Skip to contentSkip to conversation

ARM: dts: stm32: Add PTP clock to Ethernet controller

PATCH In review Kurt Kanzenbach 2 participants 2 messages Mar 16, 2021 – Apr 1, 2021

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

PATCH 1/1 ARM: dts: stm32: Add PTP clock to Ethernet controller

Add the PTP clock to the Ethernet controller. Otherwise, the driver uses the main clock to derive the PTP frequency which is not necessarily the correct one.

Tested with linuxptp on Olimex STMP1-OLinuXino-LIME2.

---
 arch/arm/boot/dts/stm32mp151.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/boot/dts/stm32mp151.dtsi +2 -0
index 3c75abacb374..d1f596ea2fd5 100644
@@ -1421,11 +1421,13 @@
 				      "mac-clk-tx",
 				      "mac-clk-rx",
 				      "eth-ck",
+				      "ptp_ref",
 				      "ethstp";
 			clocks = <&rcc ETHMAC>,
 				 <&rcc ETHTX>,
 				 <&rcc ETHRX>,
 				 <&rcc ETHCK_K>,
+				 <&rcc ETHPTP_K>,
 				 <&rcc ETHSTP>;
 			st,syscon = <&syscfg 0x4>;
 			snps,mixed-burst;
Signature · 1 line
2.20.1
maintainer
#1 lore raw

Hi Kurt

Quoted 19 lines · Kurt Kanzenbach

Add the PTP clock to the Ethernet controller. Otherwise, the driver uses the main clock to derive the PTP frequency which is not necessarily the correct one.

Tested with linuxptp on Olimex STMP1-OLinuXino-LIME2.

---
  arch/arm/boot/dts/stm32mp151.dtsi | 2 ++
  1 file changed, 2 insertions(+)
arch/arm/boot/dts/stm32mp151.dtsi +0 -0
index 3c75abacb374..d1f596ea2fd5 100644
@@ -1421,11 +1421,13 @@
  				      "mac-clk-tx",
  				      "mac-clk-rx",
  				      "eth-ck",

arch/arm/boot/dts/stm32mp151.dtsi line 1433

Quoted 10 lines
arch/arm/boot/dts/stm32mp151.dtsi +2 -0
+				      "ptp_ref",
  				      "ethstp";
  			clocks = <&rcc ETHMAC>,
  				 <&rcc ETHTX>,
  				 <&rcc ETHRX>,
  				 <&rcc ETHCK_K>,
+				 <&rcc ETHPTP_K>,
  				 <&rcc ETHSTP>;
  			st,syscon = <&syscfg 0x4>;
  			snps,mixed-burst;

Applied on stm32-next.

Thanks.
Alex