SYSFS GPIO Number For GPIO10-11-12-13

Hi,

I searched the web but i couldnt find much information about this. I use a custom board and it has only 4 GPIO pins, GPIO10-11-12-13.

I found gpio389 for GPIO13 but i am not sure if its true. Because i couldnt get the expected response from my device which is connected to GPIO13. These are the commands i use to listen GPIO13:

echo 389 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio389/direction
while true; do cat /sys/class/gpio/gpio389/value; done

What is the sysfs gpio number for GPIO10, GPIO11, GPIO12 and GPIO13?

Thanks in advance.

hello r1ch13r1ch,

you should share more details, for example, please share the name of the gpio pin.
please refer to Tegra Linux Driver Package TX2 Adaptation Guide-> [GPIO Changes] chapter
here’s mapping formula of the GPIO numbers. thanks

Hi JerryChang,

Thank you for your help. Now i can get signal from my device.

I have 4 GPIO pins on my custom board. I can get to work my GPIO device with two of them:

  1. SOM: GPIO11/AP_WAKE_BT
  2. GPIO (CVB_BT_EN) - GPIO12_BT_EN

Other two are not working properly. Their value is 1 when GPIO device is not connected. If i connect device they start to change between 0-1 fast and randomly(value 1 is more frequent). Expected signal is constant 1 or constant 0 on a period. Those pins are:

  1. GPIO (CVB_WIFI_WAKE_AP) - GPIO10_WIFI_WAKE_AP
  2. GPIO (CVB_BT_WAKE_AP) - GPIO13_BT_WAKE_AP

What should i do to make them recieve signal properly?

hi r1ch13r1ch,

please refer to TX2 Configuring Pinmux GPIO and PAD for the steps to configure GPIOs,
thanks

Thank you.

ERROR: pin sdmmc4_clk(0x00002460) field nvidia,pull(0x0000000c) is not matching, val = 0x00 expected = 0x01
ERROR: pin uart5_rx_px5(0x00000412) field nvidia,tristate(0x00000010) is not matching, val = 0x01 expected = 0x00
ERROR: pin gp_pwm6_pl6(0x00000410) field nvidia,tristate(0x00000010) is not matching, val = 0x01 expected = 0x00
ERROR: pin gp_pwm7_pl7(0x00000410) field nvidia,tristate(0x00000010) is not matching, val = 0x01 expected = 0x00

I’ve faced these errors but i simply changed the values as desired by script.