summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/rk3288-veyron.dtsi
blob: 9fce91ffff6fd89b1f39ba960dfeecd71ff8ae24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
/*
 * Google Veyron (and derivatives) board device tree source
 *
 * Copyright 2015 Google, Inc
 *
 * This file is dual-licensed: you can use it either under the terms
 * of the GPL or the X11 license, at your option. Note that this dual
 * licensing only applies to this file, and not this project as a
 * whole.
 *
 *  a) This file is free software; you can redistribute it and/or
 *     modify it under the terms of the GNU General Public License as
 *     published by the Free Software Foundation; either version 2 of the
 *     License, or (at your option) any later version.
 *
 *     This file is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *  Or, alternatively,
 *
 *  b) Permission is hereby granted, free of charge, to any person
 *     obtaining a copy of this software and associated documentation
 *     files (the "Software"), to deal in the Software without
 *     restriction, including without limitation the rights to use,
 *     copy, modify, merge, publish, distribute, sublicense, and/or
 *     sell copies of the Software, and to permit persons to whom the
 *     Software is furnished to do so, subject to the following
 *     conditions:
 *
 *     The above copyright notice and this permission notice shall be
 *     included in all copies or substantial portions of the Software.
 *
 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *     OTHER DEALINGS IN THE SOFTWARE.
 */

#include <dt-bindings/clock/rockchip,rk808.h>
#include <dt-bindings/input/input.h>
#include "rk3288.dtsi"

/ {
	memory {
		device_type = "memory";
		reg = <0x0 0x80000000>;
	};

	gpio_keys: gpio-keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;

		pinctrl-names = "default";
		pinctrl-0 = <&pwr_key_l>;
		power {
			label = "Power";
			gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_POWER>;
			debounce-interval = <100>;
			gpio-key,wakeup;
		};
	};

	gpio-restart {
		compatible = "gpio-restart";
		gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&ap_warm_reset_h>;
		priority = <200>;
	};

	emmc_pwrseq: emmc-pwrseq {
		compatible = "mmc-pwrseq-emmc";
		pinctrl-0 = <&emmc_reset>;
		pinctrl-names = "default";
		reset-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
	};

	io_domains: io-domains {
		compatible = "rockchip,rk3288-io-voltage-domain";
		rockchip,grf = <&grf>;

		bb-supply = <&vcc33_io>;
		dvp-supply = <&vcc_18>;
		flash0-supply = <&vcc18_flashio>;
		gpio1830-supply = <&vcc33_io>;
		gpio30-supply = <&vcc33_io>;
		lcdc-supply = <&vcc33_lcd>;
		wifi-supply = <&vcc18_wl>;
	};

	sdio_pwrseq: sdio-pwrseq {
		compatible = "mmc-pwrseq-simple";
		clocks = <&rk808 RK808_CLKOUT1>;
		clock-names = "ext_clock";
		pinctrl-names = "default";
		pinctrl-0 = <&bt_enable_l>, <&wifi_enable_h>;

		/*
		 * On the module itself this is one of these (depending
		 * on the actual card populated):
		 * - SDIO_RESET_L_WL_REG_ON
		 * - PDN (power down when low)
		 */
		reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
	};

	vcc_5v: vcc-5v {
		compatible = "regulator-fixed";
		regulator-name = "vcc_5v";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
	};

	vcc33_sys: vcc33-sys {
		compatible = "regulator-fixed";
		regulator-name = "vcc33_sys";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};

	vcc50_hdmi: vcc50-hdmi {
		compatible = "regulator-fixed";
		regulator-name = "vcc50_hdmi";
		regulator-always-on;
		regulator-boot-on;
		vin-supply = <&vcc_5v>;
	};
};

&cpu0 {
	cpu0-supply = <&vdd_cpu>;
};

&emmc {
	status = "okay";

	broken-cd;
	bus-width = <8>;
	cap-mmc-highspeed;
	rockchip,default-sample-phase = <158>;
	disable-wp;
	mmc-hs200-1_8v;
	mmc-pwrseq = <&emmc_pwrseq>;
	non-removable;
	num-slots = <1>;
	pinctrl-names = "default";
	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
};

&hdmi {
	ddc-i2c-bus = <&i2c5>;
	status = "okay";
};

