Skip to contentSkip to conversation

MIPS: DTS: CI20: fix reset line polarity of the ethernet controller

PATCH Applied Dmitry Torokhov 3 participants 3 messages Nov 18, 2022 – Nov 21, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: DTS: CI20: fix reset line polarity of the ethernet controller

The reset line is called PWRST#, annotated as "active low" in the binding documentation, and is driven low and then high by the driver to reset the chip. However in device tree for CI20 board it was incorrectly marked as "active high". Fix it.

Because (as far as I know) the ci20.dts is always built in the kernel I elected not to also add a quirk to gpiolib to force the polarity there.

Fixes db49ca38579d ("net: davicom: dm9000: switch to using gpiod API")
---
 arch/mips/boot/dts/ingenic/ci20.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/boot/dts/ingenic/ci20.dts +1 -1
index 37c46720c719..f38c39572a9e 100644
@@ -438,7 +438,7 @@ dm9000@6 {
 		ingenic,nemc-tAW = <50>;
 		ingenic,nemc-tSTRV = <100>;
 
-		reset-gpios = <&gpf 12 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&gpf 12 GPIO_ACTIVE_LOW>;
 		vcc-supply = <&eth0_power>;
 
 		interrupt-parent = <&gpe>;
Signature · 5 lines
2.38.1.584.g0f3c55d4c2-goog


-- 
Dmitry
maintainer Acked-by on v1 1/1
#1 lore raw

Hi Dmitry,

Quoted 11 lines · Dmitry Torokhov

The reset line is called PWRST#, annotated as "active low" in the binding documentation, and is driven low and then high by the driver to reset the chip. However in device tree for CI20 board it was incorrectly marked as "active high". Fix it.

Because (as far as I know) the ci20.dts is always built in the kernel I elected not to also add a quirk to gpiolib to force the polarity there.

Fixes db49ca38579d ("net: davicom: dm9000: switch to using gpiod API")

Thanks.

Cheers,
-Paul

Quoted 23 lines
---
 arch/mips/boot/dts/ingenic/ci20.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/boot/dts/ingenic/ci20.dts +1 -2
index 37c46720c719..f38c39572a9e 100644
@@ -438,7 +438,7 @@ dm9000@6 {
 		ingenic,nemc-tAW = <50>;
 		ingenic,nemc-tSTRV = <100>;
 
-		reset-gpios = <&gpf 12 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&gpf 12 GPIO_ACTIVE_LOW>;
 		vcc-supply = <&eth0_power>;
 
 		interrupt-parent = <&gpe>;
--

2.38.1.584.g0f3c55d4c2-goog

--
Dmitry

maintainer Applied
#2 lore raw
In reply to Dmitry Torokhov
Quoted 30 lines · Dmitry Torokhov

The reset line is called PWRST#, annotated as "active low" in the binding documentation, and is driven low and then high by the driver to reset the chip. However in device tree for CI20 board it was incorrectly marked as "active high". Fix it.

Because (as far as I know) the ci20.dts is always built in the kernel I elected not to also add a quirk to gpiolib to force the polarity there.

Fixes db49ca38579d ("net: davicom: dm9000: switch to using gpiod API")
---
 arch/mips/boot/dts/ingenic/ci20.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/boot/dts/ingenic/ci20.dts +1 -1
index 37c46720c719..f38c39572a9e 100644
@@ -438,7 +438,7 @@ dm9000@6 {
 		ingenic,nemc-tAW = <50>;
 		ingenic,nemc-tSTRV = <100>;
 
-		reset-gpios = <&gpf 12 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&gpf 12 GPIO_ACTIVE_LOW>;
 		vcc-supply = <&eth0_power>;
 
 		interrupt-parent = <&gpe>;
Signature · 1 line
2.38.1.584.g0f3c55d4c2-goog

applied to mips-next.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]