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