All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: DTS: CI20: fix reset line polarity of the ethernet controller
@ 2022-11-18 16:43 Dmitry Torokhov
  2022-11-18 16:51 ` Paul Cercueil
  2022-11-21 17:03 ` Thomas Bogendoerfer
  0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2022-11-18 16:43 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Rob Herring, Krzysztof Kozlowski, Thomas Bogendoerfer,
	linux-mips, devicetree, linux-kernel

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")
Reported-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 arch/mips/boot/dts/ingenic/ci20.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts
index 37c46720c719..f38c39572a9e 100644
--- a/arch/mips/boot/dts/ingenic/ci20.dts
+++ b/arch/mips/boot/dts/ingenic/ci20.dts
@@ -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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: DTS: CI20: fix reset line polarity of the ethernet controller
  2022-11-18 16:43 [PATCH] MIPS: DTS: CI20: fix reset line polarity of the ethernet controller Dmitry Torokhov
@ 2022-11-18 16:51 ` Paul Cercueil
  2022-11-21 17:03 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Cercueil @ 2022-11-18 16:51 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Rob Herring, Krzysztof Kozlowski, Thomas Bogendoerfer,
	linux-mips, devicetree, linux-kernel

Hi Dmitry,

Le ven. 18 nov. 2022 à 08:43:47 -0800, Dmitry Torokhov 
<dmitry.torokhov@gmail.com> a écrit :
> 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")
> Reported-by: Paul Cercueil <paul@crapouillou.net>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Acked-by: Paul Cercueil <paul@crapouillou.net>

Thanks.

Cheers,
-Paul

> ---
>  arch/mips/boot/dts/ingenic/ci20.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/boot/dts/ingenic/ci20.dts 
> b/arch/mips/boot/dts/ingenic/ci20.dts
> index 37c46720c719..f38c39572a9e 100644
> --- a/arch/mips/boot/dts/ingenic/ci20.dts
> +++ b/arch/mips/boot/dts/ingenic/ci20.dts
> @@ -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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: DTS: CI20: fix reset line polarity of the ethernet controller
  2022-11-18 16:43 [PATCH] MIPS: DTS: CI20: fix reset line polarity of the ethernet controller Dmitry Torokhov
  2022-11-18 16:51 ` Paul Cercueil
@ 2022-11-21 17:03 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2022-11-21 17:03 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Paul Cercueil, Rob Herring, Krzysztof Kozlowski, linux-mips,
	devicetree, linux-kernel

On Fri, Nov 18, 2022 at 08:43:47AM -0800, Dmitry Torokhov wrote:
> 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")
> Reported-by: Paul Cercueil <paul@crapouillou.net>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  arch/mips/boot/dts/ingenic/ci20.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts
> index 37c46720c719..f38c39572a9e 100644
> --- a/arch/mips/boot/dts/ingenic/ci20.dts
> +++ b/arch/mips/boot/dts/ingenic/ci20.dts
> @@ -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

applied to mips-next.

Thomas.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-21 17:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 16:43 [PATCH] MIPS: DTS: CI20: fix reset line polarity of the ethernet controller Dmitry Torokhov
2022-11-18 16:51 ` Paul Cercueil
2022-11-21 17:03 ` Thomas Bogendoerfer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.