[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250320100002.332720-1-amadeus@jmu.edu.cn>
Date: Thu, 20 Mar 2025 18:00:01 +0800
From: Chukun Pan <amadeus@....edu.cn>
To: Heiko Stuebner <heiko@...ech.de>
Cc: Yao Zi <ziyao@...root.org>,
Rob Herring <robh@...nel.org>,
Chukun Pan <amadeus@....edu.cn>,
Jonas Karlman <jonas@...boo.se>,
Conor Dooley <conor+dt@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 0/1] arm64: dts: rockchip: rk3528: Add CPU frequency scaling support
This series depends on the pwm series:
https://lore.kernel.org/lkml/20250318120003.2340652-1-amadeus@jmu.edu.cn/
By default, the CPUs on RK3528 operates at 1.5GHz. Add CPU frequency and
voltage mapping to the device tree to enable dynamic scaling via cpufreq.
OPP values come from the downstream kernel, and voltage is chosen from
the one that makes the actual frequency close to the displayed frequency.
Here are the test results using mhz [1] on Radxa E20C:
------------------
display | actual
408MHz | 395MHz
600MHz | 593MHz
816MHz | 833MHz
1008MHz | 1089MHz
1200MHz | 1215MHz
1416MHz | 1428MHz
1608MHz | 1640MHz
1800MHz | 1804MHz
2016MHz | 1952MHz
------------------
If we want the actual frequency to reach 2016MHz, the voltage
needs to reach 1.13V (+0.03V), not sure if it is safe.
The maximum opp-table voltage of downstream kernel is 1.1V.
Jonas previously suggested using the maximum voltage of the
downstream opp-table due to differences in silicon quality.
However, this will make the actual frequency difference a
bit large. Here are his test results using maximum voltage:
--------
4 boards (E20C, ROCK 2A, ROCK 2F)
408000: 873mV 394MHz 394MHz 394MHz 394MHz
600000: 873mV 592MHz 592MHz 592MHz 592MHz
816000: 873mV 941MHz 977MHz 954MHz 953MHz
1008000: 873mV 1148MHz 1186MHz 1169MHz 1168MHz
1200000: 900mV 1368MHz 1380MHz 1366MHz 1360MHz
1416000: 964mV 1547MHz 1554MHz 1547MHz 1534MHz
1608000: 1014mV 1734MHz 1768MHz 1770MHz 1740MHz
1800000: 1064mV 1850MHz 1883MHz 1887MHz 1854MHz
2016000: 1100mV 1931MHz 1963MHz 1970MHz 1933MHz
--------
The downstream kernel reads the efuse value from otp to
select the voltage, usually using opp-microvolt-L3.
[1] https://github.com/wtarreau/mhz.git
Chukun Pan (1):
arm64: dts: rockchip: rk3528: Add CPU frequency scaling support
arch/arm64/boot/dts/rockchip/rk3528.dtsi | 64 ++++++++++++++++++++++++
1 file changed, 64 insertions(+)
--
2.25.1
Powered by blists - more mailing lists