summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Schenker <philippe.schenker@toradex.com>2022-11-16 11:42:19 +0100
committerPhilippe Schenker <philippe.schenker@toradex.com>2022-11-16 15:11:02 +0100
commitdacfc2adbe0c3badef52bebb5813c3c699a8ee4d (patch)
tree220924464ad91a7ae6b3b235f87bb05899bda323
parent3f2d00f899ca9483bbb20b9b5fb9ae2262c19196 (diff)
linux-toradex-mainline: Rework imx6ull usb dual-role patch
Update the patch to v2 of the series that was sent upstream which hopefully gets accepted. Do also enable the needed CONFIG_USB_CONN_GPIO Related-to: ELB-4886 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline-git/0001-ARM-dts-colibri-imx6ull-Enable-dual-role-switching.patch67
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline-git/toradex_imx_v6_v7.config1
2 files changed, 42 insertions, 26 deletions
diff --git a/recipes-kernel/linux/linux-toradex-mainline-git/0001-ARM-dts-colibri-imx6ull-Enable-dual-role-switching.patch b/recipes-kernel/linux/linux-toradex-mainline-git/0001-ARM-dts-colibri-imx6ull-Enable-dual-role-switching.patch
index 4582f07..626127a 100644
--- a/recipes-kernel/linux/linux-toradex-mainline-git/0001-ARM-dts-colibri-imx6ull-Enable-dual-role-switching.patch
+++ b/recipes-kernel/linux/linux-toradex-mainline-git/0001-ARM-dts-colibri-imx6ull-Enable-dual-role-switching.patch
@@ -1,50 +1,65 @@
-From 35f50699d4d17dbd3b116ea4d3c9f349567d3805 Mon Sep 17 00:00:00 2001
+From eb5259acd986ec6862bf709f551da187057471ae Mon Sep 17 00:00:00 2001
From: Philippe Schenker <philippe.schenker@toradex.com>
-Date: Wed, 19 Oct 2022 17:59:13 +0200
-Subject: [PATCH 1/2] ARM: dts: colibri-imx6ull: Enable dual-role switching
+Date: Mon, 14 Nov 2022 16:04:47 +0100
+Subject: [PATCH] ARM: dts: colibri-imx6ull: Enable dual-role switching
The Colibri standard provides a GPIO called USBC_DET to switch from
-USB Host to USB Device and back. The Colibri iMX6ULL does have the SoC
-ball USB_OTG1_VBUS connected in series with a capacitor to ground.
-
-This means that we need to provide to the extcon framework VBUS and ID
-events using the single GPIO we have. The Extcon USB GPIO driver does
-use id-gpio also for VBUS event, as in our case where vbus-gpio is
-absent.
-
-Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20221102155226.51587-1-dev@pschenker.ch]
+USB Host to USB Device and back. Make use of this GPIO by adding it
+with usb-connector framework.
+Upstream-Status: Submitted [https://lore.kernel.org/all/20221115180554.73696-1-dev@pschenker.ch/]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
---
- arch/arm/boot/dts/imx6ull-colibri.dtsi | 8 ++++++++
- 1 file changed, 8 insertions(+)
+ arch/arm/boot/dts/imx6ull-colibri.dtsi | 29 ++++++++++++++++++++++++++
+ 1 file changed, 29 insertions(+)
diff --git a/arch/arm/boot/dts/imx6ull-colibri.dtsi b/arch/arm/boot/dts/imx6ull-colibri.dtsi
-index 577a424b0e1d..feb1fcd9a684 100644
+index a4429ba1f2ae..336ab2e0534c 100644
--- a/arch/arm/boot/dts/imx6ull-colibri.dtsi
+++ b/arch/arm/boot/dts/imx6ull-colibri.dtsi
-@@ -24,6 +24,13 @@ backlight: backlight {
- status = "okay";
+@@ -24,6 +24,28 @@ backlight: backlight {
+ status = "disabled";
};
-+ extcon_usbc_det: usbc-det {
-+ compatible = "linux,extcon-usb-gpio";
-+ id-gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>; /* SODIMM 137 / USBC_DET */
++ connector {
++ compatible = "gpio-usb-b-connector", "usb-b-connector";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_snvs_usbc_det>;
++ id-gpios = <&gpio5 2 GPIO_ACTIVE_HIGH>; /* SODIMM 137 / USBC_DET */
++ label = "USBC";
++ self-powered;
++ type = "micro";
++
++ ports {
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ port@0 {
++ reg = <0>;
++ usb_dr_connector: endpoint {
++ remote-endpoint = <&usb1_drd_sw>;
++ };
++ };
++ };
+ };
+
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
-@@ -275,6 +282,7 @@ &uart5 {
- /* Colibri USBC */
- &usbotg1 {
- dr_mode = "otg";
-+ extcon = <&extcon_usbc_det>, <&extcon_usbc_det>;
+@@ -280,6 +302,13 @@ &usbotg1 {
srp-disable;
hnp-disable;
adp-disable;
++ usb-role-switch;
++
++ port {
++ usb1_drd_sw: endpoint {
++ remote-endpoint = <&usb_dr_connector>;
++ };
++ };
+ };
+
+ /* Colibri USBH */
--
-2.38.0
+2.38.1
diff --git a/recipes-kernel/linux/linux-toradex-mainline-git/toradex_imx_v6_v7.config b/recipes-kernel/linux/linux-toradex-mainline-git/toradex_imx_v6_v7.config
index 07eecf6..c7a40bc 100644
--- a/recipes-kernel/linux/linux-toradex-mainline-git/toradex_imx_v6_v7.config
+++ b/recipes-kernel/linux/linux-toradex-mainline-git/toradex_imx_v6_v7.config
@@ -10,6 +10,7 @@ CONFIG_KERNEL_LZ4=y
# USB OTG Role Switch
CONFIG_EXTCON_USB_GPIO=y
+CONFIG_USB_CONN_GPIO=y
# Usefull for debugging
CONFIG_DYNAMIC_DEBUG=y