]> git.ipfire.org Git - thirdparty/openwrt.git/blob
06befc8af9c58cf13c44787f3fba3efe752895d6
[thirdparty/openwrt.git] /
1 From a7b2070505a2a09ea65fa0c8c480c97f62d1978d Mon Sep 17 00:00:00 2001
2 From: Alexey Charkov <alchark@gmail.com>
3 Date: Mon, 17 Jun 2024 22:28:58 +0400
4 Subject: [PATCH] arm64: dts: rockchip: Split GPU OPPs of RK3588 and RK3588j
5
6 RK3588j uses a different set of OPPs for its GPU, both in terms of
7 allowed frequencies and in terms of voltages.
8
9 Move the GPU OPPs table into per-variant .dtsi files to accommodate
10 for this difference.
11
12 The table for RK3588j is adapted from Rockchip downstream sources [1],
13 while RK3588 one is moved verbatim into the per-variant .dtsi file.
14 The values provided for RK3588 in the downstream sources match those
15 in the original commit.
16
17 [1] https://github.com/rockchip-linux/kernel/blob/604cec4004abe5a96c734f2fab7b74809d2d742f/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
18
19 Fixes: 6fca4edb93d3 ("arm64: dts: rockchip: Add rk3588 GPU node")
20 Signed-off-by: Alexey Charkov <alchark@gmail.com>
21 Link: https://lore.kernel.org/r/20240617-rk-dts-additions-v5-8-c1f5f3267f1e@gmail.com
22 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
23 ---
24 arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 38 -----------------
25 arch/arm64/boot/dts/rockchip/rk3588-opp.dtsi | 41 +++++++++++++++++++
26 arch/arm64/boot/dts/rockchip/rk3588j.dtsi | 33 +++++++++++++++
27 3 files changed, 74 insertions(+), 38 deletions(-)
28
29 --- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
30 +++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
31 @@ -451,46 +451,8 @@
32 <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH 0>,
33 <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH 0>;
34 interrupt-names = "job", "mmu", "gpu";
35 - operating-points-v2 = <&gpu_opp_table>;
36 power-domains = <&power RK3588_PD_GPU>;
37 status = "disabled";
38 -
39 - gpu_opp_table: opp-table {
40 - compatible = "operating-points-v2";
41 -
42 - opp-300000000 {
43 - opp-hz = /bits/ 64 <300000000>;
44 - opp-microvolt = <675000 675000 850000>;
45 - };
46 - opp-400000000 {
47 - opp-hz = /bits/ 64 <400000000>;
48 - opp-microvolt = <675000 675000 850000>;
49 - };
50 - opp-500000000 {
51 - opp-hz = /bits/ 64 <500000000>;
52 - opp-microvolt = <675000 675000 850000>;
53 - };
54 - opp-600000000 {
55 - opp-hz = /bits/ 64 <600000000>;
56 - opp-microvolt = <675000 675000 850000>;
57 - };
58 - opp-700000000 {
59 - opp-hz = /bits/ 64 <700000000>;
60 - opp-microvolt = <700000 700000 850000>;
61 - };
62 - opp-800000000 {
63 - opp-hz = /bits/ 64 <800000000>;
64 - opp-microvolt = <750000 750000 850000>;
65 - };
66 - opp-900000000 {
67 - opp-hz = /bits/ 64 <900000000>;
68 - opp-microvolt = <800000 800000 850000>;
69 - };
70 - opp-1000000000 {
71 - opp-hz = /bits/ 64 <1000000000>;
72 - opp-microvolt = <850000 850000 850000>;
73 - };
74 - };
75 };
76
77 usb_host0_xhci: usb@fc000000 {
78 --- a/arch/arm64/boot/dts/rockchip/rk3588-opp.dtsi
79 +++ b/arch/arm64/boot/dts/rockchip/rk3588-opp.dtsi
80 @@ -114,6 +114,43 @@
81 clock-latency-ns = <40000>;
82 };
83 };
84 +
85 + gpu_opp_table: opp-table {
86 + compatible = "operating-points-v2";
87 +
88 + opp-300000000 {
89 + opp-hz = /bits/ 64 <300000000>;
90 + opp-microvolt = <675000 675000 850000>;
91 + };
92 + opp-400000000 {
93 + opp-hz = /bits/ 64 <400000000>;
94 + opp-microvolt = <675000 675000 850000>;
95 + };
96 + opp-500000000 {
97 + opp-hz = /bits/ 64 <500000000>;
98 + opp-microvolt = <675000 675000 850000>;
99 + };
100 + opp-600000000 {
101 + opp-hz = /bits/ 64 <600000000>;
102 + opp-microvolt = <675000 675000 850000>;
103 + };
104 + opp-700000000 {
105 + opp-hz = /bits/ 64 <700000000>;
106 + opp-microvolt = <700000 700000 850000>;
107 + };
108 + opp-800000000 {
109 + opp-hz = /bits/ 64 <800000000>;
110 + opp-microvolt = <750000 750000 850000>;
111 + };
112 + opp-900000000 {
113 + opp-hz = /bits/ 64 <900000000>;
114 + opp-microvolt = <800000 800000 850000>;
115 + };
116 + opp-1000000000 {
117 + opp-hz = /bits/ 64 <1000000000>;
118 + opp-microvolt = <850000 850000 850000>;
119 + };
120 + };
121 };
122
123 &cpu_b0 {
124 @@ -147,3 +184,7 @@
125 &cpu_l3 {
126 operating-points-v2 = <&cluster0_opp_table>;
127 };
128 +
129 +&gpu {
130 + operating-points-v2 = <&gpu_opp_table>;
131 +};
132 --- a/arch/arm64/boot/dts/rockchip/rk3588j.dtsi
133 +++ b/arch/arm64/boot/dts/rockchip/rk3588j.dtsi
134 @@ -80,6 +80,35 @@
135 clock-latency-ns = <40000>;
136 };
137 };
138 +
139 + gpu_opp_table: opp-table {
140 + compatible = "operating-points-v2";
141 +
142 + opp-300000000 {
143 + opp-hz = /bits/ 64 <300000000>;
144 + opp-microvolt = <750000 750000 850000>;
145 + };
146 + opp-400000000 {
147 + opp-hz = /bits/ 64 <400000000>;
148 + opp-microvolt = <750000 750000 850000>;
149 + };
150 + opp-500000000 {
151 + opp-hz = /bits/ 64 <500000000>;
152 + opp-microvolt = <750000 750000 850000>;
153 + };
154 + opp-600000000 {
155 + opp-hz = /bits/ 64 <600000000>;
156 + opp-microvolt = <750000 750000 850000>;
157 + };
158 + opp-700000000 {
159 + opp-hz = /bits/ 64 <700000000>;
160 + opp-microvolt = <750000 750000 850000>;
161 + };
162 + opp-850000000 {
163 + opp-hz = /bits/ 64 <800000000>;
164 + opp-microvolt = <787500 787500 850000>;
165 + };
166 + };
167 };
168
169 &cpu_b0 {
170 @@ -113,3 +142,7 @@
171 &cpu_l3 {
172 operating-points-v2 = <&cluster0_opp_table>;
173 };
174 +
175 +&gpu {
176 + operating-points-v2 = <&gpu_opp_table>;
177 +};