&i2c0 {
	status = "okay";

	clock-frequency = <400000>;
	i2c-scl-falling-time-ns = <50>;		/* 2.5ns measured */
	i2c-scl-rising-time-ns = <100>;		/* 45ns measured */

	rk808: pmic@1b {
		compatible = "rockchip,rk808";
		reg = <0x1b>;
		clock-output-names = "xin32k", "wifibt_32kin";
		interrupt-parent = <&gpio0>;
		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
		pinctrl-names = "default";
		pinctrl-0 = <&pmic_int_l>;
		rockchip,system-power-controller;
		wakeup-source;
		#clock-cells = <1>;

		vcc1-supply = <&vcc33_sys>;
		vcc2-supply = <&vcc33_sys>;
		vcc3-supply = <&vcc33_sys>;
		vcc4-supply = <&vcc33_sys>;
		vcc6-supply = <&vcc_5v>;
		vcc7-supply = <&vcc33_sys>;
		vcc8-supply = <&vcc33_sys>;
		vcc12-supply = <&vcc_18>;
		vddio-supply = <&vcc33_io>;

		regulators {
			vdd_cpu: DCDC_REG1 {
				regulator-name = "vdd_arm";
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <750000>;
				regulator-max-microvolt = <1450000>;
				regulator-ramp-delay = <6001>;
				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vdd_gpu: DCDC_REG2 {
				regulator-name = "vdd_gpu";
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <1250000>;
				regulator-ramp-delay = <6001>;
				regulator-state-mem {
					regulator-on-in-suspend;
					regulator-suspend-microvolt = <1000000>;
				};
			};

			vcc135_ddr: DCDC_REG3 {
				regulator-name = "vcc135_ddr";
				regulator-always-on;
				regulator-boot-on;
				regulator-state-mem {
					regulator-on-in-suspend;
				};
			};

			/*
			 * vcc_18 has several aliases.  (vcc18_flashio and
			 * vcc18_wl).  We'll add those aliases here just to
			 * make it easier to follow the schematic.  The signals
			 * are actually hooked together and only separated for
			 * power measurement purposes).
			 */
			vcc18_wl: vcc18_flashio: vcc_18: DCDC_REG4 {
				regulator-name = "vcc_18";
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-state-mem {
					regulator-on-in-suspend;
					regulator-suspend-microvolt = <1800000>;
				};
			};

			/*
			 * Note that both vcc33_io and vcc33_pmuio are always
			 * powered together. To simplify the logic in the dts
			 * we just refer to vcc33_io every time something is
			 * powered from vcc33_pmuio. In fact, on later boards
			 * (such as danger) they're the same net.
			 */
			vcc33_io: LDO_REG1 {
				regulator-name = "vcc33_io";
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-state-mem {
					regulator-on-in-suspend;
					regulator-suspend-microvolt = <3300000>;
				};
			};

			vdd_10: LDO_REG3 {
				regulator-name = "vdd_10";
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <1000000>;
				regulator-max-microvolt = <1000000>;
				regulator-state-mem {
					regulator-on-in-suspend;
					regulator-suspend-microvolt = <1000000>;
				};
			};

			vdd10_lcd_pwren_h: LDO_REG7 {
				regulator-name = "vdd10_lcd_pwren_h";
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <2500000>;
				regulator-max-microvolt = <2500000>;
				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vcc33_lcd: SWITCH_REG1 {
				regulator-name = "vcc33_lcd";
				regulator-always-on;
				regulator-boot-on;
				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};
		};
	};
};

&i2c1 {
	status = "okay";

	clock-frequency = <400000>;
	i2c-scl-falling-time-ns = <50>;		/* 2.5ns measured */
	i2c-scl-rising-time-ns = <100>;		/* 40ns measured */

	tpm: tpm@20 {
		compatible = "infineon,slb9645tt";
		reg = <0x20>;
		powered-while-suspended;
	};
};

&i2c2 {
	status = "okay";

	/* 100kHz since 4.7k resistors don't rise fast enough */
	clock-frequency = <100000>;
	i2c-scl-falling-time-ns = <50>;		/* 10ns measured */
	i2c-scl-rising-time-ns = <800>;		/* 600ns measured */
};

&i2c4 {
	status = "okay";

	clock-frequency = <400000>;
	i2c-scl-falling-time-ns = <50>;		/* 11ns measured */
	i2c-scl-rising-time-ns = <300>;		/* 225ns measured */
};

&i2c5 {
	status = "okay";

	clock-frequency = <100000>;
	i2c-scl-falling-time-ns = <300>;
	i2c-scl-rising-time-ns = <1000>;
};

&power {
	assigned-clocks = <&cru SCLK_EDP_24M>;
	assigned-clock-parents = <&xin24m>;
};

&pwm1 {
	status = "okay";
};

&sdio0 {
	status = "okay";

	broken-cd;
	bus-width = <4>;
	cap-sd-highspeed;
	cap-sdio-irq;
	keep-power-in-suspend;
	mmc-pwrseq = <&sdio_pwrseq>;
	non-removable;
	num-slots = <1>;
	pinctrl-names = "default";
	pinctrl-0 = <&sdio0_clk &sdio0_cmd &sdio0_bus4>;
	sd-uhs-sdr12;
	sd-uhs-sdr25;
	sd-uhs-sdr50;
	sd-uhs-sdr104;
	vmmc-supply = <&vcc33_sys>;
	vqmmc-supply = <&vcc18_wl>;
};

&spi2 {
	status = "okay";

	rx-sample-delay-ns = <12>;
};

&tsadc {
	status = "okay";

	rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
};

&uart0 {
	status = "okay";

	/* We need to go faster than 24MHz, so adjust clock parents / rates */
	assigned-clocks = <&cru SCLK_UART0>;
	assigned-clock-rates = <48000000>;

	/* Pins don't include flow control by default; add that in */
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
};

&uart1 {
	status = "okay";
};

&uart2 {
	status = "okay";
};

&usbphy {
	status = "okay";
};

&usb_host0_ehci {
	status = "okay";

	needs-reset-on-resume;
};

&usb_host1 {
	status = "okay";
};

&usb_otg {
	status = "okay";

	assigned-clocks = <&cru SCLK_USBPHY480M_SRC>;
	assigned-clock-parents = <&cru SCLK_OTGPHY0>;
	dr_mode = "host";
};

&vopb {
	status = "okay";
};

&vopb_mmu {
	status = "okay";
};

&wdt {
	status = "okay";
};

&pinctrl {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <
		/* Common for sleep and wake, but no owners */
		&global_pwroff
	>;
	pinctrl-1 = <
		/* Common for sleep and wake, but no owners */
		&global_pwroff
	>;

	pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
		bias-disable;
		drive-strength = <8>;
	};

	pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
		bias-pull-up;
		drive-strength = <8>;
	};

	pcfg_output_high: pcfg-output-high {
		output-high;
	};

	pcfg_output_low: pcfg-output-low {
		output-low;
	};

	buttons {
		pwr_key_l: pwr-key-l {
			rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
		};
	};

	emmc {
		emmc_reset: emmc-reset {
			rockchip,pins = <2 9 RK_FUNC_GPIO &pcfg_pull_none>;
		};

		/*
		 * We run eMMC at max speed; bump up drive strength.
		 * We also have external pulls, so disable the internal ones.
		 */
		emmc_clk: emmc-clk {
			rockchip,pins = <3 18 RK_FUNC_2 &pcfg_pull_none_drv_8ma>;
		};

		emmc_cmd: emmc-cmd {
			rockchip,pins = <3 16 RK_FUNC_2 &pcfg_pull_none_drv_8ma>;
		};

		emmc_bus8: emmc-bus8 {
			rockchip,pins = <3 0 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
					<3 1 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
					<3 2 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
					<3 3 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
					<3 4 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
					<3 5 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
					<3 6 RK_FUNC_2 &pcfg_pull_none_drv_8ma>,
					<3 7 RK_FUNC_2 &pcfg_pull_none_drv_8ma>;
		};
	};

	pmic {
		pmic_int_l: pmic-int-l {
			rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
		};
	};

	reboot {
		ap_warm_reset_h: ap-warm-reset-h {
			rockchip,pins = <RK_GPIO0 13 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	recovery-switch {
		rec_mode_l: rec-mode-l {
			rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
		};
	};

	sdio0 {
		wifi_enable_h: wifienable-h {
			rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
		};

		/* NOTE: mislabelled on schematic; should be bt_enable_h */
		bt_enable_l: bt-enable-l {
			rockchip,pins = <4 29 RK_FUNC_GPIO &pcfg_pull_none>;
		};

		/*
		 * We run sdio0 at max speed; bump up drive strength.
		 * We also have external pulls, so disable the internal ones.
		 */
		sdio0_bus4: sdio0-bus4 {
			rockchip,pins = <4 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>,
					<4 21 RK_FUNC_1 &pcfg_pull_none_drv_8ma>,
					<4 22 RK_FUNC_1 &pcfg_pull_none_drv_8ma>,
					<4 23 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
		};

		sdio0_cmd: sdio0-cmd {
			rockchip,pins = <4 24 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
		};

		sdio0_clk: sdio0-clk {
			rockchip,pins = <4 25 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
		};
	};

	tpm {
		tpm_int_h: tpm-int-h {
			rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	write-protect {
		fw_wp_ap: fw-wp-ap {
			rockchip,pins = <7 6 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};
};