Skip to contentSkip to conversation

arm64: dts: imx8mp-beacon: Configure 100MHz PCIe Ref Clk

PATCH Superseded Adam Ford 3 participants 3 messages Aug 13, 2023 – Sep 24, 2023

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH v2 1/1 arm64: dts: imx8mp-beacon: Configure 100MHz PCIe Ref Clk

There is a I2C controlled 100MHz Reference clock used by the PCIe controller. Configure this clock's DIF1 output to be used by the PCIe.

---
V2: Remove the pcie0_refclk clock that the new one replaces.

arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts +15 -7
index acd265d8b58e..a8ccde678c33 100644
@@ -23,6 +23,12 @@ chosen {
 		stdout-path = &uart2;
 	};
 
+	clk_xtal25: clk-xtal25 {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <25000000>;
+	};
+
 	connector {
 		compatible = "usb-c-connector";
 		label = "USB-C";
@@ -112,12 +118,6 @@ led-3 {
 		};
 	};
 
-	pcie0_refclk: clock-pcie {
-		compatible = "fixed-clock";
-		#clock-cells = <0>;
-		clock-frequency = <100000000>;
-	};
-
 	reg_audio: regulator-wm8962 {
 		compatible = "regulator-fixed";
 		regulator-name = "3v3_aud";
@@ -246,6 +246,13 @@ pca6416_3: gpio@20 {
 		interrupt-controller;
 		#interrupt-cells = <2>;
 	};
+
+	pcieclk: clk@68 {
+		compatible = "renesas,9fgv0241";
+		reg = <0x68>;
+		clocks = <&clk_xtal25>;
+		#clock-cells = <1>;
+	};
 };
 
 &i2c3 {
@@ -372,8 +379,9 @@ &pcie {
 };
 
 &pcie_phy {
+	fsl,clkreq-unsupported;
 	fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
-	clocks = <&pcie0_refclk>;
+	clocks = <&pcieclk 1>;
 	clock-names = "ref";
 	status = "okay";
 };
Signature · 1 line
2.39.2
reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Adam Ford

There is a I2C controlled 100MHz Reference clock used by the PCIe controller. Configure this clock's DIF1 output to be used by the PCIe.

---
V2: Remove the pcie0_refclk clock that the new one replaces.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw
In reply to Adam Ford
Quoted 13 lines · Adam Ford

There is a I2C controlled 100MHz Reference clock used by the PCIe controller. Configure this clock's DIF1 output to be used by the PCIe.

---
V2: Remove the pcie0_refclk clock that the new one replaces.

arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts +0 -0
index acd265d8b58e..a8ccde678c33 100644

arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts chosen { · line 26

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts +1 -0
@@ -23,6 +23,12 @@ chosen {
 		stdout-path = &uart2;
 	};
 
+	clk_xtal25: clk-xtal25 {

clock-xtal25 for the node name?

Quoted 22 lines
arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts +5 -6
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <25000000>;
+	};
+
 	connector {
 		compatible = "usb-c-connector";
 		label = "USB-C";
@@ -112,12 +118,6 @@ led-3 {
 		};
 	};
 
-	pcie0_refclk: clock-pcie {
-		compatible = "fixed-clock";
-		#clock-cells = <0>;
-		clock-frequency = <100000000>;
-	};
-
 	reg_audio: regulator-wm8962 {
 		compatible = "regulator-fixed";
 		regulator-name = "3v3_aud";

arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts pca6416_3: gpio@20 { · line 250

Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts +2 -0
@@ -246,6 +246,13 @@ pca6416_3: gpio@20 {
 		interrupt-controller;
 		#interrupt-cells = <2>;
 	};
+
+	pcieclk: clk@68 {

clock-generator in the bindings example seems a better node name to me.

Shawn

Quoted 22 lines
arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts +7 -1
+		compatible = "renesas,9fgv0241";
+		reg = <0x68>;
+		clocks = <&clk_xtal25>;
+		#clock-cells = <1>;
+	};
 };
 
 &i2c3 {
@@ -372,8 +379,9 @@ &pcie {
 };
 
 &pcie_phy {
+	fsl,clkreq-unsupported;
 	fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
-	clocks = <&pcie0_refclk>;
+	clocks = <&pcieclk 1>;
 	clock-names = "ref";
 	status = "okay";
 };
Signature · 1 line
2.39.2