blob: 0a516334f15f165e7722cad5afcbd844d7b19421 [file] [log] [blame]
Jagan Tekif18d2662020-06-10 16:06:56 +05301// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
4 * Copyright (c) 2019 Vamrs Limited
5 * Copyright (c) 2019 Amarula Solutions(India)
6 */
7
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/pinctrl/rockchip.h>
10#include <dt-bindings/pwm/pwm.h>
11
12/ {
13 compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro";
14
15 clkin_gmac: external-gmac-clock {
16 compatible = "fixed-clock";
17 clock-frequency = <125000000>;
18 clock-output-names = "clkin_gmac";
19 #clock-cells = <0>;
20 };
21
22 vcc12v_dcin: vcc12v-dcin-regulator {
23 compatible = "regulator-fixed";
24 regulator-name = "vcc12v_dcin";
25 regulator-always-on;
26 regulator-boot-on;
27 regulator-min-microvolt = <12000000>;
28 regulator-max-microvolt = <12000000>;
29 };
30
31 vcc5v0_sys: vcc5v0-sys-regulator {
32 compatible = "regulator-fixed";
33 regulator-name = "vcc5v0_sys";
34 regulator-always-on;
35 regulator-boot-on;
36 regulator-min-microvolt = <5000000>;
37 regulator-max-microvolt = <5000000>;
38 vin-supply = <&vcc12v_dcin>;
39 };
40};
41
42&cpu_l0 {
43 cpu-supply = <&vdd_cpu_l>;
44};
45
46&cpu_l1 {
47 cpu-supply = <&vdd_cpu_l>;
48};
49
50&cpu_l2 {
51 cpu-supply = <&vdd_cpu_l>;
52};
53
54&cpu_l3 {
55 cpu-supply = <&vdd_cpu_l>;
56};
57
58&emmc_phy {
59 status = "okay";
60};
61
62&gmac {
63 assigned-clocks = <&cru SCLK_RMII_SRC>;
64 assigned-clock-parents = <&clkin_gmac>;
65 clock_in_out = "input";
66 phy-supply = <&vcc_lan>;
67 phy-mode = "rgmii";
68 pinctrl-names = "default";
69 pinctrl-0 = <&rgmii_pins>;
70 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
71 snps,reset-active-low;
72 snps,reset-delays-us = <0 10000 50000>;
73 tx_delay = <0x28>;
74 rx_delay = <0x11>;
75};
76
77&i2c0 {
78 clock-frequency = <400000>;
79 i2c-scl-rising-time-ns = <180>;
80 i2c-scl-falling-time-ns = <30>;
81 status = "okay";
82
83 rk809: pmic@20 {
84 compatible = "rockchip,rk809";
85 reg = <0x20>;
86 interrupt-parent = <&gpio1>;
87 interrupts = <RK_PC2 IRQ_TYPE_LEVEL_LOW>;
88 #clock-cells = <1>;
89 clock-output-names = "rk808-clkout1", "rk808-clkout2";
90 pinctrl-names = "default";
91 pinctrl-0 = <&pmic_int_l>;
92 rockchip,system-power-controller;
93 wakeup-source;
94
95 vcc1-supply = <&vcc5v0_sys>;
96 vcc2-supply = <&vcc5v0_sys>;
97 vcc3-supply = <&vcc5v0_sys>;
98 vcc4-supply = <&vcc5v0_sys>;
99 vcc5-supply = <&vcc_buck5>;
100 vcc6-supply = <&vcc_buck5>;
101 vcc7-supply = <&vcc5v0_sys>;
102 vcc8-supply = <&vcc3v3_sys>;
103 vcc9-supply = <&vcc5v0_sys>;
104
105 regulators {
106 vdd_log: DCDC_REG1 {
107 regulator-name = "vdd_log";
108 regulator-always-on;
109 regulator-boot-on;
110 regulator-min-microvolt = <750000>;
111 regulator-max-microvolt = <1350000>;
112 regulator-initial-mode = <0x2>;
113 regulator-state-mem {
114 regulator-off-in-suspend;
115 regulator-suspend-microvolt = <900000>;
116 };
117 };
118
119 vdd_cpu_l: DCDC_REG2 {
120 regulator-name = "vdd_cpu_l";
121 regulator-always-on;
122 regulator-boot-on;
123 regulator-min-microvolt = <750000>;
124 regulator-max-microvolt = <1350000>;
125 regulator-ramp-delay = <6001>;
126 regulator-initial-mode = <0x2>;
127 regulator-state-mem {
128 regulator-off-in-suspend;
129 };
130 };
131
132 vcc_ddr: DCDC_REG3 {
133 regulator-name = "vcc_ddr";
134 regulator-always-on;
135 regulator-boot-on;
136 regulator-initial-mode = <0x2>;
137 regulator-state-mem {
138 regulator-on-in-suspend;
139 };
140 };
141
142 vcc3v3_sys: DCDC_REG4 {
143 regulator-name = "vcc3v3_sys";
144 regulator-always-on;
145 regulator-boot-on;
146 regulator-min-microvolt = <3300000>;
147 regulator-max-microvolt = <3300000>;
148 regulator-initial-mode = <0x2>;
149 regulator-state-mem {
150 regulator-on-in-suspend;
151 regulator-suspend-microvolt = <3300000>;
152 };
153 };
154
155 vcc_buck5: DCDC_REG5 {
156 regulator-name = "vcc_buck5";
157 regulator-always-on;
158 regulator-boot-on;
159 regulator-min-microvolt = <2200000>;
160 regulator-max-microvolt = <2200000>;
161 regulator-state-mem {
162 regulator-on-in-suspend;
163 regulator-suspend-microvolt = <2200000>;
164 };
165 };
166
167 vcca_0v9: LDO_REG1 {
168 regulator-name = "vcca_0v9";
169 regulator-always-on;
170 regulator-boot-on;
171 regulator-min-microvolt = <900000>;
172 regulator-max-microvolt = <900000>;
173 regulator-state-mem {
174 regulator-off-in-suspend;
175 };
176 };
177
178 vcc_1v8: LDO_REG2 {
179 regulator-name = "vcc_1v8";
180 regulator-always-on;
181 regulator-boot-on;
182 regulator-min-microvolt = <1800000>;
183 regulator-max-microvolt = <1800000>;
184 regulator-state-mem {
185 regulator-on-in-suspend;
186 regulator-suspend-microvolt = <1800000>;
187 };
188 };
189
190 vcc_0v9: LDO_REG3 {
191 regulator-name = "vcc_0v9";
192 regulator-always-on;
193 regulator-boot-on;
194 regulator-min-microvolt = <900000>;
195 regulator-max-microvolt = <900000>;
196 regulator-state-mem {
197 regulator-on-in-suspend;
198 regulator-suspend-microvolt = <900000>;
199 };
200 };
201
202 vcca_1v8: LDO_REG4 {
203 regulator-name = "vcca_1v8";
204 regulator-always-on;
205 regulator-boot-on;
206 regulator-min-microvolt = <1850000>;
207 regulator-max-microvolt = <1850000>;
208 regulator-state-mem {
209 regulator-off-in-suspend;
210 };
211 };
212
213 /*
214 * As per BSP, but schematic not showing any regulator
215 * pin for LD05.
216 */
217 vdd1v5_dvp: LDO_REG5 {
218 regulator-name = "vdd1v5_dvp";
219 regulator-always-on;
220 regulator-boot-on;
221 regulator-min-microvolt = <1500000>;
222 regulator-max-microvolt = <1500000>;
223 regulator-state-mem {
224 regulator-off-in-suspend;
225 };
226 };
227
228 vcc_1v5: LDO_REG6 {
229 regulator-name = "vcc_1v5";
230 regulator-always-on;
231 regulator-boot-on;
232 regulator-min-microvolt = <1500000>;
233 regulator-max-microvolt = <1500000>;
234 regulator-state-mem {
235 regulator-off-in-suspend;
236 };
237 };
238
239 vccio_3v0: LDO_REG7 {
240 regulator-name = "vccio_3v0";
241 regulator-always-on;
242 regulator-boot-on;
243 regulator-min-microvolt = <3000000>;
244 regulator-max-microvolt = <3000000>;
245 regulator-state-mem {
246 regulator-off-in-suspend;
247 };
248 };
249
250 vccio_sd: LDO_REG8 {
251 regulator-name = "vccio_sd";
252 regulator-always-on;
253 regulator-boot-on;
254 regulator-min-microvolt = <1800000>;
255 regulator-max-microvolt = <3300000>;
256 regulator-state-mem {
257 regulator-off-in-suspend;
258 };
259 };
260
261 /*
262 * As per BSP, but schematic not showing any regulator
263 * pin for LD09.
264 */
265 vcc_sd: LDO_REG9 {
266 regulator-name = "vcc_sd";
267 regulator-always-on;
268 regulator-boot-on;
269 regulator-min-microvolt = <3300000>;
270 regulator-max-microvolt = <3300000>;
271 regulator-state-mem {
272 regulator-off-in-suspend;
273 };
274 };
275
276 vcc5v0_usb2: SWITCH_REG1 {
277 regulator-name = "vcc5v0_usb2";
278 regulator-min-microvolt = <5000000>;
279 regulator-max-microvolt = <5000000>;
280 regulator-state-mem {
281 regulator-on-in-suspend;
282 regulator-suspend-microvolt = <5000000>;
283 };
284 };
285
286 vccio_3v3: vcc_lan: SWITCH_REG2 {
287 regulator-name = "vccio_3v3";
288 regulator-always-on;
289 regulator-boot-on;
290 regulator-min-microvolt = <3300000>;
291 regulator-max-microvolt = <3300000>;
292 regulator-state-mem {
293 regulator-off-in-suspend;
294 };
295 };
296 };
297 };
298};
299
300&io_domains {
301 status = "okay";
302 bt656-supply = <&vcca_1v8>;
303 sdmmc-supply = <&vccio_sd>;
304 gpio1830-supply = <&vccio_3v0>;
305};
306
307&pmu_io_domains {
308 status = "okay";
309 pmu1830-supply = <&vcc_1v8>;
310};
311
312&sdhci {
313 bus-width = <8>;
314 mmc-hs400-1_8v;
315 mmc-hs400-enhanced-strobe;
316 non-removable;
317 status = "okay";
318};
319
320&tsadc {
321 status = "okay";
322 rockchip,hw-tshut-mode = <1>;
323 rockchip,hw-tshut-polarity = <1>;
324};
325
326&pinctrl {
327 pmic {
328 pmic_int_l: pmic-int-l {
329 rockchip,pins =
330 <1 RK_PC2 0 &pcfg_pull_up>;
331 };
332 };
333};