Issues Driving GPIO02 as an Output

I’m trying to use GPIO3_PP.06 (GPIO02) as outputs. Trying to drive it high with gpioset seems to have no effect when I probing it. My device trees looks like the following:

	gpio@2200000 {
		gpio-init-names = "default";
		gpio-init-0 = <&gpio_main_default>;
                ...
			gpio-output-high = <
				TEGRA234_MAIN_GPIO(P, 0)
				TEGRA234_MAIN_GPIO(P, 6)
				TEGRA234_MAIN_GPIO(Q, 3)
				TEGRA234_MAIN_GPIO(I, 2)
				TEGRA234_MAIN_GPIO(A, 0)
				TEGRA234_MAIN_GPIO(A, 4)
				TEGRA234_MAIN_GPIO(A, 5)
				TEGRA234_MAIN_GPIO(A, 6)
				TEGRA234_MAIN_GPIO(A, 7)
				>;
		};
	};
			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>;
			};

I’m using the following command to try and drive the pin:

sudo gpioset 0 98=1

Hi Eric1975,

Are you using Jetson Nano or Orin Nano?
TEGRA234 is for Orin series rather than Jetson Nano(T210).
Is it on the devkit or custom board?

What’s the Jetpack version in use?

It seems you didn’t configure it as GPIO in pinmux.

Please share how you configure this PIN in pinmux spreadsheet.

Hi,

I apologize for the confusion, I am using the Jetson Orin Nano. I’m using a custom board. I am using a custom build of Jetson Linux 36.3. I’ve attached a screenshot of my Pinmux config.

Thanks

I’ve moved your topic to the correct category for Jetson Orin Nano.

Okay, it seems the expected result to me.

Please use this pinmux spreadsheet to generate pinmux/gpio dtsi and replace them in BSP package.

Hi,

The device pinmux/gpio dtsi was generated using the spreadsheet config I showed above. Can you confirm the dtsi looks ok? I’m still struggling to driver this pin with the configuration showed above. Even when I tried removing the circuit connected to that pin and tried driving the pin directly from the Orin it would not change.

The strange thing is we are able to drive non GPIO labeled pins high and low like I2S0_FS without issue.

Please try running the following command to control this pin. (PP.06)

$ sudo su
# gpioset --mode=wait `gpiofind "PP.06"`=0
# gpioset --mode=wait `gpiofind "PP.06"`=1
1 Like

Hi,

We are also having issues driving GPIO02.

We have set GPIO02 as output in the dtsi like the original poster after using the excel files, gpio file is updated. soc_gpio25_pp6 is configured exactly the same like the original post.

Querying by gpioinfo command also shows pin is configured as output.

Using gpioset also works.

Our only issue is that high voltage is coming as 0.4 volts and low as 0 volts, is this the expected output or is there some issue with my module? I tried using replacement module but in that GPIO02 is not giving output change at all on gpioset command (do we need to use the same module during flashing of ssd as well?).

Can you give some guides to troubleshoot this please?

We are using Jetpack 6.0. There is no load connected to GPIO02 for testing (we are testing on our own custom board)

Hi @nsaqib1,

Are you using the devkit or custom board for Orin Nano?

Do you mean the following GPIO?


If so, please share the result of the following command on your board.

$ sudo busybox devmem 0x02430030

Hi @KevinFFF,

Sorry I wasn’t able to reply yesterday, we were busy in other tasks.

Yes it is this GPIO. We were eventually able to get this GPIO working.

We changed the following setting from this:

nvidia,io-high-voltage = <TEGRA_PIN_ENABLE>;

to this:

nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;

It is now outputting 1.8V on high and 0V on low. This is sufficient for our needs as target device is 1.8V compliant.

Right now when GPIO is in output mode with high voltage support disabled command

sudo busybox devmem 0x02430030

is showing:

0x00000000

A few related questions:

  1. Is high-voltage mode only for input mode for this pin? I am asking because the excel file didn’t show any warning when I set pin as output and 3.3V tolerant.
  2. If we want high voltage mode for output do we need to add pull-up to 3.3V? Because something like this isn’t mentioned in the documents (or maybe I missed them).

Best Regards,

How did you configure this pin in pinmux spreadsheet?
nvidia,io-high-voltage should be TEGRA_PIN_DISABLE if you configure it as Output/Drive 0 or Output/Drive 1.
Output would be only valid when you configure its state with Drive 0 or Drive 1.

If it is configured as output, then you can control it manally w/o adding the pull-up resistor.

I configured the excel sheet exactly like the original poster.

Pin was configured as Output
Pin was at Drive 1
3.3V Tolerance was enabled.

There was no warning in excel file that pin cannot be 3.3V Tolerant in output mode. Otherwise cell color also changes to yellow if there is a problem.

nvidia,io-high-voltage was not TEGRA_PIN_DISABLE in the generated dtsi also.

With generated dtsi I was not able to drive pin high to either 1.8V or 3.3V. In one module it was giving 0.4V, in another it wasn’t working at all.

After nvidia,io-high-voltage was set to TEGRA_PIN_DISABLE manually in dtsi, only then was I able to drive pin high to 1.8V.

Pin will only be able to drive 1.8V in any case right? I am assuming the module cannot drive this pin to 3.3V when in output mode.

Will pin be 3.3V tolerant in output mode? I’m asking so that we can add external pull-up in applications that need 3.3V.

3.3V tolerance is only used as open drain. An external pull-up is necessary for the GPIO pin if its “3.3v tolerance” is enable.

image

1 Like

Thank you.

Well noted the confirmation for 3.3V design.

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