Skip to contentSkip to conversation

ARM: dts: r7s72100: add ethernet clock to device tree

PATCH Superseded Chris Brandt 4 participants 15 messages Sep 1, 2016 – Sep 6, 2016

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

PATCH 1/3 ARM: dts: r7s72100: add ethernet clock to device tree

---
 include/dt-bindings/clock/r7s72100-clock.h | 3 +++
 1 file changed, 3 insertions(+)
include/dt-bindings/clock/r7s72100-clock.h +3 -0
index 5128f4d..3cd8138 100644
@@ -25,6 +25,9 @@
 #define R7S72100_CLK_SCIF6	1
 #define R7S72100_CLK_SCIF7	0
 
+/* MSTP7 */
+#define R7S72100_CLK_ETHER	4
+
 /* MSTP9 */
 #define R7S72100_CLK_I2C0	7
 #define R7S72100_CLK_I2C1	6
Signature · 1 line
2.9.2
#1 lore raw

PATCH 2/3 ARM: dts: r7s72100: add ethernet to device tree

---
 arch/arm/boot/dts/r7s72100.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm/boot/dts/r7s72100.dtsi +22 -0
index e8e2a5d7..fb9ef9c 100644
@@ -108,6 +108,15 @@
 			clock-output-names = "scif0", "scif1", "scif2", "scif3", "scif4", "scif5", "scif6", "scif7";
 		};
 
+		mstp7_clks: mstp7_clks at fcfe0430 {
+			#clock-cells = <1>;
+			compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0xfcfe0430 4>;
+			clocks = <&p0_clk>;
+			clock-indices = <R7S72100_CLK_ETHER>;
+			clock-output-names = "ether";
+		};
+
 		mstp9_clks: mstp9_clks at fcfe0438 {
 			#clock-cells = <1>;
 			compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
@@ -419,4 +428,17 @@
 		power-domains = <&cpg_clocks>;
 		status = "disabled";
 	};
+
+	ether: ethernet at e8203000 {
+		compatible = "renesas,ether-r7s72100";
+		reg = <0xe8203000 0x800>,
+		      <0xe8204800 0x200>;
+		interrupts = <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp7_clks R7S72100_CLK_ETHER>;
+		power-domains = <&cpg_clocks>;
+		phy-mode = "mii";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
 };
Signature · 1 line
2.9.2
#2 lore raw

PATCH 2/3 ARM: dts: r7s72100: add ethernet to device tree

Quoted 1 line · Chris Brandt

But...

Quoted 11 lines

---"

 arch/arm/boot/dts/r7s72100.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm/boot/dts/r7s72100.dtsi +0 -0
index e8e2a5d7..fb9ef9c 100644
@@ -108,6 +108,15 @@
                        clock-output-names = "scif0", "scif1", "scif2", "scif3", "scif4", "scif5", "scif6", "scif7";
                };

arch/arm/boot/dts/r7s72100.dtsi line 119

Quoted 10 lines
arch/arm/boot/dts/r7s72100.dtsi +9 -0
 
+               mstp7_clks: mstp7_clks at fcfe0430 {
+                       #clock-cells = <1>;
+                       compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0xfcfe0430 4>;
+                       clocks = <&p0_clk>;
+                       clock-indices = <R7S72100_CLK_ETHER>;
+                       clock-output-names = "ether";
+               };
+

... please move this chunk to "[PATCH 1/3] ARM: dts: r7s72100: add ethernet clock to device tree.

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 3/3 ARM: dts: rskrza1: add ethernet DT support

In reply to Chris Brandt
---
 arch/arm/boot/dts/r7s72100-rskrza1.dts | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/r7s72100-rskrza1.dts +9 -0
index aabfa04..e5dea5b 100644
@@ -47,6 +47,15 @@
 	status = "okay";
 };
 
+&ether {
+	status = "okay";
+	renesas,no-ether-link;
+	phy-handle = <&phy0>;
+	phy0: ethernet-phy at 0 {
+		reg = <0>;
+	};
+};
+
 &scif2 {
 	status = "okay";
 };
