Skip to contentSkip to conversation

ARM: dts: renesas: Add missing ethernet PHY reset GPIO on Gen2 reference boards

RFC PATCH Superseded [email protected] 5 participants 7 messages Jan 12, 2020 – Jan 15, 2020 Device tree bindings

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 ARM: dts: renesas: Add missing ethernet PHY reset GPIO on Gen2 reference boards

From: Marek Vasut <[email protected]>

The ethernet PHY reset GPIO was missing and the kernel was depending solely on the bootloader to bring the PHY out of reset. Fix this to get rid of the dependency on bootloader.

Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>

To: [email protected]
---
NOTE: Thus far tested on R8A7791 Koelsch

---
 arch/arm/boot/dts/r8a7790-lager.dts   | 1 +
 arch/arm/boot/dts/r8a7790-stout.dts   | 1 +
 arch/arm/boot/dts/r8a7791-koelsch.dts | 1 +
 arch/arm/boot/dts/r8a7791-porter.dts  | 1 +
 arch/arm/boot/dts/r8a7793-gose.dts    | 1 +
 arch/arm/boot/dts/r8a7794-alt.dts     | 1 +
 arch/arm/boot/dts/r8a7794-silk.dts    | 1 +
 7 files changed, 7 insertions(+)
arch/arm/boot/dts/r8a7790-lager.dts +1 -0
index 097fd9317c6e..b88d4f4d5d9e 100644
@@ -671,6 +671,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio5 31 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
arch/arm/boot/dts/r8a7790-stout.dts +1 -0
index a315ba749aa4..98dcfcbf0b70 100644
@@ -200,6 +200,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
arch/arm/boot/dts/r8a7791-koelsch.dts +1 -0
index 2b096d5e06fb..6619689a17d4 100644
@@ -630,6 +630,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
arch/arm/boot/dts/r8a7791-porter.dts +1 -0
index f9ece7ab2010..2ba2e8e5f1c3 100644
@@ -304,6 +304,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
arch/arm/boot/dts/r8a7793-gose.dts +1 -0
index 22ca7cd1e7d2..4da82f1e1e94 100644
@@ -588,6 +588,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
arch/arm/boot/dts/r8a7794-alt.dts +1 -0
index f79fce74cd9c..7aa1e8ca808b 100644
@@ -340,6 +340,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
arch/arm/boot/dts/r8a7794-silk.dts +1 -0
index 2c16ad854300..3c0ed684f4a1 100644
@@ -391,6 +391,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
Signature · 1 line
2.24.1
Tested-by on v1 1/1
#1 lore raw

Hi Marek,

Thanks for your work.

Quoted 6 lines · Marek Vasut

From: Marek Vasut <[email protected]>

The ethernet PHY reset GPIO was missing and the kernel was depending solely on the bootloader to bring the PHY out of reset. Fix this to get rid of the dependency on bootloader.

Quoted 7 lines
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>

To: [email protected]
---
NOTE: Thus far tested on R8A7791 Koelsch

I also only have a Koelsch board, but for what it's worth (for Koelsch):

Quoted 97 lines
---
 arch/arm/boot/dts/r8a7790-lager.dts   | 1 +
 arch/arm/boot/dts/r8a7790-stout.dts   | 1 +
 arch/arm/boot/dts/r8a7791-koelsch.dts | 1 +
 arch/arm/boot/dts/r8a7791-porter.dts  | 1 +
 arch/arm/boot/dts/r8a7793-gose.dts    | 1 +
 arch/arm/boot/dts/r8a7794-alt.dts     | 1 +
 arch/arm/boot/dts/r8a7794-silk.dts    | 1 +
 7 files changed, 7 insertions(+)
