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
6 RK3588j uses a different set of OPPs for its GPU, both in terms of
7 allowed frequencies and in terms of voltages.
9 Move the GPU OPPs table into per-variant .dtsi files to accommodate
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.
17 [1] https://github.com/rockchip-linux/kernel/blob/604cec4004abe5a96c734f2fab7b74809d2d742f/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
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>
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(-)
29 --- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
30 +++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
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>;
39 - gpu_opp_table: opp-table {
40 - compatible = "operating-points-v2";
43 - opp-hz = /bits/ 64 <300000000>;
44 - opp-microvolt = <675000 675000 850000>;
47 - opp-hz = /bits/ 64 <400000000>;
48 - opp-microvolt = <675000 675000 850000>;
51 - opp-hz = /bits/ 64 <500000000>;
52 - opp-microvolt = <675000 675000 850000>;
55 - opp-hz = /bits/ 64 <600000000>;
56 - opp-microvolt = <675000 675000 850000>;
59 - opp-hz = /bits/ 64 <700000000>;
60 - opp-microvolt = <700000 700000 850000>;
63 - opp-hz = /bits/ 64 <800000000>;
64 - opp-microvolt = <750000 750000 850000>;
67 - opp-hz = /bits/ 64 <900000000>;
68 - opp-microvolt = <800000 800000 850000>;
71 - opp-hz = /bits/ 64 <1000000000>;
72 - opp-microvolt = <850000 850000 850000>;
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
81 clock-latency-ns = <40000>;
85 + gpu_opp_table: opp-table {
86 + compatible = "operating-points-v2";
89 + opp-hz = /bits/ 64 <300000000>;
90 + opp-microvolt = <675000 675000 850000>;
93 + opp-hz = /bits/ 64 <400000000>;
94 + opp-microvolt = <675000 675000 850000>;
97 + opp-hz = /bits/ 64 <500000000>;
98 + opp-microvolt = <675000 675000 850000>;
101 + opp-hz = /bits/ 64 <600000000>;
102 + opp-microvolt = <675000 675000 850000>;
105 + opp-hz = /bits/ 64 <700000000>;
106 + opp-microvolt = <700000 700000 850000>;
109 + opp-hz = /bits/ 64 <800000000>;
110 + opp-microvolt = <750000 750000 850000>;
113 + opp-hz = /bits/ 64 <900000000>;
114 + opp-microvolt = <800000 800000 850000>;
117 + opp-hz = /bits/ 64 <1000000000>;
118 + opp-microvolt = <850000 850000 850000>;
126 operating-points-v2 = <&cluster0_opp_table>;
130 + operating-points-v2 = <&gpu_opp_table>;
132 --- a/arch/arm64/boot/dts/rockchip/rk3588j.dtsi
133 +++ b/arch/arm64/boot/dts/rockchip/rk3588j.dtsi
135 clock-latency-ns = <40000>;
139 + gpu_opp_table: opp-table {
140 + compatible = "operating-points-v2";
143 + opp-hz = /bits/ 64 <300000000>;
144 + opp-microvolt = <750000 750000 850000>;
147 + opp-hz = /bits/ 64 <400000000>;
148 + opp-microvolt = <750000 750000 850000>;
151 + opp-hz = /bits/ 64 <500000000>;
152 + opp-microvolt = <750000 750000 850000>;
155 + opp-hz = /bits/ 64 <600000000>;
156 + opp-microvolt = <750000 750000 850000>;
159 + opp-hz = /bits/ 64 <700000000>;
160 + opp-microvolt = <750000 750000 850000>;
163 + opp-hz = /bits/ 64 <800000000>;
164 + opp-microvolt = <787500 787500 850000>;
172 operating-points-v2 = <&cluster0_opp_table>;
176 + operating-points-v2 = <&gpu_opp_table>;