PX4 supports D (old) and S (new) FrSky telemetry. FMUv4 based boards (Pixracer) include the required electronics for the interface, older boards (Pixhawk) need a UART to S.PORT adapter board.
FrSky telemetry auto-starts on Pixracer and detects D or S mode, there is no need to configure anything.
For receivers with D-port (D4R-II and similar): Connect the Pixracer FrSky TX line to the D4R-II RX line. Also connect GND.
For receivers with S-port: Connect the Pixracer FrSky TX and RX lines together (solder the wires together) to the X series receiver's S.port pin. Also connect GND.
Ready-made cables (which include the required adapters) are available from:
Craft and Theory. Versions are available with DF-13 compatible PicoBlade connectors (for FMUv2/3DR Pixhawk, FMUv2/HKPilot32) and JST-GH connectors (for FMUv3/Pixhawk 2 "The Cube" and FMUv4/PixRacer v1).
UART to S.PORT adapters can be sourced from: