diff mbox series

[1/1] arm64: dts: qcom: bullhead: Fix sdcard1 overclocking

Message ID 20220221200540.14460-1-petr.vorel@gmail.com (mailing list archive)
State Superseded
Headers show
Series [1/1] arm64: dts: qcom: bullhead: Fix sdcard1 overclocking | expand

Commit Message

Petr Vorel Feb. 21, 2022, 8:05 p.m. UTC
rev 1.01 (msm8992-lg-bullhead-rev-101.dts) has overclocking warnings:
[    1.997606] mmc0: Card appears overclocked; req 200000000 Hz, actual 343999999 Hz
[    1.997681] mmc0: Card appears overclocked; req 200000000 Hz, actual 343999999 Hz
[    2.010904] mmc0: Card appears overclocked; req 400000000 Hz, actual 687999999 Hz
[    2.012961] mmc0: Card appears overclocked; req 200000000 Hz, actual 343999999 Hz
[    2.027497] mmc0: Card appears overclocked; req 400000000 Hz, actual 687999999 Hz
[    2.027607] mmc0: Card appears overclocked; req 400000000 Hz, actual 687999999 Hz
[    2.039699] mmc0: new HS400 MMC card at address 0001

Similarly to angler use gcc GPLL4_EARLY to get rid of the warnings.
Not tested on 1.0, but should work here as well.

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
@Jean: could you please test it on your rev 1.0?
Thanks!

Kind regards,
Petr

 arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Petr Vorel March 23, 2022, 8:44 p.m. UTC | #1
Hi,

> rev 1.01 (msm8992-lg-bullhead-rev-101.dts) has overclocking warnings:
> [    1.997606] mmc0: Card appears overclocked; req 200000000 Hz, actual 343999999 Hz
> [    1.997681] mmc0: Card appears overclocked; req 200000000 Hz, actual 343999999 Hz
> [    2.010904] mmc0: Card appears overclocked; req 400000000 Hz, actual 687999999 Hz
> [    2.012961] mmc0: Card appears overclocked; req 200000000 Hz, actual 343999999 Hz
> [    2.027497] mmc0: Card appears overclocked; req 400000000 Hz, actual 687999999 Hz
> [    2.027607] mmc0: Card appears overclocked; req 400000000 Hz, actual 687999999 Hz
> [    2.039699] mmc0: new HS400 MMC card at address 0001

> Similarly to angler use gcc GPLL4_EARLY to get rid of the warnings.
> Not tested on 1.0, but should work here as well.

As I wrote at Konrad's patch "clk: qcom: gcc-msm8994: Fix gpll4 width" [1]
with that fix this workaround is not needed if Konrad's patch applied.

Kind regards,
Petr

[1] https://lore.kernel.org/linux-arm-msm/YjuE+cgGXCLihPIa@pevik/T/#t
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
index 3b0cc85d6674..c18839b2baf0 100644
--- a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
@@ -1,7 +1,7 @@ 
 // SPDX-License-Identifier: GPL-2.0-only
 /* Copyright (c) 2015, LGE Inc. All rights reserved.
  * Copyright (c) 2016, The Linux Foundation. All rights reserved.
- * Copyright (c) 2021, Petr Vorel <petr.vorel@gmail.com>
+ * Copyright (c) 2021-2022, Petr Vorel <petr.vorel@gmail.com>
  */
 
 /dts-v1/;
@@ -299,4 +299,8 @@  &sdhc1 {
 	status = "okay";
 
 	mmc-hs400-1_8v;
+
+	/* avoid overclocking warnings */
+	assigned-clocks = <&gcc GPLL4_EARLY>;
+	assigned-clock-rates = <384000000>;
 };