xref: /OK3568_Linux_fs/u-boot/arch/arm/dts/rk3288-vyasa.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1/*
2 * Copyright (C) 2017 Jagan Teki <jagan@amarulasolutions.com>
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#include "rk3288.dtsi"
45#include "rk3288-u-boot.dtsi"
46
47/ {
48	model = "Amarula Vyasa-RK3288";
49	compatible = "amarula,vyasa-rk3288", "rockchip,rk3288";
50
51	chosen {
52		stdout-path = &uart2;
53	};
54
55	memory {
56		device_type = "memory";
57		reg = <0 0x80000000>;
58	};
59
60	vcc_sd: sdmmc-regulator {
61		compatible = "regulator-fixed";
62		gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
63		pinctrl-names = "default";
64		pinctrl-0 = <&sdmmc_pwr>;
65		regulator-name = "vcc_sd";
66		regulator-min-microvolt = <3300000>;
67		regulator-max-microvolt = <3300000>;
68		startup-delay-us = <100000>;
69		vin-supply = <&vcc_io>;
70	};
71
72	vcc_sys: vsys-regulator {
73		compatible = "regulator-fixed";
74		regulator-name = "vcc_sys";
75		regulator-min-microvolt = <5000000>;
76		regulator-max-microvolt = <5000000>;
77		regulator-always-on;
78		regulator-boot-on;
79	};
80};
81
82&dmc {
83	rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
84		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
85		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
86		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
87		0x5 0x0>;
88	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
89		0xa60 0x40 0x10 0x0>;
90	/* Add a dummy value to cause of-platdata think this is bytes */
91	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
92};
93
94&cpu0 {
95	cpu0-supply = <&vdd_cpu>;
96};
97
98&i2c0 {
99	clock-frequency = <400000>;
100	status = "okay";
101
102	rk808: pmic@1b {
103		compatible = "rockchip,rk808";
104		reg = <0x1b>;
105		interrupt-parent = <&gpio0>;
106		interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
107		pinctrl-names = "default";
108		pinctrl-0 = <&pmic_int &global_pwroff>;
109		wakeup-source;
110		rockchip,system-power-controller;
111		#clock-cells = <1>;
112		clock-output-names = "xin32k", "rk808-clkout2";
113
114		vcc1-supply = <&vcc_sys>;
115		vcc2-supply = <&vcc_sys>;
116		vcc3-supply = <&vcc_sys>;
117		vcc4-supply = <&vcc_sys>;
118		vcc6-supply = <&vcc_sys>;
119		vcc7-supply = <&vcc_sys>;
120		vcc8-supply = <&vcc_io>;
121		vcc9-supply = <&vcc_sys>;
122		vcc10-supply = <&vcc_sys>;
123		vcc11-supply = <&vcc_sys>;
124		vcc12-supply = <&vcc_io>;
125
126		regulators {
127			vdd_cpu: vdd_log: DCDC_REG1 {
128				regulator-always-on;
129				regulator-boot-on;
130				regulator-min-microvolt = <750000>;
131				regulator-max-microvolt = <1350000>;
132				regulator-name = "vdd_log";
133				regulator-state-mem {
134					regulator-off-in-suspend;
135				};
136			};
137
138			vdd_gpu: DCDC_REG2 {
139				regulator-always-on;
140				regulator-boot-on;
141				regulator-min-microvolt = <850000>;
142				regulator-max-microvolt = <1250000>;
143				regulator-name = "vdd_gpu";
144				regulator-state-mem {
145					regulator-on-in-suspend;
146					regulator-suspend-microvolt = <1000000>;
147				};
148			};
149
150			vcc_ddr: DCDC_REG3 {
151				regulator-always-on;
152				regulator-boot-on;
153				regulator-name = "vcc_ddr";
154				regulator-state-mem {
155					regulator-on-in-suspend;
156				};
157			};
158
159			vcc_io: DCDC_REG4 {
160				regulator-always-on;
161				regulator-boot-on;
162				regulator-min-microvolt = <3300000>;
163				regulator-max-microvolt = <3300000>;
164				regulator-name = "vcc_io";
165				regulator-state-mem {
166					regulator-on-in-suspend;
167					regulator-suspend-microvolt = <3300000>;
168				};
169			};
170
171			vcca_tp: LDO_REG1 {
172				regulator-always-on;
173				regulator-boot-on;
174				regulator-min-microvolt = <3300000>;
175				regulator-max-microvolt = <3300000>;
176				regulator-name = "vcc_tp";
177				regulator-state-mem {
178					regulator-on-in-suspend;
179					regulator-suspend-microvolt = <3300000>;
180				};
181			};
182
183			vcc_codec: LDO_REG2 {
184				regulator-always-on;
185				regulator-boot-on;
186				regulator-min-microvolt = <3300000>;
187				regulator-max-microvolt = <3300000>;
188				regulator-name = "vcc_codec";
189				regulator-state-mem {
190					regulator-off-in-suspend;
191				};
192			};
193
194			vdd_10: LDO_REG3 {
195				regulator-always-on;
196				regulator-boot-on;
197				regulator-min-microvolt = <1000000>;
198				regulator-max-microvolt = <1000000>;
199				regulator-name = "vdd_10";
200				regulator-state-mem {
201					regulator-on-in-suspend;
202					regulator-suspend-microvolt = <1000000>;
203				};
204			};
205
206			vcc_gps: LDO_REG4 {
207				regulator-always-on;
208				regulator-boot-on;
209				regulator-min-microvolt = <1800000>;
210				regulator-max-microvolt = <1800000>;
211				regulator-name = "vcc_gps";
212				regulator-state-mem {
213					regulator-on-in-suspend;
214					regulator-suspend-microvolt = <1800000>;
215				};
216			};
217
218			vccio_sd: LDO_REG5 {
219				regulator-always-on;
220				regulator-boot-on;
221				regulator-min-microvolt = <1800000>;
222				regulator-max-microvolt = <3300000>;
223				regulator-name = "vccio_sd";
224				regulator-state-mem {
225					regulator-on-in-suspend;
226					regulator-suspend-microvolt = <3300000>;
227				};
228			};
229
230			vcc10_lcd: LDO_REG6 {
231				regulator-always-on;
232				regulator-boot-on;
233				regulator-min-microvolt = <1000000>;
234				regulator-max-microvolt = <1000000>;
235				regulator-name = "vcc10_lcd";
236				regulator-state-mem {
237					regulator-on-in-suspend;
238					regulator-suspend-microvolt = <1800000>;
239				};
240			};
241
242			vcc_18: LDO_REG7 {
243				regulator-always-on;
244				regulator-boot-on;
245				regulator-min-microvolt = <1800000>;
246				regulator-max-microvolt = <1800000>;
247				regulator-name = "vcc_18";
248				regulator-state-mem {
249					regulator-on-in-suspend;
250					regulator-suspend-microvolt = <1800000>;
251				};
252			};
253
254			vcc18_lcd: LDO_REG8 {
255				regulator-always-on;
256				regulator-boot-on;
257				regulator-min-microvolt = <1800000>;
258				regulator-max-microvolt = <1800000>;
259				regulator-name = "vcc18_lcd";
260				regulator-state-mem {
261					regulator-on-in-suspend;
262					regulator-suspend-microvolt = <1800000>;
263				};
264			};
265
266			vcc33_sd: SWITCH_REG1 {
267				regulator-always-on;
268				regulator-boot-on;
269				regulator-min-microvolt = <3300000>;
270				regulator-max-microvolt = <3300000>;
271				regulator-name = "vcc33_sd";
272				regulator-state-mem {
273					regulator-on-in-suspend;
274				};
275			};
276
277			vcc_lan: SWITCH_REG2 {
278				regulator-always-on;
279				regulator-boot-on;
280				regulator-min-microvolt = <3300000>;
281				regulator-max-microvolt = <3300000>;
282				regulator-name = "vcc_lan";
283				regulator-state-mem {
284					regulator-on-in-suspend;
285				};
286			};
287		};
288	};
289};
290
291&sdmmc {
292	u-boot,dm-pre-reloc;
293	status = "okay";
294
295	bus-width = <4>;
296	cap-mmc-highspeed;
297	cap-sd-highspeed;
298	card-detect-delay = <200>;
299	disable-wp;
300	pinctrl-names = "default";
301	pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
302	vmmc-supply = <&vcc_sd>;
303	vqmmc-supply = <&vccio_sd>;
304};
305
306&uart2 {
307	u-boot,dm-pre-reloc;
308	status = "okay";
309};
310
311&wdt {
312	status = "okay";
313};
314
315&pinctrl {
316	u-boot,dm-pre-reloc;
317	pmic {
318		pmic_int: pmic-int {
319			rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
320		};
321	};
322
323	sdmmc {
324		sdmmc_pwr: sdmmc-pwr {
325			rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
326		};
327	};
328};
329