Cannot get gpio-22 to recognize input

On my custom carrier, I have three IO receiving output from the SN74LVC14APWR chip (coming from an encoder)

The pins are
22
65
66

I was able to reconfigure 65 and 66 by editing the settings in my dtsi which worked.

For pin 22, this has not been the case. I modified the entry in the common section:

		dp_hpd0_pcc6 {
			nvidia,enable-input = <0x1>;
			nvidia,pins = "dp_hpd0_pcc6";
			nvidia,tristate = <0x0>;
			nvidia,function = "rsvd0";
			nvidia,pull = <0x2>;
		};

I tried both 0x0 and 0x2 for pull.

When I boot the module, and I look at the different debug info:

gpio-22 ( )

It doesn’t show sysfs. If I then go through setting it manually, I see:

gpio-22 ( |sysfs ) in lo

But applying a high voltage through the pin (which I verified with a scope) does not change the value.

Looking at the pinmux info:

Boot:
pin 22 (SPI4_CS0 PC6): (MUX UNCLAIMED) (GPIO UNCLAIMED)

After manually configuring:
pin 22 (SPI4_CS0 PC6): (MUX UNCLAIMED) tegra-gpio:22

which is interesting the name is different, shows SPI4_CSO instead of DP_HPD0 now that I disabled the DP.

So I went and found the SPI4_CS0 definition in the common section:

So I tried to change as such:

		spi4_cs0_pc6 {
			nvidia,enable-input = <0x1>;
			nvidia,pins = "spi4_cs0_pc6";
			nvidia,tristate = <0x0>;
			nvidia,function = "rsvd1";
			nvidia,pull = <0x0>;
		};

But still it won’t read. Clearly I am doing something wrong.

Any ideas of what I should do? I tried two separate boards to make sure not a module problem.

Thanks.

Okay, figured it out. I finally saw that PCC6 and PC6 are two different ports. I just happened to miss that. So, taking CC=28*8 + 6=230 and now I can read the input.

For others getting stuck here.

A=0
B=1
.
.
.
Z=25
AA=26
BB=27
CC=28

For the Jetson Nano. It’s likely different on different processors + boards.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.