arch/arm/boot/dts/r8a7790-lager.dts +1 -0
index 097fd9317c6e..b88d4f4d5d9e 100644
@@ -671,6 +671,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio5 31 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
arch/arm/boot/dts/r8a7790-stout.dts +1 -0
index a315ba749aa4..98dcfcbf0b70 100644
@@ -200,6 +200,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
arch/arm/boot/dts/r8a7791-koelsch.dts +1 -0
index 2b096d5e06fb..6619689a17d4 100644
@@ -630,6 +630,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
arch/arm/boot/dts/r8a7791-porter.dts +1 -0
index f9ece7ab2010..2ba2e8e5f1c3 100644
@@ -304,6 +304,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
arch/arm/boot/dts/r8a7793-gose.dts +1 -0
index 22ca7cd1e7d2..4da82f1e1e94 100644
@@ -588,6 +588,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
arch/arm/boot/dts/r8a7794-alt.dts +1 -0
index f79fce74cd9c..7aa1e8ca808b 100644
@@ -340,6 +340,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
arch/arm/boot/dts/r8a7794-silk.dts +1 -0
index 2c16ad854300..3c0ed684f4a1 100644
@@ -391,6 +391,7 @@ &ether {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+		reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
 		interrupt-parent = <&irqc0>;
 		interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
 		micrel,led-mode = <1>;
Signature · 1 line
2.24.1
Signature · 2 lines
Regards,
Niklas Söderlund
Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]

Hi Marek,

Quoted 7 lines · On Sun, Jan 12, 2020 at 8:13 PM <[email protected]> wrote:

From: Marek Vasut <[email protected]>

The ethernet PHY reset GPIO was missing and the kernel was depending solely on the bootloader to bring the PHY out of reset. Fix this to get rid of the dependency on bootloader.

Thanks for your patch!

Quoted 9 lines

NOTE: Thus far tested on R8A7791 Koelsch

 arch/arm/boot/dts/r8a7790-lager.dts   | 1 +
 arch/arm/boot/dts/r8a7790-stout.dts   | 1 +
 arch/arm/boot/dts/r8a7791-koelsch.dts | 1 +
 arch/arm/boot/dts/r8a7791-porter.dts  | 1 +
 arch/arm/boot/dts/r8a7793-gose.dts    | 1 +
 arch/arm/boot/dts/r8a7794-alt.dts     | 1 +
 arch/arm/boot/dts/r8a7794-silk.dts    | 1 +

I believe all of the above (except for stout) are available in Magnus' farm...

r8a7743-sk-rzg1m.dts and r8a7745-sk-rzg1e.dts need similar changes as r8a7791-porter.dts resp. r8a7794-silk.dts.

