ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo
Subsystems (2)
PATCH 1/1 ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo
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.
--- arch/arm/boot/dts/imx53-m53menlo.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/boot/dts/imx53-m53menlo.dts +1 -2
@@ -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>; }; };
Signature · 7 lines
2.33.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Fabio Estevam
reviewerHi Marek,
Quoted 20 lines · Marek Vasut
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 <[email protected]>Cc Shawn Guo <[email protected]>Cc Fabio Estevam <[email protected]>Cc NXP Linux Team <[email protected]>--- arch/arm/boot/dts/imx53-m53menlo.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arch/arm/boot/dts/imx53-m53menlo.dts +0
-0
arch/arm/boot/dts/imx53-m53menlo.dts reg_usbh1_vbus: regulator-usbh1-vbus { · line 80
Quoted 6 lines
arch/arm/boot/dts/imx53-m53menlo.dts +1
-2@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 18 lines · Fabio Estevam
Hi Marek,
Quoted 15 lines · Marek Vasut
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 <[email protected]>Cc Shawn Guo <[email protected]>Cc Fabio Estevam <[email protected]>Cc NXP Linux Team <[email protected]>--- arch/arm/boot/dts/imx53-m53menlo.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 13 lines
arch/arm/boot/dts/imx53-m53menlo.dts reg_usbh1_vbus: regulator-usbh1-vbus { · line 80
Quoted 11 lines
arch/arm/boot/dts/imx53-m53menlo.dts +1
-2@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Fabio Estevam
reviewerHi Marek,
Quoted 3 lines · Marek Vasut
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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 1 line · Fabio Estevam
Hi Marek,
Hi,
Quoted 13 lines · Marek Vasut
Quoted 4 lines
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.
Quoted 7 lines
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: <[email protected]>
The 0 is correct as the field is ignored, please keep it.
Any other variants (like GPIO_ACTIVE_LOW = 1) interact badly withdrivers/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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 11 lines · Marek Vasut
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 <[email protected]>Cc Shawn Guo <[email protected]>Cc Fabio Estevam <[email protected]>Cc NXP Linux Team <[email protected]>
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Shawn Guo
AppliedQuoted 10 lines · Marek Vasut
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 <[email protected]>Cc Shawn Guo <[email protected]>Cc Fabio Estevam <[email protected]>Cc NXP Linux Team <[email protected]>
Applied, thanks!
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel