This is a cache of https://discuss.96boards.org/t/configure-pmic-dragonboard/2844. It is a snapshot of the page at 2024-09-27T06:38:30.461+0000.
Configure pmic <strong>dragonboard</strong> - <strong>dragonboard</strong>410c - 96Boards Forum

Configure pmic dragonboard

I need to power recycle the USB devices connected to the usb ports of dragonboard. Can I control the gpio3(usb_hub_reset_N_pm) which is the output of PMIC(N11 pin) so, i can reset/power cycle the connected usb devices programatically through some application.

I think this GPIO is requested by the driver and not exported to user-space.

This is overkill but a solution could be to unbind/bind the root hub to its driver:
$ echo 78d9000.ehci > /sys/bus/platform/drivers/msm_hsusb_host/unbind
$ echo 78d9000.ehci > /sys/bus/platform/drivers/msm_hsusb_host/bind

you should then see a re-enumeration of your USB device (if any).

Thanks @Loic, Thanks for your suggestion.
My application is streaming the data from USB camera. During testing I noticed that the device is abruptly getting disconnected and reconnected (without any physical disruption). Sometimes after reconnection the device is not re-enumerated. It happens only once a while.
I have tried this but in case of error (as mentioned above) the device is not re-enumerated. The camera will be functional only after the physical USB disconnection and re-connection.
Is there some way by which I can power recycle the USB port.

Does this command
$ echo 78d9000.ehci > /sys/bus/platform/drivers/msm_hsusb_host/unbind
$ echo 78d9000.ehci > /sys/bus/platform/drivers/msm_hsusb_host/bind
actually triggers the gpio3(usb_hub_reset_N_pm) signal.