GNU Linux-libre 6.1.90-gnu
[releases.git] / arch / arm64 / boot / dts / rockchip / rk3566-roc-pc.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3 /dts-v1/;
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/pinctrl/rockchip.h>
7 #include <dt-bindings/soc/rockchip,vop2.h>
8 #include "rk3566.dtsi"
9
10 / {
11         model = "Firefly Station M2";
12         compatible = "firefly,rk3566-roc-pc", "rockchip,rk3566";
13
14         aliases {
15                 mmc0 = &sdmmc0;
16                 mmc1 = &sdhci;
17                 mmc2 = &sdmmc1;
18         };
19
20         chosen: chosen {
21                 stdout-path = "serial2:1500000n8";
22         };
23
24         gmac1_clkin: external-gmac1-clock {
25                 compatible = "fixed-clock";
26                 clock-frequency = <125000000>;
27                 clock-output-names = "gmac1_clkin";
28                 #clock-cells = <0>;
29         };
30
31         hdmi-con {
32                 compatible = "hdmi-connector";
33                 type = "a";
34
35                 port {
36                         hdmi_con_in: endpoint {
37                                 remote-endpoint = <&hdmi_out_con>;
38                         };
39                 };
40         };
41
42         leds {
43                 compatible = "gpio-leds";
44
45                 led-user {
46                         label = "user-led";
47                         default-state = "on";
48                         gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
49                         linux,default-trigger = "heartbeat";
50                         pinctrl-names = "default";
51                         pinctrl-0 = <&user_led_enable_h>;
52                         retain-state-suspended;
53                 };
54         };
55
56         sdio_pwrseq: sdio-pwrseq {
57                 status = "okay";
58                 compatible = "mmc-pwrseq-simple";
59                 clocks = <&rk809 1>;
60                 clock-names = "ext_clock";
61                 pinctrl-names = "default";
62                 pinctrl-0 = <&wifi_enable_h>;
63                 reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
64         };
65
66         usb_5v: usb-5v-regulator {
67                 compatible = "regulator-fixed";
68                 regulator-name = "usb_5v";
69                 regulator-always-on;
70                 regulator-boot-on;
71                 regulator-min-microvolt = <5000000>;
72                 regulator-max-microvolt = <5000000>;
73         };
74
75         vcc5v0_sys: vcc5v0-sys-regulator {
76                 compatible = "regulator-fixed";
77                 regulator-name = "vcc5v0_sys";
78                 regulator-always-on;
79                 regulator-boot-on;
80                 regulator-min-microvolt = <5000000>;
81                 regulator-max-microvolt = <5000000>;
82                 vin-supply = <&usb_5v>;
83         };
84
85         vcc3v3_sys: vcc3v3-sys-regulator {
86                 compatible = "regulator-fixed";
87                 regulator-name = "vcc3v3_sys";
88                 regulator-min-microvolt = <3300000>;
89                 regulator-max-microvolt = <3300000>;
90                 regulator-always-on;
91                 vin-supply = <&vcc5v0_sys>;
92         };
93
94         vcc5v0_usb30_host: vcc5v0-usb30-host-regulator {
95                 compatible = "regulator-fixed";
96                 regulator-name = "vcc5v0_usb30_host";
97                 enable-active-high;
98                 gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
99                 pinctrl-names = "default";
100                 pinctrl-0 = <&vcc5v0_usb30_host_en_h>;
101                 regulator-always-on;
102                 regulator-min-microvolt = <5000000>;
103                 regulator-max-microvolt = <5000000>;
104                 vin-supply = <&vcc5v0_sys>;
105         };
106
107         vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
108                 compatible = "regulator-fixed";
109                 regulator-name = "vcc5v0_usb_otg";
110                 enable-active-high;
111                 gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
112                 pinctrl-names = "default";
113                 pinctrl-0 = <&vcc5v0_usb_otg_en_h>;
114                 regulator-always-on;
115                 regulator-min-microvolt = <5000000>;
116                 regulator-max-microvolt = <5000000>;
117                 vin-supply = <&vcc5v0_sys>;
118         };
119 };
120
121 &combphy1 {
122         status = "okay";
123 };
124
125 &cpu0 {
126         cpu-supply = <&vdd_cpu>;
127 };
128
129 &cpu1 {
130         cpu-supply = <&vdd_cpu>;
131 };
132
133 &cpu2 {
134         cpu-supply = <&vdd_cpu>;
135 };
136
137 &cpu3 {
138         cpu-supply = <&vdd_cpu>;
139 };
140
141 &gmac1 {
142         assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>;
143         assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>;
144         clock_in_out = "input";
145         phy-mode = "rgmii";
146         phy-supply = <&vcc_3v3>;
147         pinctrl-names = "default";
148         pinctrl-0 = <&gmac1m0_miim
149                      &gmac1m0_tx_bus2
150                      &gmac1m0_rx_bus2
151                      &gmac1m0_rgmii_clk
152                      &gmac1m0_clkinout
153                      &gmac1m0_rgmii_bus>;
154         snps,reset-gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
155         snps,reset-active-low;
156         /* Reset time is 20ms, 100ms for rtl8211f */
157         snps,reset-delays-us = <0 20000 100000>;
158         tx_delay = <0x4f>;
159         rx_delay = <0x24>;
160         phy-handle = <&rgmii_phy1>;
161         status = "okay";
162 };
163
164 &gpu {
165         mali-supply = <&vdd_gpu>;
166         status = "okay";
167 };
168
169 &hdmi {
170         avdd-0v9-supply = <&vdda0v9_image>;
171         avdd-1v8-supply = <&vcca1v8_image>;
172         status = "okay";
173 };
174
175 &hdmi_in {
176         hdmi_in_vp0: endpoint {
177                 remote-endpoint = <&vp0_out_hdmi>;
178         };
179 };
180
181 &hdmi_out {
182         hdmi_out_con: endpoint {
183                 remote-endpoint = <&hdmi_con_in>;
184         };
185 };
186
187 &i2c0 {
188         status = "okay";
189
190         vdd_cpu: regulator@1c {
191                 compatible = "tcs,tcs4525";
192                 reg = <0x1c>;
193                 fcs,suspend-voltage-selector = <1>;
194                 regulator-name = "vdd_cpu";
195                 regulator-min-microvolt = <800000>;
196                 regulator-max-microvolt = <1150000>;
197                 regulator-ramp-delay = <2300>;
198                 regulator-always-on;
199                 regulator-boot-on;
200                 vin-supply = <&vcc5v0_sys>;
201
202                 regulator-state-mem {
203                         regulator-off-in-suspend;
204                 };
205         };
206
207         rk809: pmic@20 {
208                 compatible = "rockchip,rk809";
209                 reg = <0x20>;
210                 interrupt-parent = <&gpio0>;
211                 interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
212                 clock-output-names = "rk808-clkout1", "rk808-clkout2";
213
214                 pinctrl-names = "default";
215                 pinctrl-0 = <&pmic_int>;
216                 rockchip,system-power-controller;
217                 wakeup-source;
218                 #clock-cells = <1>;
219
220                 vcc1-supply = <&vcc3v3_sys>;
221                 vcc2-supply = <&vcc3v3_sys>;
222                 vcc3-supply = <&vcc3v3_sys>;
223                 vcc4-supply = <&vcc3v3_sys>;
224                 vcc5-supply = <&vcc3v3_sys>;
225                 vcc6-supply = <&vcc3v3_sys>;
226                 vcc7-supply = <&vcc3v3_sys>;
227                 vcc8-supply = <&vcc3v3_sys>;
228                 vcc9-supply = <&vcc3v3_sys>;
229
230                 regulators {
231                         vdd_log: DCDC_REG1 {
232                                 regulator-name = "vdd_log";
233                                 regulator-always-on;
234                                 regulator-boot-on;
235                                 regulator-min-microvolt = <500000>;
236                                 regulator-max-microvolt = <1350000>;
237                                 regulator-init-microvolt = <900000>;
238                                 regulator-ramp-delay = <6001>;
239
240                                 regulator-state-mem {
241                                         regulator-on-in-suspend;
242                                         regulator-suspend-microvolt = <900000>;
243                                 };
244                         };
245
246                         vdd_gpu: DCDC_REG2 {
247                                 regulator-name = "vdd_gpu";
248                                 regulator-min-microvolt = <900000>;
249                                 regulator-max-microvolt = <1350000>;
250                                 regulator-init-microvolt = <900000>;
251                                 regulator-ramp-delay = <6001>;
252
253                                 regulator-state-mem {
254                                         regulator-off-in-suspend;
255                                         regulator-suspend-microvolt = <900000>;
256                                 };
257                         };
258
259                         vcc_ddr: DCDC_REG3 {
260                                 regulator-name = "vcc_ddr";
261                                 regulator-always-on;
262                                 regulator-boot-on;
263                                 regulator-min-microvolt = <1100000>;
264                                 regulator-max-microvolt = <1100000>;
265                                 regulator-initial-mode = <0x2>;
266                                 regulator-state-mem {
267                                         regulator-on-in-suspend;
268                                 };
269                         };
270
271                         vdd_npu: DCDC_REG4 {
272                                 regulator-name = "vdd_npu";
273                                 regulator-min-microvolt = <900000>;
274                                 regulator-max-microvolt = <1350000>;
275                                 regulator-initial-mode = <0x2>;
276                                 regulator-state-mem {
277                                         regulator-off-in-suspend;
278                                 };
279                         };
280
281                         vcc_1v8: DCDC_REG5 {
282                                 regulator-name = "vcc_1v8";
283                                 regulator-always-on;
284                                 regulator-boot-on;
285                                 regulator-min-microvolt = <1800000>;
286                                 regulator-max-microvolt = <1800000>;
287
288                                 regulator-state-mem {
289                                         regulator-on-in-suspend;
290                                         regulator-suspend-microvolt = <1800000>;
291                                 };
292                         };
293
294                         vdda0v9_image: LDO_REG1 {
295                                 regulator-name = "vdda0v9_image";
296                                 regulator-always-on;
297                                 regulator-boot-on;
298                                 regulator-min-microvolt = <900000>;
299                                 regulator-max-microvolt = <900000>;
300
301                                 regulator-state-mem {
302                                         regulator-on-in-suspend;
303                                         regulator-suspend-microvolt = <900000>;
304                                 };
305                         };
306
307                         vdda_0v9: LDO_REG2 {
308                                 regulator-name = "vdda_0v9";
309                                 regulator-always-on;
310                                 regulator-boot-on;
311                                 regulator-min-microvolt = <900000>;
312                                 regulator-max-microvolt = <900000>;
313
314                                 regulator-state-mem {
315                                         regulator-on-in-suspend;
316                                         regulator-suspend-microvolt = <900000>;
317                                 };
318                         };
319
320                         vdda0v9_pmu: LDO_REG3 {
321                                 regulator-name = "vdda0v9_pmu";
322                                 regulator-always-on;
323                                 regulator-boot-on;
324                                 regulator-min-microvolt = <900000>;
325                                 regulator-max-microvolt = <900000>;
326                                 regulator-state-mem {
327                                         regulator-on-in-suspend;
328                                         regulator-suspend-microvolt = <900000>;
329                                 };
330                         };
331
332                         vccio_acodec: LDO_REG4 {
333                                 regulator-name = "vccio_acodec";
334                                 regulator-always-on;
335                                 regulator-boot-on;
336                                 regulator-min-microvolt = <3300000>;
337                                 regulator-max-microvolt = <3300000>;
338
339                                 regulator-state-mem {
340                                         regulator-on-in-suspend;
341                                         regulator-suspend-microvolt = <3300000>;
342
343                                 };
344                         };
345
346                         vccio_sd: LDO_REG5 {
347                                 regulator-name = "vccio_sd";
348                                 regulator-always-on;
349                                 regulator-boot-on;
350                                 regulator-min-microvolt = <1800000>;
351                                 regulator-max-microvolt = <3300000>;
352
353                                 regulator-state-mem {
354                                         regulator-on-in-suspend;
355                                         regulator-suspend-microvolt = <3300000>;
356                                 };
357                         };
358
359                         vcc3v3_pmu: LDO_REG6 {
360                                 regulator-name = "vcc3v3_pmu";
361                                 regulator-always-on;
362                                 regulator-boot-on;
363                                 regulator-min-microvolt = <3300000>;
364                                 regulator-max-microvolt = <3300000>;
365
366                                 regulator-state-mem {
367                                         regulator-on-in-suspend;
368                                         regulator-suspend-microvolt = <3300000>;
369                                 };
370                         };
371
372                         vcca_1v8: LDO_REG7 {
373                                 regulator-name = "vcca_1v8";
374                                 regulator-always-on;
375                                 regulator-boot-on;
376                                 regulator-min-microvolt = <1800000>;
377                                 regulator-max-microvolt = <1800000>;
378
379                                 regulator-state-mem {
380                                         regulator-on-in-suspend;
381                                         regulator-suspend-microvolt = <1800000>;
382                                 };
383                         };
384
385                         vcca1v8_pmu: LDO_REG8 {
386                                 regulator-name = "vcca1v8_pmu";
387                                 regulator-always-on;
388                                 regulator-boot-on;
389                                 regulator-min-microvolt = <1800000>;
390                                 regulator-max-microvolt = <1800000>;
391
392                                 regulator-state-mem {
393                                         regulator-on-in-suspend;
394                                         regulator-suspend-microvolt = <1800000>;
395                                 };
396                         };
397
398                         vcca1v8_image: LDO_REG9 {
399                                 regulator-name = "vcca1v8_image";
400                                 regulator-always-on;
401                                 regulator-boot-on;
402                                 regulator-min-microvolt = <1800000>;
403                                 regulator-max-microvolt = <1800000>;
404
405                                 regulator-state-mem {
406                                         regulator-on-in-suspend;
407                                         regulator-suspend-microvolt = <1800000>;
408                                 };
409                         };
410
411                         vcc_3v3: SWITCH_REG1 {
412                                 regulator-boot-on;
413                                 regulator-name = "vcc3v3";
414                         };
415
416                         vcc3v3_sd: SWITCH_REG2 {
417                                 regulator-name = "vcc3v3_sd";
418                                 regulator-always-on;
419                                 regulator-boot-on;
420                         };
421                 };
422         };
423 };
424
425 &i2c1 {
426         status = "okay";
427 };
428
429 &i2c2 {
430         status = "okay";
431 };
432
433 &i2c3 {
434         pinctrl-names = "default";
435         pinctrl-0 = <&i2c3m0_xfer>;
436         status = "okay";
437 };
438
439 &mdio1 {
440         rgmii_phy1: ethernet-phy@0 {
441                 compatible = "ethernet-phy-ieee802.3-c22";
442                 reg = <0x0>;
443         };
444 };
445
446 &pinctrl {
447         bt {
448                 bt_enable_h: bt-enable-h {
449                         rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
450                 };
451
452                 bt_host_wake_l: bt-host-wake-l {
453                         rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_down>;
454                 };
455
456                 bt_wake_l: bt-wake-l {
457                         rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
458                 };
459         };
460
461         leds {
462                 user_led_enable_h: user-led-enable-h {
463                         rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
464                 };
465         };
466
467         pmic {
468                 pmic_int: pmic_int {
469                         rockchip,pins =
470                                 <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
471                 };
472         };
473
474         sdio-pwrseq {
475                 wifi_enable_h: wifi-enable-h {
476                         rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
477                 };
478         };
479
480         usb {
481                 vcc5v0_usb30_host_en_h: vcc5v0-usb30-host-en_h {
482                         rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
483                 };
484
485                 vcc5v0_usb_otg_en_h: vcc5v0-usb-otg-en_h {
486                         rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
487                 };
488         };
489 };
490
491 &pmu_io_domains {
492         status = "okay";
493         pmuio1-supply = <&vcc3v3_pmu>;
494         pmuio2-supply = <&vcc3v3_pmu>;
495         vccio1-supply = <&vccio_acodec>;
496         vccio2-supply = <&vcc_1v8>;
497         vccio3-supply = <&vccio_sd>;
498         vccio4-supply = <&vcc_1v8>;
499         vccio5-supply = <&vcc_3v3>;
500         vccio6-supply = <&vcc_1v8>;
501         vccio7-supply = <&vcc_3v3>;
502 };
503
504 &sdhci {
505         bus-width = <8>;
506         mmc-hs200-1_8v;
507         non-removable;
508         vmmc-supply = <&vcc_3v3>;
509         vqmmc-supply = <&vcc_1v8>;
510         status = "okay";
511 };
512
513 &sdmmc0 {
514         bus-width = <4>;
515         cap-sd-highspeed;
516         cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
517         disable-wp;
518         pinctrl-names = "default";
519         pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
520         sd-uhs-sdr104;
521         vmmc-supply = <&vcc3v3_sd>;
522         vqmmc-supply = <&vccio_sd>;
523         status = "okay";
524 };
525
526 &sdmmc1 {
527         bus-width = <4>;
528         cap-sd-highspeed;
529         cap-sdio-irq;
530         keep-power-in-suspend;
531         mmc-pwrseq = <&sdio_pwrseq>;
532         vmmc-supply = <&vcc3v3_sys>;
533         vqmmc-supply = <&vcca1v8_pmu>;
534         pinctrl-names = "default";
535         pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
536         status = "okay";
537 };
538
539 &tsadc {
540         status = "okay";
541 };
542
543 &uart0 {
544         pinctrl-names = "default";
545         pinctrl-0 = <&uart0_xfer>;
546         status = "okay";
547 };
548
549 &uart1 {
550         pinctrl-names = "default";
551         pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
552         status = "okay";
553         uart-has-rtscts;
554
555         bluetooth {
556                 compatible = "brcm,bcm43438-bt";
557                 clocks = <&rk809 1>;
558                 clock-names = "lpo";
559                 device-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
560                 host-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
561                 shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
562                 pinctrl-names = "default";
563                 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
564                 vbat-supply = <&vcc3v3_sys>;
565                 vddio-supply = <&vcca1v8_pmu>;
566         };
567 };
568
569 &uart2 {
570         status = "okay";
571 };
572
573 &usb2phy0_host {
574         phy-supply = <&vcc5v0_usb30_host>;
575         status = "okay";
576 };
577
578 &usb2phy0_otg {
579         phy-supply = <&vcc5v0_usb_otg>;
580         status = "okay";
581 };
582
583 &usb2phy1_otg {
584         phy-supply = <&vcc5v0_usb30_host>;
585         status = "okay";
586 };
587
588 &usb2phy0 {
589         status = "okay";
590 };
591
592 &usb2phy1 {
593         status = "okay";
594 };
595
596 &usb_host0_xhci {
597         status = "okay";
598 };
599
600 &usb_host1_xhci {
601         status = "okay";
602 };
603
604 &usb_host0_ehci {
605         status = "okay";
606 };
607
608 &usb_host0_ohci {
609         status = "okay";
610 };
611
612 &vop {
613         assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
614         assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
615         status = "okay";
616 };
617
618 &vop_mmu {
619         status = "okay";
620 };
621
622 &vp0 {
623         vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
624                 reg = <ROCKCHIP_VOP2_EP_HDMI0>;
625                 remote-endpoint = <&hdmi_in_vp0>;
626         };
627 };