MLK-11123-27 ARM: dts: add usb support for for imx6sx-sabreauto board
authorLi Jun <jun.li@freescale.com>
Fri, 3 Jul 2015 06:11:53 +0000 (14:11 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:47:18 +0000 (14:47 -0500)
Add usb otg1 and otg2 port for imx6sx-sabreauto board, and disable all otg
features for otg1 port of imx6sx-sabreauto board, then the otg port can only
do role swtich by ID pin state.

Signed-off-by: Li Jun <jun.li@freescale.com>
arch/arm/boot/dts/imx6sx-sabreauto.dts

index 240a286..e08488a 100644 (file)
                        gpio = <&gpio2 11 GPIO_ACTIVE_HIGH>;
                        enable-active-high;
                };
+
+               reg_usb_otg1_vbus: usb_otg1_vbus {
+                       compatible = "regulator-fixed";
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb_otg1_vbus>;
+                       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";
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb_otg2_vbus>;
+                       regulator-name = "usb_otg2_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio1 12 0>;
+                       enable-active-high;
+               };
        };
 };
 
        status = "okay";
 };
 
+&usbotg1 {
+       vbus-supply = <&reg_usb_otg1_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usb_otg1_id>;
+       srp-disable;
+       hnp-disable;
+       adp-disable;
+       status = "okay";
+};
+
+&usbotg2 {
+       vbus-supply = <&reg_usb_otg2_vbus>;
+       dr_mode = "host";
+       status = "okay";
+};
+
 &usdhc3 {
        pinctrl-names = "default", "state_100mhz", "state_200mhz";
        pinctrl-0 = <&pinctrl_usdhc3>;
                        >;
                };
 
+               pinctrl_usb_otg1_vbus: usbotg1vbusgrp {
+                       fsl,pins = <
+                               MX6SX_PAD_GPIO1_IO09__GPIO1_IO_9     0x10b0
+                       >;
+               };
+
+               pinctrl_usb_otg1_id: usbotg1idgrp {
+                       fsl,pins = <
+                               MX6SX_PAD_GPIO1_IO10__ANATOP_OTG1_ID 0x17059
+                       >;
+               };
+
+               pinctrl_usb_otg2_vbus: usbotg2vbusgrp {
+                       fsl,pins = <
+                               MX6SX_PAD_GPIO1_IO12__GPIO1_IO_12    0x10b0
+                       >;
+               };
+
                pinctrl_usdhc3: usdhc3grp {
                        fsl,pins = <
                                MX6SX_PAD_SD3_CMD__USDHC3_CMD           0x17059