Skip to contentSkip to conversation

arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc

PATCH Applied Adam Skladowski 4 participants 7 messages Mar 2, 2023 – Mar 16, 2023

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

PATCH 1/2 arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc

In order for consumers of RPMCC XO clock to probe successfully their parent needs to be feed with reference clock to obtain proper rate, add fixed xo-board clock and supply it to rpmcc to make consumers happy. Frequency setting is left per board basis just like on other recent trees.

Fixes 0484d3ce0902 ("arm64: dts: qcom: Add DTS for MSM8976 and MSM8956 SoCs")
---
 arch/arm64/boot/dts/qcom/msm8976.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/msm8976.dtsi +9 -0
index 2d360d05aa5e..e55baafd9efd 100644
@@ -20,6 +20,13 @@ / {
 
 	chosen { };
 
+	clocks {
+		xo_board: xo-board {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+		};
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -351,6 +358,8 @@ rpm_requests: rpm-requests {
 
 				rpmcc: clock-controller {
 					compatible = "qcom,rpmcc-msm8976", "qcom,rpmcc";
+					clocks = <&xo_board>;
+					clock-names = "xo";
 					#clock-cells = <1>;
 				};
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock

As xo_board is part of board not soc we define rates per device tree, assign common 19.2Mhz rate to make consumers happy.

Fixes ff7f6d34ca07 ("arm64: dts: qcom: Add support for SONY Xperia X/X Compact")
---
 arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi +4 -0
index 67baced639c9..085d79542e1b 100644
@@ -280,3 +280,7 @@ &usb_hs_phy {
 	vdda3p3-supply = <&pm8950_l13>;
 	status = "okay";
 };
+
+&xo_board {
+	clock-frequency = <19200000>;
+};
Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock

Quoted 15 lines · Adam Skladowski

As xo_board is part of board not soc we define rates per device tree, assign common 19.2Mhz rate to make consumers happy.

Fixes ff7f6d34ca07 ("arm64: dts: qcom: Add support for SONY Xperia X/X Compact")
---
 arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi +0 -0
index 67baced639c9..085d79542e1b 100644

arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi &usb_hs_phy { · line 285

Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi +3 -0
@@ -280,3 +280,7 @@ &usb_hs_phy {
        vdda3p3-supply = <&pm8950_l13>;
        status = "okay";
 };
+
+&xo_board {
+       clock-frequency = <19200000>;

This doesn't seem to be board-specific. Please move it to msm8976.dtsi.

Quoted 4 lines
arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi +1 -1
+};
--

2.25.1

Signature · 2 lines
With best wishes
Dmitry
Reviewed-by
#3 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock

Quoted 12 lines · Dmitry Baryshkov
Quoted 10 lines · Adam Skladowski

As xo_board is part of board not soc we define rates per device tree, assign common 19.2Mhz rate to make consumers happy.

Fixes ff7f6d34ca07 ("arm64: dts: qcom: Add support for SONY Xperia X/X Compact")
---
 arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
Quoted 13 lines

arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi &usb_hs_phy { · line 285

Quoted 11 lines
arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi +3 -0
index 67baced639c9..085d79542e1b 100644
@@ -280,3 +280,7 @@ &usb_hs_phy {
        vdda3p3-supply = <&pm8950_l13>;
        status = "okay";
 };
+
+&xo_board {
+       clock-frequency = <19200000>;

This doesn't seem to be board-specific. Please move it to msm8976.dtsi.

Adam pointed out the clock frequency is now thought to be a board-specific thing.

Signature · 2 lines
With best wishes
Dmitry
Reviewed-by on v1 1/2
#4 lore raw
In reply to Adam Skladowski
Quoted 16 lines · Adam Skladowski

In order for consumers of RPMCC XO clock to probe successfully their parent needs to be feed with reference clock to obtain proper rate, add fixed xo-board clock and supply it to rpmcc to make consumers happy. Frequency setting is left per board basis just like on other recent trees.

Fixes 0484d3ce0902 ("arm64: dts: qcom: Add DTS for MSM8976 and MSM8956 SoCs")
---
  arch/arm64/boot/dts/qcom/msm8976.dtsi | 9 +++++++++
  1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/msm8976.dtsi +0 -0
index 2d360d05aa5e..e55baafd9efd 100644

arch/arm64/boot/dts/qcom/msm8976.dtsi / { · line 26

Quoted 7 lines
arch/arm64/boot/dts/qcom/msm8976.dtsi +4 -0
@@ -20,6 +20,13 @@ / {
 
  	chosen { };
 
+	clocks {
+		xo_board: xo-board {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;

With the clock-frequency moved here:

Quoted 15 lines
arch/arm64/boot/dts/qcom/msm8976.dtsi +5 -0
+		};
+	};
+
  	cpus {
  		#address-cells = <1>;
  		#size-cells = <0>;
@@ -351,6 +358,8 @@ rpm_requests: rpm-requests {
 
  				rpmcc: clock-controller {
  					compatible = "qcom,rpmcc-msm8976", "qcom,rpmcc";
+					clocks = <&xo_board>;
+					clock-names = "xo";
  					#clock-cells = <1>;
  				};
 
Signature · 2 lines
With best wishes
Dmitry
#5 lore raw
In reply to Adam Skladowski
Quoted 8 lines · Adam Skladowski

In order for consumers of RPMCC XO clock to probe successfully their parent needs to be feed with reference clock to obtain proper rate, add fixed xo-board clock and supply it to rpmcc to make consumers happy. Frequency setting is left per board basis just like on other recent trees.

Fixes 0484d3ce0902 ("arm64: dts: qcom: Add DTS for MSM8976 and MSM8956 SoCs")

---

So your commit message suggests that this commit does not actually fix the problem, but lays the groundwork for it..

I'd say squashing these two into a single one would make more sense, as if somebody was bisecting something and landed on this one, there would be little hope in getting a boot if what you said holds.

Konrad

Quoted 30 lines
 arch/arm64/boot/dts/qcom/msm8976.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/msm8976.dtsi +9 -0
index 2d360d05aa5e..e55baafd9efd 100644
@@ -20,6 +20,13 @@ / {
 
 	chosen { };
 
+	clocks {
+		xo_board: xo-board {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+		};
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -351,6 +358,8 @@ rpm_requests: rpm-requests {
 
 				rpmcc: clock-controller {
 					compatible = "qcom,rpmcc-msm8976", "qcom,rpmcc";
+					clocks = <&xo_board>;
+					clock-names = "xo";
 					#clock-cells = <1>;
 				};
 
maintainer Applied
#6 lore raw

Re: (subset) [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc

In reply to Adam Skladowski
Quoted 6 lines · Adam Skladowski

In order for consumers of RPMCC XO clock to probe successfully their parent needs to be feed with reference clock to obtain proper rate, add fixed xo-board clock and supply it to rpmcc to make consumers happy. Frequency setting is left per board basis just like on other recent trees.

Applied, thanks!

[1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc

      commit: 4a2c9b9e1215c557c17a48e3fabe9b1674c1d608
[2/2] arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock
      commit: 4a2c9b9e1215c557c17a48e3fabe9b1674c1d608

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>