blob: 0253933a117046e7728531e6bf7f5240dfac4330 [file] [log] [blame]
jk.kernel@gmail.com7a614ac2016-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 Sankouski55003db2023-01-22 18:21:22 +030041#include <dt-bindings/input/input.h>
jk.kernel@gmail.com7a614ac2016-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 Sankouski55003db2023-01-22 18:21:22 +030067 linux,code = <KEY_POWER>;
jk.kernel@gmail.com7a614ac2016-07-26 18:28:30 +080068 linux,input-type = <1>;
69 wakeup-source;
70 debounce-interval = <100>;
71 };
72 };
73
74 io_domains: io-domains {
75 compatible = "rockchip,rk3288-io-voltage-domain";
76 rockchip,grf = <&grf>;
77
78 audio-supply = <&vcca_33>;
79 bb-supply = <&vcc_io>;
80 dvp-supply = <&vcc18_dvp>;
81 flash0-supply = <&vcc_flash>;
82 flash1-supply = <&vcc_lan>;
83 gpio30-supply = <&vcc_io>;
84 gpio1830-supply = <&vcc_io>;
85 lcdc-supply = <&vcc_io>;
86 sdcard-supply = <&vccio_sd>;
87 wifi-supply = <&vccio_wl>;
88 };
89
90 ir: ir-receiver {
91 compatible = "gpio-ir-receiver";
92 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
93 pinctrl-names = "default";
94 pinctrl-0 = <&ir_int>;
95 };
96
97 vcc_flash: flash-regulator {
98 compatible = "regulator-fixed";
99 regulator-name = "vcc_flash";
100 regulator-min-microvolt = <1800000>;
101 regulator-max-microvolt = <1800000>;
102 vin-supply = <&vcc_io>;
103 };
104
105 vcc_sd: sdmmc-regulator {
106 compatible = "regulator-fixed";
107 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
108 pinctrl-names = "default";
109 pinctrl-0 = <&sdmmc_pwr>;
110 regulator-name = "vcc_sd";
111 regulator-min-microvolt = <3300000>;
112 regulator-max-microvolt = <3300000>;
113 startup-delay-us = <100000>;
114 vin-supply = <&vcc_io>;
115 };
116
117 vcc_sys: vsys-regulator {
118 compatible = "regulator-fixed";
119 regulator-name = "vcc_sys";
120 regulator-min-microvolt = <5000000>;
121 regulator-max-microvolt = <5000000>;
122 regulator-always-on;
123 regulator-boot-on;
124 };
125
126 /*
127 * A PT5128 creates both dovdd_1v8 and vcc28_dvp, controlled
128 * by the dvp_pwr pin.
129 */
130 vcc18_dvp: vcc18-dvp-regulator {
131 compatible = "regulator-fixed";
132 regulator-name = "vcc18-dvp";
133 regulator-min-microvolt = <1800000>;
134 regulator-max-microvolt = <1800000>;
135 vin-supply = <&vcc28_dvp>;
136 };
137
138 vcc28_dvp: vcc28-dvp-regulator {
139 compatible = "regulator-fixed";
140 enable-active-high;
141 gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
142 pinctrl-names = "default";
143 pinctrl-0 = <&dvp_pwr>;
144 regulator-name = "vcc28_dvp";
145 regulator-min-microvolt = <2800000>;
146 regulator-max-microvolt = <2800000>;
147 regulator-always-on;
148 vin-supply = <&vcc_io>;
149 };
Kever Yangda65ce92016-11-24 15:29:52 +0800150
151 vcc5v0_host: usb-host-regulator {
152 compatible = "regulator-fixed";
153 enable-active-high;
154 gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
155 pinctrl-names = "default";
156 pinctrl-0 = <&host_vbus_drv>;
157 regulator-name = "vcc5v0_host";
158 regulator-min-microvolt = <5000000>;
159 regulator-max-microvolt = <5000000>;
160 regulator-always-on;
161 };
jk.kernel@gmail.com7a614ac2016-07-26 18:28:30 +0800162};
163
164&cpu0 {
165 cpu0-supply = <&vdd_cpu>;
166};
167
168&emmc {
169 bus-width = <8>;
170 cap-mmc-highspeed;
171 disable-wp;
172 non-removable;
173 num-slots = <1>;
174 pinctrl-names = "default";
175 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
176 vmmc-supply = <&vcc_io>;
177 vqmmc-supply = <&vcc_flash>;
178 status = "okay";
179};
180
181&sdmmc {
182 bus-width = <4>;
183 cap-mmc-highspeed;
184 cap-sd-highspeed;
185 card-detect-delay = <200>;
186 disable-wp;
187 num-slots = <1>;
188 pinctrl-names = "default";
189 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
190 vmmc-supply = <&vcc_sd>;
191 vqmmc-supply = <&vccio_sd>;
192 status = "okay";
193};
194
195&gmac {
196 phy-supply = <&vcc_lan>;
197 phy-mode = "rgmii";
198 clock_in_out = "input";
199 snps,reset-gpio = <&gpio4 7 0>;
200 snps,reset-active-low;
201 snps,reset-delays-us = <0 10000 1000000>;
202 assigned-clocks = <&cru SCLK_MAC>;
203 assigned-clock-parents = <&ext_gmac>;
204 pinctrl-names = "default";
205 pinctrl-0 = <&rgmii_pins>;
206 tx_delay = <0x30>;
207 rx_delay = <0x10>;
Jacob Chen8ddfce52017-02-23 14:20:16 +0800208 status = "okay";
jk.kernel@gmail.com7a614ac2016-07-26 18:28:30 +0800209};
210
211&hdmi {
212 ddc-i2c-bus = <&i2c5>;
213 status = "okay";
214};
215
216&i2c0 {
217 status = "okay";
218 clock-frequency = <400000>;
219
220 rk808: pmic@1b {
221 compatible = "rockchip,rk808";
222 reg = <0x1b>;
223 interrupt-parent = <&gpio0>;
224 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
225 pinctrl-names = "default";
226 pinctrl-0 = <&pmic_int &global_pwroff>;
227 rockchip,system-power-controller;
228 wakeup-source;
229 #clock-cells = <1>;
230 clock-output-names = "xin32k", "rk808-clkout2";
231
232 vcc1-supply = <&vcc_sys>;
233 vcc2-supply = <&vcc_sys>;
234 vcc3-supply = <&vcc_sys>;
235 vcc4-supply = <&vcc_sys>;
236 vcc6-supply = <&vcc_sys>;
237 vcc7-supply = <&vcc_sys>;
238 vcc8-supply = <&vcc_18>;
239 vcc9-supply = <&vcc_io>;
240 vcc10-supply = <&vcc_io>;
241 vcc11-supply = <&vcc_sys>;
242 vcc12-supply = <&vcc_io>;
243 vddio-supply = <&vcc_io>;
244
245 regulators {
246 vdd_cpu: DCDC_REG1 {
247 regulator-always-on;
248 regulator-boot-on;
249 regulator-min-microvolt = <750000>;
250 regulator-max-microvolt = <1350000>;
251 regulator-name = "vdd_arm";
252 regulator-state-mem {
253 regulator-off-in-suspend;
254 };
255 };
256
257 vdd_gpu: DCDC_REG2 {
258 regulator-always-on;
259 regulator-boot-on;
260 regulator-min-microvolt = <850000>;
261 regulator-max-microvolt = <1250000>;
262 regulator-name = "vdd_gpu";
263 regulator-state-mem {
264 regulator-on-in-suspend;
265 regulator-suspend-microvolt = <1000000>;
266 };
267 };
268
269 vcc_ddr: DCDC_REG3 {
270 regulator-always-on;
271 regulator-boot-on;
272 regulator-name = "vcc_ddr";
273 regulator-state-mem {
274 regulator-on-in-suspend;
275 };
276 };
277
278 vcc_io: DCDC_REG4 {
279 regulator-always-on;
280 regulator-boot-on;
281 regulator-min-microvolt = <3300000>;
282 regulator-max-microvolt = <3300000>;
283 regulator-name = "vcc_io";
284 regulator-state-mem {
285 regulator-on-in-suspend;
286 regulator-suspend-microvolt = <3300000>;
287 };
288 };
289
290 vcc_lan: LDO_REG1 {
291 regulator-always-on;
292 regulator-boot-on;
293 regulator-min-microvolt = <3300000>;
294 regulator-max-microvolt = <3300000>;
295 regulator-name = "vcc_lan";
296 regulator-state-mem {
297 regulator-on-in-suspend;
298 regulator-suspend-microvolt = <3300000>;
299 };
300 };
301
302 vccio_sd: LDO_REG2 {
303 regulator-always-on;
304 regulator-boot-on;
305 regulator-min-microvolt = <3300000>;
306 regulator-max-microvolt = <3300000>;
307 regulator-name = "vccio_sd";
308 regulator-state-mem {
309 regulator-off-in-suspend;
310 };
311 };
312
313 vdd_10: LDO_REG3 {
314 regulator-always-on;
315 regulator-boot-on;
316 regulator-min-microvolt = <1000000>;
317 regulator-max-microvolt = <1000000>;
318 regulator-name = "vdd_10";
319 regulator-state-mem {
320 regulator-on-in-suspend;
321 regulator-suspend-microvolt = <1000000>;
322 };
323 };
324
325 vcc18_lcd: LDO_REG4 {
326 regulator-always-on;
327 regulator-boot-on;
328 regulator-min-microvolt = <1800000>;
329 regulator-max-microvolt = <1800000>;
330 regulator-name = "vcc18_lcd";
331 regulator-state-mem {
332 regulator-on-in-suspend;
333 regulator-suspend-microvolt = <1800000>;
334 };
335 };
336
337 ldo5: LDO_REG5 {
338 regulator-always-on;
339 regulator-min-microvolt = <1800000>;
340 regulator-max-microvolt = <3300000>;
341 regulator-name = "ldo5";
342 };
343
344 vdd10_lcd: LDO_REG6 {
345 regulator-always-on;
346 regulator-boot-on;
347 regulator-min-microvolt = <1000000>;
348 regulator-max-microvolt = <1000000>;
349 regulator-name = "vdd10_lcd";
350 regulator-state-mem {
351 regulator-on-in-suspend;
352 regulator-suspend-microvolt = <1000000>;
353 };
354 };
355
356 vcc_18: LDO_REG7 {
357 regulator-always-on;
358 regulator-boot-on;
359 regulator-min-microvolt = <1800000>;
360 regulator-max-microvolt = <1800000>;
361 regulator-name = "vcc_18";
362 regulator-state-mem {
363 regulator-on-in-suspend;
364 regulator-suspend-microvolt = <1800000>;
365 };
366 };
367
368 vcca_33: LDO_REG8 {
369 regulator-always-on;
370 regulator-boot-on;
371 regulator-min-microvolt = <3300000>;
372 regulator-max-microvolt = <3300000>;
373 regulator-name = "vcca_33";
374 regulator-state-mem {
375 regulator-on-in-suspend;
376 regulator-suspend-microvolt = <3300000>;
377 };
378 };
379
380 vccio_wl: SWITCH_REG1 {
381 regulator-always-on;
382 regulator-boot-on;
383 regulator-name = "vccio_wl";
384 regulator-state-mem {
385 regulator-on-in-suspend;
386 };
387 };
388
389 vcc_lcd: SWITCH_REG2 {
390 regulator-always-on;
391 regulator-boot-on;
392 regulator-name = "vcc_lcd";
393 regulator-state-mem {
394 regulator-on-in-suspend;
395 };
396 };
397 };
398 };
399};
400
401&i2c1 {
402 status = "okay";
403 clock-frequency = <400000>;
404
405 ak8963: ak8963@0d {
406 compatible = "asahi-kasei,ak8975";
407 reg = <0x0d>;
408 interrupt-parent = <&gpio8>;
409 interrupts = <1 IRQ_TYPE_EDGE_RISING>;
410 pinctrl-names = "default";
411 pinctrl-0 = <&comp_int>;
412 };
413
414 l3g4200d: l3g4200d@68 {
415 compatible = "st,l3g4200d-gyro";
416 st,drdy-int-pin = <2>;
417 reg = <0x6b>;
418 };
419
420 mma8452: mma8452@1d {
421 compatible = "fsl,mma8452";
422 reg = <0x1d>;
423 interrupt-parent = <&gpio8>;
424 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
425 pinctrl-names = "default";
426 pinctrl-0 = <&gsensor_int>;
427 };
428};
429
430&i2c2 {
431 status = "okay";
432};
433
434&i2c3 {
435 status = "okay";
436};
437
438&i2c4 {
439 status = "okay";
440};
441
442&i2c5 {
443 status = "okay";
444};
445
446&pinctrl {
447 ak8963 {
448 comp_int: comp-int {
449 rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
450 };
451 };
452
453 buttons {
454 pwrbtn: pwrbtn {
455 rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
456 };
457 };
458
459 dvp {
460 dvp_pwr: dvp-pwr {
461 rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_pull_none>;
462 };
463 };
464
465 ir {
466 ir_int: ir-int {
467 rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_up>;
468 };
469 };
470
471 mma8452 {
472 gsensor_int: gsensor-int {
473 rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_up>;
474 };
475 };
476
477 pmic {
478 pmic_int: pmic-int {
479 rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
480 };
481 };
482
483 sdmmc {
484 sdmmc_pwr: sdmmc-pwr {
485 rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
486 };
487 };
Kever Yangda65ce92016-11-24 15:29:52 +0800488
489 usb_host {
490 host_vbus_drv: host-vbus-drv {
491 rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
492 };
493 };
jk.kernel@gmail.com7a614ac2016-07-26 18:28:30 +0800494};
495
David Wu5740e332017-09-20 14:43:08 +0800496&saradc {
497 status = "okay";
498};
499
jk.kernel@gmail.com7a614ac2016-07-26 18:28:30 +0800500&tsadc {
501 rockchip,hw-tshut-mode = <0>;
502 rockchip,hw-tshut-polarity = <0>;
503 status = "okay";
504};
505
506&vopb {
507 status = "okay";
508};
509
510&vopb_mmu {
511 status = "okay";
512};
513
514&vopl {
515 status = "okay";
516};
517
518&vopl_mmu {
519 status = "okay";
520};
521
522&uart0 {
523 status = "okay";
524};
525
526&uart1 {
527 status = "okay";
528};
529
530&uart2 {
531 status = "okay";
532};
533
534&uart3 {
535 status = "okay";
536};
537
538&uart4 {
539 status = "okay";
540};
541
Kever Yangda65ce92016-11-24 15:29:52 +0800542&usb_host1 {
543 vbus-supply = <&vcc5v0_host>;
544 status = "okay";
545};
546
jk.kernel@gmail.com7a614ac2016-07-26 18:28:30 +0800547&usbphy {
548 status = "okay";
549};