2022-09-28 08:16:41

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH v2 0/5] arm: dts: colibri-imx6: usb dual-role switching et. al.

From: Marcel Ziswiler <[email protected]>


This series is an assortment of USB dual-role specific commits as
follows:

Introduce USBC_DET GPIO based USB dual-role aka device/host switching.

Move USB VBUS supply from single carrier board to module level device
tree. This pin is as per Colibri module family standard.

Specify USBH_PEN GPIO being active-low rather than active-high
(cosmetic only).

Remove spurious debounce property from linux,extcon-usb-gpio. That
commit is actually for Colibri iMX7.

Changes in v2:
- Dropped fixes tag as this change is rather cosmetic.
- Add new commit also actually enabling CONFIG_EXTCON_USB_GPIO.

Marcel Ziswiler (4):
arm: dts: colibri-imx6: move vbus-supply to module level device tree
arm: dts: colibri-imx6: specify usbh_pen gpio being active-low
arm: dts: imx7-colibri: remove spurious debounce property
ARM: imx_v6_v7_defconfig: Enable USB GPIO extcon support

Philippe Schenker (1):
arm: dts: colibri-imx6: usb dual-role switching

arch/arm/boot/dts/imx6dl-colibri-aster.dts | 1 -
arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts | 1 -
arch/arm/boot/dts/imx6dl-colibri-iris.dts | 1 -
arch/arm/boot/dts/imx6qdl-colibri.dtsi | 22 ++++++++++++++++----
arch/arm/boot/dts/imx7-colibri.dtsi | 1 -
arch/arm/configs/imx_v6_v7_defconfig | 1 +
6 files changed, 19 insertions(+), 8 deletions(-)

--
2.36.1


2022-09-28 08:38:28

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH v2 4/5] arm: dts: imx7-colibri: remove spurious debounce property

From: Marcel Ziswiler <[email protected]>

Remove spurious debounce property from linux,extcon-usb-gpio.

Note that debouncing is hard-coded to 20 ms (USB_GPIO_DEBOUNCE_MS
define).

Signed-off-by: Marcel Ziswiler <[email protected]>

---

Changes in v2:
- Dropped fixes tag as this change is rather cosmetic.

arch/arm/boot/dts/imx7-colibri.dtsi | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi
index a8c31ee65623..840420f9a1cd 100644
--- a/arch/arm/boot/dts/imx7-colibri.dtsi
+++ b/arch/arm/boot/dts/imx7-colibri.dtsi
@@ -29,7 +29,6 @@ chosen {

extcon_usbc_det: usbc-det {
compatible = "linux,extcon-usb-gpio";
- debounce = <25>;
id-gpio = <&gpio7 14 GPIO_ACTIVE_HIGH>; /* SODIMM 137 / USBC_DET */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbc_det>;
--
2.36.1

2022-09-28 08:38:41

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH v2 1/5] arm: dts: colibri-imx6: usb dual-role switching

From: Philippe Schenker <[email protected]>

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 <[email protected]>
Signed-off-by: Marcel Ziswiler <[email protected]>
---

(no changes since v1)

arch/arm/boot/dts/imx6qdl-colibri.dtsi | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
index 023e76215064..3e98b5da0cc6 100644
--- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
@@ -24,6 +24,13 @@ backlight: backlight {
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";
@@ -670,9 +677,11 @@ &uart3 {
status = "disabled";
};

+/* Colibri USBC */
&usbotg {
disable-over-current;
- dr_mode = "peripheral";
+ dr_mode = "otg";
+ extcon = <0>, <&extcon_usbc_det>;
status = "disabled";
};

@@ -1055,7 +1064,7 @@ MX6QDL_PAD_SD4_CMD__UART3_RX_DATA 0x1b0b1

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
--
2.36.1

2022-10-24 02:07:10

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH v2 0/5] arm: dts: colibri-imx6: usb dual-role switching et. al.

On Wed, Sep 28, 2022 at 09:33:31AM +0200, Marcel Ziswiler wrote:
> From: Marcel Ziswiler <[email protected]>
>
>
> This series is an assortment of USB dual-role specific commits as
> follows:
>
> Introduce USBC_DET GPIO based USB dual-role aka device/host switching.
>
> Move USB VBUS supply from single carrier board to module level device
> tree. This pin is as per Colibri module family standard.
>
> Specify USBH_PEN GPIO being active-low rather than active-high
> (cosmetic only).
>
> Remove spurious debounce property from linux,extcon-usb-gpio. That
> commit is actually for Colibri iMX7.
>
> Changes in v2:
> - Dropped fixes tag as this change is rather cosmetic.
> - Add new commit also actually enabling CONFIG_EXTCON_USB_GPIO.
>
> Marcel Ziswiler (4):
> arm: dts: colibri-imx6: move vbus-supply to module level device tree
> arm: dts: colibri-imx6: specify usbh_pen gpio being active-low
> arm: dts: imx7-colibri: remove spurious debounce property
> ARM: imx_v6_v7_defconfig: Enable USB GPIO extcon support
>
> Philippe Schenker (1):
> arm: dts: colibri-imx6: usb dual-role switching

We idiomatically use prefix 'ARM: dts: ...' for i.MX arm DTS. Fixed
them up and applied the series.

Shawn