ENGR00305549 ARM: imx6sx-sdb: enable USB function
authorPeter Chen <peter.chen@freescale.com>
Thu, 27 Mar 2014 07:23:02 +0000 (15:23 +0800)
committerNitin Garg <nitin.garg@freescale.com>
Wed, 16 Apr 2014 13:58:08 +0000 (08:58 -0500)
usbotg1 is for dual-role function, usbotg2 is dedicated
to host function.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
arch/arm/boot/dts/imx6sx-sdb.dts

index 4e83f02d842fb7638bb0b5aba3648d2125d7c2a4..9d8802e04cff2645029f64fd0cc328f1cf69f296 100644 (file)
                        regulator-max-microvolt = <5000000>;
                        regulator-boot-on;
                };
+
+               reg_usb_otg1_vbus: usb_otg1_vbus {
+                       compatible = "regulator-fixed";
+                       regulator-name = "usb_otg1_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio1 9 0>;
+                       enable-active-high;
+               };
+
+               reg_usb_otg2_vbus: usb_otg2_vbus {
+                       compatible = "regulator-fixed";
+                       regulator-name = "usb_otg2_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio1 12 0>;
+                       enable-active-high;
+               };
+
        };
 
        sound {
        status = "okay";
 };
 
+&usbotg1 {
+       vbus-supply = <&reg_usb_otg1_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg1_1>;
+       status = "okay";
+};
+
+&usbotg2 {
+       vbus-supply = <&reg_usb_otg2_vbus>;
+       dr_mode = "host";
+       status = "okay";
+};
+
 &usdhc2 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_usdhc2_1>;