I need to use 4 gpios for interrupt pin. But I am confusing about the name when i am trying to enable it in my driver code. Software version is R32.3.1
From Hardware design, GPIO07,GPIO11,GPIO12,GPIo13 are in use.
checking into NV_Jetson_Nano_Module_Pinmux_Config_Template.xlsm, these four gpios have below new names.
GPIO07 - GPIO3_PV.00
GPIO12 - GPIO3_PY.02
GPIO11 - GPIO3_PZ.00
GPIO13 - GPIO3_PE.06
I don’t know the means of GPIO3_PV.00/GPIO3_PY.02/GPIO3_PZ.00/GPIO3_PE.06.
So questions from software side:
- how to define these gpio in dts file. Are the blows right?
vi tegra210-porg-p3448-common.dtsi
spi@7000d400 {
spi@0 {
…
interrupts = <&gpio TEGRA_GPIO(V, 0) 1>;
…
}
spi@1 {
interrupts = <&gpio TEGRA_GPIO(Y, 2) 1>;
}
}
spi@7000d600 {
spi@0 {
interrupts = <&gpio TEGRA_GPIO(Z, 0) 1>;
}
spi@1 {
interrupts = <&gpio TEGRA_GPIO(E, 6) 1>;
}
- Refer to the output of /sys/kernel/debug/tegra_gpio, what’re the name/bank/port of these 4 gpio?
root@yisp-desktop:~# cat /sys/kernel/debug/tegra_gpio
Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
A: 0:0 64 40 40 04 00 00 000000
B: 0:1 00 00 00 00 00 00 000000
C: 0:2 00 00 00 00 00 00 000000
D: 0:3 00 00 00 00 00 00 000000
E: 1:0 00 00 00 00 00 00 000000
F: 1:1 00 00 00 00 00 00 000000
G: 1:2 00 00 00 00 00 00 000000
H: 1:3 fd 99 00 60 00 00 000000
I: 2:0 07 05 00 02 00 00 000000
J: 2:1 00 00 00 00 00 00 000000
K: 2:2 00 00 00 00 00 00 000000
L: 2:3 00 00 00 00 00 00 000000
M: 3:0 00 00 00 00 00 00 000000
N: 3:1 00 00 00 00 00 00 000000
O: 3:2 00 00 00 00 00 00 000000
P: 3:3 00 00 00 00 00 00 000000
Q: 4:0 00 00 00 00 00 00 000000
R: 4:1 00 00 00 00 00 00 000000
S: 4:2 80 80 00 00 00 00 000000
T: 4:3 01 01 00 00 00 00 000000
U: 5:0 00 00 00 00 00 00 000000
V: 5:1 02 00 00 02 00 00 000000
W: 5:2 00 00 00 00 00 00 000000
X: 5:3 78 08 08 70 00 60 606000
Y: 6:0 02 00 00 02 00 00 000000
Z: 6:1 0e 08 08 04 00 06 020600
AA: 6:2 00 00 00 00 00 00 000000
BB: 6:3 00 00 00 00 00 00 000000
CC: 7:0 12 00 00 12 00 12 121200
DD: 7:1 00 00 00 00 00 00 000000
EE: 7:2 00 00 00 00 00 00 000000
FF: 7:3 00 00 00 00 00 00 000000
3.And the info in /sys/kernel/debug/gpio made me more confused.
cat /sys/kernel/debug/gpio
gpio-7 ( )
gpio-11 ( )
gpio-12 (SPI1_MOSI )
gpio-13 (SPI1_MISO )
gpio-38 (GPIO13 )
gpio-168 (GPIO07 )
gpio-194 (GPIO12 )
gpio-200 (GPIO11 )