Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[sfrench/cifs-2.6.git] / arch / arm / boot / 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         vsus_5v: vsus-5v {
109                 compatible = "regulator-fixed";
110                 regulator-name = "vsus_5v";
111                 regulator-min-microvolt = <5000000>;
112                 regulator-max-microvolt = <5000000>;
113                 regulator-always-on;
114                 regulator-boot-on;
115                 vin-supply = <&vcc_io>;
116         };
117
118         vusb1_5v: vusb1-5v {
119                 compatible = "regulator-fixed";
120                 regulator-name = "vusb1_5v";
121                 enable-active-high;
122                 gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; /* OTG_VBUS_DRV */
123                 pinctrl-names = "default";
124                 pinctrl-0 = <&otg_vbus_drv>;
125                 regulator-min-microvolt = <5000000>;
126                 regulator-max-microvolt = <5000000>;
127                 regulator-always-on;
128                 regulator-boot-on;
129                 vin-supply = <&vsus_5v>;
130         };
131
132         vusb2_5v: vusb2-5v {
133                 compatible = "regulator-fixed";
134                 regulator-name = "vusb2_5v";
135                 enable-active-high;
136                 gpio = <&gpio8 RK_PB1 GPIO_ACTIVE_HIGH>; /* USB2_PWR_EN */
137                 pinctrl-names = "default";
138                 pinctrl-0 = <&usb2_pwr_en>;
139                 regulator-min-microvolt = <5000000>;
140                 regulator-max-microvolt = <5000000>;
141                 regulator-always-on;
142                 regulator-boot-on;
143                 vin-supply = <&vsus_5v>;
144         };
145
146         ext_gmac: external-gmac-clock {
147                 compatible = "fixed-clock";
148                 #clock-cells = <0>;
149                 clock-frequency = <125000000>;
150                 clock-output-names = "ext_gmac";
151         };
152 };
153
154 &cpu0 {
155         cpu0-supply = <&vdd_cpu>;
156 };
157
158 &gmac {
159         assigned-clocks = <&cru SCLK_MAC>;
160         assigned-clock-parents = <&ext_gmac>;
161         clock_in_out = "input";
162         pinctrl-names = "default";
163         pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
164         phy-supply = <&vcc_lan>;
165         phy-mode = "rgmii";
166         snps,reset-active-low;
167         snps,reset-delays-us = <0 10000 1000000>;
168         snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
169         tx_delay = <0x30>;
170         rx_delay = <0x10>;
171         status = "okay";
172 };
173
174 &gpu {
175         mali-supply = <&vdd_gpu>;
176         status = "okay";
177 };
178
179 &hdmi {
180         ddc-i2c-bus = <&i2c2>;
181         status = "okay";
182 };
183
184 &i2c0 {
185         clock-frequency = <400000>;
186         status = "okay";
187
188         rk808: pmic@1b {
189                 compatible = "rockchip,rk808";
190                 reg = <0x1b>;
191                 interrupt-parent = <&gpio0>;
192                 interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
193                 #clock-cells = <1>;
194                 clock-output-names = "xin32k", "rk808-clkout2";
195                 pinctrl-names = "default";
196                 pinctrl-0 = <&pmic_int &global_pwroff>;
197                 rockchip,system-power-controller;
198                 wakeup-source;
199
200                 vcc1-supply = <&vcc_sys>;
201                 vcc2-supply = <&vcc_sys>;
202                 vcc3-supply = <&vcc_sys>;
203                 vcc4-supply = <&vcc_sys>;
204                 vcc6-supply = <&vcc_sys>;
205                 vcc7-supply = <&vcc_sys>;
206                 vcc8-supply = <&vcc_io>;
207                 vcc9-supply = <&vcc_sys>;
208                 vcc10-supply = <&vcc_sys>;
209                 vcc11-supply = <&vcc_sys>;
210                 vcc12-supply = <&vcc_io>;
211
212                 regulators {
213                         vdd_cpu: DCDC_REG1 {
214                                 regulator-name = "vdd_arm";
215                                 regulator-min-microvolt = <750000>;
216                                 regulator-max-microvolt = <1350000>;
217                                 regulator-always-on;
218                                 regulator-boot-on;
219                                 regulator-state-mem {
220                                         regulator-off-in-suspend;
221                                 };
222                         };
223
224                         vdd_gpu: DCDC_REG2 {
225                                 regulator-name = "vdd_gpu";
226                                 regulator-min-microvolt = <850000>;
227                                 regulator-max-microvolt = <1250000>;
228                                 regulator-always-on;
229                                 regulator-boot-on;
230                                 regulator-state-mem {
231                                         regulator-on-in-suspend;
232                                         regulator-suspend-microvolt = <1000000>;
233                                 };
234                         };
235
236                         vcc_ddr: DCDC_REG3 {
237                                 regulator-name = "vcc_ddr";
238                                 regulator-always-on;
239                                 regulator-boot-on;
240                                 regulator-state-mem {
241                                         regulator-on-in-suspend;
242                                 };
243                         };
244
245                         vcc_io: DCDC_REG4 {
246                                 regulator-name = "vcc_io";
247                                 regulator-min-microvolt = <3300000>;
248                                 regulator-max-microvolt = <3300000>;
249                                 regulator-always-on;
250                                 regulator-boot-on;
251                                 regulator-state-mem {
252                                         regulator-on-in-suspend;
253                                         regulator-suspend-microvolt = <3300000>;
254                                 };
255                         };
256
257                         vcca_tp: LDO_REG1 {
258                                 regulator-name = "vcc_tp";
259                                 regulator-min-microvolt = <3300000>;
260                                 regulator-max-microvolt = <3300000>;
261                                 regulator-always-on;
262                                 regulator-boot-on;
263                                 regulator-state-mem {
264                                         regulator-on-in-suspend;
265                                         regulator-suspend-microvolt = <3300000>;
266                                 };
267                         };
268
269                         vcc_codec: LDO_REG2 {
270                                 regulator-name = "vcc_codec";
271                                 regulator-min-microvolt = <3300000>;
272                                 regulator-max-microvolt = <3300000>;
273                                 regulator-always-on;
274                                 regulator-boot-on;
275                                 regulator-state-mem {
276                                         regulator-off-in-suspend;
277                                 };
278                         };
279
280                         vdd_10: LDO_REG3 {
281                                 regulator-name = "vdd_10";
282                                 regulator-min-microvolt = <1000000>;
283                                 regulator-max-microvolt = <1000000>;
284                                 regulator-always-on;
285                                 regulator-boot-on;
286                                 regulator-state-mem {
287                                         regulator-on-in-suspend;
288                                         regulator-suspend-microvolt = <1000000>;
289                                 };
290                         };
291
292                         vcc_gps: LDO_REG4 {
293                                 regulator-name = "vcc_gps";
294                                 regulator-min-microvolt = <1800000>;
295                                 regulator-max-microvolt = <1800000>;
296                                 regulator-always-on;
297                                 regulator-boot-on;
298                                 regulator-state-mem {
299                                         regulator-on-in-suspend;
300                                         regulator-suspend-microvolt = <1800000>;
301                                 };
302                         };
303
304                         vccio_sd: LDO_REG5 {
305                                 regulator-name = "vccio_sd";
306                                 regulator-min-microvolt = <1800000>;
307                                 regulator-max-microvolt = <3300000>;
308                                 regulator-always-on;
309                                 regulator-boot-on;
310                                 regulator-state-mem {
311                                         regulator-on-in-suspend;
312                                         regulator-suspend-microvolt = <3300000>;
313                                 };
314                         };
315
316                         vcc10_lcd: LDO_REG6 {
317                                 regulator-name = "vcc10_lcd";
318                                 regulator-min-microvolt = <1000000>;
319                                 regulator-max-microvolt = <1000000>;
320                                 regulator-always-on;
321                                 regulator-boot-on;
322                                 regulator-state-mem {
323                                         regulator-on-in-suspend;
324                                         regulator-suspend-microvolt = <1800000>;
325                                 };
326                         };
327
328                         vcc_18: LDO_REG7 {
329                                 regulator-name = "vcc_18";
330                                 regulator-min-microvolt = <1800000>;
331                                 regulator-max-microvolt = <1800000>;
332                                 regulator-always-on;
333                                 regulator-boot-on;
334                                 regulator-state-mem {
335                                         regulator-on-in-suspend;
336                                         regulator-suspend-microvolt = <1800000>;
337                                 };
338                         };
339
340                         vcc18_lcd: LDO_REG8 {
341                                 regulator-name = "vcc18_lcd";
342                                 regulator-min-microvolt = <1800000>;
343                                 regulator-max-microvolt = <1800000>;
344                                 regulator-always-on;
345                                 regulator-boot-on;
346                                 regulator-state-mem {
347                                         regulator-on-in-suspend;
348                                         regulator-suspend-microvolt = <1800000>;
349                                 };
350                         };
351
352                         vcc_sd: SWITCH_REG1 {
353                                 regulator-name = "vcc_sd";
354                                 regulator-min-microvolt = <3300000>;
355                                 regulator-max-microvolt = <3300000>;
356                                 regulator-always-on;
357                                 regulator-boot-on;
358                                 regulator-state-mem {
359                                         regulator-on-in-suspend;
360                                 };
361                         };
362
363                         vcc_lan: SWITCH_REG2 {
364                                 regulator-name = "vcc_lan";
365                                 regulator-min-microvolt = <3300000>;
366                                 regulator-max-microvolt = <3300000>;
367                                 regulator-always-on;
368                                 regulator-boot-on;
369                                 regulator-state-mem {
370                                         regulator-on-in-suspend;
371                                 };
372                         };
373                 };
374         };
375 };
376
377 &i2c2 {
378         status = "okay";
379 };
380
381 &io_domains {
382         status = "okay";
383
384         audio-supply = <&vcc_18>;
385         bb-supply = <&vcc_io>;
386         dvp-supply = <&vcc_io>;
387         flash0-suuply = <&vcc_18>;
388         flash1-supply = <&vcc_lan>;
389         gpio30-supply = <&vcc_io>;
390         gpio1830 = <&vcc_io>;
391         lcdc-supply = <&vcc_io>;
392         sdcard-supply = <&vccio_sd>;
393         wifi-supply = <&vcc_18>;
394 };
395
396 &sdmmc {
397         bus-width = <4>;
398         cap-mmc-highspeed;
399         cap-sd-highspeed;
400         card-detect-delay = <200>;
401         disable-wp;
402         pinctrl-names = "default";
403         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
404         vmmc-supply = <&vcc_sd>;
405         vqmmc-supply = <&vccio_sd>;
406         status = "okay";
407 };
408
409 &tsadc {
410         rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
411         rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
412         status = "okay";
413 };
414
415 &uart2 {
416         status = "okay";
417 };
418
419 &usbphy {
420         status = "okay";
421 };
422
423 &usb_host0_ehci {
424         status = "okay";
425 };
426
427 &usb_host1 {
428         pinctrl-names = "default";
429         pinctrl-0 = <&phy_pwr_en>;
430         status = "okay";
431 };
432
433 &usb_otg {
434         status = "okay";
435 };
436
437 &vopb {
438         status = "okay";
439 };
440
441 &vopb_mmu {
442         status = "okay";
443 };
444
445 &vopl {
446         status = "okay";
447 };
448
449 &vopl_mmu {
450         status = "okay";
451 };
452
453 &wdt {
454         status = "okay";
455 };
456
457 &pinctrl {
458         pcfg_output_high: pcfg-output-high {
459                 output-high;
460         };
461
462         gmac {
463                 phy_int: phy-int {
464                         rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
465                 };
466
467                 phy_pmeb: phy-pmeb {
468                         rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
469                 };
470
471                 phy_rst: phy-rst {
472                         rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>;
473                 };
474         };
475
476         pmic {
477                 pmic_int: pmic-int {
478                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
479                 };
480         };
481
482         usb_host {
483                 phy_pwr_en: phy-pwr-en {
484                         rockchip,pins = <RK_GPIO2 RK_PB1 RK_FUNC_GPIO &pcfg_output_high>;
485                 };
486
487                 usb2_pwr_en: usb2-pwr-en {
488                         rockchip,pins = <8 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
489                 };
490         };
491
492         usb_otg {
493                 otg_vbus_drv: otg-vbus-drv {
494                         rockchip,pins = <RK_GPIO0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
495
496                 };
497         };
498 };