diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2015-09-24 11:21:18 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2015-12-26 14:48:14 +0100 |
commit | 2281809ab6b442b4f1671fe2189a2ec7585b74fa (patch) | |
tree | 6a4993dedeca08d0dcf2807096fe931e02039506 | |
parent | 692d3279b3705a821c362cb4e3da3895f00c703f (diff) |
ARM: dts: imx6dl-colibri: usb device/host switch using extcon gpio
Use USBC_DET feature of Standard Colibri SODIMM pin 137 for USB
device/host switching using the generic extcon USB GPIO implementation.
-rw-r--r-- | arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts | 12 | ||||
-rw-r--r-- | arch/arm/boot/dts/imx6qdl-colibri.dtsi | 7 |
2 files changed, 15 insertions, 4 deletions
diff --git a/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts b/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts index 8ef1d67ccca9..9d4dd5180482 100644 --- a/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts +++ b/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts @@ -41,6 +41,14 @@ mmc1 = &usdhc1; /* MMC 4bit slot */ }; + extcon_usbc_det: usbc_det { + compatible = "linux,extcon-usb-gpio"; + debounce = <25>; + id-gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbc_det_1>; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; @@ -166,8 +174,7 @@ &pinctrl_weim_gpio_5 &pinctrl_csi_gpio_1 &pinctrl_gpio_1 - &pinctrl_usbh_oc_1 &pinctrl_usbc_id_1 - &pinctrl_usbc_det_1>; + &pinctrl_usbh_oc_1 &pinctrl_usbc_id_1>; }; &lcd { @@ -223,6 +230,7 @@ &usbotg { status = "okay"; + extcon = <&extcon_usbc_det>; }; /* MMC */ diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi index 03806e896c5f..2a44aa6fb4bf 100644 --- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi +++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi @@ -573,6 +573,10 @@ fsl,pins = < /* USBC_DET */ MX6QDL_PAD_GPIO_17__GPIO7_IO12 PAD_CTRL_HYS_PU + /* USBC_DET_EN */ + MX6QDL_PAD_RGMII_TX_CTL__GPIO6_IO26 PAD_CTRL_PU_22k + /* USBC_DET_OVERWRITE */ + MX6QDL_PAD_RGMII_RXC__GPIO6_IO30 PAD_CTRL_PU_22k >; }; pinctrl_usdhc3: usdhc3grp { @@ -946,8 +950,7 @@ pinctrl-names = "default"; // pinctrl-0 = <&pinctrl_usbotg_2>; disable-over-current; -// dr_mode = "host"; //working when connected at boot - dr_mode = "otg"; //working as peripheral + dr_mode = "otg"; status = "disabled"; }; |