All the GPIOs on J21:
GPIO8_ALS_PROX_INT = 388
GPIO9_MOTION_INT = 298
GPIO11_AP_WAKE_BT = 389
GPIO16_MDM_WAKE_AP = 481
GPIO19_AUD_RST = 398
Procedure:
- Look up GPIO name (e.g. “GPIO8_ALS_PROX_INT”) in TX2 pinmux spreadsheet.
- Note pin name (e.g. “GPIO_PI4”). Port is “I”, pin number is 4.
- Look up the port and its group in tegra186-gpio.h (e.g. “I” => 8 in main group).
If the group is “main”, offset is 320.
If the group is “aon”, offset is 256. - GPIO export value is group + (port * 8 + pin) (e.g. 320 + (8 * 8 + 4) = 388)