Skip to content

Commit 8a8265c

Browse files
committed
Enable DVFS for Rockchip boards
Change-Id: bc5190ad-cd3b-43fc-9127-930354102e1b Signed-off-by: Anton Burticica <mouse@ya.ru>
1 parent 6dc5474 commit 8a8265c

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

arch/arm/dts/rk3576-u-boot.dtsi

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,25 @@
2121
};
2222
};
2323

24+
/*
25+
* Wide temperature DVFS properties for U-Boot.
26+
* These are vendor-specific properties from rk3576 vendor kernel DTS
27+
* that upstream kernel doesn't have. U-Boot DVFS driver needs them.
28+
*
29+
* Values from vendor rk3576.dtsi:
30+
* - rockchip,low-temp = <15000> (15°C in millidegrees)
31+
* - rockchip,max-volt = <950000> (950mV, max from OPP table)
32+
*/
33+
&cluster0_opp_table {
34+
rockchip,low-temp = <15000>;
35+
rockchip,max-volt = <950000>;
36+
};
37+
38+
&cluster1_opp_table {
39+
rockchip,low-temp = <15000>;
40+
rockchip,max-volt = <950000>;
41+
};
42+
2443
#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
2544
&binman {
2645
simple-bin-spi {

arch/arm/mach-rockchip/board.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
#include <asm/arch-rockchip/clock.h>
3535
#include <asm/arch-rockchip/periph.h>
3636
#include <power/regulator.h>
37+
#ifdef CONFIG_DM_DVFS
38+
#include <dvfs.h>
39+
#endif
3740

3841
#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && IS_ENABLED(CONFIG_EFI_PARTITION)
3942

@@ -197,6 +200,10 @@ int board_late_init(void)
197200
gpt_capsule_update_setup();
198201
#endif
199202

203+
#ifdef CONFIG_DM_DVFS
204+
dvfs_init(true);
205+
#endif
206+
200207
return rk_board_late_init();
201208
}
202209

0 commit comments

Comments
 (0)