xref: /linux/arch/arm64/boot/dts/rockchip/px30-firefly-jd4-core.dtsi (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
4 */
5
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/pinctrl/rockchip.h>
8#include "px30.dtsi"
9
10/ {
11	compatible = "firefly,px30-jd4-core", "rockchip,px30";
12
13	emmc_pwrseq: emmc-pwrseq {
14		compatible = "mmc-pwrseq-emmc";
15		pinctrl-0 = <&emmc_reset>;
16		pinctrl-names = "default";
17		reset-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
18	};
19
20	vcc5v0_sys: regulator-vcc5v0-sys {
21		compatible = "regulator-fixed";
22		regulator-name = "vcc5v0_sys";
23		regulator-always-on;
24		regulator-boot-on;
25		regulator-min-microvolt = <5000000>;
26		regulator-max-microvolt = <5000000>;
27		vin-supply = <&vcc5v0_baseboard>;
28	};
29};
30
31&cpu0 {
32	cpu-supply = <&vdd_arm>;
33};
34
35&cpu1 {
36	cpu-supply = <&vdd_arm>;
37};
38
39&cpu2 {
40	cpu-supply = <&vdd_arm>;
41};
42
43&cpu3 {
44	cpu-supply = <&vdd_arm>;
45};
46
47&emmc {
48	bus-width = <8>;
49	cap-mmc-highspeed;
50	mmc-hs200-1_8v;
51	non-removable;
52	mmc-pwrseq = <&emmc_pwrseq>;
53	vmmc-supply = <&vcc_3v0>;
54	vqmmc-supply = <&vccio_flash>;
55	status = "okay";
56};
57
58&gpu {
59	mali-supply = <&vdd_log>;
60	status = "okay";
61};
62
63&i2c0 {
64	status = "okay";
65
66	rk809: pmic@20 {
67		compatible = "rockchip,rk809";
68		reg = <0x20>;
69		interrupt-parent = <&gpio0>;
70		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
71		pinctrl-names = "default";
72		pinctrl-0 = <&pmic_int>;
73		system-power-controller;
74		wakeup-source;
75		#clock-cells = <0>;
76		clock-output-names = "xin32k";
77
78		vcc1-supply = <&vcc5v0_sys>;
79		vcc2-supply = <&vcc5v0_sys>;
80		vcc3-supply = <&vcc5v0_sys>;
81		vcc4-supply = <&vcc5v0_sys>;
82		vcc5-supply = <&vcc3v3_sys>;
83		vcc6-supply = <&vcc3v3_sys>;
84		vcc7-supply = <&vcc3v3_sys>;
85		vcc8-supply = <&vcc3v3_sys>;
86		vcc9-supply = <&vcc5v0_sys>;
87
88		regulators {
89			vdd_log: DCDC_REG1 {
90				regulator-name = "vdd_log";
91				regulator-min-microvolt = <950000>;
92				regulator-max-microvolt = <1350000>;
93				regulator-ramp-delay = <6001>;
94				regulator-always-on;
95				regulator-boot-on;
96
97				regulator-state-mem {
98					regulator-on-in-suspend;
99					regulator-suspend-microvolt = <950000>;
100				};
101			};
102
103			vdd_arm: DCDC_REG2 {
104				regulator-name = "vdd_arm";
105				regulator-min-microvolt = <950000>;
106				regulator-max-microvolt = <1350000>;
107				regulator-ramp-delay = <6001>;
108				regulator-always-on;
109				regulator-boot-on;
110
111				regulator-state-mem {
112					regulator-off-in-suspend;
113					regulator-suspend-microvolt = <950000>;
114				};
115			};
116
117			vcc_ddr: DCDC_REG3 {
118				regulator-name = "vcc_ddr";
119				regulator-always-on;
120				regulator-boot-on;
121
122				regulator-state-mem {
123					regulator-on-in-suspend;
124				};
125			};
126
127			vcc_3v0: vcc_rmii: DCDC_REG4 {
128				regulator-name = "vcc_3v0";
129				regulator-min-microvolt = <3000000>;
130				regulator-max-microvolt = <3000000>;
131				regulator-always-on;
132				regulator-boot-on;
133
134				regulator-state-mem {
135					regulator-on-in-suspend;
136					regulator-suspend-microvolt = <3000000>;
137				};
138			};
139
140			vcc3v3_sys: DCDC_REG5 {
141				regulator-name = "vcc3v3_sys";
142				regulator-min-microvolt = <3300000>;
143				regulator-max-microvolt = <3300000>;
144				regulator-always-on;
145				regulator-boot-on;
146
147				regulator-state-mem {
148					regulator-on-in-suspend;
149					regulator-suspend-microvolt = <3300000>;
150				};
151			};
152
153			vcc_1v0: LDO_REG1 {
154				regulator-name = "vcc_1v0";
155				regulator-min-microvolt = <1000000>;
156				regulator-max-microvolt = <1000000>;
157				regulator-always-on;
158				regulator-boot-on;
159
160				regulator-state-mem {
161					regulator-on-in-suspend;
162					regulator-suspend-microvolt = <1000000>;
163				};
164			};
165
166			vcc_1v8: vccio_flash: vccio_sdio: LDO_REG2 {
167				regulator-name = "vcc_1v8";
168				regulator-min-microvolt = <1800000>;
169				regulator-max-microvolt = <1800000>;
170				regulator-always-on;
171				regulator-boot-on;
172
173				regulator-state-mem {
174					regulator-on-in-suspend;
175					regulator-suspend-microvolt = <1800000>;
176				};
177			};
178
179			vdd_1v0: LDO_REG3 {
180				regulator-name = "vdd_1v0";
181				regulator-min-microvolt = <1000000>;
182				regulator-max-microvolt = <1000000>;
183				regulator-always-on;
184				regulator-boot-on;
185
186				regulator-state-mem {
187					regulator-on-in-suspend;
188					regulator-suspend-microvolt = <1000000>;
189				};
190			};
191
192			vcc3v0_pmu: LDO_REG4 {
193				regulator-name = "vcc3v0_pmu";
194				regulator-min-microvolt = <3000000>;
195				regulator-max-microvolt = <3000000>;
196				regulator-always-on;
197				regulator-boot-on;
198
199				regulator-state-mem {
200					regulator-on-in-suspend;
201					regulator-suspend-microvolt = <3000000>;
202				};
203			};
204
205			vccio_sd: LDO_REG5 {
206				regulator-name = "vccio_sd";
207				regulator-min-microvolt = <1800000>;
208				regulator-max-microvolt = <3300000>;
209				regulator-always-on;
210				regulator-boot-on;
211
212				regulator-state-mem {
213					regulator-on-in-suspend;
214					regulator-suspend-microvolt = <3300000>;
215				};
216			};
217
218			vcc_sd: LDO_REG6 {
219				regulator-name = "vcc_sd";
220				regulator-min-microvolt = <3300000>;
221				regulator-max-microvolt = <3300000>;
222				regulator-boot-on;
223
224				regulator-state-mem {
225					regulator-on-in-suspend;
226					regulator-suspend-microvolt = <3300000>;
227				};
228			};
229
230			vcc2v8_dvp: LDO_REG7 {
231				regulator-name = "vcc2v8_dvp";
232				regulator-min-microvolt = <2800000>;
233				regulator-max-microvolt = <2800000>;
234				regulator-boot-on;
235
236				regulator-state-mem {
237					regulator-off-in-suspend;
238					regulator-suspend-microvolt = <2800000>;
239				};
240			};
241
242			vcc1v8_dvp: LDO_REG8 {
243				regulator-name = "vcc1v8_dvp";
244				regulator-min-microvolt = <1800000>;
245				regulator-max-microvolt = <1800000>;
246				regulator-boot-on;
247
248				regulator-state-mem {
249					regulator-on-in-suspend;
250					regulator-suspend-microvolt = <1800000>;
251				};
252			};
253
254			vcc1v5_dvp: LDO_REG9 {
255				regulator-name = "vcc1v5_dvp";
256				regulator-min-microvolt = <1500000>;
257				regulator-max-microvolt = <1500000>;
258				regulator-boot-on;
259
260				regulator-state-mem {
261					regulator-off-in-suspend;
262					regulator-suspend-microvolt = <1500000>;
263				};
264			};
265
266			vcc3v3_lcd: SWITCH_REG1 {
267				regulator-name = "vcc3v3_lcd";
268				regulator-boot-on;
269			};
270
271			vcc5v0_host: SWITCH_REG2 {
272				regulator-name = "vcc5v0_host";
273				regulator-always-on;
274				regulator-boot-on;
275			};
276		};
277	};
278};
279
280&io_domains {
281	vccio1-supply = <&vccio_sdio>;
282	vccio2-supply = <&vccio_sd>;
283	vccio3-supply = <&vcc_3v0>;
284	vccio4-supply = <&vcc3v0_pmu>;
285	vccio5-supply = <&vcc_3v0>;
286	vccio6-supply = <&vccio_flash>;
287	status = "okay";
288};
289
290&pinctrl {
291	emmc {
292		emmc_reset: emmc-reset {
293			rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
294		};
295	};
296
297	pmic {
298		pmic_int: pmic_int {
299			rockchip,pins =
300				<0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
301		};
302	};
303};
304
305&pmu_io_domains {
306	pmuio1-supply = <&vcc3v0_pmu>;
307	pmuio2-supply = <&vcc3v0_pmu>;
308	status = "okay";
309};
310
311&saradc {
312	vref-supply = <&vcc_1v8>;
313	status = "okay";
314};
315
316&tsadc {
317	rockchip,hw-tshut-mode = <1>;
318	rockchip,hw-tshut-polarity = <1>;
319	status = "okay";
320};
321