xref: /freebsd-src/sys/contrib/device-tree/src/arm/rockchip/rk3288-veyron.dtsi (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Google Veyron (and derivatives) board device tree source
4*f126890aSEmmanuel Vadot *
5*f126890aSEmmanuel Vadot * Copyright 2015 Google, Inc
6*f126890aSEmmanuel Vadot */
7*f126890aSEmmanuel Vadot
8*f126890aSEmmanuel Vadot#include <dt-bindings/clock/rockchip,rk808.h>
9*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
10*f126890aSEmmanuel Vadot#include "rk3288.dtsi"
11*f126890aSEmmanuel Vadot
12*f126890aSEmmanuel Vadot/ {
13*f126890aSEmmanuel Vadot	aliases {
14*f126890aSEmmanuel Vadot		mmc0 = &emmc;
15*f126890aSEmmanuel Vadot	};
16*f126890aSEmmanuel Vadot
17*f126890aSEmmanuel Vadot	chosen {
18*f126890aSEmmanuel Vadot		stdout-path = "serial2:115200n8";
19*f126890aSEmmanuel Vadot	};
20*f126890aSEmmanuel Vadot
21*f126890aSEmmanuel Vadot	/*
22*f126890aSEmmanuel Vadot	 * The default coreboot on veyron devices ignores memory@0 nodes
23*f126890aSEmmanuel Vadot	 * and would instead create another memory node.
24*f126890aSEmmanuel Vadot	 */
25*f126890aSEmmanuel Vadot	memory {
26*f126890aSEmmanuel Vadot		device_type = "memory";
27*f126890aSEmmanuel Vadot		reg = <0x0 0x0 0x0 0x80000000>;
28*f126890aSEmmanuel Vadot	};
29*f126890aSEmmanuel Vadot
30*f126890aSEmmanuel Vadot
31*f126890aSEmmanuel Vadot	power_button: power-button {
32*f126890aSEmmanuel Vadot		compatible = "gpio-keys";
33*f126890aSEmmanuel Vadot		pinctrl-names = "default";
34*f126890aSEmmanuel Vadot		pinctrl-0 = <&pwr_key_l>;
35*f126890aSEmmanuel Vadot
36*f126890aSEmmanuel Vadot		key-power {
37*f126890aSEmmanuel Vadot			label = "Power";
38*f126890aSEmmanuel Vadot			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
39*f126890aSEmmanuel Vadot			linux,code = <KEY_POWER>;
40*f126890aSEmmanuel Vadot			debounce-interval = <100>;
41*f126890aSEmmanuel Vadot			wakeup-source;
42*f126890aSEmmanuel Vadot		};
43*f126890aSEmmanuel Vadot	};
44*f126890aSEmmanuel Vadot
45*f126890aSEmmanuel Vadot	gpio-restart {
46*f126890aSEmmanuel Vadot		compatible = "gpio-restart";
47*f126890aSEmmanuel Vadot		gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
48*f126890aSEmmanuel Vadot		pinctrl-names = "default";
49*f126890aSEmmanuel Vadot		pinctrl-0 = <&ap_warm_reset_h>;
50*f126890aSEmmanuel Vadot		priority = <200>;
51*f126890aSEmmanuel Vadot	};
52*f126890aSEmmanuel Vadot
53*f126890aSEmmanuel Vadot	emmc_pwrseq: emmc-pwrseq {
54*f126890aSEmmanuel Vadot		compatible = "mmc-pwrseq-emmc";
55*f126890aSEmmanuel Vadot		pinctrl-0 = <&emmc_reset>;
56*f126890aSEmmanuel Vadot		pinctrl-names = "default";
57*f126890aSEmmanuel Vadot		reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
58*f126890aSEmmanuel Vadot	};
59*f126890aSEmmanuel Vadot
60*f126890aSEmmanuel Vadot	sdio_pwrseq: sdio-pwrseq {
61*f126890aSEmmanuel Vadot		compatible = "mmc-pwrseq-simple";
62*f126890aSEmmanuel Vadot		clocks = <&rk808 RK808_CLKOUT1>;
63*f126890aSEmmanuel Vadot		clock-names = "ext_clock";
64*f126890aSEmmanuel Vadot		pinctrl-names = "default";
65*f126890aSEmmanuel Vadot		pinctrl-0 = <&wifi_enable_h>;
66*f126890aSEmmanuel Vadot
67*f126890aSEmmanuel Vadot		/*
68*f126890aSEmmanuel Vadot		 * Depending on the actual card populated GPIO4 D4
69*f126890aSEmmanuel Vadot		 * correspond to one of these signals on the module:
70*f126890aSEmmanuel Vadot		 *
71*f126890aSEmmanuel Vadot		 * D4:
72*f126890aSEmmanuel Vadot		 * - SDIO_RESET_L_WL_REG_ON
73*f126890aSEmmanuel Vadot		 * - PDN (power down when low)
74*f126890aSEmmanuel Vadot		 */
75*f126890aSEmmanuel Vadot		reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
76*f126890aSEmmanuel Vadot	};
77*f126890aSEmmanuel Vadot
78*f126890aSEmmanuel Vadot	vcc_5v: vcc-5v {
79*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
80*f126890aSEmmanuel Vadot		regulator-name = "vcc_5v";
81*f126890aSEmmanuel Vadot		regulator-always-on;
82*f126890aSEmmanuel Vadot		regulator-boot-on;
83*f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
84*f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
85*f126890aSEmmanuel Vadot	};
86*f126890aSEmmanuel Vadot
87*f126890aSEmmanuel Vadot	vcc33_sys: vcc33-sys {
88*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
89*f126890aSEmmanuel Vadot		regulator-name = "vcc33_sys";
90*f126890aSEmmanuel Vadot		regulator-always-on;
91*f126890aSEmmanuel Vadot		regulator-boot-on;
92*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
93*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
94*f126890aSEmmanuel Vadot	};
95*f126890aSEmmanuel Vadot
96*f126890aSEmmanuel Vadot	vcc50_hdmi: vcc50-hdmi {
97*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
98*f126890aSEmmanuel Vadot		regulator-name = "vcc50_hdmi";
99*f126890aSEmmanuel Vadot		regulator-always-on;
100*f126890aSEmmanuel Vadot		regulator-boot-on;
101*f126890aSEmmanuel Vadot		vin-supply = <&vcc_5v>;
102*f126890aSEmmanuel Vadot	};
103*f126890aSEmmanuel Vadot
104*f126890aSEmmanuel Vadot	vdd_logic: vdd-logic {
105*f126890aSEmmanuel Vadot		compatible = "pwm-regulator";
106*f126890aSEmmanuel Vadot		regulator-name = "vdd_logic";
107*f126890aSEmmanuel Vadot
108*f126890aSEmmanuel Vadot		pwms = <&pwm1 0 1994 0>;
109*f126890aSEmmanuel Vadot		pwm-supply = <&vcc33_sys>;
110*f126890aSEmmanuel Vadot
111*f126890aSEmmanuel Vadot		pwm-dutycycle-range = <0x7b 0>;
112*f126890aSEmmanuel Vadot		pwm-dutycycle-unit = <0x94>;
113*f126890aSEmmanuel Vadot
114*f126890aSEmmanuel Vadot		regulator-always-on;
115*f126890aSEmmanuel Vadot		regulator-boot-on;
116*f126890aSEmmanuel Vadot		regulator-min-microvolt = <950000>;
117*f126890aSEmmanuel Vadot		regulator-max-microvolt = <1350000>;
118*f126890aSEmmanuel Vadot		regulator-ramp-delay = <4000>;
119*f126890aSEmmanuel Vadot	};
120*f126890aSEmmanuel Vadot};
121*f126890aSEmmanuel Vadot
122*f126890aSEmmanuel Vadot&cpu0 {
123*f126890aSEmmanuel Vadot	cpu0-supply = <&vdd_cpu>;
124*f126890aSEmmanuel Vadot};
125*f126890aSEmmanuel Vadot
126*f126890aSEmmanuel Vadot&cpu_crit {
127*f126890aSEmmanuel Vadot	temperature = <100000>;
128*f126890aSEmmanuel Vadot};
129*f126890aSEmmanuel Vadot
130*f126890aSEmmanuel Vadot/* rk3288-c used in Veyron Chrome-devices has slightly changed OPPs */
131*f126890aSEmmanuel Vadot&cpu_opp_table {
132*f126890aSEmmanuel Vadot	/delete-node/ opp-312000000;
133*f126890aSEmmanuel Vadot
134*f126890aSEmmanuel Vadot	opp-1512000000 {
135*f126890aSEmmanuel Vadot		opp-microvolt = <1250000>;
136*f126890aSEmmanuel Vadot	};
137*f126890aSEmmanuel Vadot	opp-1608000000 {
138*f126890aSEmmanuel Vadot		opp-microvolt = <1300000>;
139*f126890aSEmmanuel Vadot	};
140*f126890aSEmmanuel Vadot	opp-1704000000 {
141*f126890aSEmmanuel Vadot		opp-hz = /bits/ 64 <1704000000>;
142*f126890aSEmmanuel Vadot		opp-microvolt = <1350000>;
143*f126890aSEmmanuel Vadot	};
144*f126890aSEmmanuel Vadot	opp-1800000000 {
145*f126890aSEmmanuel Vadot		opp-hz = /bits/ 64 <1800000000>;
146*f126890aSEmmanuel Vadot		opp-microvolt = <1400000>;
147*f126890aSEmmanuel Vadot	};
148*f126890aSEmmanuel Vadot};
149*f126890aSEmmanuel Vadot
150*f126890aSEmmanuel Vadot&emmc {
151*f126890aSEmmanuel Vadot	status = "okay";
152*f126890aSEmmanuel Vadot
153*f126890aSEmmanuel Vadot	bus-width = <8>;
154*f126890aSEmmanuel Vadot	cap-mmc-highspeed;
155*f126890aSEmmanuel Vadot	rockchip,default-sample-phase = <158>;
156*f126890aSEmmanuel Vadot	disable-wp;
157*f126890aSEmmanuel Vadot	mmc-hs200-1_8v;
158*f126890aSEmmanuel Vadot	mmc-pwrseq = <&emmc_pwrseq>;
159*f126890aSEmmanuel Vadot	non-removable;
160*f126890aSEmmanuel Vadot	pinctrl-names = "default";
161*f126890aSEmmanuel Vadot	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
162*f126890aSEmmanuel Vadot};
163*f126890aSEmmanuel Vadot
164*f126890aSEmmanuel Vadot&gpu {
165*f126890aSEmmanuel Vadot	mali-supply = <&vdd_gpu>;
166*f126890aSEmmanuel Vadot	status = "okay";
167*f126890aSEmmanuel Vadot};
168*f126890aSEmmanuel Vadot
169*f126890aSEmmanuel Vadot&gpu_alert0 {
170*f126890aSEmmanuel Vadot	temperature = <72500>;
171*f126890aSEmmanuel Vadot};
172*f126890aSEmmanuel Vadot
173*f126890aSEmmanuel Vadot&gpu_crit {
174*f126890aSEmmanuel Vadot	temperature = <100000>;
175*f126890aSEmmanuel Vadot};
176*f126890aSEmmanuel Vadot
177*f126890aSEmmanuel Vadot&hdmi {
178*f126890aSEmmanuel Vadot	pinctrl-names = "default", "unwedge";
179*f126890aSEmmanuel Vadot	pinctrl-0 = <&hdmi_ddc>;
180*f126890aSEmmanuel Vadot	pinctrl-1 = <&hdmi_ddc_unwedge>;
181*f126890aSEmmanuel Vadot	status = "okay";
182*f126890aSEmmanuel Vadot};
183*f126890aSEmmanuel Vadot
184*f126890aSEmmanuel Vadot&i2c0 {
185*f126890aSEmmanuel Vadot	status = "okay";
186*f126890aSEmmanuel Vadot
187*f126890aSEmmanuel Vadot	clock-frequency = <400000>;
188*f126890aSEmmanuel Vadot	i2c-scl-falling-time-ns = <50>;		/* 2.5ns measured */
189*f126890aSEmmanuel Vadot	i2c-scl-rising-time-ns = <100>;		/* 45ns measured */
190*f126890aSEmmanuel Vadot
191*f126890aSEmmanuel Vadot	rk808: pmic@1b {
192*f126890aSEmmanuel Vadot		compatible = "rockchip,rk808";
193*f126890aSEmmanuel Vadot		reg = <0x1b>;
194*f126890aSEmmanuel Vadot		clock-output-names = "xin32k", "wifibt_32kin";
195*f126890aSEmmanuel Vadot		interrupt-parent = <&gpio0>;
196*f126890aSEmmanuel Vadot		interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
197*f126890aSEmmanuel Vadot		pinctrl-names = "default";
198*f126890aSEmmanuel Vadot		pinctrl-0 = <&pmic_int_l>;
199*f126890aSEmmanuel Vadot		rockchip,system-power-controller;
200*f126890aSEmmanuel Vadot		wakeup-source;
201*f126890aSEmmanuel Vadot		#clock-cells = <1>;
202*f126890aSEmmanuel Vadot
203*f126890aSEmmanuel Vadot		vcc1-supply = <&vcc33_sys>;
204*f126890aSEmmanuel Vadot		vcc2-supply = <&vcc33_sys>;
205*f126890aSEmmanuel Vadot		vcc3-supply = <&vcc33_sys>;
206*f126890aSEmmanuel Vadot		vcc4-supply = <&vcc33_sys>;
207*f126890aSEmmanuel Vadot		vcc6-supply = <&vcc_5v>;
208*f126890aSEmmanuel Vadot		vcc7-supply = <&vcc33_sys>;
209*f126890aSEmmanuel Vadot		vcc8-supply = <&vcc33_sys>;
210*f126890aSEmmanuel Vadot		vcc12-supply = <&vcc_18>;
211*f126890aSEmmanuel Vadot		vddio-supply = <&vcc33_io>;
212*f126890aSEmmanuel Vadot
213*f126890aSEmmanuel Vadot		regulators {
214*f126890aSEmmanuel Vadot			vdd_cpu: DCDC_REG1 {
215*f126890aSEmmanuel Vadot				regulator-name = "vdd_arm";
216*f126890aSEmmanuel Vadot				regulator-always-on;
217*f126890aSEmmanuel Vadot				regulator-boot-on;
218*f126890aSEmmanuel Vadot				regulator-min-microvolt = <750000>;
219*f126890aSEmmanuel Vadot				regulator-max-microvolt = <1450000>;
220*f126890aSEmmanuel Vadot				regulator-ramp-delay = <6001>;
221*f126890aSEmmanuel Vadot				regulator-state-mem {
222*f126890aSEmmanuel Vadot					regulator-off-in-suspend;
223*f126890aSEmmanuel Vadot				};
224*f126890aSEmmanuel Vadot			};
225*f126890aSEmmanuel Vadot
226*f126890aSEmmanuel Vadot			vdd_gpu: DCDC_REG2 {
227*f126890aSEmmanuel Vadot				regulator-name = "vdd_gpu";
228*f126890aSEmmanuel Vadot				regulator-always-on;
229*f126890aSEmmanuel Vadot				regulator-boot-on;
230*f126890aSEmmanuel Vadot				regulator-min-microvolt = <800000>;
231*f126890aSEmmanuel Vadot				regulator-max-microvolt = <1250000>;
232*f126890aSEmmanuel Vadot				regulator-ramp-delay = <6001>;
233*f126890aSEmmanuel Vadot				regulator-state-mem {
234*f126890aSEmmanuel Vadot					regulator-off-in-suspend;
235*f126890aSEmmanuel Vadot				};
236*f126890aSEmmanuel Vadot			};
237*f126890aSEmmanuel Vadot
238*f126890aSEmmanuel Vadot			vcc135_ddr: DCDC_REG3 {
239*f126890aSEmmanuel Vadot				regulator-name = "vcc135_ddr";
240*f126890aSEmmanuel Vadot				regulator-always-on;
241*f126890aSEmmanuel Vadot				regulator-boot-on;
242*f126890aSEmmanuel Vadot				regulator-state-mem {
243*f126890aSEmmanuel Vadot					regulator-on-in-suspend;
244*f126890aSEmmanuel Vadot				};
245*f126890aSEmmanuel Vadot			};
246*f126890aSEmmanuel Vadot
247*f126890aSEmmanuel Vadot			/*
248*f126890aSEmmanuel Vadot			 * vcc_18 has several aliases.  (vcc18_flashio and
249*f126890aSEmmanuel Vadot			 * vcc18_wl).  We'll add those aliases here just to
250*f126890aSEmmanuel Vadot			 * make it easier to follow the schematic.  The signals
251*f126890aSEmmanuel Vadot			 * are actually hooked together and only separated for
252*f126890aSEmmanuel Vadot			 * power measurement purposes).
253*f126890aSEmmanuel Vadot			 */
254*f126890aSEmmanuel Vadot			vcc18_wl: vcc18_flashio: vcc_18: DCDC_REG4 {
255*f126890aSEmmanuel Vadot				regulator-name = "vcc_18";
256*f126890aSEmmanuel Vadot				regulator-always-on;
257*f126890aSEmmanuel Vadot				regulator-boot-on;
258*f126890aSEmmanuel Vadot				regulator-min-microvolt = <1800000>;
259*f126890aSEmmanuel Vadot				regulator-max-microvolt = <1800000>;
260*f126890aSEmmanuel Vadot				regulator-state-mem {
261*f126890aSEmmanuel Vadot					regulator-on-in-suspend;
262*f126890aSEmmanuel Vadot					regulator-suspend-microvolt = <1800000>;
263*f126890aSEmmanuel Vadot				};
264*f126890aSEmmanuel Vadot			};
265*f126890aSEmmanuel Vadot
266*f126890aSEmmanuel Vadot			/*
267*f126890aSEmmanuel Vadot			 * Note that both vcc33_io and vcc33_pmuio are always
268*f126890aSEmmanuel Vadot			 * powered together. To simplify the logic in the dts
269*f126890aSEmmanuel Vadot			 * we just refer to vcc33_io every time something is
270*f126890aSEmmanuel Vadot			 * powered from vcc33_pmuio. In fact, on later boards
271*f126890aSEmmanuel Vadot			 * (such as danger) they're the same net.
272*f126890aSEmmanuel Vadot			 */
273*f126890aSEmmanuel Vadot			vcc33_io: LDO_REG1 {
274*f126890aSEmmanuel Vadot				regulator-name = "vcc33_io";
275*f126890aSEmmanuel Vadot				regulator-always-on;
276*f126890aSEmmanuel Vadot				regulator-boot-on;
277*f126890aSEmmanuel Vadot				regulator-min-microvolt = <3300000>;
278*f126890aSEmmanuel Vadot				regulator-max-microvolt = <3300000>;
279*f126890aSEmmanuel Vadot				regulator-state-mem {
280*f126890aSEmmanuel Vadot					regulator-on-in-suspend;
281*f126890aSEmmanuel Vadot					regulator-suspend-microvolt = <3300000>;
282*f126890aSEmmanuel Vadot				};
283*f126890aSEmmanuel Vadot			};
284*f126890aSEmmanuel Vadot
285*f126890aSEmmanuel Vadot			vdd_10: LDO_REG3 {
286*f126890aSEmmanuel Vadot				regulator-name = "vdd_10";
287*f126890aSEmmanuel Vadot				regulator-always-on;
288*f126890aSEmmanuel Vadot				regulator-boot-on;
289*f126890aSEmmanuel Vadot				regulator-min-microvolt = <1000000>;
290*f126890aSEmmanuel Vadot				regulator-max-microvolt = <1000000>;
291*f126890aSEmmanuel Vadot				regulator-state-mem {
292*f126890aSEmmanuel Vadot					regulator-on-in-suspend;
293*f126890aSEmmanuel Vadot					regulator-suspend-microvolt = <1000000>;
294*f126890aSEmmanuel Vadot				};
295*f126890aSEmmanuel Vadot			};
296*f126890aSEmmanuel Vadot
297*f126890aSEmmanuel Vadot			vdd10_lcd_pwren_h: LDO_REG7 {
298*f126890aSEmmanuel Vadot				regulator-name = "vdd10_lcd_pwren_h";
299*f126890aSEmmanuel Vadot				regulator-always-on;
300*f126890aSEmmanuel Vadot				regulator-boot-on;
301*f126890aSEmmanuel Vadot				regulator-min-microvolt = <2500000>;
302*f126890aSEmmanuel Vadot				regulator-max-microvolt = <2500000>;
303*f126890aSEmmanuel Vadot				regulator-state-mem {
304*f126890aSEmmanuel Vadot					regulator-off-in-suspend;
305*f126890aSEmmanuel Vadot				};
306*f126890aSEmmanuel Vadot			};
307*f126890aSEmmanuel Vadot
308*f126890aSEmmanuel Vadot			vcc33_lcd: SWITCH_REG1 {
309*f126890aSEmmanuel Vadot				regulator-name = "vcc33_lcd";
310*f126890aSEmmanuel Vadot				regulator-always-on;
311*f126890aSEmmanuel Vadot				regulator-boot-on;
312*f126890aSEmmanuel Vadot				regulator-state-mem {
313*f126890aSEmmanuel Vadot					regulator-off-in-suspend;
314*f126890aSEmmanuel Vadot				};
315*f126890aSEmmanuel Vadot			};
316*f126890aSEmmanuel Vadot		};
317*f126890aSEmmanuel Vadot	};
318*f126890aSEmmanuel Vadot};
319*f126890aSEmmanuel Vadot
320*f126890aSEmmanuel Vadot&i2c1 {
321*f126890aSEmmanuel Vadot	status = "okay";
322*f126890aSEmmanuel Vadot
323*f126890aSEmmanuel Vadot	clock-frequency = <400000>;
324*f126890aSEmmanuel Vadot	i2c-scl-falling-time-ns = <50>;		/* 2.5ns measured */
325*f126890aSEmmanuel Vadot	i2c-scl-rising-time-ns = <100>;		/* 40ns measured */
326*f126890aSEmmanuel Vadot
327*f126890aSEmmanuel Vadot	tpm: tpm@20 {
328*f126890aSEmmanuel Vadot		compatible = "infineon,slb9645tt";
329*f126890aSEmmanuel Vadot		reg = <0x20>;
330*f126890aSEmmanuel Vadot		powered-while-suspended;
331*f126890aSEmmanuel Vadot	};
332*f126890aSEmmanuel Vadot};
333*f126890aSEmmanuel Vadot
334*f126890aSEmmanuel Vadot&i2c2 {
335*f126890aSEmmanuel Vadot	status = "okay";
336*f126890aSEmmanuel Vadot
337*f126890aSEmmanuel Vadot	/* 100kHz since 4.7k resistors don't rise fast enough */
338*f126890aSEmmanuel Vadot	clock-frequency = <100000>;
339*f126890aSEmmanuel Vadot	i2c-scl-falling-time-ns = <50>;		/* 10ns measured */
340*f126890aSEmmanuel Vadot	i2c-scl-rising-time-ns = <800>;		/* 600ns measured */
341*f126890aSEmmanuel Vadot};
342*f126890aSEmmanuel Vadot
343*f126890aSEmmanuel Vadot&i2c4 {
344*f126890aSEmmanuel Vadot	status = "okay";
345*f126890aSEmmanuel Vadot
346*f126890aSEmmanuel Vadot	clock-frequency = <400000>;
347*f126890aSEmmanuel Vadot	i2c-scl-falling-time-ns = <50>;		/* 11ns measured */
348*f126890aSEmmanuel Vadot	i2c-scl-rising-time-ns = <300>;		/* 225ns measured */
349*f126890aSEmmanuel Vadot};
350*f126890aSEmmanuel Vadot
351*f126890aSEmmanuel Vadot&io_domains {
352*f126890aSEmmanuel Vadot	status = "okay";
353*f126890aSEmmanuel Vadot
354*f126890aSEmmanuel Vadot	bb-supply = <&vcc33_io>;
355*f126890aSEmmanuel Vadot	dvp-supply = <&vcc_18>;
356*f126890aSEmmanuel Vadot	flash0-supply = <&vcc18_flashio>;
357*f126890aSEmmanuel Vadot	gpio1830-supply = <&vcc33_io>;
358*f126890aSEmmanuel Vadot	gpio30-supply = <&vcc33_io>;
359*f126890aSEmmanuel Vadot	lcdc-supply = <&vcc33_lcd>;
360*f126890aSEmmanuel Vadot	wifi-supply = <&vcc18_wl>;
361*f126890aSEmmanuel Vadot};
362*f126890aSEmmanuel Vadot
363*f126890aSEmmanuel Vadot&pwm1 {
364*f126890aSEmmanuel Vadot	status = "okay";
365*f126890aSEmmanuel Vadot};
366*f126890aSEmmanuel Vadot
367*f126890aSEmmanuel Vadot&sdio0 {
368*f126890aSEmmanuel Vadot	status = "okay";
369*f126890aSEmmanuel Vadot
370*f126890aSEmmanuel Vadot	bus-width = <4>;
371*f126890aSEmmanuel Vadot	cap-sd-highspeed;
372*f126890aSEmmanuel Vadot	cap-sdio-irq;
373*f126890aSEmmanuel Vadot	keep-power-in-suspend;
374*f126890aSEmmanuel Vadot	mmc-pwrseq = <&sdio_pwrseq>;
375*f126890aSEmmanuel Vadot	non-removable;
376*f126890aSEmmanuel Vadot	pinctrl-names = "default";
377*f126890aSEmmanuel Vadot	pinctrl-0 = <&sdio0_clk &sdio0_cmd &sdio0_bus4>;
378*f126890aSEmmanuel Vadot	sd-uhs-sdr12;
379*f126890aSEmmanuel Vadot	sd-uhs-sdr25;
380*f126890aSEmmanuel Vadot	sd-uhs-sdr50;
381*f126890aSEmmanuel Vadot	sd-uhs-sdr104;
382*f126890aSEmmanuel Vadot	vmmc-supply = <&vcc33_sys>;
383*f126890aSEmmanuel Vadot	vqmmc-supply = <&vcc18_wl>;
384*f126890aSEmmanuel Vadot};
385*f126890aSEmmanuel Vadot
386*f126890aSEmmanuel Vadot&spi2 {
387*f126890aSEmmanuel Vadot	status = "okay";
388*f126890aSEmmanuel Vadot
389*f126890aSEmmanuel Vadot	rx-sample-delay-ns = <12>;
390*f126890aSEmmanuel Vadot
391*f126890aSEmmanuel Vadot	flash@0 {
392*f126890aSEmmanuel Vadot		compatible = "jedec,spi-nor";
393*f126890aSEmmanuel Vadot		spi-max-frequency = <50000000>;
394*f126890aSEmmanuel Vadot		reg = <0>;
395*f126890aSEmmanuel Vadot	};
396*f126890aSEmmanuel Vadot};
397*f126890aSEmmanuel Vadot
398*f126890aSEmmanuel Vadot&tsadc {
399*f126890aSEmmanuel Vadot	status = "okay";
400*f126890aSEmmanuel Vadot
401*f126890aSEmmanuel Vadot	rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
402*f126890aSEmmanuel Vadot	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
403*f126890aSEmmanuel Vadot	rockchip,hw-tshut-temp = <125000>;
404*f126890aSEmmanuel Vadot};
405*f126890aSEmmanuel Vadot
406*f126890aSEmmanuel Vadot&uart0 {
407*f126890aSEmmanuel Vadot	status = "okay";
408*f126890aSEmmanuel Vadot
409*f126890aSEmmanuel Vadot	/* Pins don't include flow control by default; add that in */
410*f126890aSEmmanuel Vadot	pinctrl-names = "default";
411*f126890aSEmmanuel Vadot	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
412*f126890aSEmmanuel Vadot};
413*f126890aSEmmanuel Vadot
414*f126890aSEmmanuel Vadot&uart1 {
415*f126890aSEmmanuel Vadot	status = "okay";
416*f126890aSEmmanuel Vadot};
417*f126890aSEmmanuel Vadot
418*f126890aSEmmanuel Vadot&uart2 {
419*f126890aSEmmanuel Vadot	status = "okay";
420*f126890aSEmmanuel Vadot};
421*f126890aSEmmanuel Vadot
422*f126890aSEmmanuel Vadot&usbphy {
423*f126890aSEmmanuel Vadot	status = "okay";
424*f126890aSEmmanuel Vadot};
425*f126890aSEmmanuel Vadot
426*f126890aSEmmanuel Vadot&usb_host0_ehci {
427*f126890aSEmmanuel Vadot	status = "okay";
428*f126890aSEmmanuel Vadot
429*f126890aSEmmanuel Vadot	needs-reset-on-resume;
430*f126890aSEmmanuel Vadot};
431*f126890aSEmmanuel Vadot
432*f126890aSEmmanuel Vadot&usb_host1 {
433*f126890aSEmmanuel Vadot	status = "okay";
434*f126890aSEmmanuel Vadot	snps,need-phy-for-wake;
435*f126890aSEmmanuel Vadot};
436*f126890aSEmmanuel Vadot
437*f126890aSEmmanuel Vadot&usb_otg {
438*f126890aSEmmanuel Vadot	status = "okay";
439*f126890aSEmmanuel Vadot
440*f126890aSEmmanuel Vadot	assigned-clocks = <&cru SCLK_USBPHY480M_SRC>;
441*f126890aSEmmanuel Vadot	assigned-clock-parents = <&usbphy0>;
442*f126890aSEmmanuel Vadot	dr_mode = "host";
443*f126890aSEmmanuel Vadot	snps,need-phy-for-wake;
444*f126890aSEmmanuel Vadot};
445*f126890aSEmmanuel Vadot
446*f126890aSEmmanuel Vadot&vopb {
447*f126890aSEmmanuel Vadot	status = "okay";
448*f126890aSEmmanuel Vadot};
449*f126890aSEmmanuel Vadot
450*f126890aSEmmanuel Vadot&vopb_mmu {
451*f126890aSEmmanuel Vadot	status = "okay";
452*f126890aSEmmanuel Vadot};
453*f126890aSEmmanuel Vadot
454*f126890aSEmmanuel Vadot&wdt {
455*f126890aSEmmanuel Vadot	status = "okay";
456*f126890aSEmmanuel Vadot};
457*f126890aSEmmanuel Vadot
458*f126890aSEmmanuel Vadot&pinctrl {
459*f126890aSEmmanuel Vadot	pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
460*f126890aSEmmanuel Vadot		bias-disable;
461*f126890aSEmmanuel Vadot		drive-strength = <8>;
462*f126890aSEmmanuel Vadot	};
463*f126890aSEmmanuel Vadot
464*f126890aSEmmanuel Vadot	pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
465*f126890aSEmmanuel Vadot		bias-pull-up;
466*f126890aSEmmanuel Vadot		drive-strength = <8>;
467*f126890aSEmmanuel Vadot	};
468*f126890aSEmmanuel Vadot
469*f126890aSEmmanuel Vadot	pcfg_output_high: pcfg-output-high {
470*f126890aSEmmanuel Vadot		output-high;
471*f126890aSEmmanuel Vadot	};
472*f126890aSEmmanuel Vadot
473*f126890aSEmmanuel Vadot	pcfg_output_low: pcfg-output-low {
474*f126890aSEmmanuel Vadot		output-low;
475*f126890aSEmmanuel Vadot	};
476*f126890aSEmmanuel Vadot
477*f126890aSEmmanuel Vadot	buttons {
478*f126890aSEmmanuel Vadot		pwr_key_l: pwr-key-l {
479*f126890aSEmmanuel Vadot			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
480*f126890aSEmmanuel Vadot		};
481*f126890aSEmmanuel Vadot	};
482*f126890aSEmmanuel Vadot
483*f126890aSEmmanuel Vadot	emmc {
484*f126890aSEmmanuel Vadot		emmc_reset: emmc-reset {
485*f126890aSEmmanuel Vadot			rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
486*f126890aSEmmanuel Vadot		};
487*f126890aSEmmanuel Vadot
488*f126890aSEmmanuel Vadot		/*
489*f126890aSEmmanuel Vadot		 * We run eMMC at max speed; bump up drive strength.
490*f126890aSEmmanuel Vadot		 * We also have external pulls, so disable the internal ones.
491*f126890aSEmmanuel Vadot		 */
492*f126890aSEmmanuel Vadot		emmc_clk: emmc-clk {
493*f126890aSEmmanuel Vadot			rockchip,pins = <3 RK_PC2 2 &pcfg_pull_none_drv_8ma>;
494*f126890aSEmmanuel Vadot		};
495*f126890aSEmmanuel Vadot
496*f126890aSEmmanuel Vadot		emmc_cmd: emmc-cmd {
497*f126890aSEmmanuel Vadot			rockchip,pins = <3 RK_PC0 2 &pcfg_pull_none_drv_8ma>;
498*f126890aSEmmanuel Vadot		};
499*f126890aSEmmanuel Vadot
500*f126890aSEmmanuel Vadot		emmc_bus8: emmc-bus8 {
501*f126890aSEmmanuel Vadot			rockchip,pins = <3 RK_PA0 2 &pcfg_pull_none_drv_8ma>,
502*f126890aSEmmanuel Vadot					<3 RK_PA1 2 &pcfg_pull_none_drv_8ma>,
503*f126890aSEmmanuel Vadot					<3 RK_PA2 2 &pcfg_pull_none_drv_8ma>,
504*f126890aSEmmanuel Vadot					<3 RK_PA3 2 &pcfg_pull_none_drv_8ma>,
505*f126890aSEmmanuel Vadot					<3 RK_PA4 2 &pcfg_pull_none_drv_8ma>,
506*f126890aSEmmanuel Vadot					<3 RK_PA5 2 &pcfg_pull_none_drv_8ma>,
507*f126890aSEmmanuel Vadot					<3 RK_PA6 2 &pcfg_pull_none_drv_8ma>,
508*f126890aSEmmanuel Vadot					<3 RK_PA7 2 &pcfg_pull_none_drv_8ma>;
509*f126890aSEmmanuel Vadot		};
510*f126890aSEmmanuel Vadot	};
511*f126890aSEmmanuel Vadot
512*f126890aSEmmanuel Vadot	pmic {
513*f126890aSEmmanuel Vadot		pmic_int_l: pmic-int-l {
514*f126890aSEmmanuel Vadot			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
515*f126890aSEmmanuel Vadot		};
516*f126890aSEmmanuel Vadot	};
517*f126890aSEmmanuel Vadot
518*f126890aSEmmanuel Vadot	reboot {
519*f126890aSEmmanuel Vadot		ap_warm_reset_h: ap-warm-reset-h {
520*f126890aSEmmanuel Vadot			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
521*f126890aSEmmanuel Vadot		};
522*f126890aSEmmanuel Vadot	};
523*f126890aSEmmanuel Vadot
524*f126890aSEmmanuel Vadot	recovery-switch {
525*f126890aSEmmanuel Vadot		rec_mode_l: rec-mode-l {
526*f126890aSEmmanuel Vadot			rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
527*f126890aSEmmanuel Vadot		};
528*f126890aSEmmanuel Vadot	};
529*f126890aSEmmanuel Vadot
530*f126890aSEmmanuel Vadot	sdio0 {
531*f126890aSEmmanuel Vadot		wifi_enable_h: wifienable-h {
532*f126890aSEmmanuel Vadot			rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
533*f126890aSEmmanuel Vadot		};
534*f126890aSEmmanuel Vadot
535*f126890aSEmmanuel Vadot		/* NOTE: mislabelled on schematic; should be bt_enable_h */
536*f126890aSEmmanuel Vadot		bt_enable_l: bt-enable-l {
537*f126890aSEmmanuel Vadot			rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
538*f126890aSEmmanuel Vadot		};
539*f126890aSEmmanuel Vadot
540*f126890aSEmmanuel Vadot		bt_host_wake: bt-host-wake {
541*f126890aSEmmanuel Vadot			rockchip,pins = <4 RK_PD7 RK_FUNC_GPIO &pcfg_pull_down>;
542*f126890aSEmmanuel Vadot		};
543*f126890aSEmmanuel Vadot
544*f126890aSEmmanuel Vadot		bt_host_wake_l: bt-host-wake-l {
545*f126890aSEmmanuel Vadot			rockchip,pins = <4 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>;
546*f126890aSEmmanuel Vadot		};
547*f126890aSEmmanuel Vadot
548*f126890aSEmmanuel Vadot		/*
549*f126890aSEmmanuel Vadot		 * We run sdio0 at max speed; bump up drive strength.
550*f126890aSEmmanuel Vadot		 * We also have external pulls, so disable the internal ones.
551*f126890aSEmmanuel Vadot		 */
552*f126890aSEmmanuel Vadot		sdio0_bus4: sdio0-bus4 {
553*f126890aSEmmanuel Vadot			rockchip,pins = <4 RK_PC4 1 &pcfg_pull_none_drv_8ma>,
554*f126890aSEmmanuel Vadot					<4 RK_PC5 1 &pcfg_pull_none_drv_8ma>,
555*f126890aSEmmanuel Vadot					<4 RK_PC6 1 &pcfg_pull_none_drv_8ma>,
556*f126890aSEmmanuel Vadot					<4 RK_PC7 1 &pcfg_pull_none_drv_8ma>;
557*f126890aSEmmanuel Vadot		};
558*f126890aSEmmanuel Vadot
559*f126890aSEmmanuel Vadot		sdio0_cmd: sdio0-cmd {
560*f126890aSEmmanuel Vadot			rockchip,pins = <4 RK_PD0 1 &pcfg_pull_none_drv_8ma>;
561*f126890aSEmmanuel Vadot		};
562*f126890aSEmmanuel Vadot
563*f126890aSEmmanuel Vadot		sdio0_clk: sdio0-clk {
564*f126890aSEmmanuel Vadot			rockchip,pins = <4 RK_PD1 1 &pcfg_pull_none_drv_8ma>;
565*f126890aSEmmanuel Vadot		};
566*f126890aSEmmanuel Vadot
567*f126890aSEmmanuel Vadot		/*
568*f126890aSEmmanuel Vadot		 * These pins are only present on very new veyron boards; on
569*f126890aSEmmanuel Vadot		 * older boards bt_dev_wake is simply always high.  Note that
570*f126890aSEmmanuel Vadot		 * gpio4_D2 is a NC on old veyron boards, so it doesn't hurt
571*f126890aSEmmanuel Vadot		 * to map this pin everywhere
572*f126890aSEmmanuel Vadot		 */
573*f126890aSEmmanuel Vadot		bt_dev_wake_sleep: bt-dev-wake-sleep {
574*f126890aSEmmanuel Vadot			rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_output_low>;
575*f126890aSEmmanuel Vadot		};
576*f126890aSEmmanuel Vadot
577*f126890aSEmmanuel Vadot		bt_dev_wake_awake: bt-dev-wake-awake {
578*f126890aSEmmanuel Vadot			rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_output_high>;
579*f126890aSEmmanuel Vadot		};
580*f126890aSEmmanuel Vadot
581*f126890aSEmmanuel Vadot		bt_dev_wake: bt-dev-wake {
582*f126890aSEmmanuel Vadot			rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
583*f126890aSEmmanuel Vadot		};
584*f126890aSEmmanuel Vadot	};
585*f126890aSEmmanuel Vadot
586*f126890aSEmmanuel Vadot	tpm {
587*f126890aSEmmanuel Vadot		tpm_int_h: tpm-int-h {
588*f126890aSEmmanuel Vadot			rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
589*f126890aSEmmanuel Vadot		};
590*f126890aSEmmanuel Vadot	};
591*f126890aSEmmanuel Vadot
592*f126890aSEmmanuel Vadot	write-protect {
593*f126890aSEmmanuel Vadot		fw_wp_ap: fw-wp-ap {
594*f126890aSEmmanuel Vadot			rockchip,pins = <7 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
595*f126890aSEmmanuel Vadot		};
596*f126890aSEmmanuel Vadot	};
597*f126890aSEmmanuel Vadot};
598