Skip to contentSkip to conversation

ARM: dts: rmobile: beacon-renesom: Enable USB and ethernet ref clocks

PATCH In review Adam Ford 1 participant 3 messages Aug 24, 2021 – Aug 30, 2021

Subsystems (2)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH v2 1/2 ARM: dts: rmobile: beacon-renesom: Enable USB and ethernet ref clocks

There are two versaclock programmable clock chips used to provide reference clocks for both USB and Ethernet. Enable the driver in the configs to run these clocks.

---
V2: Move from defconfig to kconfig

arch/arm/mach-rmobile/Kconfig.64 +6 -0
index a6dcce180b..c90ea06692 100644
@@ -76,18 +76,24 @@ config TARGET_BEACON_RZG2H
 	select R8A774E1
 	select RZ_G2
 	select PINCTRL_PFC_R8A774E1
+	select CLK_CCF
+	select CLK_VERSACLOCK
 
 config TARGET_BEACON_RZG2M
 	bool "Beacon EmbeddedWorks RZ/G2M Dev Kit"
 	select R8A774A1
 	select RZ_G2
 	select PINCTRL_PFC_R8A774A1
+	select CLK_CCF
+	select CLK_VERSACLOCK
 
 config TARGET_BEACON_RZG2N
 	bool "Beacon EmbeddedWorks RZ/G2N Dev Kit"
 	select R8A774B1
 	select RZ_G2
 	select PINCTRL_PFC_R8A774B1
+	select CLK_CCF
+	select CLK_VERSACLOCK
 
 config TARGET_CONDOR
 	bool "Condor board"
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH v2 2/2 ARM: dts: rmobile: beacon-renesom: Enable Ethernet

Now that the versaclock driver is available, point the ethernet node at these clocks and configure the RGMII to enable Ethernet.

---
V2: Fix subject heading

arch/arm/dts/beacon-renesom-som.dtsi +3 -0
index d30bab3c8b..9fe541b607 100644
@@ -60,8 +60,11 @@
 	pinctrl-0 = <&avb_pins>;
 	pinctrl-names = "default";
 	phy-handle = <&phy0>;
+	phy-mode = "rgmii-txid";
 	rx-internal-delay-ps = <1800>;
 	tx-internal-delay-ps = <2000>;
+	clocks = <&cpg CPG_MOD 812>, <&versaclock5 4>;
+	clock-names = "fck", "refclk";
 	status = "okay";
 
 	phy0: ethernet-phy@0 {
Signature · 1 line
2.25.1
author
#2 lore raw
In reply to Adam Ford
Quoted 7 lines · Adam Ford

There are two versaclock programmable clock chips used to provide reference clocks for both USB and Ethernet. Enable the driver in the configs to run these clocks.

---

Go ahead and drop this now.
I have FIT working with multiple DTB's from one config file. I'll push a new series to unify M/N/H boards into one defconfig, then add new the functions to the one remaining board. That should eliminate a lot of duplicated entries.

adam

Quoted 34 lines

V2: Move from defconfig to kconfig

arch/arm/mach-rmobile/Kconfig.64 +6 -1
index a6dcce180b..c90ea06692 100644
@@ -76,18 +76,24 @@ config TARGET_BEACON_RZG2H
        select R8A774E1
        select RZ_G2
        select PINCTRL_PFC_R8A774E1
+       select CLK_CCF
+       select CLK_VERSACLOCK
 
 config TARGET_BEACON_RZG2M
        bool "Beacon EmbeddedWorks RZ/G2M Dev Kit"
        select R8A774A1
        select RZ_G2
        select PINCTRL_PFC_R8A774A1
+       select CLK_CCF
+       select CLK_VERSACLOCK
 
 config TARGET_BEACON_RZG2N
        bool "Beacon EmbeddedWorks RZ/G2N Dev Kit"
        select R8A774B1
        select RZ_G2
        select PINCTRL_PFC_R8A774B1
+       select CLK_CCF
+       select CLK_VERSACLOCK
 
 config TARGET_CONDOR
        bool "Condor board"
--

2.25.1