[JP36.3] AGX Orin Industrial unable to control GPIO pins

I’m unable to change GPIO pins to output or input. For example GPIO09 is permanently in a high output state, and there no way to change it using:

gpioset --mode=wait 1 8=0

I tried adding and removing pins from MB1 GPIO and pinmux , but still I’m not able to change it state. I was using gpioset, gpioinfo and Jeston GPIO, but it was not able to change properties of this pin. What’s necessary to use these pins as normal GPIO, considering other GPIO pins are working correctly?

IO Input/Output Pin Connector Ball name GPIO Function GPIO name Working
1 Input K49 GPIO25 SOC_GPIO36 GPIO3_PM.05 RSVD1 soc_gpio36_pm5 Yes
1 Output J55 GPIO32 SOC_GPIO25 GPIO3_PP.06 VI0 soc_gpio25_pp6 No
2 Input J51 GPIO24 DP_AUX_CH3_HPD GPIO3_PM.03 RSVD1 dp_aux_ch3_hpd_pm3 No
2 Output C61 GPIO09 CAN1_STB GPIO3_PBB.00 RSVD0 can1_stb_pbb0 No
3 Input H51 GPIO26 SOC_GPIO53 GPIO3_PM.06 RSVD1 soc_gpio53_pm6 No
3 Output A59 GPIO05 DAP6_DOUT GPIO3_PA.01 RSVD1 dap6_dout_pa1 Yes

Hello m.krawczuk

You can try to set the output to high changing the device tree:

        // Set the default value
		gpio_aon: gpio@c2f0000 {
....
			gpio-ranges = <&pinmux_aon 0 0 32>;

			aon-output-high {
				gpio-hog;
				output-high;
				gpios = <TEGRA234_AON_GPIO(BB, 0) 0>;
				label = "aon-out";
			};


. . .
        // Set here the pinmux configuration
		pinmux_aon: pinmux@c300000 {
. . .
			pinctrl-0 = <&jetson_io_pinmux_aon>;
			jetson_io_pinmux_aon: exp-header-pinmux {
				can1_stb_pbb0 {
					nvidia,pins = "can1_stb_pbb0";
					nvidia,function = "rsvd1";
					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
					nvidia,tristate = <TEGRA_PIN_DISABLE>;
					nvidia,enable-input = <TEGRA_PIN_DISABLE>;
				};

You can confirm the change here:

nvidia@tegra-ubuntu:~/gpio$ sudo cat /sys/kernel/debug/gpio  | grep -e PBB.00
 gpio-324 (PBB.00              |aon-output-high     ) out hi 

Manuel Leiva
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com
Website: www.ridgerun.com

My problem with this pin that is it is permanently set in output high so I can’t switch between low and high to control DIODE or anything else. With you suggestion I get state high and I can’t switch to low, because I got message like this:

gpioinfo|grep "PBB.00"
        line   8:     "PBB.00" "aon-output-high" output active-high [used]

gpioset --mode=wait 1 8=0
gpioset: error setting the GPIO line values: Device or resource busy

m.krawczuk

Remove only this node

			aon-output-high {
				gpio-hog;
				output-high;
				gpios = <TEGRA234_AON_GPIO(BB, 0) 0>;
				label = "aon-out";
			};

Then, you should be able to control the GPIO.

Manuel Leiva
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com
Website: www.ridgerun.com

It is still in output high mode. I’m able to change it state in Jetpack 5.1.3 without any issue, but with Jetpack 6.0 I’m no longer able to do anything.