summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/rockchip/rk3368-lion.dtsi
blob: 5aaba8357e62df84b39416ae2ee58d842525ddf4 (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
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (c) 2018 Theobroma Systems Design und Consulting GmbH
 */

/dts-v1/;
#include "rk3368.dtsi"

/ {
	model = "Theobroma Systems RK3368-uQ7 SoM";
	compatible = "tsd,rk3368-uq7", "rockchip,rk3368";

	chosen {
		stdout-path = "serial0:115200n8";
	};

	xin32k: xin32k {
		compatible = "fixed-clock";
		clock-frequency = <32768>;
		clock-output-names = "xin32k";
		#clock-cells = <0>;
	};

	ext_gmac: gmac-clk {
		compatible = "fixed-clock";
		clock-frequency = <125000000>;
		clock-output-names = "ext_gmac";
		#clock-cells = <0>;
	};

	i2cmux1 {
		compatible = "i2c-mux-gpio";
		#address-cells = <1>;
		#size-cells = <0>;
		i2c-parent = <&i2c1>;
		mux-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>;

		/* Q7_GPO_I2C */
		i2c@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;
		};

		/* Q7_SMB */
		i2c@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
		};
	};

	i2cmux2 {
		compatible = "i2c-mux-gpio";
		#address-cells = <1>;
		#size-cells = <0>;
		i2c-parent = <&i2c2>;
		mux-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;

		/* Q7_LVDS_BLC_I2C */
		i2c@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;

			fan: fan@18 {
				compatible = "ti,amc6821";
				reg = <0x18>;
				cooling-min-state = <0>;
				cooling-max-state = <9>;
				#cooling-cells = <2>;
			};

			rtc_twi: rtc@6f {
				compatible = "isil,isl1208";
				reg = <0x6f>;
			};
		};

		/* Q7_GP2_I2C */
		i2c@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
		};
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&led_pins_module>;

		module_led1 {
			label = "module_led1";
			gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
			panic-indicator;
		};

		module_led2 {
			label = "module_led2";
			gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
			default-state = "off";
		};
	};

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

	vcc_host: vcc-host {
		compatible = "regulator-fixed";
		enable-active-high;
		gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&host_vbus_drv>;
		regulator-name = "vcc_host";
		regulator-always-on;
	};

	dwc_control_usb: dwc-control-usb {
		compatible = "rockchip,rk3368-dwc-control-usb";
		status = "okay";

		rockchip,grf = <&grf>;
		grf-offset = <0x04bc>; /* GRF_SOC_STATUS for USB2.0 OTG */
		interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "otg_id", "otg_bvalid",
				  "otg_linestate", "host0_linestate";
		clocks = <&cru HCLK_USB_PERI>;
		clock-names = "hclk_usb_peri";

		otg_drv_gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
		rockchip,remote_wakeup;
		rockchip,usb_irq_wakeup;

		usb_bc {
			compatible = "inno,phy";
			regbase = &dwc_control_usb;
			rk_usb,bvalid     = <0x4bc 23 1>;
			rk_usb,iddig      = <0x4bc 26 1>;
			rk_usb,vdmsrcen   = <0x718 12 1>;
			rk_usb,vdpsrcen   = <0x718 11 1>;
			rk_usb,rdmpden    = <0x718 10 1>;
			rk_usb,idpsrcen   = <0x718  9 1>;
			rk_usb,idmsinken  = <0x718  8 1>;
			rk_usb,idpsinken  = <0x718  7 1>;
			rk_usb,dpattach   = <0x4b8 31 1>;
			rk_usb,cpdet      = <0x4b8 30 1>;
			rk_usb,dcpattach  = <0x4b8 29 1>;
		};
	};


};

&cpu_l0 {
	cpu-supply = <&vdd_cpu>;
};

&cpu_l1 {
	cpu-supply = <&vdd_cpu>;
};

&cpu_l2 {
	cpu-supply = <&vdd_cpu>;
};

&cpu_l3 {
	cpu-supply = <&vdd_cpu>;
};

&cpu_b0 {
	cpu-supply = <&vdd_cpu>;
};

&cpu_b1 {
	cpu-supply = <&vdd_cpu>;
};

&cpu_b2 {
	cpu-supply = <&vdd_cpu>;
};

&cpu_b3 {
	cpu-supply = <&vdd_cpu>;
};

&emmc {
	bus-width = <8>;
	max-frequency = <150000000>;
	disable-wp;
	mmc-hs200-1_8v;
	non-removable;
	cap-mmc-highspeed;
	supports-emmc;
	no-sdio;
	no-sd;
	num-slots = <1>;
	vmmc-supply = <&vcc33_io>;
	vqmmc-supply = <&vcc18_io>;
	pinctrl-names = "default";
	pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
	status = "okay";
};

