Skip to content

Commit 916a0ed

Browse files
xdarklightkhilman
authored andcommitted
arm64: dts: amlogic: meson-g12: add the Mali OPP table and use DVFS
Add the OPP table for the Mali Bifrost GPU and drop the hardcoded initial clock configuration. This enables GPU DVFS and thus saves power when the GPU is not in use while still being able switch to a higher clock on demand. Set the GP0_PLL clock to 744MHz (which is the only frequency which cannot be derived from the FCLK dividers) as the clock driver avoids setting the parent clock rates so the HIFI PLL clock isn't changed (as that's reserved for audio). Signed-off-by: Martin Blumenstingl <[email protected]> Signed-off-by: Kevin Hilman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8f16cfa commit 916a0ed

File tree

1 file changed

+34
-15
lines changed

1 file changed

+34
-15
lines changed

arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,39 @@
5252
secure-monitor = <&sm>;
5353
};
5454

55+
gpu_opp_table: gpu-opp-table {
56+
compatible = "operating-points-v2";
57+
58+
opp-124999998 {
59+
opp-hz = /bits/ 64 <124999998>;
60+
opp-microvolt = <800000>;
61+
};
62+
opp-249999996 {
63+
opp-hz = /bits/ 64 <249999996>;
64+
opp-microvolt = <800000>;
65+
};
66+
opp-285714281 {
67+
opp-hz = /bits/ 64 <285714281>;
68+
opp-microvolt = <800000>;
69+
};
70+
opp-399999994 {
71+
opp-hz = /bits/ 64 <399999994>;
72+
opp-microvolt = <800000>;
73+
};
74+
opp-499999992 {
75+
opp-hz = /bits/ 64 <499999992>;
76+
opp-microvolt = <800000>;
77+
};
78+
opp-666666656 {
79+
opp-hz = /bits/ 64 <666666656>;
80+
opp-microvolt = <800000>;
81+
};
82+
opp-799999987 {
83+
opp-hz = /bits/ 64 <799999987>;
84+
opp-microvolt = <800000>;
85+
};
86+
};
87+
5588
psci {
5689
compatible = "arm,psci-1.0";
5790
method = "smc";
@@ -2362,21 +2395,7 @@
23622395
interrupt-names = "job", "mmu", "gpu";
23632396
clocks = <&clkc CLKID_MALI>;
23642397
resets = <&reset RESET_DVALIN_CAPB3>, <&reset RESET_DVALIN>;
2365-
2366-
/*
2367-
* Mali clocking is provided by two identical clock paths
2368-
* MALI_0 and MALI_1 muxed to a single clock by a glitch
2369-
* free mux to safely change frequency while running.
2370-
*/
2371-
assigned-clocks = <&clkc CLKID_MALI_0_SEL>,
2372-
<&clkc CLKID_MALI_0>,
2373-
<&clkc CLKID_MALI>; /* Glitch free mux */
2374-
assigned-clock-parents = <&clkc CLKID_FCLK_DIV2P5>,
2375-
<0>, /* Do Nothing */
2376-
<&clkc CLKID_MALI_0>;
2377-
assigned-clock-rates = <0>, /* Do Nothing */
2378-
<800000000>,
2379-
<0>; /* Do Nothing */
2398+
operating-points-v2 = <&gpu_opp_table>;
23802399
#cooling-cells = <2>;
23812400
};
23822401
};

0 commit comments

Comments
 (0)