Skip to contentSkip to conversation

PXO fixes for ipq8064 dtsi

PATCH Applied Ansuel Smith 3 participants 6 messages Apr 30, 2022 – Jul 3, 2022

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

v2 cover PXO fixes for ipq8064 dtsi

This small series is a fix for a long lasting error present in ipq8064 dtsi. At times the kpss-gcc driver was defined in the dts with <&gcc PXO_SRC> a pxo clock. While PXO_SRC exist in the includes, the gcc driver never expose it and if a driver try to actually use it the result is a kernel panic even before any log is init.

To prepare for correct conversion of the different krait drivers to parent data and to reflect what is defined in the Documentation with actual driver and dts implementation, fix this error by using the now defined pxo_board fixed clock.

v2:
- Swap patch 1 with patch 2 (fixes first changes second)
- Add fixes tag

Ansuel Smith (2):
ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock
ARM: dts: qcom: add syscon and cxo/pxo clock to gcc node for ipq8064

 arch/arm/boot/dts/qcom-ipq8064.dtsi | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/2 ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock

Replace gcc PXO phandle to pxo_board fixed clock declared in the dts. gcc driver doesn't provide PXO_SRC as it's a fixed-clock. This cause a kernel panic if any driver actually try to use it.

Fixes 40cf5c884a96 ("ARM: dts: qcom: add L2CC and RPM for IPQ8064")
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/qcom-ipq8064.dtsi +2 -2
index 996f4458d9fc..e6ca8d1d1c5f 100644
@@ -304,7 +304,7 @@ cxo_board {
 			clock-frequency = <25000000>;
 		};
 
-		pxo_board {
+		pxo_board: pxo_board {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			clock-frequency = <25000000>;
@@ -782,7 +782,7 @@ tcsr: syscon@1a400000 {
 		l2cc: clock-controller@2011000 {
 			compatible = "qcom,kpss-gcc", "syscon";
 			reg = <0x2011000 0x1000>;
-			clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
+			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
 			clock-names = "pll8_vote", "pxo";
 			clock-output-names = "acpu_l2_aux";
 		};
Signature · 1 line
2.34.1
Reviewed-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock

Quoted 7 lines · Ansuel Smith

Replace gcc PXO phandle to pxo_board fixed clock declared in the dts. gcc driver doesn't provide PXO_SRC as it's a fixed-clock. This cause a kernel panic if any driver actually try to use it.

Fixes 40cf5c884a96 ("ARM: dts: qcom: add L2CC and RPM for IPQ8064")
Quoted 29 lines
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/qcom-ipq8064.dtsi +2 -3
index 996f4458d9fc..e6ca8d1d1c5f 100644
@@ -304,7 +304,7 @@ cxo_board {
                        clock-frequency = <25000000>;
                };
 
-               pxo_board {
+               pxo_board: pxo_board {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <25000000>;
@@ -782,7 +782,7 @@ tcsr: syscon@1a400000 {
                l2cc: clock-controller@2011000 {
                        compatible = "qcom,kpss-gcc", "syscon";
                        reg = <0x2011000 0x1000>;
-                       clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
+                       clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
                        clock-names = "pll8_vote", "pxo";
                        clock-output-names = "acpu_l2_aux";
                };
--

2.34.1

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

PATCH v2 2/2 ARM: dts: qcom: add syscon and cxo/pxo clock to gcc node for ipq8064

In reply to Ansuel Smith

Add syscon compatible required for tsens driver to correctly probe driver and access the reg. Also add cxo and pxo tag and declare them as gcc clock now requires them for the ipq8064 gcc driver that has now been modernized.

---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm/boot/dts/qcom-ipq8064.dtsi +4 -2
index e6ca8d1d1c5f..ad30f7c8a5a7 100644
@@ -298,7 +298,7 @@ smem: smem@41000000 {
 	};
 
 	clocks {
-		cxo_board {
+		cxo_board: cxo_board {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			clock-frequency = <25000000>;
@@ -736,7 +736,9 @@ tsens_calib_backup: calib_backup@410 {
 		};
 
 		gcc: clock-controller@900000 {
-			compatible = "qcom,gcc-ipq8064";
+			compatible = "qcom,gcc-ipq8064", "syscon";
+			clocks = <&pxo_board>, <&cxo_board>;
+			clock-names = "pxo", "cxo";
 			reg = <0x00900000 0x4000>;
 			#clock-cells = <1>;
 			#reset-cells = <1>;
Signature · 1 line
2.34.1
Reviewed-by on v2 2/2
#4 lore raw

Re: [PATCH v2 2/2] ARM: dts: qcom: add syscon and cxo/pxo clock to gcc node for ipq8064

Quoted 8 lines · Ansuel Smith

Add syscon compatible required for tsens driver to correctly probe driver and access the reg. Also add cxo and pxo tag and declare them as gcc clock now requires them for the ipq8064 gcc driver that has now been modernized.

Quoted 31 lines
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm/boot/dts/qcom-ipq8064.dtsi +4 -3
index e6ca8d1d1c5f..ad30f7c8a5a7 100644
@@ -298,7 +298,7 @@ smem: smem@41000000 {
        };
 
        clocks {
-               cxo_board {
+               cxo_board: cxo_board {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <25000000>;
@@ -736,7 +736,9 @@ tsens_calib_backup: calib_backup@410 {
                };
 
                gcc: clock-controller@900000 {
-                       compatible = "qcom,gcc-ipq8064";
+                       compatible = "qcom,gcc-ipq8064", "syscon";
+                       clocks = <&pxo_board>, <&cxo_board>;
+                       clock-names = "pxo", "cxo";
                        reg = <0x00900000 0x4000>;
                        #clock-cells = <1>;
                        #reset-cells = <1>;
--

2.34.1

Signature · 2 lines
With best wishes
Dmitry
#5 lore raw
In reply to Ansuel Smith
Quoted 6 lines · Ansuel Smith

This small series is a fix for a long lasting error present in ipq8064 dtsi. At times the kpss-gcc driver was defined in the dts with <&gcc PXO_SRC> a pxo clock. While PXO_SRC exist in the includes, the gcc driver never expose it and if a driver try to actually use it the result is a kernel panic even before any log is init.

Quoted 6 lines

To prepare for correct conversion of the different krait drivers to parent data and to reflect what is defined in the Documentation with actual driver and dts implementation, fix this error by using the now defined pxo_board fixed clock.

[...]

Applied, thanks!

[1/2] ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock

      commit: eb9e93937756a05787977875830c0dc482cb57e0

[2/2] ARM: dts: qcom: add syscon and cxo/pxo clock to gcc node for ipq8064
(no commit info)

Best regards,

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