Skip to contentSkip to conversation

Add R8A7790 EtherAVB DT support

PATCH Superseded Sergei Shtylyov 3 participants 9 messages Mar 30, 2015 – Apr 6, 2015

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add R8A7790 EtherAVB DT support

Hello.

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20150330-v4.0-rc6' tag. Here we add the EtherAVB device tree support for the R8A7790 SoC. The 2nd patch depends on the EtherAVB driver posted recently for the bindings.

[1/2] ARM: shmobile: r8a7790: add EtherAVB clocks [2/2] ARM: shmobile: r8a7790: add EtherAVB DT support

WBR, Sergei

#1 lore raw

PATCH 1/2 ARM: shmobile: r8a7790: add EtherAVB clock

Add the EtherAVB clock to the R8A7790 device tree.

Based on original patch by Mitsuhiro Kimura <[email protected]>.

---
 arch/arm/boot/dts/r8a7790.dtsi            |    8 +++++---
 include/dt-bindings/clock/r8a7790-clock.h |    1 +
 2 files changed, 6 insertions(+), 3 deletions(-)
arch/arm/boot/dts/r8a7790.dtsi +5 -3
Index: renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================
@@ -1193,16 +1193,18 @@
 			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>;
 			clocks = <&hp_clk>, <&zg_clk>, <&zg_clk>, <&zg_clk>,
-			         <&zg_clk>, <&p_clk>, <&zs_clk>, <&zs_clk>;
+			         <&zg_clk>, <&p_clk>, <&hp_clk>, <&zs_clk>,
+				 <&zs_clk>;
 			#clock-cells = <1>;
 			clock-indices = <
 				R8A7790_CLK_MLB R8A7790_CLK_VIN3 R8A7790_CLK_VIN2
-				R8A7790_CLK_VIN1 R8A7790_CLK_VIN0 R8A7790_CLK_ETHER
+				R8A7790_CLK_VIN1 R8A7790_CLK_VIN0
+				R8A7790_CLK_ETHER R8A7790_CLK_ETHERAVB
 				R8A7790_CLK_SATA1 R8A7790_CLK_SATA0
 			>;
 			clock-output-names =
 				"mlb", "vin3", "vin2", "vin1", "vin0", "ether",
-				"sata1", "sata0";
+				"etheravb", "sata1", "sata0";
 		};
 		mstp9_clks: mstp9_clks at e6150994 {
 			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
include/dt-bindings/clock/r8a7790-clock.h +1 -0
Index: renesas/include/dt-bindings/clock/r8a7790-clock.h
===================================================================
@@ -105,6 +105,7 @@
 #define R8A7790_CLK_VIN2		9
 #define R8A7790_CLK_VIN1		10
 #define R8A7790_CLK_VIN0		11
+#define R8A7790_CLK_ETHERAVB		12
 #define R8A7790_CLK_ETHER		13
 #define R8A7790_CLK_SATA1		14
 #define R8A7790_CLK_SATA0		15
#2 lore raw

PATCH 1/2 ARM: shmobile: r8a7790: add EtherAVB clock

Hi Sergei,

arch/arm/boot/dts/r8a7790.dtsi line 1197

Quoted 9 lines · Sergei Shtylyov
arch/arm/boot/dts/r8a7790.dtsi +2 -1
@@ -1193,16 +1193,18 @@
                        compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
                        reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>;
                        clocks = <&hp_clk>, <&zg_clk>, <&zg_clk>, <&zg_clk>,
-                                <&zg_clk>, <&p_clk>, <&zs_clk>, <&zs_clk>;
+                                <&zg_clk>, <&p_clk>, <&hp_clk>, <&zs_clk>,
+                                <&zs_clk>;

For consistency, please insert the new etheravb entry between vin0 and ether, cfr. the order in r8a7790-clock.h.

Quoted 20 lines
arch/arm/boot/dts/r8a7790.dtsi +3 -2
                        #clock-cells = <1>;
                        clock-indices = <
                                R8A7790_CLK_MLB R8A7790_CLK_VIN3 R8A7790_CLK_VIN2
-                               R8A7790_CLK_VIN1 R8A7790_CLK_VIN0 R8A7790_CLK_ETHER
+                               R8A7790_CLK_VIN1 R8A7790_CLK_VIN0
+                               R8A7790_CLK_ETHER R8A7790_CLK_ETHERAVB
                                R8A7790_CLK_SATA1 R8A7790_CLK_SATA0
                        >;
                        clock-output-names =
                                "mlb", "vin3", "vin2", "vin1", "vin0", "ether",
-                               "sata1", "sata0";
+                               "etheravb", "sata1", "sata0";
                };
                mstp9_clks: mstp9_clks at e6150994 {
                        compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";

Index: renesas/include/dt-bindings/clock/r8a7790-clock.h
===================================================================

include/dt-bindings/clock/r8a7790-clock.h line 111

Quoted 7 lines
include/dt-bindings/clock/r8a7790-clock.h +1 -0
@@ -105,6 +105,7 @@
 #define R8A7790_CLK_VIN2               9
 #define R8A7790_CLK_VIN1               10
 #define R8A7790_CLK_VIN0               11
+#define R8A7790_CLK_ETHERAVB           12
 #define R8A7790_CLK_ETHER              13
 #define R8A7790_CLK_SATA1              14
 #define R8A7790_CLK_SATA0              15

Gr{oetje,eeting}s,

Geert

--
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 Torvalds

#3 lore raw

PATCH 2/2 ARM: shmobile: r8a7790: add EtherAVB DT support

In reply to Sergei Shtylyov

Define the generic R8A7790 part of the EtherAVB device node.

Based on original patch by Mitsuhiro Kimura <[email protected]>.

---
 arch/arm/boot/dts/r8a7790.dtsi |   10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/r8a7790.dtsi +10 -0
Index: renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================
@@ -626,6 +626,16 @@
 		status = "disabled";
 	};
 
