[PATCH] ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo

Subsystems: the rest

STALE1854d

7 messages, 3 authors, 2021-09-22 · open the first message on its own page

[PATCH] ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo

From: Marek Vasut <marex@denx.de>
Date: 2021-09-05 00:03:16

The MIC2025 switch input signal nEN is active low, describe it as such
in the DT. The previous change to this regulator polarity was incorrectly
influenced by broken quirks in gpiolib-of.c, which is now long fixed. So
fix this regulator polarity setting here once and for all.

Fixes: 3c3601cd6a6d3 ("ARM: dts: imx53: Update USB configuration on M53Menlo")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <redacted>
---
 arch/arm/boot/dts/imx53-m53menlo.dts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx53-m53menlo.dts b/arch/arm/boot/dts/imx53-m53menlo.dts
index 48adcfd32cea9..4f88e96d81ddb 100644
--- a/arch/arm/boot/dts/imx53-m53menlo.dts
+++ b/arch/arm/boot/dts/imx53-m53menlo.dts
@@ -77,8 +77,7 @@ reg_usbh1_vbus: regulator-usbh1-vbus {
 		regulator-name = "vbus";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
-		gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
-		enable-active-high;
+		gpio = <&gpio1 2 0>;
 	};
 };
 
-- 
2.33.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH] ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo

From: Fabio Estevam <festevam@gmail.com>
Date: 2021-09-05 00:50:59

Hi Marek,

On Sat, Sep 4, 2021 at 9:01 PM Marek Vasut [off-list ref] wrote:
quoted hunk
The MIC2025 switch input signal nEN is active low, describe it as such
in the DT. The previous change to this regulator polarity was incorrectly
influenced by broken quirks in gpiolib-of.c, which is now long fixed. So
fix this regulator polarity setting here once and for all.

Fixes: 3c3601cd6a6d3 ("ARM: dts: imx53: Update USB configuration on M53Menlo")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <redacted>
---
 arch/arm/boot/dts/imx53-m53menlo.dts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx53-m53menlo.dts b/arch/arm/boot/dts/imx53-m53menlo.dts
