All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks
@ 2020-12-28 21:31 Adam Ford
  2020-12-28 21:31 ` [PATCH 2/4] ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list Adam Ford
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Adam Ford @ 2020-12-28 21:31 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: aford, Adam Ford, Sergei Shtylyov, David S. Miller,
	Jakub Kicinski, Rob Herring, Geert Uytterhoeven, Magnus Damm,
	netdev, devicetree, linux-kernel

The AVB driver assumes there is an external clock, but it could
be driven by an external clock.  In order to enable a programmable
clock, it needs to be added to the clocks list and enabled in the
driver.  Since there currently only one clock, there is no
clock-names list either.

Update bindings to add the additional optional clock, and explicitly
name both of them.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
 .../devicetree/bindings/net/renesas,etheravb.yaml     | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
index 244befb6402a..c1a06510f056 100644
--- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
+++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
@@ -49,7 +49,16 @@ properties:
   interrupt-names: true
 
   clocks:
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
+    items:
+      - description: AVB functional clock
+      - description: Optional TXC reference clock
+
+  clock-names:
+    items:
+      - const: fck
+      - const: txc_refclk
 
   iommus:
     maxItems: 1
-- 
2.25.1


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

* [PATCH 2/4] ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list
  2020-12-28 21:31 [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks Adam Ford
@ 2020-12-28 21:31 ` Adam Ford
  2020-12-29  8:36   ` Sergei Shtylyov
  2021-01-08 14:15   ` Geert Uytterhoeven
  2020-12-28 21:31 ` [PATCH 3/4] arm64: dts: renesas: Add fck to etheravb-rcar-gen3 " Adam Ford
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 15+ messages in thread
From: Adam Ford @ 2020-12-28 21:31 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: aford, Adam Ford, Sergei Shtylyov, David S. Miller,
	Jakub Kicinski, Rob Herring, Geert Uytterhoeven, Magnus Damm,
	netdev, devicetree, linux-kernel

The bindings have been updated to support two clocks, but the
original clock now requires the name fck.  Add a clock-names
list in the device tree with fck in it.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
 arch/arm/boot/dts/r8a7742.dtsi  | 1 +
 arch/arm/boot/dts/r8a7743.dtsi  | 1 +
 arch/arm/boot/dts/r8a7744.dtsi  | 1 +
 arch/arm/boot/dts/r8a7745.dtsi  | 1 +
 arch/arm/boot/dts/r8a77470.dtsi | 1 +
 arch/arm/boot/dts/r8a7790.dtsi  | 1 +
 arch/arm/boot/dts/r8a7791.dtsi  | 1 +
 arch/arm/boot/dts/r8a7792.dtsi  | 1 +
 arch/arm/boot/dts/r8a7794.dtsi  | 1 +
 9 files changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/boot/dts/r8a7742.dtsi
index 6a78c813057b..6b922f664fcd 100644
--- a/arch/arm/boot/dts/r8a7742.dtsi
+++ b/arch/arm/boot/dts/r8a7742.dtsi
@@ -750,6 +750,7 @@ avb: ethernet@e6800000 {
 			reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
 			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A7742_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			#address-cells = <1>;
diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index f444e418f408..084bf3e039cf 100644
--- a/arch/arm/boot/dts/r8a7743.dtsi
+++ b/arch/arm/boot/dts/r8a7743.dtsi
@@ -702,6 +702,7 @@ avb: ethernet@e6800000 {
 			reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
 			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			#address-cells = <1>;
diff --git a/arch/arm/boot/dts/r8a7744.dtsi b/arch/arm/boot/dts/r8a7744.dtsi
index 0442aad4f9db..d01eba99ceb0 100644
--- a/arch/arm/boot/dts/r8a7744.dtsi
+++ b/arch/arm/boot/dts/r8a7744.dtsi
@@ -702,6 +702,7 @@ avb: ethernet@e6800000 {
 			reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
 			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A7744_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			#address-cells = <1>;
diff --git a/arch/arm/boot/dts/r8a7745.dtsi b/arch/arm/boot/dts/r8a7745.dtsi
index 0f14ac22921d..d0d45a369047 100644
--- a/arch/arm/boot/dts/r8a7745.dtsi
+++ b/arch/arm/boot/dts/r8a7745.dtsi
@@ -645,6 +645,7 @@ avb: ethernet@e6800000 {
 			reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
 			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A7745_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			#address-cells = <1>;
diff --git a/arch/arm/boot/dts/r8a77470.dtsi b/arch/arm/boot/dts/r8a77470.dtsi
index 691b1a131c87..ae90a001d663 100644
--- a/arch/arm/boot/dts/r8a77470.dtsi
+++ b/arch/arm/boot/dts/r8a77470.dtsi
@@ -537,6 +537,7 @@ avb: ethernet@e6800000 {
 			reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
 			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			#address-cells = <1>;
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index b0569b4ea5c8..af9cd3324f4c 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -768,6 +768,7 @@ avb: ethernet@e6800000 {
 			reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
 			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			#address-cells = <1>;
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 87f0d6dc3e5a..2354af7fa83f 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -728,6 +728,7 @@ avb: ethernet@e6800000 {
 			reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
 			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			#address-cells = <1>;
diff --git a/arch/arm/boot/dts/r8a7792.dtsi b/arch/arm/boot/dts/r8a7792.dtsi
index f5b299bfcb23..60c184ab1b49 100644
--- a/arch/arm/boot/dts/r8a7792.dtsi
+++ b/arch/arm/boot/dts/r8a7792.dtsi
@@ -537,6 +537,7 @@ avb: ethernet@e6800000 {
 			reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
 			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			#address-cells = <1>;
diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index cd5e2904068a..18cc6f6b588d 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -598,6 +598,7 @@ avb: ethernet@e6800000 {
 			reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
 			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A7794_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			#address-cells = <1>;
-- 
2.25.1


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

* [PATCH 3/4] arm64: dts: renesas: Add fck to etheravb-rcar-gen3 clock-names list
  2020-12-28 21:31 [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks Adam Ford
  2020-12-28 21:31 ` [PATCH 2/4] ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list Adam Ford
