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