Signature · 1 line
2.9.2
#4 lore raw

PATCH 3/3 ARM: dts: rskrza1: add ethernet DT support

Quoted 1 line · Chris Brandt

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

#5 lore raw

PATCH 1/3 ARM: dts: r7s72100: add ethernet clock to device tree

In reply to Chris Brandt
Quoted 10 lines · Chris Brandt
---
 include/dt-bindings/clock/r7s72100-clock.h | 3 +++
 1 file changed, 3 insertions(+)
include/dt-bindings/clock/r7s72100-clock.h +0 -0
index 5128f4d..3cd8138 100644

include/dt-bindings/clock/r7s72100-clock.h line 33

Quoted 9 lines
include/dt-bindings/clock/r7s72100-clock.h +3 -0
@@ -25,6 +25,9 @@
 #define R7S72100_CLK_SCIF6	1
 #define R7S72100_CLK_SCIF7	0
 
+/* MSTP7 */
+#define R7S72100_CLK_ETHER	4
+
 /* MSTP9 */
 #define R7S72100_CLK_I2C0	7
 #define R7S72100_CLK_I2C1	6

I'd add the MSTP7 clock node itself in the same patch...

MBR, Sergei

#6 lore raw

PATCH 1/3 ARM: dts: r7s72100: add ethernet clock to device tree

Quoted 1 line · Sergei Shtylyov

I'd add the MSTP7 clock node itself in the same patch...

OK. I tried to look at previous commits to figure out what goes in what patch.

Thanks.

Chris

#7 lore raw

PATCH 1/3 ARM: dts: r7s72100: add ethernet clock to device tree

Quoted 3 lines · Chris Brandt
Quoted 1 line

I'd add the MSTP7 clock node itself in the same patch...

OK. I tried to look at previous commits to figure out what goes in what patch.

There's no single approach here... but it was just that your patch subject
doesn't seem to correspond well to what the patch does.

Quoted 3 lines

Thanks.

Chris

MBR, Sergei

#8 lore raw

PATCH 1/3 ARM: dts: r7s72100: add ethernet clock to device tree

In reply to Chris Brandt
Quoted 1 line · Chris Brandt

But as Sergei mentioned, the addition of mstp7_clks to the .dtsi really belongs in this patch.

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

#9 lore raw

PATCH v2 1/3 ARM: dts: r7s72100: add ethernet clock to device tree

In reply to Chris Brandt

---
v2:
* Added MSTP7 clock node

---
 arch/arm/boot/dts/r7s72100.dtsi            | 9 +++++++++
 include/dt-bindings/clock/r7s72100-clock.h | 3 +++
 2 files changed, 12 insertions(+)
arch/arm/boot/dts/r7s72100.dtsi +9 -0
index e8e2a5d7..6d29e8f 100644
@@ -108,6 +108,15 @@
 			clock-output-names = "scif0", "scif1", "scif2", "scif3", "scif4", "scif5", "scif6", "scif7";
 		};
 
+		mstp7_clks: mstp7_clks at fcfe0430 {
+			#clock-cells = <1>;
+			compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0xfcfe0430 4>;
+			clocks = <&p0_clk>;
+			clock-indices = <R7S72100_CLK_ETHER>;
+			clock-output-names = "ether";
+		};
+
 		mstp9_clks: mstp9_clks at fcfe0438 {
 			#clock-cells = <1>;
 			compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
include/dt-bindings/clock/r7s72100-clock.h +3 -0
index 5128f4d..3cd8138 100644
@@ -25,6 +25,9 @@
 #define R7S72100_CLK_SCIF6	1
 #define R7S72100_CLK_SCIF7	0
 
+/* MSTP7 */
+#define R7S72100_CLK_ETHER	4
+
 /* MSTP9 */
 #define R7S72100_CLK_I2C0	7
 #define R7S72100_CLK_I2C1	6
Signature · 1 line
2.9.2
#10 lore raw

PATCH v2 2/3 ARM: dts: r7s72100: add ethernet to device tree

---
v2:
* Removed MSTP7 clock node

---
 arch/arm/boot/dts/r7s72100.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/boot/dts/r7s72100.dtsi +13 -0
index 6d29e8f..fb9ef9c 100644
@@ -428,4 +428,17 @@
 		power-domains = <&cpg_clocks>;
 		status = "disabled";
 	};
