blob: d732a70678baa80ff2d1b24f95832511fabe00ce [file] [log] [blame]
jk.kernel@gmail.comdd63fbc2016-07-26 18:28:30 +08001/*
2 * This file is dual-licensed: you can use it either under the terms
3 * of the GPL or the X11 license, at your option. Note that this dual
4 * licensing only applies to this file, and not this project as a
5 * whole.
6 *
7 * a) This file is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
11 *
12 * This file is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * Or, alternatively,
18 *
19 * b) Permission is hereby granted, free of charge, to any person
20 * obtaining a copy of this software and associated documentation
21 * files (the "Software"), to deal in the Software without
22 * restriction, including without limitation the rights to use,
23 * copy, modify, merge, publish, distribute, sublicense, and/or
24 * sell copies of the Software, and to permit persons to whom the
25 * Software is furnished to do so, subject to the following
26 * conditions:
27 *
28 * The above copyright notice and this permission notice shall be
29 * included in all copies or substantial portions of the Software.
30 *
31 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38 * OTHER DEALINGS IN THE SOFTWARE.
39 */
40
Dzmitry Sankouski2ea06222023-01-22 18:21:22 +030041#include <dt-bindings/input/input.h>
jk.kernel@gmail.comdd63fbc2016-07-26 18:28:30 +080042#include "rk3288.dtsi"
43
44/ {
45 memory{
46 device_type = "memory";
47 reg = <0 0x80000000>;
48 };
49
50 ext_gmac: external-gmac-clock {
51 compatible = "fixed-clock";
52 clock-frequency = <125000000>;
53 clock-output-names = "ext_gmac";
54 #clock-cells = <0>;
55 };
56
57 gpio-keys {
58 compatible = "gpio-keys";
59 autorepeat;
60
61 pinctrl-names = "default";
62 pinctrl-0 = <&pwrbtn>;
63
64 power {
65 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
66 label = "GPIO Key Power";
Dzmitry Sankouski2ea06222023-01-22 18:21:22 +030067 linux,code = <KEY_POWER>;
jk.kernel@gmail.comdd63fbc2016-07-26 18:28:30 +080068 linux,input-type = <1>;
69 wakeup-source;
70 debounce-interval = <100>;
71 };
72 };
73
jk.kernel@gmail.comdd63fbc2016-07-26 18:28:30 +080074 ir: ir-receiver {
75 compatible = "gpio-ir-receiver";
76 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
77 pinctrl-names = "default";
78 pinctrl-0 = <&ir_int>;
79 };
80
81 vcc_flash: flash-regulator {
82 compatible = "regulator-fixed";
83 regulator-name = "vcc_flash";
84 regulator-min-microvolt = <1800000>;
85 regulator-max-microvolt = <1800000>;
86 vin-supply = <&vcc_io>;
87 };
88
89 vcc_sd: sdmmc-regulator {
90 compatible = "regulator-fixed";
91 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
92 pinctrl-names = "default";
93 pinctrl-0 = <&sdmmc_pwr>;
94 regulator-name = "vcc_sd";
95 regulator-min-microvolt = <3300000>;
96 regulator-max-microvolt = <3300000>;
97 startup-delay-us = <100000>;
98 vin-supply = <&vcc_io>;
99 };
100
101 vcc_sys: vsys-regulator {
102 compatible = "regulator-fixed";
103 regulator-name = "vcc_sys";
104 regulator-min-microvolt = <5000000>;
105 regulator-max-microvolt = <5000000>;
106 regulator-always-on;
107 regulator-boot-on;
108 };
109
110 /*
111 * A PT5128 creates both dovdd_1v8 and vcc28_dvp, controlled
112 * by the dvp_pwr pin.
113 */
114 vcc18_dvp: vcc18-dvp-regulator {
115 compatible = "regulator-fixed";
116 regulator-name = "vcc18-dvp";
117 regulator-min-microvolt = <1800000>;
118 regulator-max-microvolt = <1800000>;
119 vin-supply = <&vcc28_dvp>;
120 };
121
122 vcc28_dvp: vcc28-dvp-regulator {
123 compatible = "regulator-fixed";
124 enable-active-high;
125 gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
126 pinctrl-names = "default";
127 pinctrl-0 = <&dvp_pwr>;
128 regulator-name = "vcc28_dvp";
129 regulator-min-microvolt = <2800000>;
130 regulator-max-microvolt = <2800000>;
131 regulator-always-on;
132 vin-supply = <&vcc_io>;
133 };
Kever Yang897ddca2016-11-24 15:29:52 +0800134
135 vcc5v0_host: usb-host-regulator {
136 compatible = "regulator-fixed";
137 enable-active-high;
138 gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
139 pinctrl-names = "default";
140 pinctrl-0 = <&host_vbus_drv>;
141 regulator-name = "vcc5v0_host";
142 regulator-min-microvolt = <5000000>;
143 regulator-max-microvolt = <5000000>;
144 regulator-always-on;
145 };
jk.kernel@gmail.comdd63fbc2016-07-26 18:28:30 +0800146};
147
148&cpu0 {
149 cpu0-supply = <&vdd_cpu>;
150};
151
152&emmc {
153 bus-width = <8>;
154 cap-mmc-highspeed;
155 disable-wp;
156 non-removable;
157 num-slots = <1>;
158 pinctrl-names = "default";
159 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
160 vmmc-supply = <&vcc_io>;
161 vqmmc-supply = <&vcc_flash>;
162 status = "okay";
163};
164
165&sdmmc {
166 bus-width = <4>;
167 cap-mmc-highspeed;
168 cap-sd-highspeed;
169 card-detect-delay = <200>;
170 disable-wp;
171 num-slots = <1>;
172 pinctrl-names = "default";
173 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
174 vmmc-supply = <&vcc_sd>;
175 vqmmc-supply = <&vccio_sd>;
176 status = "okay";
177};
178
179&gmac {
180 phy-supply = <&vcc_lan>;
181 phy-mode = "rgmii";
182 clock_in_out = "input";
183 snps,reset-gpio = <&gpio4 7 0>;
184 snps,reset-active-low;
185 snps,reset-delays-us = <0 10000 1000000>;
186 assigned-clocks = <&cru SCLK_MAC>;
187 assigned-clock-parents = <&ext_gmac>;
188 pinctrl-names = "default";
189 pinctrl-0 = <&rgmii_pins>;
190 tx_delay = <0x30>;
191 rx_delay = <0x10>;
Jacob Chenee4bc342017-02-23 14:20:16 +0800192 status = "okay";
jk.kernel@gmail.comdd63fbc2016-07-26 18:28:30 +0800193};
194
195&hdmi {
196 ddc-i2c-bus = <&i2c5>;
197 status = "okay";
198};
199
200&i2c0 {
201 status = "okay";
202 clock-frequency = <400000>;
203
204 rk808: pmic@1b {
205 compatible = "rockchip,rk808";
206 reg = <0x1b>;
207 interrupt-parent = <&gpio0>;
208 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
209 pinctrl-names = "default";
210 pinctrl-0 = <&pmic_int &global_pwroff>;
211 rockchip,system-power-controller;
212 wakeup-source;
213 #clock-cells = <1>;
214 clock-output-names = "xin32k", "rk808-clkout2";
215
216 vcc1-supply = <&vcc_sys>;
217 vcc2-supply = <&vcc_sys>;
218 vcc3-supply = <&vcc_sys>;
219 vcc4-supply = <&vcc_sys>;
220 vcc6-supply = <&vcc_sys>;
221 vcc7-supply = <&vcc_sys>;
222 vcc8-supply = <&vcc_18>;
223 vcc9-supply = <&vcc_io>;
224 vcc10-supply = <&vcc_io>;
225 vcc11-supply = <&vcc_sys>;
226 vcc12-supply = <&vcc_io>;
227 vddio-supply = <&vcc_io>;
228
229 regulators {
230 vdd_cpu: DCDC_REG1 {
231 regulator-always-on;
232 regulator-boot-on;
233 regulator-min-microvolt = <750000>;
234 regulator-max-microvolt = <1350000>;
235 regulator-name = "vdd_arm";
236 regulator-state-mem {
237 regulator-off-in-suspend;
238 };
239 };
240
241 vdd_gpu: DCDC_REG2 {
242 regulator-always-on;
243 regulator-boot-on;
244 regulator-min-microvolt = <850000>;
245 regulator-max-microvolt = <1250000>;
246 regulator-name = "vdd_gpu";
247 regulator-state-mem {
248 regulator-on-in-suspend;
249 regulator-suspend-microvolt = <1000000>;
250 };
251 };
252
253 vcc_ddr: DCDC_REG3 {
254 regulator-always-on;
255 regulator-boot-on;
256 regulator-name = "vcc_ddr";
257 regulator-state-mem {
258 regulator-on-in-suspend;
259 };
260 };
261
262 vcc_io: DCDC_REG4 {
263 regulator-always-on;
264 regulator-boot-on;
265 regulator-min-microvolt = <3300000>;
266 regulator-max-microvolt = <3300000>;
267 regulator-name = "vcc_io";
268 regulator-state-mem {
269 regulator-on-in-suspend;
270 regulator-suspend-microvolt = <3300000>;
271 };
272 };
273
274 vcc_lan: LDO_REG1 {
275 regulator-always-on;
276 regulator-boot-on;
277 regulator-min-microvolt = <3300000>;
278 regulator-max-microvolt = <3300000>;
279 regulator-name = "vcc_lan";
280 regulator-state-mem {
281 regulator-on-in-suspend;
282 regulator-suspend-microvolt = <3300000>;
283 };
284 };
285
286 vccio_sd: LDO_REG2 {
287 regulator-always-on;
288 regulator-boot-on;
289 regulator-min-microvolt = <3300000>;
290 regulator-max-microvolt = <3300000>;
291 regulator-name = "vccio_sd";
292 regulator-state-mem {
293 regulator-off-in-suspend;
294 };
295 };
296
297 vdd_10: LDO_REG3 {
298 regulator-always-on;
299 regulator-boot-on;
300 regulator-min-microvolt = <1000000>;
301 regulator-max-microvolt = <1000000>;
302 regulator-name = "vdd_10";
303 regulator-state-mem {
304 regulator-on-in-suspend;
305 regulator-suspend-microvolt = <1000000>;
306 };
307 };
308
309 vcc18_lcd: LDO_REG4 {
310 regulator-always-on;
311 regulator-boot-on;
312 regulator-min-microvolt = <1800000>;
313 regulator-max-microvolt = <1800000>;
314 regulator-name = "vcc18_lcd";
315 regulator-state-mem {
316 regulator-on-in-suspend;
317 regulator-suspend-microvolt = <1800000>;
318 };
319 };
320
321 ldo5: LDO_REG5 {
322 regulator-always-on;
323 regulator-min-microvolt = <1800000>;
324 regulator-max-microvolt = <3300000>;
325 regulator-name = "ldo5";
326 };
327
328 vdd10_lcd: LDO_REG6 {
329 regulator-always-on;
330 regulator-boot-on;
331 regulator-min-microvolt = <1000000>;
332 regulator-max-microvolt = <1000000>;
333 regulator-name = "vdd10_lcd";
334 regulator-state-mem {
335 regulator-on-in-suspend;
336 regulator-suspend-microvolt = <1000000>;
337 };
338 };
339
340 vcc_18: LDO_REG7 {
341 regulator-always-on;
342 regulator-boot-on;
343 regulator-min-microvolt = <1800000>;
344 regulator-max-microvolt = <1800000>;
345 regulator-name = "vcc_18";
346 regulator-state-mem {
347 regulator-on-in-suspend;
348 regulator-suspend-microvolt = <1800000>;
349 };
350 };
351
352 vcca_33: LDO_REG8 {
353 regulator-always-on;
354 regulator-boot-on;
355 regulator-min-microvolt = <3300000>;
356 regulator-max-microvolt = <3300000>;
357 regulator-name = "vcca_33";
358 regulator-state-mem {
359 regulator-on-in-suspend;
360 regulator-suspend-microvolt = <3300000>;
361 };
362 };
363
364 vccio_wl: SWITCH_REG1 {
365 regulator-always-on;
366 regulator-boot-on;
367 regulator-name = "vccio_wl";
368 regulator-state-mem {
369 regulator-on-in-suspend;
370 };
371 };
372
373 vcc_lcd: SWITCH_REG2 {
374 regulator-always-on;
375 regulator-boot-on;
376 regulator-name = "vcc_lcd";
377 regulator-state-mem {
378 regulator-on-in-suspend;
379 };
380 };
381 };
382 };
383};
384
385&i2c1 {
386 status = "okay";
387 clock-frequency = <400000>;
388
389 ak8963: ak8963@0d {
390 compatible = "asahi-kasei,ak8975";
391 reg = <0x0d>;
392 interrupt-parent = <&gpio8>;
393 interrupts = <1 IRQ_TYPE_EDGE_RISING>;
394 pinctrl-names = "default";
395 pinctrl-0 = <&comp_int>;
396 };
397
398 l3g4200d: l3g4200d@68 {
399 compatible = "st,l3g4200d-gyro";
400 st,drdy-int-pin = <2>;
401 reg = <0x6b>;
402 };
403
404 mma8452: mma8452@1d {
405 compatible = "fsl,mma8452";
406 reg = <0x1d>;
407 interrupt-parent = <&gpio8>;
408 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
409 pinctrl-names = "default";
410 pinctrl-0 = <&gsensor_int>;
411 };
412};
413
414&i2c2 {
415 status = "okay";
416};
417
418&i2c3 {
419 status = "okay";
420};
421
422&i2c4 {
423 status = "okay";
424};
425
426&i2c5 {
427 status = "okay";
428};
429
Johan Jonker35e9e8a2023-03-15 19:31:57 +0100430&io_domains {
431 audio-supply = <&vcca_33>;
432 bb-supply = <&vcc_io>;
433 dvp-supply = <&vcc18_dvp>;
434 flash0-supply = <&vcc_flash>;
435 flash1-supply = <&vcc_lan>;
436 gpio30-supply = <&vcc_io>;
437 gpio1830-supply = <&vcc_io>;
438 lcdc-supply = <&vcc_io>;
439 sdcard-supply = <&vccio_sd>;
440 wifi-supply = <&vccio_wl>;
441 status = "okay";
442};
443
jk.kernel@gmail.comdd63fbc2016-07-26 18:28:30 +0800444&pinctrl {
445 ak8963 {
446 comp_int: comp-int {
447 rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
448 };
449 };
450
451 buttons {
452 pwrbtn: pwrbtn {
453 rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
454 };
455 };
456
457 dvp {
458 dvp_pwr: dvp-pwr {
459 rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_pull_none>;
460 };
461 };
462
463 ir {
464 ir_int: ir-int {
465 rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_up>;
466 };
467 };
468
469 mma8452 {
470 gsensor_int: gsensor-int {
471 rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_up>;
472 };
473 };
474
475 pmic {
476 pmic_int: pmic-int {
477 rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
478 };
479 };
480
481 sdmmc {
482 sdmmc_pwr: sdmmc-pwr {
483 rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
484 };
485 };
Kever Yang897ddca2016-11-24 15:29:52 +0800486
487 usb_host {
488 host_vbus_drv: host-vbus-drv {
489 rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
490 };
491 };
jk.kernel@gmail.comdd63fbc2016-07-26 18:28:30 +0800492};
493
David Wu0eaf58b2017-09-20 14:43:08 +0800494&saradc {
495 status = "okay";
496};
497
jk.kernel@gmail.comdd63fbc2016-07-26 18:28:30 +0800498&tsadc {
499 rockchip,hw-tshut-mode = <0>;
500 rockchip,hw-tshut-polarity = <0>;
501 status = "okay";
502};
503
504&vopb {
505 status = "okay";
506};
507
508&vopb_mmu {
509 status = "okay";
510};
511
512&vopl {
513 status = "okay";
514};
515
516&vopl_mmu {
517 status = "okay";
518};
519
520&uart0 {
521 status = "okay";
522};
523
524&uart1 {
525 status = "okay";
526};
527
528&uart2 {
529 status = "okay";
530};
531
532&uart3 {
533 status = "okay";
534};
535
536&uart4 {
537 status = "okay";
538};
539
Kever Yang897ddca2016-11-24 15:29:52 +0800540&usb_host1 {
541 vbus-supply = <&vcc5v0_host>;
542 status = "okay";
543};
544
jk.kernel@gmail.comdd63fbc2016-07-26 18:28:30 +0800545&usbphy {
546 status = "okay";
547};