6b9035d34f13227dd54050b7c081f48e91f82cae
[openwrt/staging/ldir.git] /
1 From 988035f152709549a095b12fcdcb3cf26cbad63f Mon Sep 17 00:00:00 2001
2 From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
3 Date: Tue, 20 May 2025 20:50:10 +0200
4 Subject: arm64: dts: rockchip: move common ROCK 5B/+ nodes into own tree
5
6 A few device tree nodes are shared between ROCK 5B and ROCK 5B+ that are
7 not shared with ROCK 5T.
8
9 Move them into their own device tree include.
10
11 Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
12 Link: https://lore.kernel.org/r/20250520-add-rock5t-v2-3-1f1971850a20@collabora.com
13 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
14
15 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi
16 +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi
17 @@ -18,23 +18,6 @@
18 stdout-path = "serial2:1500000n8";
19 };
20
21 - analog-sound {
22 - compatible = "audio-graph-card";
23 - label = "rk3588-es8316";
24 -
25 - widgets = "Microphone", "Mic Jack",
26 - "Headphone", "Headphones";
27 -
28 - routing = "MIC2", "Mic Jack",
29 - "Headphones", "HPOL",
30 - "Headphones", "HPOR";
31 -
32 - dais = <&i2s0_8ch_p0>;
33 - hp-det-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
34 - pinctrl-names = "default";
35 - pinctrl-0 = <&hp_detect>;
36 - };
37 -
38 hdmi0-con {
39 compatible = "hdmi-connector";
40 type = "a";
41 @@ -57,19 +40,6 @@
42 };
43 };
44
45 - leds {
46 - compatible = "gpio-leds";
47 - pinctrl-names = "default";
48 - pinctrl-0 = <&led_rgb_b>;
49 -
50 - led_rgb_b {
51 - function = LED_FUNCTION_STATUS;
52 - color = <LED_COLOR_ID_BLUE>;
53 - gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
54 - linux,default-trigger = "heartbeat";
55 - };
56 - };
57 -
58 fan: pwm-fan {
59 compatible = "pwm-fan";
60 cooling-levels = <0 120 150 180 210 240 255>;
61 @@ -78,13 +48,6 @@
62 #cooling-cells = <2>;
63 };
64
65 - rfkill {
66 - compatible = "rfkill-gpio";
67 - label = "rfkill-m2-wlan";
68 - radio-type = "wlan";
69 - shutdown-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
70 - };
71 -
72 rfkill-bt {
73 compatible = "rfkill-gpio";
74 label = "rfkill-m2-bt";
75 @@ -95,9 +58,6 @@
76 vcc3v3_pcie2x1l0: regulator-vcc3v3-pcie2x1l0 {
77 compatible = "regulator-fixed";
78 enable-active-high;
79 - gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
80 - pinctrl-names = "default";
81 - pinctrl-0 = <&pcie2_0_vcc3v3_en>;
82 regulator-name = "vcc3v3_pcie2x1l0";
83 regulator-always-on;
84 regulator-boot-on;
85 @@ -105,6 +65,7 @@
86 regulator-max-microvolt = <3300000>;
87 startup-delay-us = <50000>;
88 vin-supply = <&vcc5v0_sys>;
89 + status = "disabled";
90 };
91
92 vcc3v3_pcie2x1l2: regulator-vcc3v3-pcie2x1l2 {
93 @@ -255,10 +216,8 @@
94 };
95
96 &hdmi_receiver {
97 - hpd-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
98 pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_hpd>;
99 pinctrl-names = "default";
100 - status = "okay";
101 };
102
103 &hdptxphy0 {
104 @@ -434,39 +393,17 @@
105 };
106
107 &pinctrl {
108 - hdmirx {
109 - hdmirx_hpd: hdmirx-5v-detection {
110 - rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
111 - };
112 - };
113 -
114 hym8563 {
115 hym8563_int: hym8563-int {
116 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
117 };
118 };
119
120 - leds {
121 - led_rgb_b: led-rgb-b {
122 - rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
123 - };
124 - };
125 -
126 - sound {
127 - hp_detect: hp-detect {
128 - rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
129 - };
130 - };
131 -
132 pcie2 {
133 pcie2_0_rst: pcie2-0-rst {
134 rockchip,pins = <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
135 };
136
137 - pcie2_0_vcc3v3_en: pcie2-0-vcc-en {
138 - rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
139 - };
140 -
141 pcie2_2_rst: pcie2-2-rst {
142 rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
143 };
144 @@ -918,10 +855,6 @@
145 status = "okay";
146 };
147
148 -&usb_host2_xhci {
149 - status = "okay";
150 -};
151 -
152 &vop {
153 status = "okay";
154 };
155 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus.dts
156 +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus.dts
157 @@ -2,7 +2,7 @@
158
159 /dts-v1/;
160
161 -#include "rk3588-rock-5b-5bp-5t.dtsi"
162 +#include "rk3588-rock-5b.dtsi"
163
164 / {
165 model = "Radxa ROCK 5B+";
166 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
167 +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
168 @@ -2,7 +2,7 @@
169
170 /dts-v1/;
171
172 -#include "rk3588-rock-5b-5bp-5t.dtsi"
173 +#include "rk3588-rock-5b.dtsi"
174
175 / {
176 model = "Radxa ROCK 5B";
177 --- /dev/null
178 +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi
179 @@ -0,0 +1,86 @@
180 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
181 +
182 +/dts-v1/;
183 +
184 +#include "rk3588-rock-5b-5bp-5t.dtsi"
185 +
186 +/ {
187 + analog-sound {
188 + compatible = "audio-graph-card";
189 + label = "rk3588-es8316";
190 +
191 + widgets = "Microphone", "Mic Jack",
192 + "Headphone", "Headphones";
193 +
194 + routing = "MIC2", "Mic Jack",
195 + "Headphones", "HPOL",
196 + "Headphones", "HPOR";
197 +
198 + dais = <&i2s0_8ch_p0>;
199 + hp-det-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
200 + pinctrl-names = "default";
201 + pinctrl-0 = <&hp_detect>;
202 + };
203 +
204 + leds {
205 + compatible = "gpio-leds";
206 + pinctrl-names = "default";
207 + pinctrl-0 = <&led_rgb_b>;
208 +
209 + led_rgb_b {
210 + function = LED_FUNCTION_STATUS;
211 + color = <LED_COLOR_ID_BLUE>;
212 + gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
213 + linux,default-trigger = "heartbeat";
214 + };
215 + };
216 +
217 + rfkill {
218 + compatible = "rfkill-gpio";
219 + label = "rfkill-m2-wlan";
220 + radio-type = "wlan";
221 + shutdown-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
222 + };
223 +};
224 +
225 +&hdmi_receiver {
226 + hpd-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
227 + status = "okay";
228 +};
229 +
230 +&pinctrl {
231 + hdmirx {
232 + hdmirx_hpd: hdmirx-5v-detection {
233 + rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
234 + };
235 + };
236 +
237 + leds {
238 + led_rgb_b: led-rgb-b {
239 + rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
240 + };
241 + };
242 +
243 + pcie2 {
244 + pcie2_0_vcc3v3_en: pcie2-0-vcc-en {
245 + rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
246 + };
247 + };
248 +
249 + sound {
250 + hp_detect: hp-detect {
251 + rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
252 + };
253 + };
254 +};
255 +
256 +&usb_host2_xhci {
257 + status = "okay";
258 +};
259 +
260 +&vcc3v3_pcie2x1l0 {
261 + gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
262 + pinctrl-names = "default";
263 + pinctrl-0 = <&pcie2_0_vcc3v3_en>;
264 + status = "okay";
265 +};