SPDX: Convert all of our multiple license tags to Linux Kernel style
[oweals/u-boot.git] / arch / arm / dts / rk3288-miqi.dtsi
1 // SPDX-License-Identifier: GPL-2.0+ OR X11
2 /*
3  * Copyright (c) 2016 Heiko Stuebner <heiko@sntech.de>
4  */
5
6 #include "rk3288.dtsi"
7
8 / {
9         memory {
10                 device_type = "memory";
11                 reg = <0 0x80000000>;
12         };
13
14         ext_gmac: external-gmac-clock {
15                 compatible = "fixed-clock";
16                 #clock-cells = <0>;
17                 clock-frequency = <125000000>;
18                 clock-output-names = "ext_gmac";
19         };
20
21         io_domains: io-domains {
22                 compatible = "rockchip,rk3288-io-voltage-domain";
23                 rockchip,grf = <&grf>;
24
25                 audio-supply = <&vcca_33>;
26                 flash0-supply = <&vcc_flash>;
27                 flash1-supply = <&vcc_lan>;
28                 gpio30-supply = <&vcc_io>;
29                 gpio1830-supply = <&vcc_io>;
30                 lcdc-supply = <&vcc_io>;
31                 sdcard-supply = <&vccio_sd>;
32                 wifi-supply = <&vcc_18>;
33         };
34
35
36         leds {
37                 u-boot,dm-pre-reloc;
38                 compatible = "gpio-leds";
39
40                 work {
41                         u-boot,dm-pre-reloc;
42                         gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
43                         label = "miqi:green:user";
44                         linux,default-trigger = "default-on";
45                         pinctrl-names = "default";
46                         pinctrl-0 = <&led_ctl>;
47                 };
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_host: usb-host-regulator {
59                 compatible = "regulator-fixed";
60                 enable-active-high;
61                 gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
62                 pinctrl-names = "default";
63                 pinctrl-0 = <&host_vbus_drv>;
64                 regulator-name = "vcc_host";
65                 regulator-min-microvolt = <5000000>;
66                 regulator-max-microvolt = <5000000>;
67                 regulator-always-on;
68                 vin-supply = <&vcc_sys>;
69         };
70
71         vcc_sd: sdmmc-regulator {
72                 compatible = "regulator-fixed";
73                 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
74                 pinctrl-names = "default";
75                 pinctrl-0 = <&sdmmc_pwr>;
76                 regulator-name = "vcc_sd";
77                 regulator-min-microvolt = <3300000>;
78                 regulator-max-microvolt = <3300000>;
79                 startup-delay-us = <100000>;
80                 vin-supply = <&vcc_io>;
81         };
82
83         vcc_sys: vsys-regulator {
84                 compatible = "regulator-fixed";
85                 regulator-name = "vcc_sys";
86                 regulator-min-microvolt = <5000000>;
87                 regulator-max-microvolt = <5000000>;
88                 regulator-always-on;
89                 regulator-boot-on;
90         };
91 };
92
93 &cpu0 {
94         cpu0-supply = <&vdd_cpu>;
95 };
96
97 &emmc {
98         bus-width = <8>;
99         cap-mmc-highspeed;
100         disable-wp;
101         non-removable;
102         num-slots = <1>;
103         pinctrl-names = "default";
104         pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
105         vmmc-supply = <&vcc_io>;
106         vqmmc-supply = <&vcc_flash>;
107         status = "okay";
108 };
109
110 &gmac {
111         assigned-clocks = <&cru SCLK_MAC>;
112         assigned-clock-parents = <&ext_gmac>;
113         clock_in_out = "input";
114         pinctrl-names = "default";
115         pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
116         phy-supply = <&vcc_lan>;
117         phy-mode = "rgmii";
118         snps,reset-active-low;
119         snps,reset-delays-us = <0 10000 1000000>;
120         snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
121         tx_delay = <0x30>;
122         rx_delay = <0x10>;
123         status = "okay";
124 };
125
126 &hdmi {
127         ddc-i2c-bus = <&i2c5>;
128         status = "okay";
129 };
130
131 &i2c0 {
132         clock-frequency = <400000>;
133         status = "okay";
134
135         vdd_cpu: syr827@40 {
136                 compatible = "silergy,syr827";
137                 fcs,suspend-voltage-selector = <1>;
138                 reg = <0x40>;
139                 regulator-name = "vdd_cpu";
140                 regulator-min-microvolt = <850000>;
141                 regulator-max-microvolt = <1350000>;
142                 regulator-always-on;
143                 regulator-boot-on;
144                 regulator-enable-ramp-delay = <300>;
145                 regulator-ramp-delay = <8000>;
146                 vin-supply = <&vcc_sys>;
147         };
148
149         vdd_gpu: syr828@41 {
150                 compatible = "silergy,syr828";
151                 fcs,suspend-voltage-selector = <1>;
152                 reg = <0x41>;
153                 regulator-name = "vdd_gpu";
154                 regulator-min-microvolt = <850000>;
155                 regulator-max-microvolt = <1350000>;
156                 regulator-always-on;
157                 vin-supply = <&vcc_sys>;
158         };
159
160         hym8563: hym8563@51 {
161                 compatible = "haoyu,hym8563";
162                 reg = <0x51>;
163                 #clock-cells = <0>;
164                 clock-frequency = <32768>;
165                 clock-output-names = "xin32k";
166         };
167
168         act8846: act8846@5a {
169                 compatible = "active-semi,act8846";
170                 reg = <0x5a>;
171                 pinctrl-names = "default";
172                 pinctrl-0 = <&pmic_vsel>;
173                 system-power-controller;
174
175                 vp1-supply = <&vcc_sys>;
176                 vp2-supply = <&vcc_sys>;
177                 vp3-supply = <&vcc_sys>;
178                 vp4-supply = <&vcc_sys>;
179                 inl1-supply = <&vcc_sys>;
180                 inl2-supply = <&vcc_sys>;
181                 inl3-supply = <&vcc_20>;
182
183                 regulators {
184                         vcc_ddr: REG1 {
185                                 regulator-name = "vcc_ddr";
186                                 regulator-always-on;
187                         };
188
189                         vcc_io: REG2 {
190                                 regulator-name = "vcc_io";
191                                 regulator-min-microvolt = <3300000>;
192                                 regulator-max-microvolt = <3300000>;
193                                 regulator-always-on;
194                         };
195
196                         vdd_log: REG3 {
197                                 regulator-name = "vdd_log";
198                                 regulator-min-microvolt = <1100000>;
199                                 regulator-max-microvolt = <1100000>;
200                                 regulator-always-on;
201                         };
202
203                         vcc_20: REG4 {
204                                 regulator-name = "vcc_20";
205                                 regulator-min-microvolt = <2000000>;
206                                 regulator-max-microvolt = <2000000>;
207                                 regulator-always-on;
208                         };
209
210                         vccio_sd: REG5 {
211                                 regulator-name = "vccio_sd";
212                                 regulator-min-microvolt = <3300000>;
213                                 regulator-max-microvolt = <3300000>;
214                                 regulator-always-on;
215                         };
216
217                         vdd10_lcd: REG6 {
218                                 regulator-name = "vdd10_lcd";
219                                 regulator-min-microvolt = <1000000>;
220                                 regulator-max-microvolt = <1000000>;
221                                 regulator-always-on;
222                         };
223
224                         vcca_18: REG7 {
225                                 regulator-name = "vcca_18";
226                                 regulator-min-microvolt = <1800000>;
227                                 regulator-max-microvolt = <1800000>;
228                         };
229
230                         vcca_33: REG8 {
231                                 regulator-name = "vcca_33";
232                                 regulator-min-microvolt = <3300000>;
233                                 regulator-max-microvolt = <3300000>;
234                         };
235
236                         vcc_lan: REG9 {
237                                 regulator-name = "vcc_lan";
238                                 regulator-min-microvolt = <3300000>;
239                                 regulator-max-microvolt = <3300000>;
240                         };
241
242                         vdd_10: REG10 {
243                                 regulator-name = "vdd_10";
244                                 regulator-min-microvolt = <1000000>;
245                                 regulator-max-microvolt = <1000000>;
246                                 regulator-always-on;
247                         };
248
249                         vcc_18: REG11 {
250                                 regulator-name = "vcc_18";
251                                 regulator-min-microvolt = <1800000>;
252                                 regulator-max-microvolt = <1800000>;
253                                 regulator-always-on;
254                         };
255
256                         vcc18_lcd: REG12 {
257                                 regulator-name = "vcc18_lcd";
258                                 regulator-min-microvolt = <1800000>;
259                                 regulator-max-microvolt = <1800000>;
260                                 regulator-always-on;
261                         };
262                 };
263         };
264 };
265
266 &i2c1 {
267         status = "okay";
268 };
269
270 &i2c2 {
271         status = "okay";
272 };
273
274 &i2c4 {
275         status = "okay";
276 };
277
278 &i2c5 {
279         status = "okay";
280 };
281
282 &pinctrl {
283         pcfg_output_high: pcfg-output-high {
284                 output-high;
285         };
286
287         pcfg_output_low: pcfg-output-low {
288                 output-low;
289         };
290
291         pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
292                 bias-pull-up;
293                 drive-strength = <12>;
294         };
295
296         act8846 {
297                 pmic_int: pmic-int {
298                         rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>;
299                 };
300
301                 pmic_sleep: pmic-sleep {
302                         rockchip,pins = <0 0 RK_FUNC_GPIO &pcfg_output_low>;
303                 };
304
305                 pmic_vsel: pmic-vsel {
306                         rockchip,pins = <7 1 RK_FUNC_GPIO &pcfg_output_low>;
307                 };
308         };
309
310         gmac {
311                 phy_int: phy-int {
312                         rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
313                 };
314
315                 phy_pmeb: phy-pmeb {
316                         rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
317                 };
318
319                 phy_rst: phy-rst {
320                         rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
321                 };
322         };
323
324         leds {
325                 led_ctl: led-ctl {
326                         rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>;
327                 };
328         };
329
330         sdmmc {
331                 /*
332                  * Default drive strength isn't enough to achieve even
333                  * high-speed mode on firefly board so bump up to 12ma.
334                  */
335                 sdmmc_bus4: sdmmc-bus4 {
336                         rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
337                                         <6 17 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
338                                         <6 18 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
339                                         <6 19 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
340                 };
341
342                 sdmmc_clk: sdmmc-clk {
343                         rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_12ma>;
344                 };
345
346                 sdmmc_cmd: sdmmc-cmd {
347                         rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
348                 };
349
350                 sdmmc_pwr: sdmmc-pwr {
351                         rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
352                 };
353         };
354
355         usb_host {
356                 host_vbus_drv: host-vbus-drv {
357                         rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
358                 };
359         };
360 };
361
362 &saradc {
363         vref-supply = <&vcc_18>;
364         status = "okay";
365 };
366
367 &sdmmc {
368         bus-width = <4>;
369         cap-mmc-highspeed;
370         cap-sd-highspeed;
371         card-detect-delay = <200>;
372         disable-wp;
373         num-slots = <1>;
374         pinctrl-names = "default";
375         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
376         vmmc-supply = <&vcc_sd>;
377         vqmmc-supply = <&vccio_sd>;
378         status = "okay";
379 };
380
381 &tsadc {
382         rockchip,hw-tshut-mode = <0>;
383         rockchip,hw-tshut-polarity = <0>;
384         status = "okay";
385 };
386
387 &uart2 {
388         status = "okay";
389 };
390
391 &uart3 {
392         status = "okay";
393 };
394
395 &usbphy {
396         status = "okay";
397 };
398
399 &usb_host1 {
400         vbus-supply = <&vcc_host>;
401         status = "okay";
402 };
403
404 &vopb {
405         status = "okay";
406 };
407
408 &vopb_mmu {
409         status = "okay";
410 };
411
412 &vopl {
413         status = "okay";
414 };
415
416 &vopl_mmu {
417         status = "okay";
418 };
419
420 &wdt {
421         status = "okay";
422 };