blob: d4263ed7031c9785c6a0e894b8a5c678738811fe [file] [log] [blame]
Alexandru M Stane28ea9d2015-07-07 19:42:53 +02001/*
2 * Google Veyron (and derivatives) board device tree source
3 *
4 * Copyright 2015 Google, Inc
5 *
6 * This file is dual-licensed: you can use it either under the terms
7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
9 * whole.
10 *
11 * a) This file is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
15 *
16 * This file is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * Or, alternatively,
22 *
23 * b) Permission is hereby granted, free of charge, to any person
24 * obtaining a copy of this software and associated documentation
25 * files (the "Software"), to deal in the Software without
26 * restriction, including without limitation the rights to use,
27 * copy, modify, merge, publish, distribute, sublicense, and/or
28 * sell copies of the Software, and to permit persons to whom the
29 * Software is furnished to do so, subject to the following
30 * conditions:
31 *
32 * The above copyright notice and this permission notice shall be
33 * included in all copies or substantial portions of the Software.
34 *
35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42 * OTHER DEALINGS IN THE SOFTWARE.
43 */
44
45#include <dt-bindings/clock/rockchip,rk808.h>
46#include <dt-bindings/input/input.h>
47#include "rk3288.dtsi"
48
49/ {
50 memory {
51 device_type = "memory";
52 reg = <0x0 0x80000000>;
53 };
54
55 gpio_keys: gpio-keys {
56 compatible = "gpio-keys";
57 #address-cells = <1>;
58 #size-cells = <0>;
59
60 pinctrl-names = "default";
61 pinctrl-0 = <&pwr_key_l>;
62 power {
63 label = "Power";
64 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_POWER>;
66 debounce-interval = <100>;
67 gpio-key,wakeup;
68 };
69 };
70
71 gpio-restart {
72 compatible = "gpio-restart";
73 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
74 pinctrl-names = "default";
75 pinctrl-0 = <&ap_warm_reset_h>;
76 priority = <200>;
77 };
78
79 emmc_pwrseq: emmc-pwrseq {
80 compatible = "mmc-pwrseq-emmc";
81 pinctrl-0 = <&emmc_reset>;
82 pinctrl-names = "default";
83 reset-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
84 };
85
86 io_domains: io-domains {
87 compatible = "rockchip,rk3288-io-voltage-domain";
88 rockchip,grf = <&grf>;
89
90 bb-supply = <&vcc33_io>;
91 dvp-supply = <&vcc_18>;
92 flash0-supply = <&vcc18_flashio>;
93 gpio1830-supply = <&vcc33_io>;
94 gpio30-supply = <&vcc33_io>;
95 lcdc-supply = <&vcc33_lcd>;
96 wifi-supply = <&vcc18_wl>;
97 };
98
99 sdio_pwrseq: sdio-pwrseq {
100 compatible = "mmc-pwrseq-simple";
101 clocks = <&rk808 RK808_CLKOUT1>;
102 clock-names = "ext_clock";
103 pinctrl-names = "default";
104 pinctrl-0 = <&bt_enable_l>, <&wifi_enable_h>;
105
106 /*
107 * On the module itself this is one of these (depending
108 * on the actual card populated):
109 * - SDIO_RESET_L_WL_REG_ON
110 * - PDN (power down when low)
111 */
112 reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
113 };
114
115 vcc_5v: vcc-5v {
116 compatible = "regulator-fixed";
117 regulator-name = "vcc_5v";
118 regulator-always-on;
119 regulator-boot-on;
120 regulator-min-microvolt = <5000000>;
121 regulator-max-microvolt = <5000000>;
122 };
123
124 vcc33_sys: vcc33-sys {
125 compatible = "regulator-fixed";
126 regulator-name = "vcc33_sys";
127 regulator-always-on;
128 regulator-boot-on;
129 regulator-min-microvolt = <3300000>;
130 regulator-max-microvolt = <3300000>;
131 };
132
133 vcc50_hdmi: vcc50-hdmi {
134 compatible = "regulator-fixed";
135 regulator-name = "vcc50_hdmi";
136 regulator-always-on;
137 regulator-boot-on;
138 vin-supply = <&vcc_5v>;
139 };
140};
141
142&cpu0 {
143 cpu0-supply = <&vdd_cpu>;
144};
145
146&emmc {
147 status = "okay";
148
149 broken-cd;
150 bus-width = <8>;
151 cap-mmc-highspeed;
152 disable-wp;
153 mmc-pwrseq = <&emmc_pwrseq>;
154 non-removable;
155 num-slots = <1>;
156 pinctrl-names = "default";
157 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
158};
159
160&hdmi {
Douglas Andersona7974512015-09-02 14:25:48 -0700161 ddc-i2c-bus = <&i2c5>;
Alexandru M Stane28ea9d2015-07-07 19:42:53 +0200162 status = "okay";
163};
164
165&i2c0 {
166 status = "okay";
167
168 clock-frequency = <400000>;
169 i2c-scl-falling-time-ns = <50>; /* 2.5ns measured */
170 i2c-scl-rising-time-ns = <100>; /* 45ns measured */
171
172 rk808: pmic@1b {
173 compatible = "rockchip,rk808";
174 reg = <0x1b>;
175 clock-output-names = "xin32k", "wifibt_32kin";
176 interrupt-parent = <&gpio0>;
177 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
178 pinctrl-names = "default";
179 pinctrl-0 = <&pmic_int_l>;
180 rockchip,system-power-controller;
181 wakeup-source;
182 #clock-cells = <1>;
183
184 vcc1-supply = <&vcc33_sys>;
185 vcc2-supply = <&vcc33_sys>;
186 vcc3-supply = <&vcc33_sys>;
187 vcc4-supply = <&vcc33_sys>;
188 vcc6-supply = <&vcc_5v>;
189 vcc7-supply = <&vcc33_sys>;
190 vcc8-supply = <&vcc33_sys>;
191 vcc12-supply = <&vcc_18>;
192 vddio-supply = <&vcc33_io>;
193
194 regulators {
195 vdd_cpu: DCDC_REG1 {
196 regulator-name = "vdd_arm";
197 regulator-always-on;
198 regulator-boot-on;
199 regulator-min-microvolt = <750000>;
200 regulator-max-microvolt = <1450000>;
201 regulator-ramp-delay = <6001>;
202 regulator-state-mem {
203 regulator-off-in-suspend;
204 };
205 };
206
207 vdd_gpu: DCDC_REG2 {
208 regulator-name = "vdd_gpu";
209 regulator-always-on;
210 regulator-boot-on;
211 regulator-min-microvolt = <800000>;
212 regulator-max-microvolt = <1250000>;
213 regulator-ramp-delay = <6001>;
214 regulator-state-mem {
215 regulator-on-in-suspend;
216 regulator-suspend-microvolt = <1000000>;
217 };
218 };
219
220 vcc135_ddr: DCDC_REG3 {
221 regulator-name = "vcc135_ddr";
222 regulator-always-on;
223 regulator-boot-on;
224 regulator-state-mem {
225 regulator-on-in-suspend;
226 };
227 };
228
229 /*
230 * vcc_18 has several aliases. (vcc18_flashio and
231 * vcc18_wl). We'll add those aliases here just to
232 * make it easier to follow the schematic. The signals
233 * are actually hooked together and only separated for
234 * power measurement purposes).
235 */
236 vcc18_wl: vcc18_flashio: vcc_18: DCDC_REG4 {
237 regulator-name = "vcc_18";
238 regulator-always-on;
239 regulator-boot-on;
240 regulator-min-microvolt = <1800000>;
241 regulator-max-microvolt = <1800000>;
242 regulator-state-mem {
243 regulator-on-in-suspend;
244 regulator-suspend-microvolt = <1800000>;
245 };
246 };
247
248 /*
249 * Note that both vcc33_io and vcc33_pmuio are always
250 * powered together. To simplify the logic in the dts
251 * we just refer to vcc33_io every time something is
252 * powered from vcc33_pmuio. In fact, on later boards
253 * (such as danger) they're the same net.
254 */
255 vcc33_io: LDO_REG1 {
256 regulator-name = "vcc33_io";
257 regulator-always-on;
258 regulator-boot-on;
259 regulator-min-microvolt = <3300000>;
260 regulator-max-microvolt = <3300000>;
261 regulator-state-mem {
262 regulator-on-in-suspend;
263 regulator-suspend-microvolt = <3300000>;
264 };
265 };
266
267 vdd_10: LDO_REG3 {
268 regulator-name = "vdd_10";
269 regulator-always-on;
270 regulator-boot-on;
271 regulator-min-microvolt = <1000000>;
272 regulator-max-microvolt = <1000000>;
273 regulator-state-mem {
274 regulator-on-in-suspend;
275 regulator-suspend-microvolt = <1000000>;
276 };
277 };
278
279 vdd10_lcd_pwren_h: LDO_REG7 {
280 regulator-name = "vdd10_lcd_pwren_h";
281 regulator-always-on;
282 regulator-boot-on;
283 regulator-min-microvolt = <2500000>;
284 regulator-max-microvolt = <2500000>;
285 regulator-state-mem {
286 regulator-off-in-suspend;
287 };
288 };
289
290 vcc33_lcd: SWITCH_REG1 {
291 regulator-name = "vcc33_lcd";
292 regulator-always-on;
293 regulator-boot-on;
294 regulator-state-mem {
295 regulator-off-in-suspend;
296 };
297 };
298 };
299 };
300};
301
302&i2c1 {
303 status = "okay";
304
305 clock-frequency = <400000>;
306 i2c-scl-falling-time-ns = <50>; /* 2.5ns measured */
307 i2c-scl-rising-time-ns = <100>; /* 40ns measured */
308
309 tpm: tpm@20 {
310 compatible = "infineon,slb9645tt";
311 reg = <0x20>;
312 powered-while-suspended;
313 };
314};
315
316&i2c2 {
317 status = "okay";
318
319 /* 100kHz since 4.7k resistors don't rise fast enough */
320 clock-frequency = <100000>;
321 i2c-scl-falling-time-ns = <50>; /* 10ns measured */
322 i2c-scl-rising-time-ns = <800>; /* 600ns measured */
323};
324
325&i2c4 {
326 status = "okay";
327
328 clock-frequency = <400000>;
329 i2c-scl-falling-time-ns = <50>; /* 11ns measured */
330 i2c-scl-rising-time-ns = <300>; /* 225ns measured */
331};
332
333&i2c5 {
334 status = "okay";
335
336 clock-frequency = <100000>;
337 i2c-scl-falling-time-ns = <300>;
338 i2c-scl-rising-time-ns = <1000>;
339};
340
341&pwm1 {
342 status = "okay";
343};
344
345&sdio0 {
346 status = "okay";
347
348 broken-cd;
349 bus-width = <4>;
350 cap-sd-highspeed;
351 cap-sdio-irq;
352 keep-power-in-suspend;
353 mmc-pwrseq = <&sdio_pwrseq>;
354 non-removable;
355 num-slots = <1>;
356 pinctrl-names = "default";
357 pinctrl-0 = <&sdio0_clk &sdio0_cmd &sdio0_bus4>;
358 vmmc-supply = <&vcc33_sys>;
359 vqmmc-supply = <&vcc18_wl>;
360};
361
362&spi2 {
363 status = "okay";
364
365 rx-sample-delay-ns = <12>;
366};
367
368&tsadc {
369 status = "okay";
370
Romain Perier117ccc12015-07-22 07:44:06 +0200371 rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
372 rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
Alexandru M Stane28ea9d2015-07-07 19:42:53 +0200373};
374
375&uart0 {
376 status = "okay";
377
378 /* We need to go faster than 24MHz, so adjust clock parents / rates */
379 assigned-clocks = <&cru SCLK_UART0>;
380 assigned-clock-rates = <48000000>;
381
382 /* Pins don't include flow control by default; add that in */
383 pinctrl-names = "default";
384 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
385};
386
387&uart1 {
388 status = "okay";
389};
390
391&uart2 {
392 status = "okay";
393};
394
395&usbphy {
396 status = "okay";
397};
398
399&usb_host0_ehci {
400 status = "okay";
401
402 needs-reset-on-resume;
403};
404
405&usb_host1 {
406 status = "okay";
407};
408
409&usb_otg {
410 status = "okay";
411
412 assigned-clocks = <&cru SCLK_USBPHY480M_SRC>;
413 assigned-clock-parents = <&cru SCLK_OTGPHY0>;
414 dr_mode = "host";
415};
416
417&vopb {
418 status = "okay";
419};
420
421&vopb_mmu {
422 status = "okay";
423};
424
425&wdt {
426 status = "okay";
427};
428
429&pinctrl {
430 pinctrl-names = "default", "sleep";
431 pinctrl-0 = <
432 /* Common for sleep and wake, but no owners */
433 &global_pwroff
434 >;
435 pinctrl-1 = <
436 /* Common for sleep and wake, but no owners */
437 &global_pwroff
438 >;
439
440 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
441 bias-disable;
442 drive-strength = <8>;
443 };
444
445 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
446 bias-pull-up;
447 drive-strength = <8>;
448 };
449
450 pcfg_output_high: pcfg-output-high {
451 output-high;
452 };
453
454 pcfg_output_low: pcfg-output-low {
455 output-low;
456 };
457
458 buttons {
459 pwr_key_l: pwr-key-l {
460 rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
461 };
462 };
463
464 emmc {
465 emmc_reset: emmc-reset {
466 rockchip,pins = <2 9 RK_FUNC_GPIO &pcfg_pull_none>;
467 };
468
469 /*
470 * We run eMMC at max speed; bump up drive strength.
471 * We also have external pulls, so disable the internal ones.
472 */
473 emmc_clk: emmc-clk {
474 rockchip,pins = <3 18 RK_FUNC_2 &pcfg_pull_none_drv_8ma>;
475 };
476
477 emmc_cmd: emmc-cmd {
478 rockchip,pins = <3 16 RK_FUNC_2 &pcfg_pull_none_drv_8ma>;
479 };
480
481 emmc_bus8: emmc-bus8 {
482 rockchip,pins = <3 0 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
483 <3 1 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
484 <3 2 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
485 <3 3 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
486 <3 4 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
487 <3 5 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
488 <3 6 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
489 <3 7 RK_FUNC_2 &pcfg_pull_none_drv_8ma>;
490 };
491 };
492
493 pmic {
494 pmic_int_l: pmic-int-l {
495 rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
496 };
497 };
498
499 reboot {
500 ap_warm_reset_h: ap-warm-reset-h {
501 rockchip,pins = <RK_GPIO0 13 RK_FUNC_GPIO &pcfg_pull_none>;
502 };
503 };
504
505 recovery-switch {
506 rec_mode_l: rec-mode-l {
507 rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
508 };
509 };
510
511 sdio0 {
512 wifi_enable_h: wifienable-h {
513 rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
514 };
515
516 /* NOTE: mislabelled on schematic; should be bt_enable_h */
517 bt_enable_l: bt-enable-l {
518 rockchip,pins = <4 29 RK_FUNC_GPIO &pcfg_pull_none>;
519 };
520
521 /*
522 * We run sdio0 at max speed; bump up drive strength.
523 * We also have external pulls, so disable the internal ones.
524 */
525 sdio0_bus4: sdio0-bus4 {
526 rockchip,pins = <4 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>,
527 <4 21 RK_FUNC_1 &pcfg_pull_none_drv_8ma>,
528 <4 22 RK_FUNC_1 &pcfg_pull_none_drv_8ma>,
529 <4 23 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
530 };
531
532 sdio0_cmd: sdio0-cmd {
533 rockchip,pins = <4 24 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
534 };
535
536 sdio0_clk: sdio0-clk {
537 rockchip,pins = <4 25 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
538 };
539 };
540
541 tpm {
542 tpm_int_h: tpm-int-h {
543 rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>;
544 };
545 };
546
Alexandru M Stane28ea9d2015-07-07 19:42:53 +0200547 write-protect {
548 fw_wp_ap: fw-wp-ap {
549 rockchip,pins = <7 6 RK_FUNC_GPIO &pcfg_pull_none>;
550 };
551 };
552};