GPIO can not keep high when resuming

Jetson Linux 36.4 + Orin Nano
I set pins (SPI1_SCK,SPI1_MISO)on GPIO mode and high voltage, they can keep high during suspend, but when resuming , they have low pulse for 100ms like the following.
Could you help me to avoid this 100ms low pulse ?

Hi 627263202,

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

How did you perform this?

Have you tried to configure the pin as GPIO/Output/Drive 1 in pinmux spreadsheet to check if it could help?

I am using custom board
Yes ,I had configured in pinmux spreadsheet , and sync the following code to pinmux dtsi
spi3_sck_py0 {
nvidia,pins = “spi3_sck_py0”;
nvidia,function = “rsvd1”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};

spi3_miso_py1 {
nvidia,pins = “spi3_miso_py1”;
nvidia,function = “rsvd1”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};

Could anyone give an advice?

You should also update gpio dtsi to configure the default pin state.

Yes, I did update gpio dtsi as bellow:
gpio@2200000 {
gpio-init-names = “default”;
gpio-init-0 = <&gpio_main_default>;

gpio_main_default: default {
gpio-output-high = <
TEGRA234_MAIN_GPIO(Q, 3)
TEGRA234_MAIN_GPIO(Y, 0)
TEGRA234_MAIN_GPIO(Y, 1)

image
Could you configure them as above in pinmux spreadsheet and generate pinmux/gpio dtsi to check if the configurations are exact the same as yours?



image
I configure pinmux xls and generate pinmux/gpio dtsi again, the configurations are the same as mine.

Have you also used a scope to check if the default state for these 2 pins is high after boot up?

Have you also used a scope to check if the default state for these 2 pins is high after boot up?
Yes, these 2 pins is high after boot up.

I did the same test on dev kit
Pin 13 (SPI1_SCK) could keep high during resuming.



I removed “Level Shifter” and tested Pin SPI1_SCK on the CPU side , the Pin SPI1_SCK got 600ms low pulse

It seems these 2 pin would be in high impedance state during resuming. But the level shifter keep these 2 pin high.
Could Nvidia release a patch to fix this issue?

Isn’t it the expected result for your use case?
Why you need to remove the level shift?

The dev kit board with level shifter is OK, But the customer board does not have level shifter , It would cause low pulse.

On dev kit board, These 2 PINs would not keep low voltage during resuming.
#gpioset --mode=signal gpiofind "PY.01"=0
sudo systemctl suspend
Short PWR BTN and ground PINs to resume
The below PIC shows the voltage of PIN22/40(SPI1_MISO) can not keep low voltage during resuming

How about if you’ve configured this pin as Input/PD in pinmux spreadsheet?

Do you suggest me to set this pin as input/PD ?
But what I need is setting this PIN as output. and expect ORIN NX keeps this PIN during suspend & resume .
I set this pin correctly
It would be high voltage by " gpioset --mode=signal gpiofind "PY.01" =1" command
and be low voltage by " gpioset --mode=signal gpiofind "PY.01" =0" command

Oh, sorry, I was think it is MISO pin so that I said it Input.
If you want to use it as GPIO Output mode and also keep it low after resume, please configure it as Output/Drive 0 in pinmux spreadsheet.

Could you also try using mode wait as following instead of signal?

# gpioset --mode=wait gpiofind "PY.01" =1
# gpioset --mode=wait gpiofind "PY.01" =0

What I expect is not low or high after resumeing. What I expect is the PIN voltage is the same as before suspending.
For example:
I set the PIN to high voltage , do suspend and resume, the PIN should be in high voltage.
I set the PIN to low voltage , do suspend and resume, the PIN should be in low voltage.

Sorry that it seems you can only achieve either of them according to your use case.
When the Orin wakes up from SC7, it loads from MB1/MB2 where it would configure the pinmux for its state.
You can refer to the full serial console log during resume.

Please check if you are using AON GPIO. Only AON GPIO would keep the state during and after SC7 resume.

1 Like