arm64: dts: defconfig: imx8mp-somdevices: Add USB ID and USB power support.
authorJosep Orga <jorga@somdevices.com>
Tue, 7 Nov 2023 18:52:20 +0000 (19:52 +0100)
committerJosep Orga <jorga@somdevices.com>
Tue, 7 Nov 2023 18:52:20 +0000 (19:52 +0100)
Signed-off-by: Josep Orga <jorga@somdevices.com>
arch/arm64/boot/dts/freescale/imx8mp-somdevices.dtsi
arch/arm64/configs/imx8mp_somdevices_defconfig

index 1851603..1ecc402 100644 (file)
                status = "disabled";
        };
 
+       reg_usb0: regulator-usb0 {
+               compatible = "regulator-fixed";
+               regulator-name = "vbus0_regulator";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb0_vbus>;
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       reg_usb1: regulator-usb1 {
+               compatible = "regulator-fixed";
+               regulator-name = "vbus1_regulator";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb1_vbus>;
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        reg_usdhc2_vmmc: regulator-usdhc2 {
                compatible = "regulator-fixed";
                pinctrl-names = "default";
 };
 
 &usb3_phy0 {
+       vbus-supply = <&reg_usb0>;
        status = "okay";
 };
 
        adp-disable;
        usb-role-switch;
        status = "okay";
+
+       connector {
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb0_id>;
+               compatible = "gpio-usb-b-connector", "usb-b-connector";
+               type = "micro";
+               id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+       };
 };
 
 &usb3_phy1 {
-       fsl,phy-tx-preemp-amp-tune = <3>;
-       fsl,phy-tx-vref-tune = <0xb>;
+       vbus-supply = <&reg_usb1>;
        status = "okay";
 };
 
 };
 
 &usb_dwc3_1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_usb1_vbus>;
        dr_mode = "host";
        status = "okay";
 };
                >;
        };
 
+       pinctrl_usb0_id: usb0-id {
+               fsl,pins = <
+                       MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10             0x19
+               >;
+       };
+
+       pinctrl_usb0_vbus: usb0grp {
+               fsl,pins = <
+                       MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12             0x19
+               >;
+       };
+
        pinctrl_usb1_vbus: usb1grp {
                fsl,pins = <
-                       MX8MP_IOMUXC_GPIO1_IO14__USB2_PWR               0x19
+                       MX8MP_IOMUXC_GPIO1_IO14__GPIO1_IO14             0x19
                >;
        };
 
index 1a134ee..cbb540a 100644 (file)
@@ -627,7 +627,7 @@ CONFIG_SND_SOC_WSA881X=m
 CONFIG_SND_SIMPLE_CARD=y
 CONFIG_SND_AUDIO_GRAPH_CARD=y
 CONFIG_I2C_HID=m
-CONFIG_USB_CONN_GPIO=y
+CONFIG_USB_CONN_GPIO=m
 CONFIG_USB=y
 CONFIG_USB_OTG=y
 CONFIG_USB_XHCI_HCD=y