arm64: dts: imx8mm-somdevices.dtsi: Set proper configuration to usb1 (otg) and add...
authorJosep Orga <jorga@somdevices.com>
Fri, 13 Aug 2021 10:22:06 +0000 (12:22 +0200)
committerJosep Orga <jorga@somdevices.com>
Fri, 13 Aug 2021 10:22:06 +0000 (12:22 +0200)
Signed-off-by: Josep Orga <jorga@somdevices.com>
arch/arm64/boot/dts/freescale/imx8mm-somdevices.dtsi

index 2aa4527..66fa8c9 100644 (file)
                enable-active-high;
        };
 
+       reg_usb1: regulator-usb1 {
+               compatible = "regulator-fixed";
+               regulator-name = "vbus1_regulator";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       reg_usb2: regulator-usb2 {
+               compatible = "regulator-fixed";
+               regulator-name = "vbus2_regulator";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        bt_sco_codec: bt_sco_codec {
                #sound-dai-cells = <1>;
                compatible = "linux,bt-sco";
 
 &usbotg1 {
        dr_mode = "otg";
-       hnp-disable;
-       srp-disable;
-       adp-disable;
-       usb-role-switch;
-       disable-over-current;
-       samsung,picophy-pre-emp-curr-control = <3>;
-       samsung,picophy-dc-vol-level-adjust = <7>;
+       over-current-active-low;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg1>;
+       vbus-supply = <&reg_usb1>;
+       status = "okay";
+};
+
+&usbotg2 {
+       dr_mode = "host";
+       over-current-active-low;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg2>;
+       vbus-supply = <&reg_usb2>;
        status = "okay";
 };
 
                >;
        };
 
+       pinctrl_usbotg1: usbotg1grp {
+               fsl,pins = <
+                       MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12              0x16
+                       MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC             0x156
+               >;
+       };
+
+       pinctrl_usbotg2: usbotg2grp {
+               fsl,pins = <
+                       MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3               0x16
+                       MX8MM_IOMUXC_GPIO1_IO15_USB2_OTG_OC             0x156
+               >;
+       };
+
        pinctrl_usdhc1_gpio: usdhc1grpgpio {
                fsl,pins = <
                        MX8MM_IOMUXC_SD1_RESET_B_GPIO2_IO10     0x41