&gmac {
	assigned-clocks = <&cru SCLK_MAC>;
	assigned-clock-parents = <&ext_gmac>;
	clock_in_out = "input";
	phy-supply = <&vcc33_io>;
	phy-mode = "rgmii";
	pinctrl-names = "default";
	pinctrl-0 = <&rgmii_pins>;
	snps,reset-active-low;
	snps,reset-delays-us = <0 10000 50000>;
	snps,reset-gpio = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
	tx_delay = <0x10>;
	rx_delay = <0x10>;
	status = "okay";
	phy-handle = <&phy0>;

	mdio {
		compatible = "snps,dwmac-mdio";
		#address-cells = <1>;
		#size-cells = <0>;

		// Microsemi VSC8531-02
		phy0: phy0 {
			compatible = "ethernet-phy-id0007.0570";
			reg = <0>;
			vsc8531,edge-slowdown = <7>;
			vsc8531,led-0-mode = <1>;
			vsc8531,led-1-mode = <2>;
		};
	};
};

/* PMIC_SCL/SDA */
&i2c0 {
	status = "okay";

	rk808: pmic@1b {
		compatible = "rockchip,rk808";
		reg = <0x1b>;
		interrupt-parent = <&gpio0>;
		interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
		clock-output-names = "rk808-clkout1", "rk808-clkout2";
		#clock-cells = <1>;
		pinctrl-names = "default";
		pinctrl-0 = <&pmic_int_l>, <&pmic_sleep>;
		rockchip,system-power-controller;
		vcc1-supply = <&vcc_sys>;
		vcc2-supply = <&vcc_sys>;
		vcc3-supply = <&vcc_sys>;
		vcc4-supply = <&vcc_sys>;
		vcc6-supply = <&vcc_sys>;
		vcc7-supply = <&vcc_sys>;
		vcc8-supply = <&vcc_sys>;
		vcc9-supply = <&vcc_sys>;
		vcc10-supply = <&vcc_sys>;
		vcc11-supply = <&vcc_sys>;
		vcc12-supply = <&vcc_sys>;

		regulators {
			vdd_cpu: DCDC_REG1 {
				regulator-name = "vdd_cpu";
				regulator-min-microvolt = <700000>;
				regulator-max-microvolt = <1500000>;
				regulator-always-on;
				regulator-boot-on;
			};

			vdd_log: DCDC_REG2 {
				regulator-name = "vdd_log";
				regulator-min-microvolt = <700000>;
				regulator-max-microvolt = <1500000>;
				regulator-always-on;
				regulator-boot-on;
			};

			vcc_ddr: DCDC_REG3 {
				regulator-name = "vcc_ddr";
				regulator-always-on;
				regulator-boot-on;
			};

			vcc33_io: DCDC_REG4 {
				regulator-name = "vcc33_io";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
				regulator-boot-on;
			};

			vcc33_video: LDO_REG2 {
				regulator-name = "vcc33_video";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
				regulator-boot-on;
			};

			vdd10_pll: LDO_REG3 {
				regulator-name = "vdd10_pll";
				regulator-min-microvolt = <1000000>;
				regulator-max-microvolt = <1000000>;
				regulator-always-on;
				regulator-boot-on;
			};

			vcc18_io: LDO_REG4 {
				regulator-name = "vcc18_io";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-boot-on;
			};

			vdd10_video: LDO_REG6 {
				regulator-name = "vdd10_video";
				regulator-min-microvolt = <1000000>;
				regulator-max-microvolt = <1000000>;
				regulator-always-on;
				regulator-boot-on;
			};

			vcc18_video: LDO_REG8 {
				regulator-name = "vcc18_video";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-always-on;
				regulator-boot-on;
			};
		};
	};
};

/* Do not use directly - this bus is behind a i2c mux */
&i2c1 {
	status = "okay";
};

/* Do not use directly - this bus is behind a i2c mux */
&i2c2 {
	status = "okay";
};

&pinctrl {
	leds {
		led_pins_module: led-module-gpio {
			rockchip,pins =
				<RK_GPIO2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
				<RK_GPIO3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

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

		pmic_sleep: pmic-sleep {
			rockchip,pins = <RK_GPIO0 RK_PA0 RK_FUNC_2 &pcfg_pull_none>;
		};
	};

	usb_otg {
		otg_vbus_drv: otg-vbus-drv {
			rockchip,pins =
				<RK_GPIO0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	usb_host {
		host_vbus_drv: host-vbus-drv {
			rockchip,pins = <RK_GPIO0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};
};

&spi1 {
	status = "okay";

	norflash: flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <50000000>;
	};
};

&uart1 {
	status = "okay";
};

&uart3 {
	status = "okay";
};

&usb_otg {
	status = "okay";

	compatible = "rockchip,rk3368-usb";
	clocks = <&cru SCLK_OTGPHY0>, <&cru HCLK_OTG0>;
	clock-names = "sclk_otgphy0", "otg";
	resets = <&cru SRST_USBOTG_AHB>,
		 <&cru SRST_USBOTG_PHY>,
		 <&cru SRST_USBOTG_CON>;
	reset-names = "otg_ahb", "otg_phy", "otg_controller";
	/* 0 - Normal, 1 - Force Host, 2 - Force Device */
	rockchip,usb-mode = <1>;
};

&u2phy {
	status = "okay";

	u2phy_host: host-port {
		phy-supply = <&vcc_host>;
		status = "okay";
	};
};

&usb_host0_ehci {
	status = "okay";
};

&usb_host0_ohci {
	status = "okay";
};

&wdt {
	status = "okay";
};

&tsadc {
	tsadc-supply = <&vdd_cpu>;
	status = "okay";
};