Orin NX 16GB, problem with using gpio

Hello nvidia team,
I have questions about using gpio on Orin NX with Jetson Linux R36.2.

Is it possible using pins 229 and 227 as gpio ?

if so please give me config example

I want to use pins 206 - GPIO3_PG.06 and 207 - GPIO3_PR.04 as gpio. I configured these pins as shown on the picture.

In pinmux dtsi file these pins defined as:

soc_gpio19_pg6 {
				nvidia,pins = "soc_gpio19_pg6";
				nvidia,function = "rsvd0";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_PULL_NONE>;
				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
				nvidia,lpdr = <TEGRA_PIN_DISABLE>;
uart1_rts_pr4 {
				nvidia,pins = "uart1_rts_pr4";
				nvidia,function = "rsvd0";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_PULL_NONE>;
				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
				nvidia,lpdr = <TEGRA_PIN_DISABLE>;

I try to control these pins with following commands:

sudo gpioset --mode=time --sec=30 gpiochip0 41=1    //206
sudo gpioset --mode=time --sec=30 gpiochip0 41=0    //206

sudo gpioset --mode=time --sec=30 gpiochip0 112=1    //207
sudo gpioset --mode=time --sec=30 gpiochip0 112=0   //207

I can see correct output changes on pin 206, but pin 207 always stay in high level.
Can you help me to find solution?

If your desired function is not shown in the drop-down menu, then that means it’s not supported, so NO for your case.

It’s illegal/meaningless to set the initial state of an output GPIO pin as Int PU/PD.
Correct it as Drive 0 (low voltage by default) or Drive 1 (high voltage by default) and try again.

Thank you for your answer. I made changes in dtsi

gpio@2200000 {
		gpio-init-names = "default";
		gpio-init-0 = <&gpio_main_default>;

		gpio_main_default: default {
			gpio-input = <
				TEGRA234_MAIN_GPIO(B, 0)
				TEGRA234_MAIN_GPIO(P, 6)
				TEGRA234_MAIN_GPIO(Q, 6)
				TEGRA234_MAIN_GPIO(N, 1)
				TEGRA234_MAIN_GPIO(G, 0)
				TEGRA234_MAIN_GPIO(G, 7)
				TEGRA234_MAIN_GPIO(H, 0)
				TEGRA234_MAIN_GPIO(H, 7)
				TEGRA234_MAIN_GPIO(I, 0)
				TEGRA234_MAIN_GPIO(I, 1)
				TEGRA234_MAIN_GPIO(I, 2)
				TEGRA234_MAIN_GPIO(L, 2)
			gpio-output-low = <
				TEGRA234_MAIN_GPIO(R, 4)
				TEGRA234_MAIN_GPIO(G, 6)

It does not solve the problem. The pin207-GPIO3_PR.04 are still in high level. And I can’t control it with gpioset.

I checked GPIO3_PR.04 settings

sudo busybox devmem 0x02430098

Is it correct?

You don’t directly change anything in dtsi.
All of them have to be done via the pinmux spreadsheet.

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