ARM: dts: colibri-imx6: usb dual-role switching
authorPhilippe Schenker <philippe.schenker@toradex.com>
Wed, 28 Sep 2022 07:33:32 +0000 (09:33 +0200)
committerShawn Guo <shawnguo@kernel.org>
Mon, 24 Oct 2022 01:46:16 +0000 (09:46 +0800)
Introduce USBC_DET GPIO based USB dual-role aka device/host switching.

While at it re-work pinmux comment adding SODIMM number to the USBC_DET
entry.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/boot/dts/imx6qdl-colibri.dtsi

index 023e762..3e98b5d 100644 (file)
                status = "disabled";
        };
 
+       extcon_usbc_det: usbc-det {
+               compatible = "linux,extcon-usb-gpio";
+               id-gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>; /* SODIMM 137 / USBC_DET */
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usbc_det>;
+       };
+
        gpio-keys {
                compatible = "gpio-keys";
                pinctrl-names = "default";
        status = "disabled";
 };
 
+/* Colibri USBC */
 &usbotg {
        disable-over-current;
-       dr_mode = "peripheral";
+       dr_mode = "otg";
+       extcon = <0>, <&extcon_usbc_det>;
        status = "disabled";
 };
 
 
        pinctrl_usbc_det: usbcdetgrp {
                fsl,pins = <
-                       /* USBC_DET */
+                       /* SODIMM 137 / USBC_DET */
                        MX6QDL_PAD_GPIO_17__GPIO7_IO12          0x1b0b0
                        /* USBC_DET_OVERWRITE */
                        MX6QDL_PAD_RGMII_RXC__GPIO6_IO30        0x0f058