Skip to content

Commit bd3e32b

Browse files
Kwibooigorpecovnik
authored andcommitted
RFC: arm64: dts: rockchip: rk3588: Use scmi gpu clk as main GPU clock
CLK_GPU is the main clock for the GPU on RK3588, it's typical source pll can be one of gpll, cpll, aupll, npll or spll. For higher clock rates it is also possible to use the gpu pvtpll as pll source. The logic to switch between a normal pll and the pvtpll depending on rate is handled in TF-A firmware, and exposed to Linux as a scmi clock. TF-A will typically change to use normal pll for rates up to 200 MHz and use pvtpll for 300 MHz or more. Change to use the SCMI_CLK_GPU as the main GPU clock and add the normal CLK_GPU as a bus clk to model this in a similar way as on RK356x. Prior to this change the GPU clk rate was max 850 MHz: $ glmark2-es2-gbm -b terrain [...] GL_VENDOR: Mesa GL_RENDERER: Mali-G610 (Panfrost) GL_VERSION: OpenGL ES 3.1 Mesa 25.0.4 Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0 Surface Size: 800x600 fullscreen [...] [terrain] <default>: FPS: 139 FrameTime: 7.231 ms After this the GPU clk rate can use the 1 GHz rate with PVTPLL: [terrain] <default>: FPS: 152 FrameTime: 6.579 ms Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
1 parent b25d684 commit bd3e32b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

arch/arm64/boot/dts/rockchip/rk3588s.dtsi

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,11 +2391,11 @@
23912391
compatible = "rockchip,rk3588-mali", "arm,mali-valhall-csf";
23922392
reg = <0x0 0xfb000000 0x0 0x200000>;
23932393
#cooling-cells = <2>;
2394-
assigned-clocks = <&scmi_clk SCMI_CLK_GPU>;
2395-
assigned-clock-rates = <200000000>;
2396-
clocks = <&cru CLK_GPU>, <&cru CLK_GPU_COREGROUP>,
2397-
<&cru CLK_GPU_STACKS>;
2398-
clock-names = "core", "coregroup", "stacks";
2394+
assigned-clocks = <&cru CLK_GPU>, <&scmi_clk SCMI_CLK_GPU>;
2395+
assigned-clock-rates = <198000000>, <200000000>;
2396+
clocks = <&scmi_clk SCMI_CLK_GPU>, <&cru CLK_GPU_COREGROUP>,
2397+
<&cru CLK_GPU_STACKS>, <&cru CLK_GPU>;
2398+
clock-names = "core", "coregroup", "stacks", "bus";
23992399
dynamic-power-coefficient = <2982>;
24002400
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
24012401
<GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
@@ -2408,6 +2408,11 @@
24082408
gpu_opp_table_panthor: opp-table {
24092409
compatible = "operating-points-v2";
24102410

2411+
opp-200000000 {
2412+
opp-hz = /bits/ 64 <200000000>;
2413+
opp-microvolt = <675000 675000 850000>;
2414+
opp-suspend;
2415+
};
24112416
opp-300000000 {
24122417
opp-hz = /bits/ 64 <300000000>;
24132418
opp-microvolt = <675000 675000 850000>;

0 commit comments

Comments
 (0)