@ 2020-12-28 21:31 ` Adam Ford
  2021-01-08 14:26   ` Geert Uytterhoeven
  2020-12-28 21:31 ` [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck Adam Ford
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Adam Ford @ 2020-12-28 21:31 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: aford, Adam Ford, Sergei Shtylyov, David S. Miller,
	Jakub Kicinski, Rob Herring, Geert Uytterhoeven, Magnus Damm,
	netdev, devicetree, linux-kernel

The bindings have been updated to support two clocks, but the
original clock now requires the name fck.  Add a clock-names
list in the device tree with fck in it.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 1 +
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 1 +
 arch/arm64/boot/dts/renesas/r8a774c0.dtsi | 1 +
 arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 1 +
 arch/arm64/boot/dts/renesas/r8a77951.dtsi | 1 +
 arch/arm64/boot/dts/renesas/r8a77960.dtsi | 1 +
 arch/arm64/boot/dts/renesas/r8a77961.dtsi | 1 +
 arch/arm64/boot/dts/renesas/r8a77965.dtsi | 1 +
 arch/arm64/boot/dts/renesas/r8a77970.dtsi | 1 +
 arch/arm64/boot/dts/renesas/r8a77980.dtsi | 1 +
 arch/arm64/boot/dts/renesas/r8a77990.dtsi | 1 +
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 1 +
 12 files changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
index d37ec42a1caa..6804de678453 100644
--- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
@@ -1112,6 +1112,7 @@ avb: ethernet@e6800000 {
 					  "ch20", "ch21", "ch22", "ch23",
 					  "ch24";
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
index 83523916d360..179817de1bef 100644
--- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
@@ -986,6 +986,7 @@ avb: ethernet@e6800000 {
 					  "ch20", "ch21", "ch22", "ch23",
 					  "ch24";
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
diff --git a/arch/arm64/boot/dts/renesas/r8a774c0.dtsi b/arch/arm64/boot/dts/renesas/r8a774c0.dtsi
index e0e54342cd4c..e43e8b0a167b 100644
--- a/arch/arm64/boot/dts/renesas/r8a774c0.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774c0.dtsi
@@ -957,6 +957,7 @@ avb: ethernet@e6800000 {
 					  "ch20", "ch21", "ch22", "ch23",
 					  "ch24";
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
diff --git a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
index 1333b02d623a..c6b47ca9ed45 100644
--- a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
@@ -1215,6 +1215,7 @@ avb: ethernet@e6800000 {
 					  "ch20", "ch21", "ch22", "ch23",
 					  "ch24";
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A774E1_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
diff --git a/arch/arm64/boot/dts/renesas/r8a77951.dtsi b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
index 5c39152e4570..1e622ab8a044 100644
--- a/arch/arm64/boot/dts/renesas/r8a77951.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
@@ -1312,6 +1312,7 @@ avb: ethernet@e6800000 {
 					  "ch20", "ch21", "ch22", "ch23",
 					  "ch24";
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
diff --git a/arch/arm64/boot/dts/renesas/r8a77960.dtsi b/arch/arm64/boot/dts/renesas/r8a77960.dtsi
index 25d947a81b29..a3d1c33cbc1d 100644
--- a/arch/arm64/boot/dts/renesas/r8a77960.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77960.dtsi
@@ -1188,6 +1188,7 @@ avb: ethernet@e6800000 {
 					  "ch20", "ch21", "ch22", "ch23",
 					  "ch24";
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
diff --git a/arch/arm64/boot/dts/renesas/r8a77961.dtsi b/arch/arm64/boot/dts/renesas/r8a77961.dtsi
index e8c31ebec097..55a3ba3c844f 100644
--- a/arch/arm64/boot/dts/renesas/r8a77961.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77961.dtsi
@@ -1144,6 +1144,7 @@ avb: ethernet@e6800000 {
 					  "ch20", "ch21", "ch22", "ch23",
 					  "ch24";
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
index 657b20d3533b..dd4c0e621b9c 100644
--- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
@@ -1050,6 +1050,7 @@ avb: ethernet@e6800000 {
 					  "ch20", "ch21", "ch22", "ch23",
 					  "ch24";
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
diff --git a/arch/arm64/boot/dts/renesas/r8a77970.dtsi b/arch/arm64/boot/dts/renesas/r8a77970.dtsi
index 5a5d5649332a..d4b0b9952619 100644
--- a/arch/arm64/boot/dts/renesas/r8a77970.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77970.dtsi
@@ -612,6 +612,7 @@ avb: ethernet@e6800000 {
 					  "ch20", "ch21", "ch22", "ch23",
 					  "ch24";
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
diff --git a/arch/arm64/boot/dts/renesas/r8a77980.dtsi b/arch/arm64/boot/dts/renesas/r8a77980.dtsi
index ec7ca72399ec..992a577a3b17 100644
--- a/arch/arm64/boot/dts/renesas/r8a77980.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77980.dtsi
@@ -664,6 +664,7 @@ avb: ethernet@e6800000 {
 					  "ch20", "ch21", "ch22", "ch23",
 					  "ch24";
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
index 5010f23fafcc..cc56267e0850 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
@@ -1000,6 +1000,7 @@ avb: ethernet@e6800000 {
 					  "ch20", "ch21", "ch22", "ch23",
 					  "ch24";
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
index 2319271c881b..84dba3719381 100644
--- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
@@ -760,6 +760,7 @@ avb: ethernet@e6800000 {
 					  "ch20", "ch21", "ch22", "ch23",
 					  "ch24";
 			clocks = <&cpg CPG_MOD 812>;
+			clock-names = "fck";
 			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
 			resets = <&cpg 812>;
 			phy-mode = "rgmii";
-- 
2.25.1


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

* [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck
  2020-12-28 21:31 [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks Adam Ford
  2020-12-28 21:31 ` [PATCH 2/4] ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list Adam Ford
  2020-12-28 21:31 ` [PATCH 3/4] arm64: dts: renesas: Add fck to etheravb-rcar-gen3 " Adam Ford
@ 2020-12-28 21:31 ` Adam Ford
  2020-12-29  8:22   ` Sergei Shtylyov
  2021-01-04 10:41   ` Geert Uytterhoeven
  2020-12-29  8:17 ` [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks Sergei Shtylyov
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 15+ messages in thread
From: Adam Ford @ 2020-12-28 21:31 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: aford, Adam Ford, Sergei Shtylyov, David S. Miller,
	Jakub Kicinski, Rob Herring, Geert Uytterhoeven, Magnus Damm,
	netdev, devicetree, linux-kernel

The bindings have been updated to support two clocks, but the
original clock now requires the name fck to distinguish it
from the other.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
 drivers/net/ethernet/renesas/ravb_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index bd30505fbc57..99a6ef9c15c1 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -2142,7 +2142,7 @@ static int ravb_probe(struct platform_device *pdev)
 
 	priv->chip_id = chip_id;
 
-	priv->clk = devm_clk_get(&pdev->dev, NULL);
+	priv->clk = devm_clk_get(&pdev->dev, "fck");
 	if (IS_ERR(priv->clk)) {
 		error = PTR_ERR(priv->clk);
 		goto out_release;
-- 
2.25.1


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

* Re: [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks
  2020-12-28 21:31 [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks Adam Ford
                   ` (2 preceding siblings ...)
  2020-12-28 21:31 ` [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck Adam Ford
@ 2020-12-29  8:17 ` Sergei Shtylyov
  2021-01-08 14:11 ` Geert Uytterhoeven
  2021-01-11 20:19 ` Rob Herring
  5 siblings, 0 replies; 15+ messages in thread
