Enable USB_VBUS on demand iMX8M Mini

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enable USB_VBUS on demand iMX8M Mini

395 Views
dpog
Contributor IV

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 = <&reg_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";
};
Labels (1)
0 Kudos
2 Replies

372 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

What's your design for the USB2? Could you share us the schematic of this section?

0 Kudos

371 Views
dpog
Contributor IV
It's the same design I mentioned earlier in this post:
https://community.nxp.com/t5/i-MX-Processors/USB-detection-on-i-MX8MM/m-p/1584663
0 Kudos