index 48adcfd32cea9..4f88e96d81ddb 100644
--- a/arch/arm/boot/dts/imx53-m53menlo.dts
+++ b/arch/arm/boot/dts/imx53-m53menlo.dts
@@ -77,8 +77,7 @@ reg_usbh1_vbus: regulator-usbh1-vbus {
                regulator-name = "vbus";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
-               gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
-               enable-active-high;
+               gpio = <&gpio1 2 0>;
Don't you mean: gpio = <&gpio1 2 GPIO_ACTIVE_LOW> here?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH] ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo

From: Marek Vasut <marex@denx.de>
Date: 2021-09-05 02:59:52

On 9/5/21 2:49 AM, Fabio Estevam wrote:
Hi Marek,

On Sat, Sep 4, 2021 at 9:01 PM Marek Vasut [off-list ref] wrote:
quoted
The MIC2025 switch input signal nEN is active low, describe it as such
in the DT. The previous change to this regulator polarity was incorrectly
influenced by broken quirks in gpiolib-of.c, which is now long fixed. So
fix this regulator polarity setting here once and for all.

Fixes: 3c3601cd6a6d3 ("ARM: dts: imx53: Update USB configuration on M53Menlo")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <redacted>
---
  arch/arm/boot/dts/imx53-m53menlo.dts | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx53-m53menlo.dts b/arch/arm/boot/dts/imx53-m53menlo.dts
index 48adcfd32cea9..4f88e96d81ddb 100644
--- a/arch/arm/boot/dts/imx53-m53menlo.dts
+++ b/arch/arm/boot/dts/imx53-m53menlo.dts
@@ -77,8 +77,7 @@ reg_usbh1_vbus: regulator-usbh1-vbus {
                 regulator-name = "vbus";
                 regulator-min-microvolt = <5000000>;
                 regulator-max-microvolt = <5000000>;
-               gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
-               enable-active-high;
+               gpio = <&gpio1 2 0>;
Don't you mean: gpio = <&gpio1 2 GPIO_ACTIVE_LOW> here?
No, the GPIO flags are ignored by gpiolib-of and the signal is active low. That's why there is that zero, no flags, and no enable-active-high property.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH] ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo

From: Fabio Estevam <festevam@gmail.com>
Date: 2021-09-05 12:03:17

Hi Marek,

On Sat, Sep 4, 2021 at 11:57 PM Marek Vasut [off-list ref] wrote:
No, the GPIO flags are ignored by gpiolib-of and the signal is active
low. That's why there is that zero, no flags, and no enable-active-high
property.
Yes, correct. The GPIO flag is ignored by "regulator-fixed".

As you removed the 'enable-active-high' property, you turned the
regulator to active low as needed.

This is correct.

gpio = <&gpio1 2 0> is the same as gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>

I just suggested gpio = <&gpio1 2 GPIO_ACTIVE_LOW> to make it clearer
what is the real polarity.

The GPIO flag is ignored, I know. No issues if you want to keep it as
gpio = <&gpio1 2 0>.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH] ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo

From: Fabio Estevam <festevam@gmail.com>
Date: 2021-09-05 13:05:37

On Sat, Sep 4, 2021 at 9:01 PM Marek Vasut [off-list ref] wrote:
The MIC2025 switch input signal nEN is active low, describe it as such
in the DT. The previous change to this regulator polarity was incorrectly
influenced by broken quirks in gpiolib-of.c, which is now long fixed. So
fix this regulator polarity setting here once and for all.

Fixes: 3c3601cd6a6d3 ("ARM: dts: imx53: Update USB configuration on M53Menlo")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <redacted>
Reviewed-by: Fabio Estevam <festevam@gmail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH] ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo

From: Marek Vasut <marex@denx.de>
Date: 2021-09-05 14:38:53

On 9/5/21 2:00 PM, Fabio Estevam wrote:
Hi Marek,
Hi,
On Sat, Sep 4, 2021 at 11:57 PM Marek Vasut [off-list ref] wrote:
quoted
No, the GPIO flags are ignored by gpiolib-of and the signal is active
low. That's why there is that zero, no flags, and no enable-active-high
property.
Yes, correct. The GPIO flag is ignored by "regulator-fixed".

As you removed the 'enable-active-high' property, you turned the
regulator to active low as needed.

This is correct.

gpio = <&gpio1 2 0> is the same as gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>

I just suggested gpio = <&gpio1 2 GPIO_ACTIVE_LOW> to make it clearer
what is the real polarity.

The GPIO flag is ignored, I know. No issues if you want to keep it as
gpio = <&gpio1 2 0>.
We had the same discussion before around this patch :)
[PATCH V6 01/15] ARM: dts: imx6q-dhcom: Add the parallel system bus
Message-ID: [off-list ref]

The 0 is correct as the field is ignored, please keep it.

Any other variants (like GPIO_ACTIVE_LOW = 1) interact badly with
drivers/gpio/gpiolib-of.c of_gpio_flags_quirks()
which is already a total compatibility attempt mess and lead to odd misbehavior of the regulator where the polarity of the GPIO is randomly interpreted as low or high dependent on the kernel version.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH] ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo

From: Shawn Guo <shawnguo@kernel.org>
Date: 2021-09-22 08:16:47

On Sun, Sep 05, 2021 at 02:01:37AM +0200, Marek Vasut wrote:
The MIC2025 switch input signal nEN is active low, describe it as such
in the DT. The previous change to this regulator polarity was incorrectly
influenced by broken quirks in gpiolib-of.c, which is now long fixed. So
fix this regulator polarity setting here once and for all.

Fixes: 3c3601cd6a6d3 ("ARM: dts: imx53: Update USB configuration on M53Menlo")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <redacted>
Applied, thanks!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help