Merge tag 'edac_for_5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / rk3288-popmetal.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2014, 2015 Andy Yan <andy.yan@rock-chips.com>
4  */
5
6 /dts-v1/;
7 #include <dt-bindings/input/input.h>
8 #include "rk3288.dtsi"
9
10 / {
11         model = "PopMetal-RK3288";
12         compatible = "chipspark,popmetal-rk3288", "rockchip,rk3288";
13
14         memory@0 {
15                 device_type = "memory";
16                 reg = <0x0 0x0 0x0 0x80000000>;
17         };
18
19         ext_gmac: external-gmac-clock {
20                 compatible = "fixed-clock";
21                 clock-frequency = <125000000>;
22                 clock-output-names = "ext_gmac";
23                 #clock-cells = <0>;
24         };
25
26         gpio-keys {
27                 compatible = "gpio-keys";
28                 autorepeat;
29
30                 pinctrl-names = "default";
31                 pinctrl-0 = <&pwrbtn>;
32
33                 power {
34                         gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
35                         linux,code = <KEY_POWER>;
36                         label = "GPIO Key Power";
37                         linux,input-type = <1>;
38                         wakeup-source;
39                         debounce-interval = <100>;
40                 };
41         };
42
43         ir: ir-receiver {
44                 compatible = "gpio-ir-receiver";
45                 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
46                 pinctrl-names = "default";
47                 pinctrl-0 = <&ir_int>;
48         };
49
50         vcc_flash: flash-regulator {
51                 compatible = "regulator-fixed";
52                 regulator-name = "vcc_flash";
53                 regulator-min-microvolt = <1800000>;
54                 regulator-max-microvolt = <1800000>;
55                 vin-supply = <&vcc_io>;
56         };
57
58         vcc_sd: sdmmc-regulator {
59                 compatible = "regulator-fixed";
60                 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
61                 pinctrl-names = "default";
62                 pinctrl-0 = <&sdmmc_pwr>;
63                 regulator-name = "vcc_sd";
64                 regulator-min-microvolt = <3300000>;
65                 regulator-max-microvolt = <3300000>;
66                 startup-delay-us = <100000>;
67                 vin-supply = <&vcc_io>;
68         };
69
70         vcc_sys: vsys-regulator {
71                 compatible = "regulator-fixed";
72                 regulator-name = "vcc_sys";
73                 regulator-min-microvolt = <5000000>;
74                 regulator-max-microvolt = <5000000>;
75                 regulator-always-on;
76                 regulator-boot-on;
77         };
78
79         /*
80          * A PT5128 creates both dovdd_1v8 and vcc28_dvp, controlled
81          * by the dvp_pwr pin.
82          */
83         vcc18_dvp: vcc18-dvp-regulator {
84                 compatible = "regulator-fixed";
85                 regulator-name = "vcc18-dvp";
86                 regulator-min-microvolt = <1800000>;
87                 regulator-max-microvolt = <1800000>;
88                 vin-supply = <&vcc28_dvp>;
89         };
90
91         vcc28_dvp: vcc28-dvp-regulator {
92                 compatible = "regulator-fixed";
93                 enable-active-high;
94                 gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
95                 pinctrl-names = "default";
96                 pinctrl-0 = <&dvp_pwr>;
97                 regulator-name = "vcc28_dvp";
98                 regulator-min-microvolt = <2800000>;
99                 regulator-max-microvolt = <2800000>;
100                 regulator-always-on;
101                 vin-supply = <&vcc_io>;
102         };
103 };
104
105 &cpu0 {
106         cpu0-supply = <&vdd_cpu>;
107 };
108
109 &emmc {
110         bus-width = <8>;
111         cap-mmc-highspeed;
112         mmc-ddr-1_8v;
113         mmc-hs200-1_8v;
114         non-removable;
115         pinctrl-names = "default";
116         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
117         vmmc-supply = <&vcc_io>;
118         vqmmc-supply = <&vcc_flash>;
119         status = "okay";
120 };
121
122 &sdmmc {
123         bus-width = <4>;
124         cap-mmc-highspeed;
125         cap-sd-highspeed;
126         card-detect-delay = <200>;
127         disable-wp;                     /* wp not hooked up */
128         pinctrl-names = "default";
129         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
130         sd-uhs-sdr12;
131         sd-uhs-sdr25;
132         sd-uhs-sdr50;
133         sd-uhs-sdr104;
134         vmmc-supply = <&vcc_sd>;
135         vqmmc-supply = <&vccio_sd>;
136         status = "okay";
137 };
138
139 &gmac {
140         phy-supply = <&vcc_lan>;
141         phy-mode = "rgmii";
142         clock_in_out = "input";
143         snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
144         snps,reset-active-low;
145         snps,reset-delays-us = <0 10000 1000000>;
146         assigned-clocks = <&cru SCLK_MAC>;
147         assigned-clock-parents = <&ext_gmac>;
148         pinctrl-names = "default";
149         pinctrl-0 = <&rgmii_pins>;
150         tx_delay = <0x30>;
151         rx_delay = <0x10>;
152         status = "ok";
153 };
154
155 &hdmi {
156         ddc-i2c-bus = <&i2c5>;
157         status = "okay";
158 };
159
160 &i2c0 {
161         status = "okay";
162         clock-frequency = <400000>;
163
164         rk808: pmic@1b {
165                 compatible = "rockchip,rk808";
166                 reg = <0x1b>;
167                 interrupt-parent = <&gpio0>;
168                 interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
169                 pinctrl-names = "default";
170                 pinctrl-0 = <&pmic_int &global_pwroff>;
171                 rockchip,system-power-controller;
172                 wakeup-source;
173                 #clock-cells = <1>;
174                 clock-output-names = "xin32k", "rk808-clkout2";
175
176                 vcc1-supply = <&vcc_sys>;
177                 vcc2-supply = <&vcc_sys>;
178                 vcc3-supply = <&vcc_sys>;
179                 vcc4-supply = <&vcc_sys>;
180                 vcc6-supply = <&vcc_sys>;
181                 vcc7-supply = <&vcc_sys>;
182                 vcc8-supply = <&vcc_18>;
183                 vcc9-supply = <&vcc_io>;
184                 vcc10-supply = <&vcc_io>;
185                 vcc11-supply = <&vcc_sys>;
186                 vcc12-supply = <&vcc_io>;
187                 vddio-supply = <&vcc_io>;
188
189                 regulators {
190                         vdd_cpu: DCDC_REG1 {
191                                 regulator-always-on;
192                                 regulator-boot-on;
193                                 regulator-min-microvolt = <750000>;
194                                 regulator-max-microvolt = <1350000>;
195                                 regulator-name = "vdd_arm";
196                                 regulator-state-mem {
197                                         regulator-off-in-suspend;
198                                 };
199                         };
200
201                         vdd_gpu: DCDC_REG2 {
202                                 regulator-always-on;
203                                 regulator-boot-on;
204                                 regulator-min-microvolt = <850000>;
205                                 regulator-max-microvolt = <1250000>;
206                                 regulator-name = "vdd_gpu";
207                                 regulator-state-mem {
208                                         regulator-on-in-suspend;
209                                         regulator-suspend-microvolt = <1000000>;
210                                 };
211                         };
212
213                         vcc_ddr: DCDC_REG3 {
214                                 regulator-always-on;
215                                 regulator-boot-on;
216                                 regulator-name = "vcc_ddr";
217                                 regulator-state-mem {
218                                         regulator-on-in-suspend;
219                                 };
220                         };
221
222                         vcc_io: DCDC_REG4 {
223                                 regulator-always-on;
224                                 regulator-boot-on;
225                                 regulator-min-microvolt = <3300000>;
226                                 regulator-max-microvolt = <3300000>;
227                                 regulator-name = "vcc_io";
228                                 regulator-state-mem {
229                                         regulator-on-in-suspend;
230                                         regulator-suspend-microvolt = <3300000>;
231                                 };
232                         };
233
234                         vcc_lan: LDO_REG1 {
235                                 regulator-always-on;
236                                 regulator-boot-on;
237                                 regulator-min-microvolt = <3300000>;
238                                 regulator-max-microvolt = <3300000>;
239                                 regulator-name = "vcc_lan";
240                                 regulator-state-mem {
241                                         regulator-on-in-suspend;
242                                         regulator-suspend-microvolt = <3300000>;
243                                 };
244                         };
245
246                         vccio_sd: LDO_REG2 {
247                                 regulator-always-on;
248                                 regulator-boot-on;
249                                 regulator-min-microvolt = <1800000>;
250                                 regulator-max-microvolt = <3300000>;
251                                 regulator-name = "vccio_sd";
252                                 regulator-state-mem {
253                                         regulator-off-in-suspend;
254                                 };
255                         };
256
257                         vdd_10: LDO_REG3 {
258                                 regulator-always-on;
259                                 regulator-boot-on;
260                                 regulator-min-microvolt = <1000000>;
261                                 regulator-max-microvolt = <1000000>;
262                                 regulator-name = "vdd_10";
263                                 regulator-state-mem {
264                                         regulator-on-in-suspend;
265                                         regulator-suspend-microvolt = <1000000>;
266                                 };
267                         };
268
269                         vcc18_lcd: LDO_REG4 {
270                                 regulator-always-on;
271                                 regulator-boot-on;
272                                 regulator-min-microvolt = <1800000>;
273                                 regulator-max-microvolt = <1800000>;
274                                 regulator-name = "vcc18_lcd";
275                                 regulator-state-mem {
276                                         regulator-on-in-suspend;
277                                         regulator-suspend-microvolt = <1800000>;
278                                 };
279                         };
280
281                         ldo5: LDO_REG5 {
282                                 regulator-always-on;
283                                 regulator-min-microvolt = <1800000>;
284                                 regulator-max-microvolt = <3300000>;
285                                 regulator-name = "ldo5";
286                         };
287
288                         vdd10_lcd: LDO_REG6 {
289                                 regulator-always-on;
290                                 regulator-boot-on;
291                                 regulator-min-microvolt = <1000000>;
292                                 regulator-max-microvolt = <1000000>;
293                                 regulator-name = "vdd10_lcd";
294                                 regulator-state-mem {
295                                         regulator-on-in-suspend;
296                                         regulator-suspend-microvolt = <1000000>;
297                                 };
298                         };
299
300                         vcc_18: LDO_REG7 {
301                                 regulator-always-on;
302                                 regulator-boot-on;
303                                 regulator-min-microvolt = <1800000>;
304                                 regulator-max-microvolt = <1800000>;
305                                 regulator-name = "vcc_18";
306                                 regulator-state-mem {
307                                         regulator-on-in-suspend;
308                                         regulator-suspend-microvolt = <1800000>;
309                                 };
310                         };
311
312                         vcca_33: LDO_REG8 {
313                                 regulator-always-on;
314                                 regulator-boot-on;
315                                 regulator-min-microvolt = <3300000>;
316                                 regulator-max-microvolt = <3300000>;
317                                 regulator-name = "vcca_33";
318                                 regulator-state-mem {
319                                         regulator-on-in-suspend;
320                                         regulator-suspend-microvolt = <3300000>;
321                                 };
322                         };
323
324                         vccio_wl: SWITCH_REG1 {
325                                 regulator-always-on;
326                                 regulator-boot-on;
327                                 regulator-name = "vccio_wl";
328                                 regulator-state-mem {
329                                         regulator-on-in-suspend;
330                                 };
331                         };
332
333                         vcc_lcd: SWITCH_REG2 {
334                                 regulator-always-on;
335                                 regulator-boot-on;
336                                 regulator-name = "vcc_lcd";
337                                 regulator-state-mem {
338                                         regulator-on-in-suspend;
339                                 };
340                         };
341                 };
342         };
343 };
344
345 &i2c1 {
346         status = "okay";
347         clock-frequency = <400000>;
348
349         ak8963: ak8963@d {
350                 compatible = "asahi-kasei,ak8975";
351                 reg = <0x0d>;
352                 interrupt-parent = <&gpio8>;
353                 interrupts = <RK_PA1 IRQ_TYPE_EDGE_RISING>;
354                 pinctrl-names = "default";
355                 pinctrl-0 = <&comp_int>;
356                 vdd-supply = <&vcc_io>;
357                 vid-supply = <&vcc_io>;
358         };
359
360         l3g4200d: l3g4200d@69 {
361                 compatible = "st,l3g4200d-gyro";
362                 st,drdy-int-pin = <2>;
363                 reg = <0x69>;
364                 vdd-supply = <&vcc_io>;
365                 vddio-supply = <&vcc_io>;
366         };
367
368         mma8452: mma8452@1d {
369                 compatible = "fsl,mma8452";
370                 reg = <0x1d>;
371                 interrupt-parent = <&gpio8>;
372                 interrupts = <RK_PA0 IRQ_TYPE_EDGE_RISING>;
373                 pinctrl-names = "default";
374                 pinctrl-0 = <&gsensor_int>;
375         };
376 };
377
378 &i2c2 {
379         status = "okay";
380 };
381
382 &i2c3 {
383         status = "okay";
384 };
385
386 &i2c4 {
387         status = "okay";
388 };
389
390 &i2c5 {
391         status = "okay";
392 };
393
394 &io_domains {
395         status = "okay";
396
397         audio-supply = <&vcca_33>;
398         bb-supply = <&vcc_io>;
399         dvp-supply = <&vcc18_dvp>;
400         flash0-supply = <&vcc_flash>;
401         flash1-supply = <&vcc_lan>;
402         gpio30-supply = <&vcc_io>;
403         gpio1830-supply = <&vcc_io>;
404         lcdc-supply = <&vcc_io>;
405         sdcard-supply = <&vccio_sd>;
406         wifi-supply = <&vccio_wl>;
407 };
408
409 &pinctrl {
410         ak8963 {
411                 comp_int: comp-int {
412                         rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
413                 };
414         };
415
416         buttons {
417                 pwrbtn: pwrbtn {
418                         rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
419                 };
420         };
421
422         dvp {
423                 dvp_pwr: dvp-pwr {
424                         rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
425                 };
426         };
427
428         ir {
429                 ir_int: ir-int {
430                         rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
431                 };
432         };
433
434         mma8452 {
435                 gsensor_int: gsensor-int {
436                         rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
437                 };
438         };
439
440         pmic {
441                 pmic_int: pmic-int {
442                         rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
443                 };
444         };
445
446         sdmmc {
447                 sdmmc_pwr: sdmmc-pwr {
448                         rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
449                 };
450         };
451 };
452
453 &tsadc {
454         rockchip,hw-tshut-mode = <0>;
455         rockchip,hw-tshut-polarity = <0>;
456         status = "okay";
457 };
458
459 &vopb {
460         status = "okay";
461 };
462
463 &vopb_mmu {
464         status = "okay";
465 };
466
467 &vopl {
468         status = "okay";
469 };
470
471 &vopl_mmu {
472         status = "okay";
473 };
474
475 &uart0 {
476         status = "okay";
477 };
478
479 &uart1 {
480         status = "okay";
481 };
482
483 &uart2 {
484         status = "okay";
485 };
486
487 &uart3 {
488         status = "okay";
489 };
490
491 &uart4 {
492         status = "okay";
493 };
494
495 &usbphy {
496         status = "okay";
497 };
498
499 &usb_otg {
500         status = "okay";
501 };