+	avb: ethernet at e6800000 {
+		compatible = "renesas,ravb-r8a7790";
+		reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
+		interrupts = <0 163 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp8_clks R8A7790_CLK_ETHERAVB>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
 	sata0: sata at ee300000 {
 		compatible = "renesas,sata-r8a7790";
 		reg = <0 0xee300000 0 0x2000>;
#4 lore raw

PATCH 2/2 ARM: shmobile: r8a7790: add EtherAVB DT support

Quoted 1 line · Sergei Shtylyov

Define the generic R8A7790 part of the EtherAVB device node.

Please repost once this binding (and associated driver) has been accepted.

Quoted 30 lines

Based on original patch by Mitsuhiro Kimura <[email protected]>.

---
 arch/arm/boot/dts/r8a7790.dtsi |   10 ++++++++++
 1 file changed, 10 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================

arch/arm/boot/dts/r8a7790.dtsi +10 -0
@@ -626,6 +626,16 @@
 		status = "disabled";
 	};
 
+	avb: ethernet at e6800000 {
+		compatible = "renesas,ravb-r8a7790";
+		reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
+		interrupts = <0 163 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp8_clks R8A7790_CLK_ETHERAVB>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
 	sata0: sata at ee300000 {
 		compatible = "renesas,sata-r8a7790";
 		reg = <0 0xee300000 0 0x2000>;
#5 lore raw

PATCH 2/2 ARM: shmobile: r8a7790: add EtherAVB DT support

Hello.

Quoted 3 lines · Simon Horman
Quoted 1 line

Define the generic R8A7790 part of the EtherAVB device node.

Please repost once this binding (and associated driver) has been accepted.

OK, but will you merge patch #1?

Quoted 16 lines
Quoted 16 lines

Based on original patch by Mitsuhiro Kimura <[email protected]>.

---
  arch/arm/boot/dts/r8a7790.dtsi |   10 ++++++++++
  1 file changed, 10 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================

arch/arm/boot/dts/r8a7790.dtsi +0 -0
@@ -626,6 +626,16 @@
  		status = "disabled";
  	};
 
Quoted 2 lines

arch/arm/boot/dts/r8a7790.dtsi line 630

Quoted 2 lines
arch/arm/boot/dts/r8a7790.dtsi +2 -0
+	avb: ethernet at e6800000 {
+		compatible = "renesas,ravb-r8a7790";

I went the usual way here but I suspect that SoC part of the prop should
be "-rcar-gen2" as we now have this IP core (as well as most of the others, except PFC) described in a common manual for the R-Car generation 2 SoCs. What do you think?

WBR, Sergei

#6 lore raw

PATCH 2/2 ARM: shmobile: r8a7790: add EtherAVB DT support

Quoted 9 lines · Sergei Shtylyov

Hello.

Quoted 3 lines · Simon Horman
Quoted 1 line

Define the generic R8A7790 part of the EtherAVB device node.

Please repost once this binding (and associated driver) has been accepted.

OK, but will you merge patch #1?

I would prefer to wait until we can exercise it with a driver.

Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
---
 arch/arm/boot/dts/r8a7790.dtsi |   10 ++++++++++
 1 file changed, 10 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================

arch/arm/boot/dts/r8a7790.dtsi +0 -0
@@ -626,6 +626,16 @@
 		status = "disabled";
 	};
 
Quoted 7 lines
Quoted 2 lines

arch/arm/boot/dts/r8a7790.dtsi line 630

Quoted 2 lines
arch/arm/boot/dts/r8a7790.dtsi +2 -0
+	avb: ethernet at e6800000 {
+		compatible = "renesas,ravb-r8a7790";

I went the usual way here but I suspect that SoC part of the prop should
be "-rcar-gen2" as we now have this IP core (as well as most of the others, except PFC) described in a common manual for the R-Car generation 2 SoCs. What do you think?

I like -r8a7790.

#7 lore raw

PATCH 2/2 ARM: shmobile: r8a7790: add EtherAVB DT support

Hello.

Quoted 9 lines · Simon Horman
Quoted 7 lines · Simon Horman
Quoted 4 lines
Quoted 2 lines

Define the generic R8A7790 part of the EtherAVB device node.

Please repost once this binding (and associated driver) has been accepted.

OK, but will you merge patch #1?

I would prefer to wait until we can exercise it with a driver.

Then you'll have to wait long as the Lager board doesn't have support for
Ethernet AVB. We've only tested it with the daughter boards.

WBR, Sergei

#8 lore raw

PATCH 2/2 ARM: shmobile: r8a7790: add EtherAVB DT support

Quoted 8 lines · Sergei Shtylyov

Hello.

Quoted 3 lines · Simon Horman
Quoted 3 lines · Simon Horman
Quoted 2 lines
Quoted 2 lines

Define the generic R8A7790 part of the EtherAVB device node.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Please repost once this binding (and associated driver) has been accepted.

OK, but will you merge patch #1?

I would prefer to wait until we can exercise it with a driver.

Then you'll have to wait long as the Lager board doesn't have support for
Ethernet AVB. We've only tested it with the daughter boards.

All the same, I'd rather wait for the driver to be merged first.