]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/gnu/dts/arm/rk3288-tinker.dtsi
Merge OpenSSL 1.1.1g.
[FreeBSD/FreeBSD.git] / sys / gnu / dts / arm / rk3288-tinker.dtsi
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
4  */
5
6 #include "rk3288.dtsi"
7 #include <dt-bindings/input/input.h>
8 #include <dt-bindings/clock/rockchip,rk808.h>
9
10 / {
11         chosen {
12                 stdout-path = "serial2:115200n8";
13         };
14
15         memory {
16                 reg = <0x0 0x0 0x0 0x80000000>;
17                 device_type = "memory";
18         };
19
20         ext_gmac: external-gmac-clock {
21                 compatible = "fixed-clock";
22                 #clock-cells = <0>;
23                 clock-frequency = <125000000>;
24                 clock-output-names = "ext_gmac";
25         };
26
27         gpio-keys {
28                 compatible = "gpio-keys";
29                 #address-cells = <1>;
30                 #size-cells = <0>;
31                 autorepeat;
32
33                 pinctrl-names = "default";
34                 pinctrl-0 = <&pwrbtn>;
35
36                 button@0 {
37                         gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
38                         linux,code = <KEY_POWER>;
39                         label = "GPIO Key Power";
40                         linux,input-type = <1>;
41                         wakeup-source;
42                         debounce-interval = <100>;
43                 };
44         };
45
46         gpio-leds {
47                 compatible = "gpio-leds";
48
49                 act-led {
50                         gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
51                         linux,default-trigger = "mmc0";
52                 };
53
54                 heartbeat-led {
55                         gpios = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
56                         linux,default-trigger = "heartbeat";
57                 };
58
59                 pwr-led {
60                         gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
61                         linux,default-trigger = "default-on";
62                 };
63         };
64
65         sdio_pwrseq: sdio-pwrseq {
66                 compatible = "mmc-pwrseq-simple";
67                 clocks = <&rk808 RK808_CLKOUT1>;
68                 clock-names = "ext_clock";
69                 pinctrl-names = "default";
70                 pinctrl-0 = <&wifi_enable>;
71                 reset-gpios = <&gpio4 RK_PD3 GPIO_ACTIVE_LOW>,
72                         <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
73         };
74
75         sound {
76                 compatible = "simple-audio-card";
77                 simple-audio-card,format = "i2s";
78                 simple-audio-card,name = "rockchip,tinker-codec";
79                 simple-audio-card,mclk-fs = <512>;
80
81                 simple-audio-card,codec {
82                         sound-dai = <&hdmi>;
83                 };
84
85                 simple-audio-card,cpu {
86                         sound-dai = <&i2s>;
87                 };
88         };
89
90         vcc_sys: vsys-regulator {
91                 compatible = "regulator-fixed";
92                 regulator-name = "vcc_sys";
93                 regulator-min-microvolt = <5000000>;
94                 regulator-max-microvolt = <5000000>;
95                 regulator-always-on;
96                 regulator-boot-on;
97         };
98
99         vcc_sd: sdmmc-regulator {
100                 compatible = "regulator-fixed";
101                 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
102                 pinctrl-names = "default";
103                 pinctrl-0 = <&sdmmc_pwr>;
104                 regulator-name = "vcc_sd";
105                 regulator-min-microvolt = <3300000>;
106                 regulator-max-microvolt = <3300000>;
107                 startup-delay-us = <100000>;
108                 vin-supply = <&vcc_io>;
109         };
110 };
111
112 &cpu0 {
113         cpu0-supply = <&vdd_cpu>;
114 };
115
116 &cpu_opp_table {
117         opp-1704000000 {
118                 opp-hz = /bits/ 64 <1704000000>;
119                 opp-microvolt = <1350000>;
120         };
121         opp-1800000000 {
122                 opp-hz = /bits/ 64 <1800000000>;
123                 opp-microvolt = <1400000>;
124         };
125 };
126
127 &gmac {
128         assigned-clocks = <&cru SCLK_MAC>;
129         assigned-clock-parents = <&ext_gmac>;
130         clock_in_out = "input";
131         phy-mode = "rgmii";
132         phy-supply = <&vcc33_lan>;
133         pinctrl-names = "default";
134         pinctrl-0 = <&rgmii_pins>;
135         snps,reset-gpio = <&gpio4 7 0>;
136         snps,reset-active-low;
137         snps,reset-delays-us = <0 10000 1000000>;
138         tx_delay = <0x30>;
139         rx_delay = <0x10>;
140         status = "ok";
141 };
142
143 &gpu {
144         mali-supply = <&vdd_gpu>;
145         status = "okay";
146 };
147
148 &hdmi {
149         ddc-i2c-bus = <&i2c5>;
150         status = "okay";
151 };
152
153 &i2c0 {
154         clock-frequency = <400000>;
155         status = "okay";
156
157         rk808: pmic@1b {
158                 compatible = "rockchip,rk808";
159                 reg = <0x1b>;
160                 interrupt-parent = <&gpio0>;
161                 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
162                 #clock-cells = <1>;
163                 clock-output-names = "xin32k", "rk808-clkout2";
164                 dvs-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>,
165                                 <&gpio0 12 GPIO_ACTIVE_HIGH>;
166                 pinctrl-names = "default";
167                 pinctrl-0 = <&pmic_int &global_pwroff &dvs_1 &dvs_2>;
168                 rockchip,system-power-controller;
169                 wakeup-source;
170
171                 vcc1-supply = <&vcc_sys>;
172                 vcc2-supply = <&vcc_sys>;
173                 vcc3-supply = <&vcc_sys>;
174                 vcc4-supply = <&vcc_sys>;
175                 vcc6-supply = <&vcc_sys>;
176                 vcc7-supply = <&vcc_sys>;
177                 vcc8-supply = <&vcc_io>;
178                 vcc9-supply = <&vcc_io>;
179                 vcc10-supply = <&vcc_io>;
180                 vcc11-supply = <&vcc_sys>;
181                 vcc12-supply = <&vcc_io>;
182                 vddio-supply = <&vcc_io>;
183
184                 regulators {
185                         vdd_cpu: DCDC_REG1 {
186                                 regulator-always-on;
187                                 regulator-boot-on;
188                                 regulator-min-microvolt = <750000>;
189                                 regulator-max-microvolt = <1400000>;
190                                 regulator-name = "vdd_arm";
191                                 regulator-ramp-delay = <6000>;
192                                 regulator-state-mem {
193                                         regulator-off-in-suspend;
194                                 };
195                         };
196
197                         vdd_gpu: DCDC_REG2 {
198                                 regulator-always-on;
199                                 regulator-boot-on;
200                                 regulator-min-microvolt = <850000>;
201                                 regulator-max-microvolt = <1250000>;
202                                 regulator-name = "vdd_gpu";
203                                 regulator-ramp-delay = <6000>;
204                                 regulator-state-mem {
205                                         regulator-on-in-suspend;
206                                         regulator-suspend-microvolt = <1000000>;
207                                 };
208                         };
209
210                         vcc_ddr: DCDC_REG3 {
211                                 regulator-always-on;
212                                 regulator-boot-on;
213                                 regulator-name = "vcc_ddr";
214                                 regulator-state-mem {
215                                         regulator-on-in-suspend;
216                                 };
217                         };
218
219                         vcc_io: DCDC_REG4 {
220                                 regulator-always-on;
221                                 regulator-boot-on;
222                                 regulator-min-microvolt = <3300000>;
223                                 regulator-max-microvolt = <3300000>;
224                                 regulator-name = "vcc_io";
225                                 regulator-state-mem {
226                                         regulator-on-in-suspend;
227                                         regulator-suspend-microvolt = <3300000>;
228                                 };
229                         };
230
231                         vcc18_ldo1: LDO_REG1 {
232                                 regulator-always-on;
233                                 regulator-boot-on;
234                                 regulator-min-microvolt = <1800000>;
235                                 regulator-max-microvolt = <1800000>;
236                                 regulator-name = "vcc18_ldo1";
237                                 regulator-state-mem {
238                                         regulator-on-in-suspend;
239                                         regulator-suspend-microvolt = <1800000>;
240                                 };
241                         };
242
243                         vcc33_mipi: LDO_REG2 {
244                                 regulator-always-on;
245                                 regulator-boot-on;
246                                 regulator-min-microvolt = <3300000>;
247                                 regulator-max-microvolt = <3300000>;
248                                 regulator-name = "vcc33_mipi";
249                                 regulator-state-mem {
250                                         regulator-off-in-suspend;
251                                 };
252                         };
253
254                         vdd_10: LDO_REG3 {
255                                 regulator-always-on;
256                                 regulator-boot-on;
257                                 regulator-min-microvolt = <1000000>;
258                                 regulator-max-microvolt = <1000000>;
259                                 regulator-name = "vdd_10";
260                                 regulator-state-mem {
261                                         regulator-on-in-suspend;
262                                         regulator-suspend-microvolt = <1000000>;
263                                 };
264                         };
265
266                         vcc18_codec: LDO_REG4 {
267                                 regulator-always-on;
268                                 regulator-boot-on;
269                                 regulator-min-microvolt = <1800000>;
270                                 regulator-max-microvolt = <1800000>;
271                                 regulator-name = "vcc18_codec";
272                                 regulator-state-mem {
273                                         regulator-on-in-suspend;
274                                         regulator-suspend-microvolt = <1800000>;
275                                 };
276                         };
277
278                         vccio_sd: LDO_REG5 {
279                                 regulator-boot-on;
280                                 regulator-min-microvolt = <1800000>;
281                                 regulator-max-microvolt = <3300000>;
282                                 regulator-name = "vccio_sd";
283                                 regulator-state-mem {
284                                         regulator-on-in-suspend;
285                                         regulator-suspend-microvolt = <3300000>;
286                                 };
287                         };
288
289                         vdd10_lcd: LDO_REG6 {
290                                 regulator-always-on;
291                                 regulator-boot-on;
292                                 regulator-min-microvolt = <1000000>;
293                                 regulator-max-microvolt = <1000000>;
294                                 regulator-name = "vdd10_lcd";
295                                 regulator-state-mem {
296                                         regulator-on-in-suspend;
297                                         regulator-suspend-microvolt = <1000000>;
298                                 };
299                         };
300
301                         vcc_18: LDO_REG7 {
302                                 regulator-always-on;
303                                 regulator-boot-on;
304                                 regulator-min-microvolt = <1800000>;
305                                 regulator-max-microvolt = <1800000>;
306                                 regulator-name = "vcc_18";
307                                 regulator-state-mem {
308                                         regulator-on-in-suspend;
309                                         regulator-suspend-microvolt = <1800000>;
310                                 };
311                         };
312
313                         vcc18_lcd: LDO_REG8 {
314                                 regulator-always-on;
315                                 regulator-boot-on;
316                                 regulator-min-microvolt = <1800000>;
317                                 regulator-max-microvolt = <1800000>;
318                                 regulator-name = "vcc18_lcd";
319                                 regulator-state-mem {
320                                         regulator-on-in-suspend;
321                                         regulator-suspend-microvolt = <1800000>;
322                                 };
323                         };
324
325                         vcc33_sd: SWITCH_REG1 {
326                                 regulator-always-on;
327                                 regulator-boot-on;
328                                 regulator-name = "vcc33_sd";
329                                 regulator-state-mem {
330                                         regulator-on-in-suspend;
331                                 };
332                         };
333
334                         vcc33_lan: SWITCH_REG2 {
335                                 regulator-always-on;
336                                 regulator-boot-on;
337                                 regulator-name = "vcc33_lan";
338                                 regulator-state-mem {
339                                         regulator-on-in-suspend;
340                                 };
341                         };
342                 };
343         };
344 };
345
346 &i2c2 {
347         status = "okay";
348 };
349
350 &i2c5 {
351         status = "okay";
352 };
353
354 &i2s {
355         #sound-dai-cells = <0>;
356         status = "okay";
357 };
358
359 &io_domains {
360         status = "okay";
361
362         sdcard-supply = <&vccio_sd>;
363         wifi-supply = <&vcc_18>;
364 };
365
366 &pinctrl {
367         pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
368                 drive-strength = <8>;
369         };
370
371         pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
372                 bias-pull-up;
373                 drive-strength = <8>;
374         };
375
376         backlight {
377                 bl_en: bl-en {
378                         rockchip,pins = <7 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
379                 };
380         };
381
382         buttons {
383                 pwrbtn: pwrbtn {
384                         rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
385                 };
386         };
387
388         eth_phy {
389                 eth_phy_pwr: eth-phy-pwr {
390                         rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
391                 };
392         };
393
394         pmic {
395                 pmic_int: pmic-int {
396                         rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
397                 };
398
399                 dvs_1: dvs-1 {
400                         rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_down>;
401                 };
402
403                 dvs_2: dvs-2 {
404                         rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>;
405                 };
406         };
407
408         sdmmc {
409                 sdmmc_bus4: sdmmc-bus4 {
410                         rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_8ma>,
411                                         <6 RK_PC1 1 &pcfg_pull_up_drv_8ma>,
412                                         <6 RK_PC2 1 &pcfg_pull_up_drv_8ma>,
413                                         <6 RK_PC3 1 &pcfg_pull_up_drv_8ma>;
414                 };
415
416                 sdmmc_clk: sdmmc-clk {
417                         rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_drv_8ma>;
418                 };
419
420                 sdmmc_cmd: sdmmc-cmd {
421                         rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>;
422                 };
423
424                 sdmmc_pwr: sdmmc-pwr {
425                         rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
426                 };
427         };
428
429         usb {
430                 host_vbus_drv: host-vbus-drv {
431                         rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
432                 };
433
434                 pwr_3g: pwr-3g {
435                         rockchip,pins = <7 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
436                 };
437         };
438
439         sdio {
440                 wifi_enable: wifi-enable {
441                         rockchip,pins = <4 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>,
442                                         <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
443                 };
444         };
445 };
446
447 &pwm0 {
448         status = "okay";
449 };
450
451 &saradc {
452         vref-supply = <&vcc18_ldo1>;
453         status = "okay";
454 };
455
456 &sdmmc {
457         bus-width = <4>;
458         cap-mmc-highspeed;
459         cap-sd-highspeed;
460         broken-cd;
461         disable-wp;                     /* wp not hooked up */
462         pinctrl-names = "default";
463         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
464         status = "okay";
465         vmmc-supply = <&vcc33_sd>;
466         vqmmc-supply = <&vccio_sd>;
467 };
468
469 &sdio0 {
470         bus-width = <4>;
471         cap-sd-highspeed;
472         cap-sdio-irq;
473         keep-power-in-suspend;
474         max-frequency = <50000000>;
475         mmc-pwrseq = <&sdio_pwrseq>;
476         non-removable;
477         pinctrl-names = "default";
478         pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
479         sd-uhs-sdr12;
480         sd-uhs-sdr25;
481         sd-uhs-sdr50;
482         vmmc-supply = <&vcc_io>;
483         vqmmc-supply = <&vcc_18>;
484         status = "okay";
485 };
486
487 &tsadc {
488         rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
489         rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
490         status = "okay";
491 };
492
493 &uart0 {
494         status = "okay";
495 };
496
497 &uart1 {
498         status = "okay";
499 };
500
501 &uart2 {
502         status = "okay";
503 };
504
505 &uart3 {
506         status = "okay";
507 };
508
509 &uart4 {
510         status = "okay";
511 };
512
513 &usbphy {
514         status = "okay";
515 };
516
517 &usb_host0_ehci {
518         status = "okay";
519 };
520
521 &usb_host1 {
522         status = "okay";
523 };
524
525 &usb_otg {
526         status = "okay";
527 };
528
529 &vopb {
530         status = "okay";
531 };
532
533 &vopb_mmu {
534         status = "okay";
535 };
536
537 &vopl {
538         status = "okay";
539 };
540
541 &vopl_mmu {
542         status = "okay";
543 };
544
545 &wdt {
546         status = "okay";
547 };