riscv: dts: Set specific cpu frequency when suspending
authorMason Huo <mason.huo@starfivetech.com>
Wed, 1 Mar 2023 05:24:41 +0000 (13:24 +0800)
committerMason Huo <mason.huo@starfivetech.com>
Fri, 3 Mar 2023 06:16:08 +0000 (14:16 +0800)
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 <mason.huo@starfivetech.com>
arch/riscv/boot/dts/starfive/jh7110.dtsi

index 9ff8701..d0b7b42 100644 (file)
@@ -31,6 +31,7 @@
                        opp-750000000 {
                                        opp-hz = /bits/ 64 <750000000>;
                                        opp-microvolt = <800000>;
+                                       opp-suspend;
                        };
                        opp-1500000000 {
                                        opp-hz = /bits/ 64 <1500000000>;