diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2022-02-10 16:24:16 +0100 |
---|---|---|
committer | Francesco Dolcini <francesco.dolcini@toradex.com> | 2022-02-25 10:46:03 +0000 |
commit | 6192ec5c77bfad55eda4fcbf2b6ea42d4781ff6a (patch) | |
tree | 82397fa93c51b18580a3a2b39b0d8b2ed5dce207 | |
parent | e709e74498b69e999d3a514f260e76d40849627c (diff) |
arm64: dts: imx8mp-verdin: fix usb device/host switching
The PCB of the hardware version V1.1 has the USB ID pin issue fixed.
Move USB_1_ID (pin 161) from USB1_ID to SD1_RESET_B. Support USB
device/host switching using the ID pin as an extcon GPIO.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rwxr-xr-x | arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi | 11 | ||||
-rwxr-xr-x | arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 11 |
2 files changed, 19 insertions, 3 deletions
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi index a8d590b17486..830ff9c8d66b 100755 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi @@ -4,6 +4,13 @@ */ / { + extcon_usb_1_id: usb_1_id { + compatible = "linux,extcon-usb-gpio"; + id-gpio = <&gpio2 10 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usb_1_id>; + }; + /* Carrier Board Supply +V1.8 */ reg_1p8v: regulator-1p8v { compatible = "regulator-fixed"; @@ -216,6 +223,10 @@ status = "okay"; }; +&usb_dwc3_0 { + extcon = <&extcon_usb_1_id>; +}; + &usb3_1 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi index eab76b85d144..edf5b19a7257 100755 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi @@ -714,12 +714,10 @@ }; &usb_dwc3_0 { -// dr_mode = "otg"; - dr_mode = "peripheral"; + dr_mode = "otg"; hnp-disable; srp-disable; adp-disable; - usb-role-switch; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb1_en>; }; @@ -1170,6 +1168,13 @@ >; }; + /* USB_1_ID */ + pinctrl_usb_1_id: usb1idgrp { + fsl,pins = < + MX8MP_IOMUXC_SD1_RESET_B__GPIO2_IO10 0x1c4 /* SODIMM 161 */ + >; + }; + pinctrl_usb2_en: usb2engrp { fsl,pins = < MX8MP_IOMUXC_GPIO1_IO14__USB2_PWR 0x184 /* SODIMM 185 */ |