Hi,
I am trying to power off USB port on my i.MX6ULL with 4.14.78 BSP and there is an instruction on the reference manual:
4.9.8 How to Close the USB Child Device Power
The following code string outlines how to close the USB child device power:
echo auto > /sys/bus/usb/devices/1-1/power/control
echo auto > /sys/bus/usb/devices/1-1.1/power/control (If there is a hub at USB device)
But it seems not working like that:
echo auto > /sys/bus/usb/devices/1-1/power/control // -> nothing happened
echo auto > /sys/bus/usb/devices/usb1/power/control // -> device detached, but VBUS 5V is still ON
Even if I enter deep sleep mode (echo mem > /sys/power/state), VBUS 5V is still ON.
Is there any setting or configuration to change this behavior? I don't want to get USB devices to be charged from USB port after entering deep sleep mode.
Thanks,
-Engin
Actually USB is powered even in deep sleep mode.
Please try to turn off USB power with the command like this:
# echo suspend > /sys/bus/usb/devices/usb1/power/control
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
But I got an error...
# echo suspend > /sys/bus/usb/devices/usb1/power/control
sh: write error: Invalid argument
# echo suspend > /sys/bus/usb/devices/usb2/power/control
sh: write error: Invalid argument