ARM: dts: rockchip: Add regulators for rk3288-vyasa
[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                 reg = <0x0 0x0 0x0 0x80000000>;
56                 device_type = "memory";
57         };
58
59         dc12_vbat: dc12-vbat {
60                 compatible = "regulator-fixed";
61                 regulator-name = "dc12_vbat";
62                 regulator-min-microvolt = <12000000>;
63                 regulator-max-microvolt = <12000000>;
64                 regulator-always-on;
65                 regulator-boot-on;
66         };
67
68         vboot_3v3: vboot-3v3 {
69                 compatible = "regulator-fixed";
70                 regulator-name = "vboot_3v3";
71                 regulator-min-microvolt = <3300000>;
72                 regulator-max-microvolt = <3300000>;
73                 regulator-always-on;
74                 regulator-boot-on;
75                 vin-supply = <&dc12_vbat>;
76         };
77
78         vcc_sys: vsys-regulator {
79                 compatible = "regulator-fixed";
80                 regulator-name = "vcc_sys";
81                 regulator-min-microvolt = <3700000>;
82                 regulator-max-microvolt = <3700000>;
83                 regulator-always-on;
84                 regulator-boot-on;
85                 vin-supply = <&dc12_vbat>;
86         };
87
88         vboot_5v: vboot-5v {
89                 compatible = "regulator-fixed";
90                 regulator-name = "vboot_sv";
91                 regulator-min-microvolt = <5000000>;
92                 regulator-max-microvolt = <5000000>;
93                 regulator-always-on;
94                 regulator-boot-on;
95                 vin-supply = <&dc12_vbat>;
96         };
97
98         v3g_3v3: v3g-3v3 {
99                 compatible = "regulator-fixed";
100                 regulator-name = "v3g_3v3";
101                 regulator-min-microvolt = <3300000>;
102                 regulator-max-microvolt = <3300000>;
103                 regulator-always-on;
104                 regulator-boot-on;
105                 vin-supply = <&dc12_vbat>;
106         };
107 };
108
109 &cpu0 {
110         cpu0-supply = <&vdd_cpu>;
111 };
112
113 &gpu {
114         mali-supply = <&vdd_gpu>;
115         status = "okay";
116 };
117
118 &hdmi {
119         ddc-i2c-bus = <&i2c2>;
120         status = "okay";
121 };
122
123 &i2c0 {
124         clock-frequency = <400000>;
125         status = "okay";
126
127         rk808: pmic@1b {
128                 compatible = "rockchip,rk808";
129                 reg = <0x1b>;
130                 interrupt-parent = <&gpio0>;
131                 interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
132                 #clock-cells = <1>;
133                 clock-output-names = "xin32k", "rk808-clkout2";
134                 pinctrl-names = "default";
135                 pinctrl-0 = <&pmic_int &global_pwroff>;
136                 rockchip,system-power-controller;
137                 wakeup-source;
138
139                 vcc1-supply = <&vcc_sys>;
140                 vcc2-supply = <&vcc_sys>;
141                 vcc3-supply = <&vcc_sys>;
142                 vcc4-supply = <&vcc_sys>;
143                 vcc6-supply = <&vcc_sys>;
144                 vcc7-supply = <&vcc_sys>;
145                 vcc8-supply = <&vcc_io>;
146                 vcc9-supply = <&vcc_sys>;
147                 vcc10-supply = <&vcc_sys>;
148                 vcc11-supply = <&vcc_sys>;
149                 vcc12-supply = <&vcc_io>;
150
151                 regulators {
152                         vdd_cpu: DCDC_REG1 {
153                                 regulator-name = "vdd_arm";
154                                 regulator-min-microvolt = <750000>;
155                                 regulator-max-microvolt = <1350000>;
156                                 regulator-always-on;
157                                 regulator-boot-on;
158                                 regulator-state-mem {
159                                         regulator-off-in-suspend;
160                                 };
161                         };
162
163                         vdd_gpu: DCDC_REG2 {
164                                 regulator-name = "vdd_gpu";
165                                 regulator-min-microvolt = <850000>;
166                                 regulator-max-microvolt = <1250000>;
167                                 regulator-always-on;
168                                 regulator-boot-on;
169                                 regulator-state-mem {
170                                         regulator-on-in-suspend;
171                                         regulator-suspend-microvolt = <1000000>;
172                                 };
173                         };
174
175                         vcc_ddr: DCDC_REG3 {
176                                 regulator-name = "vcc_ddr";
177                                 regulator-always-on;
178                                 regulator-boot-on;
179                                 regulator-state-mem {
180                                         regulator-on-in-suspend;
181                                 };
182                         };
183
184                         vcc_io: DCDC_REG4 {
185                                 regulator-name = "vcc_io";
186                                 regulator-min-microvolt = <3300000>;
187                                 regulator-max-microvolt = <3300000>;
188                                 regulator-always-on;
189                                 regulator-boot-on;
190                                 regulator-state-mem {
191                                         regulator-on-in-suspend;
192                                         regulator-suspend-microvolt = <3300000>;
193                                 };
194                         };
195
196                         vcca_tp: LDO_REG1 {
197                                 regulator-name = "vcc_tp";
198                                 regulator-min-microvolt = <3300000>;
199                                 regulator-max-microvolt = <3300000>;
200                                 regulator-always-on;
201                                 regulator-boot-on;
202                                 regulator-state-mem {
203                                         regulator-on-in-suspend;
204                                         regulator-suspend-microvolt = <3300000>;
205                                 };
206                         };
207
208                         vcc_codec: LDO_REG2 {
209                                 regulator-name = "vcc_codec";
210                                 regulator-min-microvolt = <3300000>;
211                                 regulator-max-microvolt = <3300000>;
212                                 regulator-always-on;
213                                 regulator-boot-on;
214                                 regulator-state-mem {
215                                         regulator-off-in-suspend;
216                                 };
217                         };
218
219                         vdd_10: LDO_REG3 {
220                                 regulator-name = "vdd_10";
221                                 regulator-min-microvolt = <1000000>;
222                                 regulator-max-microvolt = <1000000>;
223                                 regulator-always-on;
224                                 regulator-boot-on;
225                                 regulator-state-mem {
226                                         regulator-on-in-suspend;
227                                         regulator-suspend-microvolt = <1000000>;
228                                 };
229                         };
230
231                         vcc_gps: LDO_REG4 {
232                                 regulator-name = "vcc_gps";
233                                 regulator-min-microvolt = <1800000>;
234                                 regulator-max-microvolt = <1800000>;
235                                 regulator-always-on;
236                                 regulator-boot-on;
237                                 regulator-state-mem {
238                                         regulator-on-in-suspend;
239                                         regulator-suspend-microvolt = <1800000>;
240                                 };
241                         };
242
243                         vccio_sd: LDO_REG5 {
244                                 regulator-name = "vccio_sd";
245                                 regulator-min-microvolt = <1800000>;
246                                 regulator-max-microvolt = <3300000>;
247                                 regulator-always-on;
248                                 regulator-boot-on;
249                                 regulator-state-mem {
250                                         regulator-on-in-suspend;
251                                         regulator-suspend-microvolt = <3300000>;
252                                 };
253                         };
254
255                         vcc10_lcd: LDO_REG6 {
256                                 regulator-name = "vcc10_lcd";
257                                 regulator-min-microvolt = <1000000>;
258                                 regulator-max-microvolt = <1000000>;
259                                 regulator-always-on;
260                                 regulator-boot-on;
261                                 regulator-state-mem {
262                                         regulator-on-in-suspend;
263                                         regulator-suspend-microvolt = <1800000>;
264                                 };
265                         };
266
267                         vcc_18: LDO_REG7 {
268                                 regulator-name = "vcc_18";
269                                 regulator-min-microvolt = <1800000>;
270                                 regulator-max-microvolt = <1800000>;
271                                 regulator-always-on;
272                                 regulator-boot-on;
273                                 regulator-state-mem {
274                                         regulator-on-in-suspend;
275                                         regulator-suspend-microvolt = <1800000>;
276                                 };
277                         };
278
279                         vcc18_lcd: LDO_REG8 {
280                                 regulator-name = "vcc18_lcd";
281                                 regulator-min-microvolt = <1800000>;
282                                 regulator-max-microvolt = <1800000>;
283                                 regulator-always-on;
284                                 regulator-boot-on;
285                                 regulator-state-mem {
286                                         regulator-on-in-suspend;
287                                         regulator-suspend-microvolt = <1800000>;
288                                 };
289                         };
290
291                         vcc_sd: SWITCH_REG1 {
292                                 regulator-name = "vcc_sd";
293                                 regulator-min-microvolt = <3300000>;
294                                 regulator-max-microvolt = <3300000>;
295                                 regulator-always-on;
296                                 regulator-boot-on;
297                                 regulator-state-mem {
298                                         regulator-on-in-suspend;
299                                 };
300                         };
301
302                         vcc_lan: SWITCH_REG2 {
303                                 regulator-name = "vcc_lan";
304                                 regulator-min-microvolt = <3300000>;
305                                 regulator-max-microvolt = <3300000>;
306                                 regulator-always-on;
307                                 regulator-boot-on;
308                                 regulator-state-mem {
309                                         regulator-on-in-suspend;
310                                 };
311                         };
312                 };
313         };
314 };
315
316 &i2c2 {
317         status = "okay";
318 };
319
320 &sdmmc {
321         bus-width = <4>;
322         cap-mmc-highspeed;
323         cap-sd-highspeed;
324         card-detect-delay = <200>;
325         disable-wp;
326         pinctrl-names = "default";
327         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
328         vmmc-supply = <&vcc_sd>;
329         vqmmc-supply = <&vccio_sd>;
330         status = "okay";
331 };
332
333 &uart2 {
334         status = "okay";
335 };
336
337 &vopb {
338         status = "okay";
339 };
340
341 &vopb_mmu {
342         status = "okay";
343 };
344
345 &vopl {
346         status = "okay";
347 };
348
349 &vopl_mmu {
350         status = "okay";
351 };
352
353 &wdt {
354         status = "okay";
355 };
356
357 &pinctrl {
358         pmic {
359                 pmic_int: pmic-int {
360                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
361                 };
362         };
363 };