USB power does not turn off when jetson nano is turned off

Hi, I am using the button headers to turn my jetson on and off. I have shorted pins 7&8 and using a button over pins 1&2. The nano powers on as expected, but when powered off, the USB power does not turn off.

I have verified that the jetson nano itself turns off and the GPIO pins are turned off as well. But my peripherals (like an Arduino) remain on till I physically remove the micro USB power plug.

Is there a fix to this?

This is how the USB standard works. USB has certain power delivery requirements, and any device exceeding this rating in power consumption will fail. When fully booted the max output must be supplied by a compliant host.

The part which is not obvious is that when a host shuts down, that some “much smaller” power must be available…full voltage, but greatly reduced current ability. When a computer sleeps or goes into a low power mode one would typically still be able to “wake” the computer with a mouse movement or a keyboard key press. This is the minimal power delivery purpose, and thus the port is working as it should (changing this is a “customization”, not a “fix”).

There is a thread about achieving what you want to do which you might be interested in:
https://forums.developer.nvidia.com/t/howto-disable-enable-usb-p-orts-on-nx-programmatically/146125/4
(the NX is very similar to the Nano, but would likely require some changes)

Trivia: PCI also does this. Take a look at “wake on LAN” (“WOL”).

1 Like

for modes sleep/off/active reference : https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3231/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fpower_management_nano.html%23

Chipset Power States

The supported power states are listed in order of increasing flexibility or configurability:

•Off: There is only one way for a system to be off.

•Deep Sleep (SC7) offers a small amount of configurability. For example, prior to entering Deep Sleep, software can select which of the many hardware wake events can wake the chip from Deep Sleep.

•Active state is extraordinarily flexible in terms of power and performance. It encompasses activity levels from low power audio playback through peak performance. Power consumption in Active state can range from tens of milliwatts to several watts.

Supported Power States

The supported power states are:

Power State Functionality Characteristics
Off Power rails None of the power rails supplying the SoC and DRAM are powered.
State No state is maintained in the SoC or DRAM.
Exiting Into Active state via cold boot.
Deep Sleep (SC7) Power rails VDD_RTC, VDDIO_DDR, VDDIO_SYS, and DRAM power rails are powered on. VDD_CORE and VDD_CPU are powered off.
State The SoC maintains a small amount of state information in the PMC block. DRAM maintains state.
Exiting Into Active state via a pre-defined set of wake events.
Active Power rails VDD_RTC, VDDIO_DDR, VDDIO_SYS, VDD_CORE, and DRAM rails are powered on. Other power rails, including VDD_CPU and VDD_GPU, may be powered on.
State Software actively manages the power states of the devices that make up the SoC.
Exiting Software can initiate a transition from Active to any other power state.

Power State Mapping to Linux

BSP maps hardware power states to Linux power states as follows.

Chipset Power State Linux Power State Comments
Off Off
Deep Sleep (SC7) Suspend Software can choose whether to enter Deep Sleep before the OS enters Suspend.
Active Running/Idle (display on or off) Many SoC devices may be idle or disabled under driver control. For example, VDD_GPU may be powered off and the companion GPU may be power-gated.

for shutting down/powering up usb ports on nano: it was only possible to manually trigger state of USB from running os on models before B01 using https://elinux.org/Jetson/L4T/r32.3.x_patches

2 Likes

Thanks @linuxdev, the link looks promising. I’ll try and update this post if that works. :D