xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/rk3229-echo-v10.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1/*
2 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 *  a) This file is free software; you can redistribute it and/or
10 *     modify it under the terms of the GNU General Public License as
11 *     published by the Free Software Foundation; either version 2 of the
12 *     License, or (at your option) any later version.
13 *
14 *     This file is distributed in the hope that it will be useful,
15 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *     GNU General Public License for more details.
18 *
19 *  Or, alternatively,
20 *
21 *  b) Permission is hereby granted, free of charge, to any person
22 *     obtaining a copy of this software and associated documentation
23 *     files (the "Software"), to deal in the Software without
24 *     restriction, including without limitation the rights to use,
25 *     copy, modify, merge, publish, distribute, sublicense, and/or
26 *     sell copies of the Software, and to permit persons to whom the
27 *     Software is furnished to do so, subject to the following
28 *     conditions:
29 *
30 *     The above copyright notice and this permission notice shall be
31 *     included in all copies or substantial portions of the Software.
32 *
33 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 *     OTHER DEALINGS IN THE SOFTWARE.
41 */
42
43/dts-v1/;
44
45#include "rk322x.dtsi"
46#include "rk3229-cpu-opp.dtsi"
47#include "rk322x-android.dtsi"
48
49/ {
50	model = "RK3229 Echo Board V1.0";
51	compatible = "rockchip,rk3229-echo", "rockchip,rk3229";
52
53	memory@60000000 {
54		device_type = "memory";
55		reg = <0x60000000 0x40000000>;
56	};
57
58	reserved-memory {
59		#address-cells = <1>;
60		#size-cells = <1>;
61		ranges;
62
63		trust_reserved: trust@0x68400000 {
64			 reg = <0x68400000 0xe00000>;
65			 no-map;
66		};
67	};
68
69	sdio_pwrseq: sdio-pwrseq {
70		compatible = "mmc-pwrseq-simple";
71		clocks = <&rk805 1>;
72		clock-names = "ext_clock";
73		pinctrl-names = "default";
74		pinctrl-0 = <&wifi_enable_h>;
75
76		/*
77		 * On the module itself this is one of these (depending
78		 * on the actual card populated):
79		 * - SDIO_RESET_L_WL_REG_ON
80		 * - PDN (power down when low)
81		 */
82		reset-gpios = <&gpio2 26 GPIO_ACTIVE_LOW>; /* GPIO2_D2 */
83	};
84
85	vcc_host: vcc-host-regulator {
86		compatible = "regulator-fixed";
87		enable-active-high;
88		gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>;
89		pinctrl-names = "default";
90		pinctrl-0 = <&host_vbus_drv>;
91		regulator-name = "vcc_host";
92		regulator-always-on;
93		regulator-boot-on;
94	};
95
96	vcc_otg_vbus: otg-vbus-regulator {
97		compatible = "regulator-fixed";
98		gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
99		pinctrl-names = "default";
100		pinctrl-0 = <&otg_vbus_drv>;
101		regulator-name = "vcc_otg_vbus";
102		regulator-min-microvolt = <5000000>;
103		regulator-max-microvolt = <5000000>;
104		enable-active-high;
105	};
106
107	xin32k: xin32k {
108		compatible = "fixed-clock";
109		clock-frequency = <32768>;
110		clock-output-names = "xin32k";
111		#clock-cells = <0>;
112	};
113
114	wireless-bluetooth {
115		compatible = "bluetooth-platdata";
116		clocks = <&rk805 1>;
117		clock-names = "ext_clock";
118		uart_rts_gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
119		pinctrl-names = "default", "rts_gpio";
120		pinctrl-0 = <&uart11_rts>;
121		pinctrl-1 = <&uart11_rts_gpio>;
122		BT,reset_gpio    = <&gpio2 29 GPIO_ACTIVE_HIGH>;
123		BT,wake_gpio     = <&gpio3 27 GPIO_ACTIVE_HIGH>;
124		BT,wake_host_irq = <&gpio3 26 GPIO_ACTIVE_HIGH>;
125		status = "okay";
126	};
127
128	wireless-wlan {
129		compatible = "wlan-platdata";
130		rockchip,grf = <&grf>;
131		wifi_chip_type = "ap6255";
132		WIFI,host_wake_irq = <&gpio0 28 GPIO_ACTIVE_HIGH>;
133		status = "okay";
134	};
135
136	gpio_keys {
137		compatible = "gpio-keys";
138		#address-cells = <1>;
139		#size-cells = <0>;
140		autorepeat;
141
142		pinctrl-names = "default";
143		pinctrl-0 = <&pwr_key>;
144
145		power_key: power-key {
146			label = "GPIO Key Power";
147			gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
148			linux,code = <116>;
149			debounce-interval = <100>;
150			wakeup-source;
151		};
152	};
153};
154
155&firmware_android {
156	compatible = "android,firmware";
157	fstab {
158		compatible = "android,fstab";
159		system {
160			compatible = "android,system";
161			dev = "/dev/block/by-name/system";
162			type = "ext4";
163			mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
164			fsmgr_flags = "wait,verify";
165		};
166		vendor {
167			compatible = "android,vendor";
168			dev = "/dev/block/by-name/vendor";
169			type = "ext4";
170			mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
171			fsmgr_flags = "wait,verify";
172		};
173	};
174};
175
176&gpu {
177	status = "okay";
178	mali-supply = <&vdd_logic>;
179};
180
181&i2c0 {
182	status = "okay";
183
184	rk805: rk805@18 {
185		compatible = "rockchip,rk805";
186		status = "okay";
187		reg = <0x18>;
188		interrupt-parent = <&gpio1>;
189		interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
190		pinctrl-names = "default";
191		pinctrl-0 = <&pmic_int_l>;
192		rockchip,system-power-controller;
193		wakeup-source;
194		gpio-controller;
195		#gpio-cells = <2>;
196		#clock-cells = <1>;
197		clock-output-names = "rk805-clkout1", "rk805-clkout2";
198
199		rtc {
200			status = "okay";
201		};
202
203		pwrkey {
204			status = "okay";
205		};
206
207		gpio {
208			status = "okay";
209		};
210
211		regulators {
212			vdd_arm: DCDC_REG1 {
213				regulator-name = "vdd_arm";
214				regulator-min-microvolt = <712500>;
215				regulator-max-microvolt = <1450000>;
216				regulator-initial-mode = <0x1>;
217				regulator-ramp-delay = <12500>;
218				regulator-boot-on;
219				regulator-always-on;
220				regulator-state-mem {
221					regulator-mode = <0x2>;
222					regulator-on-in-suspend;
223					regulator-suspend-microvolt = <950000>;
224				};
225			};
226
227			vdd_logic: DCDC_REG2 {
228				regulator-name = "vdd_logic";
229				regulator-min-microvolt = <712500>;
230				regulator-max-microvolt = <1450000>;
231				regulator-initial-mode = <0x1>;
232				regulator-ramp-delay = <12500>;
233				regulator-boot-on;
234				regulator-always-on;
235				regulator-state-mem {
236					regulator-mode = <0x2>;
237					regulator-on-in-suspend;
238					regulator-suspend-microvolt = <1000000>;
239				};
240			};
241
242			vcc_ddr: DCDC_REG3 {
243				regulator-name = "vcc_ddr";
244				regulator-boot-on;
245				regulator-always-on;
246				regulator-state-mem {
247					regulator-mode = <0x2>;
248					regulator-on-in-suspend;
249				};
250			};
251
252			vcc_io: DCDC_REG4 {
253				regulator-name = "vcc_io";
254				regulator-min-microvolt = <3300000>;
255				regulator-max-microvolt = <3300000>;
256				regulator-initial-mode = <0x1>;
257				regulator-boot-on;
258				regulator-always-on;
259				regulator-state-mem {
260					regulator-mode = <0x2>;
261					regulator-on-in-suspend;
262					regulator-suspend-microvolt = <3300000>;
263				};
264			};
265
266			vcc_18: LDO_REG1 {
267				regulator-name = "vcc_18";
268				regulator-min-microvolt = <1800000>;
269				regulator-max-microvolt = <1800000>;
270				regulator-boot-on;
271				regulator-always-on;
272				regulator-state-mem {
273					regulator-on-in-suspend;
274					regulator-suspend-microvolt = <1800000>;
275				};
276			};
277
278			vcc_18emmc: LDO_REG2 {
279				regulator-name = "vcc_18emmc";
280				regulator-min-microvolt = <1800000>;
281				regulator-max-microvolt = <1800000>;
282				regulator-boot-on;
283				regulator-always-on;
284				regulator-state-mem {
285					regulator-on-in-suspend;
286					regulator-suspend-microvolt = <1800000>;
287				};
288			};
289
290			vdd_10: LDO_REG3 {
291				regulator-name = "vdd_10";
292				regulator-min-microvolt = <1000000>;
293				regulator-max-microvolt = <1000000>;
294				regulator-boot-on;
295				regulator-always-on;
296				regulator-state-mem {
297					regulator-on-in-suspend;
298					regulator-suspend-microvolt = <1000000>;
299				};
300			};
301		};
302	};
303};
304
305&cpu0 {
306	cpu-supply = <&vdd_arm>;
307};
308
309&io_domains {
310	status = "okay";
311
312	vccio1-supply = <&vcc_io>;
313	vccio2-supply = <&vcc_18>;
314	vccio4-supply = <&vcc_io>;
315};
316
317&pinctrl {
318	pmic {
319		pmic_int_l: pmic-int-l {
320			rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; /* gpio1_b4 */
321		};
322	};
323
324	sdio-pwrseq {
325		wifi_enable_h: wifi-enable-h {
326			rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
327		};
328	};
329
330	usb {
331		host_vbus_drv: host-vbus-drv {
332			rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
333		};
334
335		otg_vbus_drv: otg-vbus-drv {
336			rockchip,pins = <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
337		};
338	};
339
340	keys {
341		pwr_key: pwr-key {
342			rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
343		};
344	};
345};
346
347&sdio {
348	max-frequency = <150000000>;
349	mmc-pwrseq = <&sdio_pwrseq>;
350	num-slots = <1>;
351	sd-uhs-sdr104;
352	status = "okay";
353};
354
355&sdmmc {
356	status = "okay";
357};
358
359&u2phy0_host {
360	phy-supply = <&vcc_host>;
361};
362
363&u2phy0_otg {
364	vbus-supply = <&vcc_otg_vbus>;
365};
366
367&usb_host0_ehci {
368	status = "okay";
369};
370
371&usb_host0_ohci {
372	status = "okay";
373};
374