Is there way to dynamically enable/disable a USB port

Hi, we have a custom carrier built for config #5 and we have a USB3.0 to GbE PHY, soldered to the carrier board, which works when we physically disconnect the USB3.0 lines and have only USB2.0 connected, but since USB2.0 is too slow to host gigabit Ethernet (480MBits vs 5000MBits), then we get low performance from the GbE PHY. For our debugging purposes, and many other reasons, it would be spiffy to be able to turn on and off a particular USB port (3.0 or 2.0)… just for test purposes.

We have commands like
55. usb2-1 {
56. status = “okay”;
57. mode = “host”;
58. vbus-supply = <&vdd_usb1_5v>;
59. nvidia,oc-pin = <1>;
60. };
in our startup dtb’s, but is it possible to issue a script command on the fly, containing status = “disabled”, to accomplish this without power cycling and re-writing/compiling code?

Please note that the vbus-supply solutions probably don’t work with USB peripheral chips soldered to the board since they get their power as “always on” with no vbus control… (unless this somehow changes their respective port status?)

And so at the system level, can the status = “disabled” and status = “okay” be used after startup dynamically? Perhaps after compiling the commands in an overlay? If so what must we do to accomplish dynamically turning on and off a USB port?


Please refer to