blob: c50fbdd48680ca7273fdcd53f7fef527d8e1c008 [file] [log] [blame]
Jonas Karlman1f54f712023-07-30 12:30:26 +00001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3#include <dt-bindings/gpio/gpio.h>
4#include <dt-bindings/leds/common.h>
5#include <dt-bindings/pinctrl/rockchip.h>
6#include "rk3568.dtsi"
7
8/ {
9 compatible = "radxa,cm3i", "rockchip,rk3568";
10
11 aliases {
12 mmc0 = &sdhci;
13 };
14
15 chosen {
16 stdout-path = "serial2:115200n8";
17 };
18
19 gpio-leds {
20 compatible = "gpio-leds";
21
22 led_user: led-0 {
23 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
24 function = LED_FUNCTION_HEARTBEAT;
25 color = <LED_COLOR_ID_GREEN>;
26 linux,default-trigger = "heartbeat";
27 pinctrl-names = "default";
28 pinctrl-0 = <&led_user_en>;
29 };
30 };
31
32 pcie30_avdd0v9: pcie30-avdd0v9-regulator {
33 compatible = "regulator-fixed";
34 regulator-name = "pcie30_avdd0v9";
35 regulator-always-on;
36 regulator-boot-on;
37 regulator-min-microvolt = <900000>;
38 regulator-max-microvolt = <900000>;
39 vin-supply = <&vcc3v3_sys>;
40 };
41
42 pcie30_avdd1v8: pcie30-avdd1v8-regulator {
43 compatible = "regulator-fixed";
44 regulator-name = "pcie30_avdd1v8";
45 regulator-always-on;
46 regulator-boot-on;
47 regulator-min-microvolt = <1800000>;
48 regulator-max-microvolt = <1800000>;
49 vin-supply = <&vcc3v3_sys>;
50 };
51
52 vcc3v3_sys: vcc3v3-sys-regulator {
53 compatible = "regulator-fixed";
54 regulator-name = "vcc3v3_sys";
55 regulator-always-on;
56 regulator-boot-on;
57 regulator-min-microvolt = <3300000>;
58 regulator-max-microvolt = <3300000>;
59 vin-supply = <&vcc5v_input>;
60 };
61
62 vcc5v0_sys: vcc5v0-sys-regulator {
63 compatible = "regulator-fixed";
64 regulator-name = "vcc5v0_sys";
65 regulator-always-on;
66 regulator-boot-on;
67 regulator-min-microvolt = <5000000>;
68 regulator-max-microvolt = <5000000>;
69 vin-supply = <&vcc5v_input>;
70 };
71
72 /* labeled +5v_input in schematic */
73 vcc5v_input: vcc5v-input-regulator {
74 compatible = "regulator-fixed";
75 regulator-name = "vcc5v_input";
76 regulator-always-on;
77 regulator-boot-on;
78 regulator-min-microvolt = <5000000>;
79 regulator-max-microvolt = <5000000>;
80 };
81};
82
83&combphy0 {
84 status = "okay";
85};
86
87&combphy1 {
88 status = "okay";
89};
90
91&combphy2 {
92 status = "okay";
93};
94
95&cpu0 {
96 cpu-supply = <&vdd_cpu>;
97};
98
99&cpu1 {
100 cpu-supply = <&vdd_cpu>;
101};
102
103&cpu2 {
104 cpu-supply = <&vdd_cpu>;
105};
106
107&cpu3 {
108 cpu-supply = <&vdd_cpu>;
109};
110
111&display_subsystem {
112 status = "disabled";
113};
114
115&gpu {
116 mali-supply = <&vdd_gpu>;
117 status = "okay";
118};
119
120&i2c0 {
121 status = "okay";
122
123 vdd_cpu: regulator@1c {
124 compatible = "tcs,tcs4525";
125 reg = <0x1c>;
126 fcs,suspend-voltage-selector = <1>;
127 regulator-name = "vdd_cpu";
128 regulator-always-on;
129 regulator-boot-on;
130 regulator-min-microvolt = <800000>;
131 regulator-max-microvolt = <1150000>;
132 regulator-ramp-delay = <2300>;
133 vin-supply = <&vcc5v_input>;
134
135 regulator-state-mem {
136 regulator-off-in-suspend;
137 };
138 };
139
140 rk809: pmic@20 {
141 compatible = "rockchip,rk809";
142 reg = <0x20>;
143 interrupt-parent = <&gpio0>;
144 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
145 #clock-cells = <1>;
146 pinctrl-names = "default";
147 pinctrl-0 = <&pmic_int>;
148 rockchip,system-power-controller;
149 wakeup-source;
150
151 vcc1-supply = <&vcc3v3_sys>;
152 vcc2-supply = <&vcc3v3_sys>;
153 vcc3-supply = <&vcc3v3_sys>;
154 vcc4-supply = <&vcc3v3_sys>;
155 vcc5-supply = <&vcc3v3_sys>;
156 vcc6-supply = <&vcc3v3_sys>;
157 vcc7-supply = <&vcc3v3_sys>;
158 vcc8-supply = <&vcc3v3_sys>;
159 vcc9-supply = <&vcc3v3_sys>;
160
161 regulators {
162 vdd_logic: DCDC_REG1 {
163 regulator-name = "vdd_logic";
164 regulator-always-on;
165 regulator-boot-on;
166 regulator-init-microvolt = <900000>;
167 regulator-initial-mode = <0x2>;
168 regulator-min-microvolt = <500000>;
169 regulator-max-microvolt = <1350000>;
170 regulator-ramp-delay = <6001>;
171
172 regulator-state-mem {
173 regulator-off-in-suspend;
174 };
175 };
176
177 vdd_gpu: DCDC_REG2 {
178 regulator-name = "vdd_gpu";
179 regulator-always-on;
180 regulator-init-microvolt = <900000>;
181 regulator-initial-mode = <0x2>;
182 regulator-min-microvolt = <500000>;
183 regulator-max-microvolt = <1350000>;
184 regulator-ramp-delay = <6001>;
185
186 regulator-state-mem {
187 regulator-off-in-suspend;
188 };
189 };
190
191 vcc_ddr: DCDC_REG3 {
192 regulator-name = "vcc_ddr";
193 regulator-always-on;
194 regulator-boot-on;
195 regulator-initial-mode = <0x2>;
196
197 regulator-state-mem {
198 regulator-on-in-suspend;
199 };
200 };
201
202 vdd_npu: DCDC_REG4 {
203 regulator-name = "vdd_npu";
204 regulator-init-microvolt = <900000>;
205 regulator-initial-mode = <0x2>;
206 regulator-min-microvolt = <500000>;
207 regulator-max-microvolt = <1350000>;
208 regulator-ramp-delay = <6001>;
209
210 regulator-state-mem {
211 regulator-off-in-suspend;
212 };
213 };
214
215 vcc_1v8: DCDC_REG5 {
216 regulator-name = "vcc_1v8";
217 regulator-always-on;
218 regulator-boot-on;
219 regulator-min-microvolt = <1800000>;
220 regulator-max-microvolt = <1800000>;
221
222 regulator-state-mem {
223 regulator-off-in-suspend;
224 };
225 };
226
227 vdda0v9_image: LDO_REG1 {
228 regulator-name = "vdda0v9_image";
229 regulator-min-microvolt = <900000>;
230 regulator-max-microvolt = <900000>;
231
232 regulator-state-mem {
233 regulator-off-in-suspend;
234 };
235 };
236
237 vdda_0v9: LDO_REG2 {
238 regulator-name = "vdda_0v9";
239 regulator-always-on;
240 regulator-boot-on;
241 regulator-min-microvolt = <900000>;
242 regulator-max-microvolt = <900000>;
243
244 regulator-state-mem {
245 regulator-off-in-suspend;
246 };
247 };
248
249 vdda0v9_pmu: LDO_REG3 {
250 regulator-name = "vdda0v9_pmu";
251 regulator-always-on;
252 regulator-boot-on;
253 regulator-min-microvolt = <900000>;
254 regulator-max-microvolt = <900000>;
255
256 regulator-state-mem {
257 regulator-on-in-suspend;
258 regulator-suspend-microvolt = <900000>;
259 };
260 };
261
262 vccio_acodec: LDO_REG4 {
263 regulator-name = "vccio_acodec";
264 regulator-always-on;
265 regulator-min-microvolt = <3300000>;
266 regulator-max-microvolt = <3300000>;
267
268 regulator-state-mem {
269 regulator-off-in-suspend;
270 };
271 };
272
273 vccio_sd: LDO_REG5 {
274 regulator-name = "vccio_sd";
275 regulator-min-microvolt = <1800000>;
276 regulator-max-microvolt = <3300000>;
277
278 regulator-state-mem {
279 regulator-off-in-suspend;
280 };
281 };
282
283 vcc3v3_pmu: LDO_REG6 {
284 regulator-name = "vcc3v3_pmu";
285 regulator-always-on;
286 regulator-boot-on;
287 regulator-min-microvolt = <3300000>;
288 regulator-max-microvolt = <3300000>;
289
290 regulator-state-mem {
291 regulator-on-in-suspend;
292 regulator-suspend-microvolt = <3300000>;
293 };
294 };
295
296 vcca_1v8: LDO_REG7 {
297 regulator-name = "vcca_1v8";
298 regulator-always-on;
299 regulator-boot-on;
300 regulator-min-microvolt = <1800000>;
301 regulator-max-microvolt = <1800000>;
302
303 regulator-state-mem {
304 regulator-off-in-suspend;
305 };
306 };
307
308 vcca1v8_pmu: LDO_REG8 {
309 regulator-name = "vcca1v8_pmu";
310 regulator-always-on;
311 regulator-boot-on;
312 regulator-min-microvolt = <1800000>;
313 regulator-max-microvolt = <1800000>;
314
315 regulator-state-mem {
316 regulator-on-in-suspend;
317 regulator-suspend-microvolt = <1800000>;
318 };
319 };
320
321 vcca1v8_image: LDO_REG9 {
322 regulator-name = "vcca1v8_image";
323 regulator-min-microvolt = <1800000>;
324 regulator-max-microvolt = <1800000>;
325
326 regulator-state-mem {
327 regulator-off-in-suspend;
328 };
329 };
330
331 vcc_3v3: SWITCH_REG1 {
332 regulator-name = "vcc_3v3";
333 regulator-always-on;
334 regulator-boot-on;
335
336 regulator-state-mem {
337 regulator-off-in-suspend;
338 };
339 };
340
341 vcc3v3_sd: SWITCH_REG2 {
342 regulator-name = "vcc3v3_sd";
343
344 regulator-state-mem {
345 regulator-off-in-suspend;
346 };
347 };
348 };
349 };
350};
351
352&pinctrl {
353 leds {
354 led_user_en: led_user_en {
355 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
356 };
357 };
358
359 pmic {
360 pmic_int: pmic_int {
361 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
362 };
363 };
364};
365
366&pmu_io_domains {
367 pmuio1-supply = <&vcc3v3_pmu>;
368 pmuio2-supply = <&vcc3v3_pmu>;
369 vccio1-supply = <&vccio_acodec>;
370 vccio2-supply = <&vcc_1v8>;
371 vccio3-supply = <&vccio_sd>;
372 vccio4-supply = <&vcc_1v8>;
373 vccio5-supply = <&vcc_3v3>;
374 vccio6-supply = <&vcc_1v8>;
375 vccio7-supply = <&vcc_3v3>;
376 status = "okay";
377};
378
379&saradc {
380 vref-supply = <&vcca_1v8>;
381 status = "okay";
382};
383
384&sdhci {
385 bus-width = <8>;
386 max-frequency = <200000000>;
387 non-removable;
388 pinctrl-names = "default";
389 pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
390 vmmc-supply = <&vcc_3v3>;
391 vqmmc-supply = <&vcc_1v8>;
392 status = "okay";
393};
394
395&tsadc {
396 rockchip,hw-tshut-mode = <1>;
397 rockchip,hw-tshut-polarity = <0>;
398 status = "okay";
399};
400
401&uart2 {
402 status = "okay";
403};
404
405&usb2phy0 {
406 status = "okay";
407};
408
409&usb2phy1 {
410 status = "okay";
411};
412
413&usb_host0_xhci {
414 extcon = <&usb2phy0>;
415};