arch/arm/boot/dts/r8a7790-lager.dts &ether { · line 674

Quoted 7 lines
arch/arm/boot/dts/r8a7790-lager.dts +1 -0
@@ -671,6 +671,7 @@ &ether {
 
        phy1: ethernet-phy@1 {
                reg = <1>;
+               reset-gpios = <&gpio5 31 GPIO_ACTIVE_LOW>;

I would insert this line below micrel,led-mode, though.

arch/arm/boot/dts/r8a7790-lager.dts &ether { · line 677

Quoted 3 lines
arch/arm/boot/dts/r8a7790-lager.dts +0 -0
                interrupt-parent = <&irqc0>;
                interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
                micrel,led-mode = <1>;

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#3 lore raw
Quoted 1 line · Geert Uytterhoeven

Hi Marek,

Hi,

[...]

Quoted 8 lines
Quoted 7 lines
 arch/arm/boot/dts/r8a7790-lager.dts   | 1 +
 arch/arm/boot/dts/r8a7790-stout.dts   | 1 +
 arch/arm/boot/dts/r8a7791-koelsch.dts | 1 +
 arch/arm/boot/dts/r8a7791-porter.dts  | 1 +
 arch/arm/boot/dts/r8a7793-gose.dts    | 1 +
 arch/arm/boot/dts/r8a7794-alt.dts     | 1 +
 arch/arm/boot/dts/r8a7794-silk.dts    | 1 +
Quoted 4 lines

I believe all of the above (except for stout) are available in Magnus' farm...

r8a7743-sk-rzg1m.dts and r8a7745-sk-rzg1e.dts need similar changes as r8a7791-porter.dts resp. r8a7794-silk.dts.

Do you have those two boards / can you prepare and test a patch ?

[...]

#4 lore raw

Hi Marek,

Quoted 9 lines · Marek Vasut
Quoted 8 lines · Geert Uytterhoeven
Quoted 7 lines
 arch/arm/boot/dts/r8a7790-lager.dts   | 1 +
 arch/arm/boot/dts/r8a7790-stout.dts   | 1 +
 arch/arm/boot/dts/r8a7791-koelsch.dts | 1 +
 arch/arm/boot/dts/r8a7791-porter.dts  | 1 +
 arch/arm/boot/dts/r8a7793-gose.dts    | 1 +
 arch/arm/boot/dts/r8a7794-alt.dts     | 1 +
 arch/arm/boot/dts/r8a7794-silk.dts    | 1 +
Quoted 6 lines
Quoted 4 lines

I believe all of the above (except for stout) are available in Magnus' farm...

r8a7743-sk-rzg1m.dts and r8a7745-sk-rzg1e.dts need similar changes as r8a7791-porter.dts resp. r8a7794-silk.dts.

Do you have those two boards / can you prepare and test a patch ?

I don't have those boards, and thus can't test them.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#5 lore raw
Quoted 16 lines

From: Geert Uytterhoeven <[email protected]>
Sent: 15 January 2020 07:40

Hi Marek,

Quoted 9 lines · Marek Vasut
Quoted 8 lines · Geert Uytterhoeven
Quoted 7 lines
 arch/arm/boot/dts/r8a7790-lager.dts   | 1 +
 arch/arm/boot/dts/r8a7790-stout.dts   | 1 +
 arch/arm/boot/dts/r8a7791-koelsch.dts | 1 +
 arch/arm/boot/dts/r8a7791-porter.dts  | 1 +
 arch/arm/boot/dts/r8a7793-gose.dts    | 1 +
 arch/arm/boot/dts/r8a7794-alt.dts     | 1 +
 arch/arm/boot/dts/r8a7794-silk.dts    | 1 +
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

I believe all of the above (except for stout) are available in Magnus' farm...

r8a7743-sk-rzg1m.dts and r8a7745-sk-rzg1e.dts need similar changes as r8a7791-porter.dts resp. r8a7794-silk.dts.

Do you have those two boards / can you prepare and test a patch ?

I don't have those boards, and thus can't test them.

Sorry, I don’t either. Perhaps Sergei?

Chris

Quoted 12 lines

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux- m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#6 lore raw

Hello!

Quoted 11 lines · Chris Paterson
Quoted 11 lines
Quoted 11 lines · Geert Uytterhoeven
Quoted 10 lines
Quoted 7 lines
  arch/arm/boot/dts/r8a7790-lager.dts   | 1 +
  arch/arm/boot/dts/r8a7790-stout.dts   | 1 +
  arch/arm/boot/dts/r8a7791-koelsch.dts | 1 +
  arch/arm/boot/dts/r8a7791-porter.dts  | 1 +
  arch/arm/boot/dts/r8a7793-gose.dts    | 1 +
  arch/arm/boot/dts/r8a7794-alt.dts     | 1 +
  arch/arm/boot/dts/r8a7794-silk.dts    | 1 +

I believe all of the above (except for stout) are available in Magnus' farm...

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

r8a7743-sk-rzg1m.dts and r8a7745-sk-rzg1e.dts need similar changes as r8a7791-porter.dts resp. r8a7794-silk.dts.

Do you have those two boards / can you prepare and test a patch ?

I don't have those boards, and thus can't test them.

Sorry, I don’t either. Perhaps Sergei?

Me neither, I only have Porter and SILK.

Quoted 1 line

Chris

MBR, Sergei