linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] arm64: dts: rockchip: rk3528: Add CPU frequency scaling support
@ 2025-06-20 10:00 Chukun Pan
  2025-06-20 10:00 ` [PATCH v2 1/1] " Chukun Pan
  0 siblings, 1 reply; 17+ messages in thread
From: Chukun Pan @ 2025-06-20 10:00 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Yao Zi, Rob Herring, Chukun Pan, Jonas Karlman, Conor Dooley,
	Krzysztof Kozlowski, linux-arm-kernel, linux-rockchip,
	linux-kernel, devicetree

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.

The OPP values come from downstream 5.10 kernel. Both 408MHz and 600MHz
frequencies use the normal PLL, so use the corresponding highest voltage.

The voltage used for other frequencies can't be less than above (875mV).
Therefore, 816MHz to 1200MHz also uses the corresponding highest voltage.

The remaining 1416MHz to 2016MHz use a voltage close to actual frequency.

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.

Here are the test results using mhz [1] on Radxa E20C:

--------------------------------------
display frequency |  actual frequency
      408MHz      |       395MHz
      600MHz      |       593MHz
      816MHz      |       956MHz
     1008MHz      |      1152MHz
     1200MHz      |      1366MHz
     1416MHz      |      1430MHz
     1608MHz      |      1640MHz
     1800MHz      |      1802MHz
     2016MHz      |      1946MHz
--------------------------------------

[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(+)

Changed from v2:
  Rename label opp-table-0 to opp-table-cpu
  Adjust the voltage used for 408MHz to 1200MHz

-- 
2.25.1



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-07-30 13:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-20 10:00 [PATCH v2 0/1] arm64: dts: rockchip: rk3528: Add CPU frequency scaling support Chukun Pan
2025-06-20 10:00 ` [PATCH v2 1/1] " Chukun Pan
2025-07-10 11:45   ` Heiko Stuebner
2025-07-10 12:11     ` Jonas Karlman
2025-07-10 15:59       ` Alexey Charkov
2025-07-16 14:30         ` Chukun Pan
2025-07-16 15:48           ` Alexey Charkov
2025-07-17  7:00       ` Chukun Pan
2025-07-17  8:46         ` Alexey Charkov
2025-07-18 14:01           ` Chukun Pan
2025-07-18 15:03             ` Alexey Charkov
2025-07-20 14:00               ` Chukun Pan
2025-07-27 17:09                 ` Willy Tarreau
2025-07-30  7:00                   ` Chukun Pan
2025-07-30  7:11                     ` Willy Tarreau
2025-07-30 13:20                       ` Chukun Pan
2025-07-30 13:33                         ` Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).