Orin NX 16 GB, R36.2, Issue with using pins GPIO3_PQ.05 and GPIO3_PP.06

Hello nvidia support,
I use module Orin NX 16Gb with Jetson Linux r36.2

I want to use pin 118 (GPIO3_PQ.05) as CAM0_PWDN and pin 124 (GPIO3_PP.06) as CAM1_PWDN

In my device tree I have added:

#define CAM0_PWDN	TEGRA234_MAIN_GPIO(Q, 5)
#define CAM1_PWDN	TEGRA234_MAIN_GPIO(P, 6)

Unfortunately PQ.05 stuxed in high level and PP.06 stuxed in low level.

These pins don’t change output values even when I try to access them directly via gpioset.

sudo gpioset gpiochip0 98=1
sudo gpioget gpiochip0 98
0

sudo gpioset gpiochip0 105=1
sudo gpioget gpiochip0 105
1

I tried change pins assignment with pinmux, I added:

pinmux@2430000 {
		
			soc_gpio25_pp6 {
					nvidia,pins = "soc_gpio25_pp6";
					nvidia,function = "vi0";
					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
					nvidia,tristate = <TEGRA_PIN_DISABLE>;
					nvidia,enable-input = <TEGRA_PIN_DISABLE>;
					nvidia,io-high-voltage = <TEGRA_PIN_ENABLE>;
					nvidia,lpdr = <TEGRA_PIN_DISABLE>;
				};
				
			soc_gpio32_pq5 {
				nvidia,pins = "soc_gpio32_pq5";
				nvidia,function = "vi0";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
				nvidia,io-high-voltage = <TEGRA_PIN_ENABLE>;
				nvidia,lpdr = <TEGRA_PIN_DISABLE>;
			};
		};

Unfortunately, this did not fix the issue.
Can you help me?

When you run gpioget, it will directly set the pin into input mode.

When you run gpioset xxx=1, it will only set the pin to output 1 for a moment.

Please use something like below and use gpioinfo or cat /sys/kernel/debug/gpio to check the pin state.

sudo gpioset --mode=time --sec=30 gpiochip0 98=1

Thank you for your answer. I use oscilloscope to control pins state, and I see they do not change level when I use gpioset.
Do you have any idea how can I assign these pins for CAM_PWDN ?

BTW, your pinmux is set to SFIO. That is wrong…

I used example pinmux from Pinmux and GPIO Configuration — NVIDIA Jetson Linux Developer Guide 1 documentation

Could you give me correct example for my case?

If your pin is set to gpio, then nvidia,function will be rsvd.

so I have to change nvidia,function = "vi0"; to nvidia,function = "rsvd"; Right ?

No, use your pinmux spreadsheet to generate but not directly the dts.

Please describe this step with more details. Or give me reference in guide…

For the pinmux spreadsheet file:
https://developer.nvidia.com/downloads/jetson-orin-nx-and-orin-nano-series-pinmux-config-template
For document on how you modify pinmux and flash them in the device:
Jetson AGX Orin Platform Adaptation and Bring-Up — NVIDIA Jetson Linux Developer Guide 1 documentation

thank you, it solved my issue

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