Re: [PATCH v2 01/31] arm64: dts: qcom: msm8916: correct sleep clock frequency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 30, 2024 at 03:44:13AM +0200, Dmitry Baryshkov wrote:
The MSM8916 platform uses PM8916 to provide sleep clock. According to the
documentation, that clock has 32.7645 kHz frequency. Correct the sleep
clock definition.

Fixes: f4fb6aeafaaa ("arm64: dts: qcom: msm8916: Add fixed rate on-board oscillators")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>

Thanks for spotting this! This fix looks good independent of the more
controversial "arm64: dts: qcom: move board clocks to SoC DTSI files"
changes. Maybe move these to a separate series?

---
arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 5e558bcc9d87893486352e5e211f131d4a1f67e5..8f35c9af18782aa1da7089988692e6588c4b7c5d 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -125,7 +125,7 @@ xo_board: xo-board {
		sleep_clk: sleep-clk {
			compatible = "fixed-clock";
			#clock-cells = <0>;
-			clock-frequency = <32768>;
+			clock-frequency = <32764>;

To be precise the PM8916 specification says the sleep clock is "The 19.2
MHz XO divided by 586". Maybe we can actually describe it that way with
a fixed-factor-clock?

		sleep_clk: sleep-clk {
			compatible = "fixed-factor-clock";
			clocks = <&xo_board>;
			#clock-cells = <0>;
			clock-div = <586>;
			clock-mult = <1>;
		};

If we keep the fixed-clock with the hardcoded frequency I wonder if we
should put 32765 instead of 32764. If you calculate it exactly it's
slightly closer to 32765 than 32764. :-)

	19200000/586 = 32764.505119453926 = ~32765

Thanks,
Stephan




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux