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