From: Sergei Shtylyov @ 2020-12-29  8:17 UTC (permalink / raw)
  To: Adam Ford, linux-renesas-soc
  Cc: aford, David S. Miller, Jakub Kicinski, Rob Herring,
	Geert Uytterhoeven, Magnus Damm, netdev, devicetree,
	linux-kernel

Hello!

On 29.12.2020 0:31, Adam Ford wrote:

> The AVB driver assumes there is an external clock, but it could
> be driven by an external clock.

     Driver can be driven by external clock? :-)

> In order to enable a programmable
> clock, it needs to be added to the clocks list and enabled in the
> driver.  Since there currently only one clock, there is no
                       ^ is
> clock-names list either.
> 
> Update bindings to add the additional optional clock, and explicitly
> name both of them.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
[...]

MBR, Sergei

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

* Re: [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck
  2020-12-28 21:31 ` [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck Adam Ford
@ 2020-12-29  8:22   ` Sergei Shtylyov
  2021-01-04 10:41   ` Geert Uytterhoeven
  1 sibling, 0 replies; 15+ messages in thread
From: Sergei Shtylyov @ 2020-12-29  8:22 UTC (permalink / raw)
  To: Adam Ford, linux-renesas-soc
  Cc: aford, David S. Miller, Jakub Kicinski, Rob Herring,
	Geert Uytterhoeven, Magnus Damm, netdev, devicetree,
	linux-kernel

On 29.12.2020 0:31, Adam Ford wrote:

> The bindings have been updated to support two clocks, but the
> original clock now requires the name fck to distinguish it
> from the other.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>

Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com>

MBR, Sergei

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

* Re: [PATCH 2/4] ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list
  2020-12-28 21:31 ` [PATCH 2/4] ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list Adam Ford
@ 2020-12-29  8:36   ` Sergei Shtylyov
  2021-01-08 14:15   ` Geert Uytterhoeven
  1 sibling, 0 replies; 15+ messages in thread
From: Sergei Shtylyov @ 2020-12-29  8:36 UTC (permalink / raw)
  To: Adam Ford, linux-renesas-soc
  Cc: aford, David S. Miller, Jakub Kicinski, Rob Herring,
	Geert Uytterhoeven, Magnus Damm, netdev, devicetree,
	linux-kernel

On 29.12.2020 0:31, Adam Ford wrote:

> The bindings have been updated to support two clocks, but the
> original clock now requires the name fck.  Add a clock-names
> list in the device tree with fck in it.

    Hopefully this won't break RPM...

> Signed-off-by: Adam Ford <aford173@gmail.com>
[...]

MBR, Sergei

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

* Re: [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck
  2020-12-28 21:31 ` [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck Adam Ford
  2020-12-29  8:22   ` Sergei Shtylyov
@ 2021-01-04 10:41   ` Geert Uytterhoeven
  2021-01-05 12:53     ` Adam Ford
  1 sibling, 1 reply; 15+ messages in thread
From: Geert Uytterhoeven @ 2021-01-04 10:41 UTC (permalink / raw)
  To: Adam Ford
  Cc: Linux-Renesas, Adam Ford-BE, Sergei Shtylyov, David S. Miller,
	Jakub Kicinski, Rob Herring, Magnus Damm, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Adam,

On Mon, Dec 28, 2020 at 10:32 PM Adam Ford <aford173@gmail.com> wrote:
> The bindings have been updated to support two clocks, but the
> original clock now requires the name fck to distinguish it
> from the other.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>

Thanks for your patch!

> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -2142,7 +2142,7 @@ static int ravb_probe(struct platform_device *pdev)
>
>         priv->chip_id = chip_id;
>
> -       priv->clk = devm_clk_get(&pdev->dev, NULL);
> +       priv->clk = devm_clk_get(&pdev->dev, "fck");

This change is not backwards compatible, as existing DTB files do not
have the "fck" clock.  So the driver has to keep on assuming the first
clock is the functional clock, and this patch is thus not needed nor
desired.

>         if (IS_ERR(priv->clk)) {
>                 error = PTR_ERR(priv->clk);
>                 goto out_release;

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

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

* Re: [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck
  2021-01-04 10:41   ` Geert Uytterhoeven
@ 2021-01-05 12:53     ` Adam Ford
  2021-01-08 14:13       ` Geert Uytterhoeven
  0 siblings, 1 reply; 15+ messages in thread
From: Adam Ford @ 2021-01-05 12:53 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas, Adam Ford-BE, Sergei Shtylyov, David S. Miller,
	Jakub Kicinski, Rob Herring, Magnus Damm, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Mon, Jan 4, 2021 at 4:41 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Adam,
>
> On Mon, Dec 28, 2020 at 10:32 PM Adam Ford <aford173@gmail.com> wrote:
> > The bindings have been updated to support two clocks, but the
> > original clock now requires the name fck to distinguish it
> > from the other.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
>
> Thanks for your patch!
>
> > --- a/drivers/net/ethernet/renesas/ravb_main.c
> > +++ b/drivers/net/ethernet/renesas/ravb_main.c
> > @@ -2142,7 +2142,7 @@ static int ravb_probe(struct platform_device *pdev)
> >
> >         priv->chip_id = chip_id;
> >
> > -       priv->clk = devm_clk_get(&pdev->dev, NULL);
> > +       priv->clk = devm_clk_get(&pdev->dev, "fck");
>
> This change is not backwards compatible, as existing DTB files do not
> have the "fck" clock.  So the driver has to keep on assuming the first
> clock is the functional clock, and this patch is thus not needed nor
> desired.

Should I post a V2 with this removed, or can this patch just be excluded?

adam
>
> >         if (IS_ERR(priv->clk)) {
> >                 error = PTR_ERR(priv->clk);
> >                 goto out_release;
>
> 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

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

* Re: [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks
  2020-12-28 21:31 [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks Adam Ford
                   ` (3 preceding siblings ...)
  2020-12-29  8:17 ` [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks Sergei Shtylyov
@ 2021-01-08 14:11 ` Geert Uytterhoeven
  2021-01-08 14:24   ` Geert Uytterhoeven
  2021-01-11 20:19 ` Rob Herring
  5 siblings, 1 reply; 15+ messages in thread
From: Geert Uytterhoeven @ 2021-01-08 14:11 UTC (permalink / raw)
  To: Adam Ford
  Cc: Linux-Renesas, Adam Ford-BE, Sergei Shtylyov, David S. Miller,
	Jakub Kicinski, Rob Herring, Magnus Damm, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Mon, Dec 28, 2020 at 10:32 PM Adam Ford <aford173@gmail.com> wrote:
> The AVB driver assumes there is an external clock, but it could
> be driven by an external clock.  In order to enable a programmable
> clock, it needs to be added to the clocks list and enabled in the
> driver.  Since there currently only one clock, there is no
> clock-names list either.
>
> Update bindings to add the additional optional clock, and explicitly
> name both of them.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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

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

* Re: [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck
  2021-01-05 12:53     ` Adam Ford
@ 2021-01-08 14:13       ` Geert Uytterhoeven
  0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2021-01-08 14:13 UTC (permalink / raw)
  To: Adam Ford
  Cc: Linux-Renesas, Adam Ford-BE, Sergei Shtylyov, David S. Miller,
	Jakub Kicinski, Rob Herring, Magnus Damm, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Adam,

On Tue, Jan 5, 2021 at 1:53 PM Adam Ford <aford173@gmail.com> wrote:
> On Mon, Jan 4, 2021 at 4:41 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Mon, Dec 28, 2020 at 10:32 PM Adam Ford <aford173@gmail.com> wrote:
> > > The bindings have been updated to support two clocks, but the
> > > original clock now requires the name fck to distinguish it
> > > from the other.
> > >
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > Thanks for your patch!
> >
> > > --- a/drivers/net/ethernet/renesas/ravb_main.c
> > > +++ b/drivers/net/ethernet/renesas/ravb_main.c
> > > @@ -2142,7 +2142,7 @@ static int ravb_probe(struct platform_device *pdev)
> > >
> > >         priv->chip_id = chip_id;
> > >
> > > -       priv->clk = devm_clk_get(&pdev->dev, NULL);
> > > +       priv->clk = devm_clk_get(&pdev->dev, "fck");
> >
> > This change is not backwards compatible, as existing DTB files do not
> > have the "fck" clock.  So the driver has to keep on assuming the first
> > clock is the functional clock, and this patch is thus not needed nor
> > desired.
>
> Should I post a V2 with this removed, or can this patch just be excluded?

As far as I am concerned, it can just be excluded.
Patches 1 and 2+3 have to follow different maintainer paths anyway.

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

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

* Re: [PATCH 2/4] ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list
  2020-12-28 21:31 ` [PATCH 2/4] ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list Adam Ford
  2020-12-29  8:36   ` Sergei Shtylyov
@ 2021-01-08 14:15   ` Geert Uytterhoeven
  1 sibling, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2021-01-08 14:15 UTC (permalink / raw)
  To: Adam Ford
  Cc: Linux-Renesas, Adam Ford-BE, Sergei Shtylyov, David S. Miller,
	Jakub Kicinski, Rob Herring, Geert Uytterhoeven, Magnus Damm,
	netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Mon, Dec 28, 2020 at 10:32 PM Adam Ford <aford173@gmail.com> wrote:
> The bindings have been updated to support two clocks, but the
> original clock now requires the name fck.  Add a clock-names
> list in the device tree with fck in it.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel once PATCH 1/4 has been accepted.

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

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

* Re: [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks
  2021-01-08 14:11 ` Geert Uytterhoeven
@ 2021-01-08 14:24   ` Geert Uytterhoeven
  0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2021-01-08 14:24 UTC (permalink / raw)
  To: Adam Ford
  Cc: Linux-Renesas, Adam Ford-BE, Sergei Shtylyov, David S. Miller,
	Jakub Kicinski, Rob Herring, Magnus Damm, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Adam,

On Fri, Jan 8, 2021 at 3:11 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Mon, Dec 28, 2020 at 10:32 PM Adam Ford <aford173@gmail.com> wrote:
> > The AVB driver assumes there is an external clock, but it could
> > be driven by an external clock.  In order to enable a programmable
> > clock, it needs to be added to the clocks list and enabled in the
> > driver.  Since there currently only one clock, there is no
> > clock-names list either.
> >
> > Update bindings to add the additional optional clock, and explicitly
> > name both of them.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Upon second look...

>> --- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
>> +++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
>> @@ -49,7 +49,16 @@ properties:
>>    interrupt-names: true
>>
>>    clocks:
>> -    maxItems: 1
>> +    minItems: 1
>> +    maxItems: 2
>> +    items:
>> +      - description: AVB functional clock
>> +      - description: Optional TXC reference clock
>> +
>> +  clock-names:
>> +    items:
>> +      - const: fck
>> +      - const: txc_refclk

On R-Car Gen3 and RZ/G2, RGMII is used, and this clock is called
"txcrefclk", i.e. without underscore.
On R-Car Gen2, GMII is used, and this clock is called "gtxrefclk".

Perhaps it should just be called "refclk"?

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

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

* Re: [PATCH 3/4] arm64: dts: renesas: Add fck to etheravb-rcar-gen3 clock-names list
  2020-12-28 21:31 ` [PATCH 3/4] arm64: dts: renesas: Add fck to etheravb-rcar-gen3 " Adam Ford
@ 2021-01-08 14:26   ` Geert Uytterhoeven
  0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2021-01-08 14:26 UTC (permalink / raw)
  To: Adam Ford
  Cc: Linux-Renesas, Adam Ford-BE, Sergei Shtylyov, David S. Miller,
	Jakub Kicinski, Rob Herring, Magnus Damm, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Mon, Dec 28, 2020 at 10:32 PM Adam Ford <aford173@gmail.com> wrote:
> The bindings have been updated to support two clocks, but the
> original clock now requires the name fck.  Add a clock-names
> list in the device tree with fck in it.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel once PATCH 1/4 has been accepted.

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

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

* Re: [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks
  2020-12-28 21:31 [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks Adam Ford
                   ` (4 preceding siblings ...)
  2021-01-08 14:11 ` Geert Uytterhoeven
@ 2021-01-11 20:19 ` Rob Herring
  5 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2021-01-11 20:19 UTC (permalink / raw)
  To: Adam Ford
  Cc: aford, linux-renesas-soc, Magnus Damm, Rob Herring, linux-kernel,
	David S. Miller, Geert Uytterhoeven, devicetree, Sergei Shtylyov,
	netdev, Jakub Kicinski

On Mon, 28 Dec 2020 15:31:17 -0600, Adam Ford wrote:
> The AVB driver assumes there is an external clock, but it could
> be driven by an external clock.  In order to enable a programmable
> clock, it needs to be added to the clocks list and enabled in the
> driver.  Since there currently only one clock, there is no
> clock-names list either.
> 
> Update bindings to add the additional optional clock, and explicitly
> name both of them.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
>  .../devicetree/bindings/net/renesas,etheravb.yaml     | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

end of thread, other threads:[~2021-01-11 20:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 21:31 [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks Adam Ford
2020-12-28 21:31 ` [PATCH 2/4] ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list Adam Ford
2020-12-29  8:36   ` Sergei Shtylyov
2021-01-08 14:15   ` Geert Uytterhoeven
2020-12-28 21:31 ` [PATCH 3/4] arm64: dts: renesas: Add fck to etheravb-rcar-gen3 " Adam Ford
2021-01-08 14:26   ` Geert Uytterhoeven
2020-12-28 21:31 ` [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck Adam Ford
2020-12-29  8:22   ` Sergei Shtylyov
2021-01-04 10:41   ` Geert Uytterhoeven
2021-01-05 12:53     ` Adam Ford
2021-01-08 14:13       ` Geert Uytterhoeven
2020-12-29  8:17 ` [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks Sergei Shtylyov
2021-01-08 14:11 ` Geert Uytterhoeven
2021-01-08 14:24   ` Geert Uytterhoeven
2021-01-11 20:19 ` Rob Herring

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.