+
+	ether: ethernet at e8203000 {
+		compatible = "renesas,ether-r7s72100";
+		reg = <0xe8203000 0x800>,
+		      <0xe8204800 0x200>;
+		interrupts = <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp7_clks R7S72100_CLK_ETHER>;
+		power-domains = <&cpg_clocks>;
+		phy-mode = "mii";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
 };
Signature · 1 line
2.9.2
#11 lore raw

PATCH v2 3/3 ARM: dts: rskrza1: add ethernet DT support

In reply to Chris Brandt
---
 arch/arm/boot/dts/r7s72100-rskrza1.dts | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/r7s72100-rskrza1.dts +9 -0
index aabfa04..e5dea5b 100644
@@ -47,6 +47,15 @@
 	status = "okay";
 };
 
+&ether {
+	status = "okay";
+	renesas,no-ether-link;
+	phy-handle = <&phy0>;
+	phy0: ethernet-phy at 0 {
+		reg = <0>;
+	};
+};
+
 &scif2 {
 	status = "okay";
 };
Signature · 1 line
2.9.2
#12 lore raw

PATCH v2 1/3 ARM: dts: r7s72100: add ethernet clock to device tree

In reply to Chris Brandt

Thanks Chris,

I have queued up this and the following 2 patches for v4.9 (nothing more for you to do unless something goes wrong in which case I'll let you know).

For future submissions please consider:
1. Supplying a cover letter (git format-patch has a --cover-letter option) for patch-sets comprising more than one patch. This allows you to describe an overview of what the series as a whole achieves. And is also convenient for maintainers to reply to when accepting your patches.
2. Starting a new thread for each new version of a patch/patch-set.

Different maintainers have different preferences. The above are mine.

#13 lore raw

PATCH v2 1/3 ARM: dts: r7s72100: add ethernet clock to device tree

Quoted 5 lines · Simon Horman

For future submissions please consider:
1. Supplying a cover letter (git format-patch has a --cover-letter option) for patch-sets comprising more than one patch. This allows you to describe an overview of what the series as a whole achieves. And is also convenient for maintainers to reply to when accepting your patches.

OK. I can do that.

Quoted 1 line

2. Starting a new thread for each new version of a patch/patch-set.

Does that mean to NOT use --in-reply-to= when submitting a v2,v3,etc... ????

One more question:
Can I submit a patches series now that just adds all the MSTP clock nodes that I'll be working on for the next couple weeks? (USB, SDHI, MMC) Or, do I have to wait till I have the drivers working?
Or, better yet, can I add all the MSTP clocks that will probably get used at some point (basically, everything that we're using today in our 3.14 BSP).

Chris

#14 lore raw

PATCH v2 1/3 ARM: dts: r7s72100: add ethernet clock to device tree

Quoted 7 lines · Chris Brandt
Quoted 5 lines · Simon Horman

For future submissions please consider:
1. Supplying a cover letter (git format-patch has a --cover-letter option) for patch-sets comprising more than one patch. This allows you to describe an overview of what the series as a whole achieves. And is also convenient for maintainers to reply to when accepting your patches.

Quoted 6 lines

OK. I can do that.

Quoted 1 line

2. Starting a new thread for each new version of a patch/patch-set.

Does that mean to NOT use --in-reply-to= when submitting a v2,v3,etc... ????

I think so.

Quoted 4 lines

One more question:
Can I submit a patches series now that just adds all the MSTP clock nodes that I'll be working on for the next couple weeks? (USB, SDHI, MMC) Or, do I have to wait till I have the drivers working?
Or, better yet, can I add all the MSTP clocks that will probably get used at some point (basically, everything that we're using today in our 3.14 BSP).

I think that would be ok. I would slightly prefer that MSTP patches are added in such a way that they can be tested. But in this case I'm not sure anyone would test them :^)