dt-bindings: net: renesas,etheravb: Add additional clocks
Subsystems (5)
PATCH 3/4 arm64: dts: renesas: Add fck to etheravb-rcar-gen3 clock-names list
In reply to Adam FordThe 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.
--- 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(+)
arch/arm64/boot/dts/renesas/r8a774a1.dtsi +1 -0
@@ -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";
arch/arm64/boot/dts/renesas/r8a774b1.dtsi +1 -0
@@ -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";
arch/arm64/boot/dts/renesas/r8a774c0.dtsi +1 -0
@@ -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";
arch/arm64/boot/dts/renesas/r8a774e1.dtsi +1 -0
@@ -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";
arch/arm64/boot/dts/renesas/r8a77951.dtsi +1 -0
@@ -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";
arch/arm64/boot/dts/renesas/r8a77960.dtsi +1 -0
@@ -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";
arch/arm64/boot/dts/renesas/r8a77961.dtsi +1 -0
@@ -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";
arch/arm64/boot/dts/renesas/r8a77965.dtsi +1 -0
@@ -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";
arch/arm64/boot/dts/renesas/r8a77970.dtsi +1 -0
@@ -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";
arch/arm64/boot/dts/renesas/r8a77980.dtsi +1 -0
@@ -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";
arch/arm64/boot/dts/renesas/r8a77990.dtsi +1 -0
@@ -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";
arch/arm64/boot/dts/renesas/r8a77995.dtsi +1 -0
@@ -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";
Signature · 1 line
2.25.1
PATCH 4/4 net: ethernet: ravb: Name the AVB functional clock fck
In reply to Adam FordThe bindings have been updated to support two clocks, but the original clock now requires the name fck to distinguish it from the other.
--- drivers/net/ethernet/renesas/ravb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/renesas/ravb_main.c +1 -1
@@ -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;
Signature · 1 line
2.25.1
PATCH 1/4 dt-bindings: net: renesas,etheravb: Add additional clocks
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.
--- .../devicetree/bindings/net/renesas,etheravb.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/net/renesas,etheravb.yaml +10 -1
@@ -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
Signature · 1 line
2.25.1
PATCH 2/4 ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list
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.
--- 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(+)
arch/arm/boot/dts/r8a7742.dtsi +1 -0
@@ -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>;
arch/arm/boot/dts/r8a7743.dtsi +1 -0
@@ -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>;
arch/arm/boot/dts/r8a7744.dtsi +1 -0
@@ -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>;
arch/arm/boot/dts/r8a7745.dtsi +1 -0
@@ -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>;
arch/arm/boot/dts/r8a77470.dtsi +1 -0
@@ -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>;
arch/arm/boot/dts/r8a7790.dtsi +1 -0
@@ -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>;
arch/arm/boot/dts/r8a7791.dtsi +1 -0
@@ -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>;
arch/arm/boot/dts/r8a7792.dtsi +1 -0
@@ -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>;
arch/arm/boot/dts/r8a7794.dtsi +1 -0
@@ -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>;
Signature · 1 line
2.25.1
Hello!
Quoted 2 lines · Adam Ford
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? :-)
Quoted 3 lines
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
Quoted 6 lines
clock-names list either.
Update bindings to add the additional optional clock, and explicitly name both of them.
Signed-off-by Adam Ford <[email protected]>
[...]
MBR, Sergei
Re: [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck
In reply to Adam FordQuoted 5 lines · Adam Ford
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 <[email protected]>
MBR, Sergei
Re: [PATCH 2/4] ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list
In reply to Adam FordQuoted 3 lines · Adam Ford
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...
Quoted 1 line
Signed-off-by Adam Ford <[email protected]>
[...]
MBR, Sergei
Re: [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck
In reply to Adam FordHi Adam,
Quoted 5 lines · Adam Ford
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 <[email protected]>
Thanks for your patch!
drivers/net/ethernet/renesas/ravb_main.c static int ravb_probe(struct platform_device *pdev) · line 2145
Quoted 8 lines
drivers/net/ethernet/renesas/ravb_main.c +1
-1@@ -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.
drivers/net/ethernet/renesas/ravb_main.c static int ravb_probe(struct platform_device *pdev) · line 2148
Quoted 3 lines
drivers/net/ethernet/renesas/ravb_main.c +0
-0if (IS_ERR (priv->clk)) { error =PTR_ERR (priv->clk); goto out_release;
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
Re: [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck
Quoted 18 lines · Geert Uytterhoeven
Hi Adam,
Quoted 5 lines · Adam Ford
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 <[email protected]>Thanks for your patch!
Quoted 6 lines
drivers/net/ethernet/renesas/ravb_main.c +0
-0@@ -2142,7 +2142,7 @@ static int ravb_probe(struct platform_device *pdev) priv->chip_id = chip_id;
Quoted 7 lines
drivers/net/ethernet/renesas/ravb_main.c static int ravb_probe(struct platform_device *pdev) · line 2145
Quoted 2 lines
drivers/net/ethernet/renesas/ravb_main.c +1
-1- 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
Quoted 15 lines
drivers/net/ethernet/renesas/ravb_main.c static int ravb_probe(struct platform_device *pdev) · line 2148
Quoted 4 lines
drivers/net/ethernet/renesas/ravb_main.c +0
-0if (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 -- [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
Quoted 10 lines · Adam Ford
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 <[email protected]>
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
Re: [PATCH 4/4] net: ethernet: ravb: Name the AVB functional clock fck
In reply to Adam FordHi Adam,
Quoted 24 lines · Adam Ford
Quoted 15 lines · Geert Uytterhoeven
Quoted 5 lines · Adam Ford
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 <[email protected]>Thanks for your patch!
Quoted 6 lines
drivers/net/ethernet/renesas/ravb_main.c +0
-0@@ -2142,7 +2142,7 @@ static int ravb_probe(struct platform_device *pdev) priv->chip_id = chip_id;Quoted 7 lines
drivers/net/ethernet/renesas/ravb_main.c static int ravb_probe(struct platform_device *pdev) · line 2145
Quoted 2 lines
drivers/net/ethernet/renesas/ravb_main.c +1
-1- 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.
Quoted 1 line
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
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
Re: [PATCH 2/4] ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list
In reply to Adam FordQuoted 5 lines · Adam Ford
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 <[email protected]>
i.e. will queue in renesas-devel once PATCH 1/4 has been accepted.
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
Hi Adam,
Quoted 7 lines · Geert Uytterhoeven
Quoted 6 lines · Adam Ford
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.
Quoted 6 lines
Quoted 4 lines
Update bindings to add the additional optional clock, and explicitly name both of them.
Signed-off-by Adam Ford <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>
Upon second look...
Quoted 5 lines
Quoted 5 lines
Documentation/devicetree/bindings/net/renesas,etheravb.yaml +0
-0@@ -49,7 +49,16 @@ properties: interrupt-names: true
Quoted 12 lines
Documentation/devicetree/bindings/net/renesas,etheravb.yaml properties: · line 61
Quoted 12 lines
Documentation/devicetree/bindings/net/renesas,etheravb.yaml +10
-1clocks: - 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
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
Re: [PATCH 3/4] arm64: dts: renesas: Add fck to etheravb-rcar-gen3 clock-names list
In reply to Adam FordQuoted 5 lines · Adam Ford
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 <[email protected]>
i.e. will queue in renesas-devel once PATCH 1/4 has been accepted.
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
Quoted 6 lines · Adam Ford
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.
Quoted 8 lines
Update bindings to add the additional optional clock, and explicitly name both of them.
Signed-off-by Adam Ford <[email protected]>--- .../devicetree/bindings/net/renesas,etheravb.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)