From 73e24a3b9bf4ea1cef3f1da7ffb449ee2adeb45e Mon Sep 17 00:00:00 2001 From: Mason Huo Date: Wed, 1 Mar 2023 13:24:41 +0800 Subject: [PATCH] riscv: dts: Set specific cpu frequency when suspending As JH7110 saves & restores all clock registers in hibernation. The cpu voltage may not correct after restoring cpu freqency from hibernation resume process. In case it's suspended in 1.5GHz with 1.04v, and it schedules to 750Mhz with 0.8v before resuming, then the cpu clock will be restored to 1.5GHz, but the cpu voltage still remains in 0.8v, then the system crashes. So we set the cpu frequency to 750MHz, and it will keep the cpu voltage matched when doing hibernation resuming. Signed-off-by: Mason Huo --- arch/riscv/boot/dts/starfive/jh7110.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi index 9ff8701..d0b7b42 100644 --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi @@ -31,6 +31,7 @@ opp-750000000 { opp-hz = /bits/ 64 <750000000>; opp-microvolt = <800000>; + opp-suspend; }; opp-1500000000 { opp-hz = /bits/ 64 <1500000000>; -- 2.7.4