Is there a way to toggle the USB VBUS only on demand? My current design switches on the VBUS on Kernel-startup, but it does not turn it off when nothing is connected. The port is configured as host, the gpio1_14 corresponds to the USB2_PWR_EN-Pin. I tried to use the ID-Pin for toggling, only to have no voltage at all on the port.
reg_usb_b_vbus: regulator@2 {
compatible = "regulator-fixed";
regulator-name = "USB_B_VBUS";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
off-on-delay = <20000>;
enable-active-high;
};
&usbotg2 {
vbus-supply = <®_usb_b_vbus>;
over-current-active-low;
dr_mode = "host";
pinctrl-names = "idle", "active";
pinctrl-0 = <&pinctrl_usb2_idle>;
pinctrl-1 = <&pinctrl_usb2_active>;
status = "okay";
};