Skip to main content

GPIO Usage (R5A)

The GPIO architecture and numbering schemes, the sysfs / libgpiod commands, the pin-mux inspection and the troubleshooting tables are on the GPIO page; this page lists the R5A-specific content only.

40-pin header​

The R5A 40-pin header is compatible with common Raspberry-Pi-style sensors and HATs; all logic levels are 3.3 V. The complete pin table (GPIO numbers, alternate functions and the colour legend) is on the R5A 40-PIN Pinout page.

Every pin can be used as plain GPIO while its alternate function is not enabled. Pins 11, 12, 13, 15, 22, 37 and 40 have no default peripheral function in the reference design — the safe choice for buttons, LEDs and relays. Pin 7 (SPDIF1_TX) and pin 32 (PWM2, the onboard fan) are already claimed in the stock device tree; check before using them. Enabling any other alternate function needs a device-tree change — see the interface pages (e.g. I2C (R5A)).

Safe GPIO quick table​

Header pinSignalsysfs global no.libgpiod (chip, offset)
Pin 11GPIO4_A01284, 0
Pin 12GPIO1_A7391, 7
Pin 13GPIO4_A11294, 1
Pin 15GPIO4_A21304, 2
Pin 22GPIO1_B0401, 8
Pin 37GPIO4_A71354, 7
Pin 40GPIO3_C31153, 19

For the control commands and caveats see GPIO.

  • GPIO — generic architecture, numbering, control commands and troubleshooting.
  • R5A 40-PIN Pinout — complete header table with mux details.