diff mbox series

[RFC,1/2] arm64: dts: qcom: sm8450: move board clocks to DTS files

Message ID 20241115-fix-board-clocks-v1-1-8cb00a4f57c2@linaro.org
State New
Headers show
Series [RFC,1/2] arm64: dts: qcom: sm8450: move board clocks to DTS files | expand

Commit Message

Dmitry Baryshkov Nov. 15, 2024, 6:59 a.m. UTC
SM8450 is one of the platforms where board-level clocks (XO, sleep) are
fully defined in the SoC dtsi file. This is not correct and doesn't
fully follow the DT guidelines. Move these two clocks to the board files
completely.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8450-hdk.dts                 | 14 ++++++++++++++
 arch/arm64/boot/dts/qcom/sm8450-qrd.dts                 | 14 ++++++++++++++
 arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi | 14 ++++++++++++++
 arch/arm64/boot/dts/qcom/sm8450.dtsi                    | 14 --------------
 4 files changed, 42 insertions(+), 14 deletions(-)

Comments

Krzysztof Kozlowski Nov. 23, 2024, 5 p.m. UTC | #1
On 15/11/2024 07:59, Dmitry Baryshkov wrote:
> SM8450 is one of the platforms where board-level clocks (XO, sleep) are
> fully defined in the SoC dtsi file. This is not correct and doesn't
> fully follow the DT guidelines. Move these two clocks to the board files
> completely.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sm8450-hdk.dts                 | 14 ++++++++++++++
>  arch/arm64/boot/dts/qcom/sm8450-qrd.dts                 | 14 ++++++++++++++
>  arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi | 14 ++++++++++++++
>  arch/arm64/boot/dts/qcom/sm8450.dtsi                    | 14 --------------
>  4 files changed, 42 insertions(+), 14 deletions(-)


Clocks could stay and only their frequency would be in DTS, but either
way is fine:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Tingwei Zhang Nov. 27, 2024, 8:31 a.m. UTC | #2
On 11/15/2024 2:59 PM, Dmitry Baryshkov wrote:
> SM8450 is one of the platforms where board-level clocks (XO, sleep) are
> fully defined in the SoC dtsi file. This is not correct and doesn't
> fully follow the DT guidelines. Move these two clocks to the board files
> completely.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   arch/arm64/boot/dts/qcom/sm8450-hdk.dts                 | 14 ++++++++++++++
>   arch/arm64/boot/dts/qcom/sm8450-qrd.dts                 | 14 ++++++++++++++
>   arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi | 14 ++++++++++++++
>   arch/arm64/boot/dts/qcom/sm8450.dtsi                    | 14 --------------
>   4 files changed, 42 insertions(+), 14 deletions(-)
> 
<...>
> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> index 53147aa6f7e4acb102dd5dee51f0aec164b971c7..7dc183cc5c29374a19aabb36086e27edfffeaf37 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> @@ -33,20 +33,6 @@ / {
>   
>   	chosen { };
>   
> -	clocks {
> -		xo_board: xo-board {
> -			compatible = "fixed-clock";
> -			#clock-cells = <0>;
> -			clock-frequency = <76800000>;
> -		};
> -
> -		sleep_clk: sleep-clk {
> -			compatible = "fixed-clock";
> -			#clock-cells = <0>;
> -			clock-frequency = <32000>;
> -		};
> -	};
> -
Sleep clock is moved to board device tree while reference of this clock 
is still in soc device tree like gcc node. Is this preferrable way to 
reference the node defined in board device in soc device tree?
>   	cpus {
>   		#address-cells = <2>;
>   		#size-cells = <0>;
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
index 2ff40a120aadf9e7556bb568b5c99847584189fa..f50a6cbd4b6800a0236f1e5b4e0242c50472cbf3 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
@@ -59,6 +59,20 @@  chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+	clocks {
+		xo_board: xo-board {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <76800000>;
+		};
+
+		sleep_clk: sleep-clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <32000>;
+		};
+	};
+
 	hdmi-out {
 		compatible = "hdmi-connector";
 		type = "a";
diff --git a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
index 8c39fbcaad802893870141582731ea8105994dd1..c330f019a4ed42ee8a0ead2cd39c6b1dc45cb1b7 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
@@ -28,6 +28,20 @@  chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+	clocks {
+		xo_board: xo-board {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <76800000>;
+		};
+
+		sleep_clk: sleep-clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <32000>;
+		};
+	};
+
 	vph_pwr: vph-pwr-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vph_pwr";
diff --git a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi
index cc1335a07a35c7a4239d684f978d958f7d47f533..135666c96493c65ed4d926df7396f170f9b36356 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi
@@ -28,6 +28,20 @@  chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+	clocks {
+		xo_board: xo-board {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <76800000>;
+		};
+
+		sleep_clk: sleep-clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <32000>;
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 		label = "gpio-keys";
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 53147aa6f7e4acb102dd5dee51f0aec164b971c7..7dc183cc5c29374a19aabb36086e27edfffeaf37 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -33,20 +33,6 @@  / {
 
 	chosen { };
 
-	clocks {
-		xo_board: xo-board {
-			compatible = "fixed-clock";
-			#clock-cells = <0>;
-			clock-frequency = <76800000>;
-		};
-
-		sleep_clk: sleep-clk {
-			compatible = "fixed-clock";
-			#clock-cells = <0>;
-			clock-frequency = <32000>;
-		};
-	};
-
 	cpus {
 		#address-cells = <2>;
 		#size-cells = <0>;