xref: /freebsd/sys/contrib/device-tree/src/arm64/rockchip/rk3368-lion.dtsi (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Theobroma Systems Design und Consulting GmbH
4 */
5
6/dts-v1/;
7#include "rk3368.dtsi"
8
9/ {
10	aliases {
11		ethernet0 = &gmac;
12		mmc0 = &emmc;
13	};
14
15	chosen {
16		stdout-path = "serial0:115200n8";
17	};
18
19	ext_gmac: gmac-clk {
20		compatible = "fixed-clock";
21		clock-frequency = <125000000>;
22		clock-output-names = "ext_gmac";
23		#clock-cells = <0>;
24	};
25
26	i2cmux1 {
27		compatible = "i2c-mux-gpio";
28		#address-cells = <1>;
29		#size-cells = <0>;
30		i2c-parent = <&i2c1>;
31		mux-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>;
32
33		/* Q7_GP0_I2C */
34		i2c_gp0: i2c@0 {
35			reg = <0>;
36			#address-cells = <1>;
37			#size-cells = <0>;
38		};
39
40		/* Q7_SMB */
41		i2c_smb: i2c@1 {
42			reg = <1>;
43			#address-cells = <1>;
44			#size-cells = <0>;
45		};
46	};
47
48	i2cmux2 {
49		compatible = "i2c-mux-gpio";
50		#address-cells = <1>;
51		#size-cells = <0>;
52		i2c-parent = <&i2c2>;
53		mux-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
54
55		/* Q7_LVDS_BLC_I2C */
56		i2c_lvds_blc: i2c@0 {
57			reg = <0>;
58			#address-cells = <1>;
59			#size-cells = <0>;
60
61			fan: fan@18 {
62				compatible = "ti,amc6821";
63				reg = <0x18>;
64				#cooling-cells = <2>;
65			};
66
67			rtc_twi: rtc@6f {
68				compatible = "isil,isl1208";
69				reg = <0x6f>;
70			};
71		};
72
73		/* Q7_GP2_I2C = LVDS_DID_CLK/DAT */
74		i2c_gp2: i2c@1 {
75			reg = <1>;
76			#address-cells = <1>;
77			#size-cells = <0>;
78		};
79	};
80
81	leds {
82		compatible = "gpio-leds";
83		pinctrl-names = "default";
84		pinctrl-0 = <&module_led_pins>;
85
86		module_led1: led-1 {
87			label = "module_led1";
88			gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>;
89			linux,default-trigger = "heartbeat";
90			panic-indicator;
91		};
92
93		module_led2: led-2 {
94			label = "module_led2";
95			gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
96			default-state = "off";
97		};
98	};
99
100	vcc_sys: vcc-sys-regulator {
101		compatible = "regulator-fixed";
102		regulator-name = "vcc_sys";
103		regulator-min-microvolt = <5000000>;
104		regulator-max-microvolt = <5000000>;
105		regulator-always-on;
106		regulator-boot-on;
107	};
108};
109
110&cpu_l0 {
111	cpu-supply = <&vdd_cpu>;
112};
113
114&cpu_l1 {
115	cpu-supply = <&vdd_cpu>;
116};
117
118&cpu_l2 {
119	cpu-supply = <&vdd_cpu>;
120};
121
122&cpu_l3 {
123	cpu-supply = <&vdd_cpu>;
124};
125
126&cpu_b0 {
127	cpu-supply = <&vdd_cpu>;
128};
129
130&cpu_b1 {
131	cpu-supply = <&vdd_cpu>;
132};
133
134&cpu_b2 {
135	cpu-supply = <&vdd_cpu>;
136};
137
138&cpu_b3 {
139	cpu-supply = <&vdd_cpu>;
140};
141
142&emmc {
143	bus-width = <8>;
144	clock-frequency = <150000000>;
145	mmc-hs200-1_8v;
146	non-removable;
147	vmmc-supply = <&vcc33_io>;
148	vqmmc-supply = <&vcc_18>;
149	pinctrl-names = "default";
150	pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
151	status = "okay";
152};
153
154&gmac {
155	assigned-clocks = <&cru SCLK_MAC>;
156	assigned-clock-parents = <&ext_gmac>;
157	clock_in_out = "input";
158	phy-supply = <&vcc33_io>;
159	phy-mode = "rgmii";
160	pinctrl-names = "default";
161	pinctrl-0 = <&rgmii_pins>;
162	snps,reset-active-low;
163	snps,reset-delays-us = <0 10000 50000>;
164	snps,reset-gpio = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
165	tx_delay = <0x10>;
166	rx_delay = <0x10>;
167	status = "okay";
168};
169
170&i2c0 {
171	status = "okay";
172
173	rk808: pmic@1b {
174		compatible = "rockchip,rk808";
175		reg = <0x1b>;
176		interrupt-parent = <&gpio0>;
177		interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
178		clock-output-names = "xin32k", "rk808-clkout2";
179		#clock-cells = <1>;
180		pinctrl-names = "default";
181		pinctrl-0 = <&pmic_int_l>, <&pmic_sleep>;
182		rockchip,system-power-controller;
183		vcc1-supply = <&vcc_sys>;
184		vcc2-supply = <&vcc_sys>;
185		vcc3-supply = <&vcc_sys>;
186		vcc4-supply = <&vcc_sys>;
187		vcc6-supply = <&vcc_sys>;
188		vcc7-supply = <&vcc_sys>;
189		vcc8-supply = <&vcc_sys>;
190		vcc9-supply = <&vcc_sys>;
191		vcc10-supply = <&vcc_sys>;
192		vcc11-supply = <&vcc_sys>;
193		vcc12-supply = <&vcc_sys>;
194
195		regulators {
196			vdd_cpu: DCDC_REG1 {
197				regulator-name = "vdd_cpu";
198				regulator-min-microvolt = <700000>;
199				regulator-max-microvolt = <1500000>;
200				regulator-always-on;
201				regulator-boot-on;
202			};
203
204			vdd_log: DCDC_REG2 {
205				regulator-name = "vdd_log";
206				regulator-min-microvolt = <700000>;
207				regulator-max-microvolt = <1500000>;
208				regulator-always-on;
209				regulator-boot-on;
210			};
211
212			vcc_ddr: DCDC_REG3 {
213				regulator-name = "vcc_ddr";
214				regulator-always-on;
215				regulator-boot-on;
216			};
217
218			vcc33_io: DCDC_REG4 {
219				regulator-name = "vcc33_io";
220				regulator-min-microvolt = <3300000>;
221				regulator-max-microvolt = <3300000>;
222				regulator-always-on;
223				regulator-boot-on;
224			};
225
226			vcc33_video: LDO_REG2 {
227				regulator-name = "vcc33_video";
228				regulator-min-microvolt = <3300000>;
229				regulator-max-microvolt = <3300000>;
230				regulator-always-on;
231				regulator-boot-on;
232			};
233
234			vdd10_pll: LDO_REG3 {
235				regulator-name = "vdd10_pll";
236				regulator-min-microvolt = <1000000>;
237				regulator-max-microvolt = <1000000>;
238				regulator-always-on;
239				regulator-boot-on;
240			};
241
242			vdd10_video: LDO_REG6 {
243				regulator-name = "vdd10_video";
244				regulator-min-microvolt = <1000000>;
245				regulator-max-microvolt = <1000000>;
246				regulator-always-on;
247				regulator-boot-on;
248			};
249
250			vcc_18: LDO_REG7 {
251				regulator-always-on;
252				regulator-boot-on;
253				regulator-min-microvolt = <1800000>;
254				regulator-max-microvolt = <1800000>;
255				regulator-name = "vcc_18";
256			};
257
258			vcc18_video: LDO_REG8 {
259				regulator-name = "vcc18_video";
260				regulator-min-microvolt = <1800000>;
261				regulator-max-microvolt = <1800000>;
262				regulator-always-on;
263				regulator-boot-on;
264			};
265		};
266	};
267};
268
269&i2c1 {
270	status = "okay";
271};
272
273&i2c2 {
274	status = "okay";
275};
276
277/* The RK3368-uQ7 "Lion" has most IO voltages hardwired to 3.3V. */
278&io_domains {
279	audio-supply = <&vcc33_io>;
280	dvp-supply = <&vcc33_io>;
281	flash0-supply = <&vcc_18>;
282	gpio30-supply = <&vcc33_io>;
283	gpio1830-supply = <&vcc33_io>;
284	sdcard-supply = <&vcc33_io>;
285	wifi-supply = <&vcc33_io>;
286	status = "okay";
287};
288
289&pinctrl {
290	leds {
291		module_led_pins: module-led-pins {
292			rockchip,pins =
293				<2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
294				<3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
295		};
296	};
297	pmic {
298		pmic_int_l: pmic-int-l {
299			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
300		};
301
302		pmic_sleep: pmic-sleep {
303			rockchip,pins = <0 RK_PA0 2 &pcfg_pull_none>;
304		};
305	};
306};
307
308&pmu_io_domains {
309	pmu-supply = <&vcc33_io>;
310	vop-supply = <&vcc33_io>;
311	status = "okay";
312};
313
314&spi1 {
315	status = "okay";
316
317	norflash: flash@0 {
318		compatible = "jedec,spi-nor";
319		reg = <0>;
320		spi-max-frequency = <50000000>;
321	};
322};
323
324&uart1 {
325	status = "okay";
326};
327
328&uart3 {
329	status = "okay";
330};
331
332&usb_host0_ehci {
333	status = "okay";
334};
335
336&wdt {
337	status = "okay";
338};
339