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.
Marcel Ziswiler (3):
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
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 -
5 files changed, 18 insertions(+), 8 deletions(-)
--
2.36.1
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]>
---
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
From: Marcel Ziswiler <[email protected]>
Specify USBH_PEN GPIO being active-low rather than active-high.
Note that this should not have any functional impact as for fixed
regulators the regular GPIO polarity is ignored and a true active-high
enable GPIO would need an additional enable-active-high property which
is/was not the case here. However, this may be rather confusing which
this patch fixes.
Signed-off-by: Marcel Ziswiler <[email protected]>
---
arch/arm/boot/dts/imx6qdl-colibri.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
index 21c5049bda4e..d8f985f297e4 100644
--- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
@@ -112,7 +112,7 @@ reg_module_3v3_audio: regulator-module-3v3-audio {
reg_usb_host_vbus: regulator-usb-host-vbus {
compatible = "regulator-fixed";
- gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>; /* SODIMM 129 / USBH_PEN */
+ gpio = <&gpio3 31 GPIO_ACTIVE_LOW>; /* SODIMM 129 / USBH_PEN */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_regulator_usbh_pwr>;
regulator-max-microvolt = <5000000>;
--
2.36.1
From: Marcel Ziswiler <[email protected]>
Move USB VBUS supply from single carrier board to module level device
tree. This pin is as per Colibri module family standard.
Signed-off-by: Marcel Ziswiler <[email protected]>
---
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 | 9 +++++++--
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boot/dts/imx6dl-colibri-aster.dts b/arch/arm/boot/dts/imx6dl-colibri-aster.dts
index 74e8a6cd8bed..a28e083f29d5 100644
--- a/arch/arm/boot/dts/imx6dl-colibri-aster.dts
+++ b/arch/arm/boot/dts/imx6dl-colibri-aster.dts
@@ -99,7 +99,6 @@ &uart3 {
};
&usbh1 {
- vbus-supply = <®_usb_host_vbus>;
status = "okay";
};
diff --git a/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts b/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
index 7272edd85a49..a02981d4a3fc 100644
--- a/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
+++ b/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
@@ -111,7 +111,6 @@ &uart3 {
};
&usbh1 {
- vbus-supply = <®_usb_host_vbus>;
status = "okay";
};
diff --git a/arch/arm/boot/dts/imx6dl-colibri-iris.dts b/arch/arm/boot/dts/imx6dl-colibri-iris.dts
index cf77d894f6d7..c5797ff35b71 100644
--- a/arch/arm/boot/dts/imx6dl-colibri-iris.dts
+++ b/arch/arm/boot/dts/imx6dl-colibri-iris.dts
@@ -138,7 +138,6 @@ &uart3 {
};
&usbh1 {
- vbus-supply = <®_usb_host_vbus>;
status = "okay";
};
diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
index 3e98b5da0cc6..21c5049bda4e 100644
--- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
@@ -112,7 +112,7 @@ reg_module_3v3_audio: regulator-module-3v3-audio {
reg_usb_host_vbus: regulator-usb-host-vbus {
compatible = "regulator-fixed";
- gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>; /* USBH_PEN */
+ gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>; /* SODIMM 129 / USBH_PEN */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_regulator_usbh_pwr>;
regulator-max-microvolt = <5000000>;
@@ -677,6 +677,11 @@ &uart3 {
status = "disabled";
};
+/* Colibri USBH */
+&usbh1 {
+ vbus-supply = <®_usb_host_vbus>;
+};
+
/* Colibri USBC */
&usbotg {
disable-over-current;
@@ -995,7 +1000,7 @@ MX6QDL_PAD_SD4_DAT2__PWM4_OUT 0x1b0b1
pinctrl_regulator_usbh_pwr: gpioregusbhpwrgrp {
fsl,pins = <
- /* USBH_EN */
+ /* SODIMM 129 / USBH_PEN */
MX6QDL_PAD_EIM_D31__GPIO3_IO31 0x0f058
>;
};
--
2.36.1
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).
Fixes: 0ef1969ea569 ("ARM: dts: imx7-colibri: move aliases, chosen, extcon and gpio-keys")
Signed-off-by: Marcel Ziswiler <[email protected]>
---
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
On Wed, Sep 21, 2022 at 02:15:05PM +0200, Francesco Dolcini wrote:
> +Greg, to get an opinion on the fixes tag.
>
> On Tue, Sep 20, 2022 at 11:22:27AM +0200, Marcel Ziswiler wrote:
> > 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).
> >
> > Fixes: 0ef1969ea569 ("ARM: dts: imx7-colibri: move aliases, chosen, extcon and gpio-keys")
> > Signed-off-by: Marcel Ziswiler <[email protected]>
>
> Hello all,
> we did have some (internal) discussion if this patch should have the
> fixes tag or not.
>
> I do personally think it should not have it and should not be backported
> to stable tree, since this is not fixing a real bug, it's just a
> cleanup.
If it's not a real bug, why would you have a Fixes: tag on the commit?
> On the other hand the original patch was not correct, and this change is
> making it right.
Ah, so it is a bugfix.
> What is the general opinion on this topic? What do the stable kernel
> maintainers would expect?
It's up to you, but what is the problem with it being backported?
> Documentation/process/stable-kernel-rules.rst is about rules for
> backporting, it does not really talk about the fixes tag, but today this
> is used to decide if a patch should be backported or not.
We use Fixes: as a signal from maintainers and developers that do not
normally use the cc: stable@ as documented to pick up things that look
like fixes but someone forgot to ask to be backported.
It's not a guarantee it will be backported, like cc: stable will be, but
it is a hint to us that maybe it should be looked at.
thanks,
greg k-h