Add R8A77980/V3HSK GEther support
Subsystems (2)
cover Add R8A77980/V3HSK GEther support
Hello!
Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's 'renesas-devel-20180518-v4.17-rc5' tag plus the R8A77980 SMP support patch. I'm adding the device tree support for mounting the NFS root on the R8A77980- based V3H Starter Kit board. The 'sh_eth' driver patches adding R8A77980 GEther support patches needed for these 2 patches to work have been posted and are close to be merged...
[1/2] arm64: dts: renesas: r8a77980: add GEther support [2/2] arm64: dts: renesas: v3hsk: add GEther support
WBR, Sergei
PATCH 1/2 arm64: dts: renesas: r8a77980: add GEther support
Define the generic R8A77980 part of the GEther device node.
Based on the original (and large) patch by Vladimir Barinov.
--- arch/arm64/boot/dts/renesas/r8a77980.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/renesas/r8a77980.dtsi +11 -0
@@ -417,6 +417,17 @@ dma-channels = <16>; }; + gether: ethernet at e7400000 { + compatible = "renesas,gether-r8a77980"; + reg = <0 0xe7400000 0 0x1000>; + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 813>; + power-domains = <&sysc R8A77980_PD_ALWAYS_ON>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + mmc0: mmc at ee140000 { compatible = "renesas,sdhi-r8a77980", "renesas,rcar-gen3-sdhi";
PATCH 2/2 arm64: dts: renesas: v3hsk: add GEther support
In reply to Sergei ShtylyovDefine the V3H Starter Kit board dependent part of the GEther device node.
Based on the original (and large) patch by Vladimir Barinov.
--- arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts +21 -0
@@ -15,6 +15,7 @@ aliases { serial0 = &scif0; + ethernet0 = &gether; }; chosen {
@@ -36,7 +37,27 @@ clock-frequency = <32768>; }; +&gether { + pinctrl-0 = <&gether_pins>; + pinctrl-names = "default"; + + phy-mode = "rgmii"; + phy-handle = <&phy0>; + renesas,no-ether-link; + status = "okay"; + + phy0: ethernet-phy at 0 { + reg = <0>; + }; +}; + &pfc { + gether_pins: gether { + groups = "gether_mdio_a", "gether_rgmii", + "gether_txcrefclk", "gether_txcrefclk_mega"; + function = "gether"; + }; + scif0_pins: scif0 { groups = "scif0_data"; function = "scif0";
PATCH 1/2 arm64: dts: renesas: r8a77980: add GEther support
In reply to Sergei ShtylyovQuoted 6 lines · Sergei Shtylyov
Define the generic R8A77980 part of the GEther device node.
Based on the original (and large) patch by Vladimir Barinov.
Signed-off-by Vladimir Barinov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>
This looks fine but I will wait to see if there are other reviews before applying.
PATCH 2/2 arm64: dts: renesas: v3hsk: add GEther support
In reply to Sergei ShtylyovQuoted 6 lines · Sergei Shtylyov
Define the V3H Starter Kit board dependent part of the GEther device node.
Based on the original (and large) patch by Vladimir Barinov.
Signed-off-by Vladimir Barinov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>
This looks fine but I will wait to see if there are other reviews before applying.
PATCH 1/2 arm64: dts: renesas: r8a77980: add GEther support
In reply to Sergei ShtylyovHi Sergei,
Quoted 6 lines · Sergei Shtylyov
Define the generic R8A77980 part of the GEther device node.
Based on the original (and large) patch by Vladimir Barinov.
Signed-off-by Vladimir Barinov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>
Thanks for your patch!
With the below addressed:
arch/arm64/boot/dts/renesas/r8a77980.dtsi line 425
Quoted 12 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +6
-0@@ -417,6 +417,17 @@ dma-channels = <16>; }; + gether: ethernet at e7400000 { + compatible = "renesas,gether-r8a77980"; + reg = <0 0xe7400000 0 0x1000>; + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 813>; + power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
resets = <&cpg 813>;
arch/arm64/boot/dts/renesas/r8a77980.dtsi line 428
Quoted 3 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +3
-0+ #address-cells = <1>; + #size-cells = <0>; + status = "disabled";
Any default phy-mode needed?
arch/arm64/boot/dts/renesas/r8a77980.dtsi line 433
Quoted 5 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +2
-0+ }; + mmc0: mmc at ee140000 { compatible = "renesas,sdhi-r8a77980", "renesas,rcar-gen3-sdhi";
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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 TorvaldsPATCH 1/2 arm64: dts: renesas: r8a77980: add GEther support
Quoted 11 lines · Geert Uytterhoeven
Quoted 6 lines
Define the generic R8A77980 part of the GEther device node.
Based on the original (and large) patch by Vladimir Barinov.
Signed-off-by Vladimir Barinov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>Thanks for your patch!
With the below addressed:
Reviewed-by Geert Uytterhoeven <[email protected]>
Thanks!
Quoted 6 lines
Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +0
-0@@ -417,6 +417,17 @@ dma-channels = <16>; };
Quoted 8 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi line 425
Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +6
-0+ gether: ethernet at e7400000 { + compatible = "renesas,gether-r8a77980"; + reg = <0 0xe7400000 0 0x1000>; + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 813>; + power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;resets = <&cpg 813>;
As usual...
Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi line 428
Quoted 4 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +3
-0+ #address-cells = <1>; + #size-cells = <0>; + status = "disabled";Any default phy-mode needed?
A default "phy-mode" IMO make sense when the MAC supports a single
PHY interface mode. In this case, both RMII and RGMII are supported, so I coulsn't choose a default...
Quoted 11 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi line 433
Quoted 5 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +2
-0+ }; + mmc0: mmc at ee140000 { compatible = "renesas,sdhi-r8a77980", "renesas,rcar-gen3-sdhi";Gr{oetje,eeting}s,
Geert
PATCH 1/2 arm64: dts: renesas: r8a77980: add GEther support
Quoted 38 lines · Sergei Shtylyov
Quoted 11 lines · Geert Uytterhoeven
Quoted 6 lines
Define the generic R8A77980 part of the GEther device node.
Based on the original (and large) patch by Vladimir Barinov.
Signed-off-by Vladimir Barinov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>Thanks for your patch!
With the below addressed:
Reviewed-by Geert Uytterhoeven <[email protected]>Thanks!
Quoted 6 lines
Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +0
-0@@ -417,6 +417,17 @@ dma-channels = <16>; };Quoted 8 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi line 425
Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +6
-0+ gether: ethernet at e7400000 { + compatible = "renesas,gether-r8a77980"; + reg = <0 0xe7400000 0 0x1000>; + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 813>; + power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;resets = <&cpg 813>;
As usual...Quoted 5 lines
Quoted 4 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +3
-0+ #address-cells = <1>; + #size-cells = <0>; + status = "disabled";
Quoted 5 lines
Quoted 1 line
Any default phy-mode needed?
A default "phy-mode" IMO make sense when the MAC supports a single
PHY interface mode. In this case, both RMII and RGMII are supported, so I coulsn't choose a default...
I would think making an arbitrary choice is better than no choice. How does the driver behave in the absence of a default?
Quoted 13 lines
Quoted 12 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi line 433
Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +2
-0+ }; + mmc0: mmc at ee140000 { compatible = "renesas,sdhi-r8a77980", "renesas,rcar-gen3-sdhi";Gr{oetje,eeting}s,
Geert
PATCH 1/2 arm64: dts: renesas: r8a77980: add GEther support
Hello!
Quoted 36 lines · Simon Horman
Quoted 36 lines
Quoted 11 lines
Quoted 6 lines
Define the generic R8A77980 part of the GEther device node.
Based on the original (and large) patch by Vladimir Barinov.
Signed-off-by Vladimir Barinov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>Thanks for your patch!
With the below addressed:
Reviewed-by Geert Uytterhoeven <[email protected]>Thanks!
Quoted 6 lines
Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +0
-0@@ -417,6 +417,17 @@ dma-channels = <16>; };Quoted 8 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi line 425
Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +6
-0+ gether: ethernet at e7400000 { + compatible = "renesas,gether-r8a77980"; + reg = <0 0xe7400000 0 0x1000>; + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 813>; + power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;resets = <&cpg 813>;
As usual...Quoted 5 lines
Quoted 4 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +3
-0+ #address-cells = <1>; + #size-cells = <0>; + status = "disabled";
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Any default phy-mode needed?
A default "phy-mode" IMO make sense when the MAC supports a single
PHY interface mode. In this case, both RMII and RGMII are supported, so I coulsn't choose a default...I would think making an arbitrary choice is better than no choice. How does the driver behave in the absence of a default?
The board DT *must* assign some "phy-mode" -- it's a required prop. In this particular case, iff the mode is still unspecified, the driver
will select the MII mode for the RMII_MII reg (which is a reserved value for this GEther)...
[...]
MBR, Sergei
PATCH 1/2 arm64: dts: renesas: r8a77980: add GEther support
Quoted 46 lines · Sergei Shtylyov
Hello!
Quoted 42 lines · Simon Horman
Quoted 41 lines
Quoted 11 lines
Quoted 6 lines
Define the generic R8A77980 part of the GEther device node.
Based on the original (and large) patch by Vladimir Barinov.
Signed-off-by Vladimir Barinov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>Thanks for your patch!
With the below addressed:
Reviewed-by Geert Uytterhoeven <[email protected]>Thanks!
Quoted 6 lines
Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +0
-0@@ -417,6 +417,17 @@ dma-channels = <16>; };Quoted 8 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi line 425
Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +6
-0+ gether: ethernet at e7400000 { + compatible = "renesas,gether-r8a77980"; + reg = <0 0xe7400000 0 0x1000>; + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 813>; + power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;resets = <&cpg 813>;
As usual...Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi line 428
Quoted 4 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +3
-0+ #address-cells = <1>; + #size-cells = <0>; + status = "disabled";Any default phy-mode needed?
A default "phy-mode" IMO make sense when the MAC supports a single
PHY interface mode. In this case, both RMII and RGMII are supported, so I coulsn't choose a default...
Quoted 7 lines
Quoted 2 lines
I would think making an arbitrary choice is better than no choice. How does the driver behave in the absence of a default?
The board DT *must* assign some "phy-mode" -- it's a required prop. In this particular case, iff the mode is still unspecified, the driver
will select the MII mode for theRMII_MIIreg (which is a reserved value for this GEther)...
Thanks, if its required that boards provide this property then this makes sense to me.
I have applied the patch after adding the resets property. The result is as follows:
From: Sergei Shtylyov <[email protected]>
Subject: [PATCH] arm64: dts: renesas: r8a77980: add GEther support
Define the generic R8A77980 part of the GEther device node.
Based on the original (and large) patch by Vladimir Barinov.
--- arch/arm64/boot/dts/renesas/r8a77980.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/renesas/r8a77980.dtsi +12 -0
@@ -417,6 +417,18 @@ dma-channels = <16>; }; + gether: ethernet at e7400000 { + compatible = "renesas,gether-r8a77980"; + reg = <0 0xe7400000 0 0x1000>; + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 813>; + power-domains = <&sysc R8A77980_PD_ALWAYS_ON>; + resets = <&cpg 813>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + mmc0: mmc at ee140000 { compatible = "renesas,sdhi-r8a77980", "renesas,rcar-gen3-sdhi";
Signature · 1 line
2.11.0
Simon Horman
AppliedPATCH 2/2 arm64: dts: renesas: v3hsk: add GEther support
In reply to Simon HormanQuoted 5 lines · Simon Horman
Quoted 4 lines · Sergei Shtylyov
Define the V3H Starter Kit board dependent part of the GEther device node.
Based on the original (and large) patch by Vladimir Barinov.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Vladimir Barinov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>This looks fine but I will wait to see if there are other reviews before applying.
Reviewed-by Simon Horman <[email protected]>
Applied.