OSDN Git Service

smb3: Add defines for new information level, FileIdInformation
[tomoyo/tomoyo-test1.git] / arch / arm64 / boot / dts / rockchip / rk3399-rock-pi-4.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2019 Akash Gajjar <Akash_Gajjar@mentor.com>
4  * Copyright (c) 2019 Pragnesh Patel <Pragnesh_Patel@mentor.com>
5  */
6
7 /dts-v1/;
8 #include <dt-bindings/input/linux-event-codes.h>
9 #include <dt-bindings/pwm/pwm.h>
10 #include "rk3399.dtsi"
11 #include "rk3399-opp.dtsi"
12
13 / {
14         model = "Radxa ROCK Pi 4";
15         compatible = "radxa,rockpi4", "rockchip,rk3399";
16
17         chosen {
18                 stdout-path = "serial2:1500000n8";
19         };
20
21         clkin_gmac: external-gmac-clock {
22                 compatible = "fixed-clock";
23                 clock-frequency = <125000000>;
24                 clock-output-names = "clkin_gmac";
25                 #clock-cells = <0>;
26         };
27
28         sdio_pwrseq: sdio-pwrseq {
29                 compatible = "mmc-pwrseq-simple";
30                 clocks = <&rk808 1>;
31                 clock-names = "ext_clock";
32                 pinctrl-names = "default";
33                 pinctrl-0 = <&wifi_enable_h>;
34                 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
35         };
36
37         vcc12v_dcin: dc-12v {
38                 compatible = "regulator-fixed";
39                 regulator-name = "vcc12v_dcin";
40                 regulator-always-on;
41                 regulator-boot-on;
42                 regulator-min-microvolt = <12000000>;
43                 regulator-max-microvolt = <12000000>;
44         };
45
46         vcc5v0_sys: vcc-sys {
47                 compatible = "regulator-fixed";
48                 regulator-name = "vcc5v0_sys";
49                 regulator-always-on;
50                 regulator-boot-on;
51                 regulator-min-microvolt = <5000000>;
52                 regulator-max-microvolt = <5000000>;
53                 vin-supply = <&vcc12v_dcin>;
54         };
55
56         vcc3v3_pcie: vcc3v3-pcie-regulator {
57                 compatible = "regulator-fixed";
58                 enable-active-high;
59                 gpio = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
60                 pinctrl-names = "default";
61                 pinctrl-0 = <&pcie_pwr_en>;
62                 regulator-name = "vcc3v3_pcie";
63                 regulator-always-on;
64                 regulator-boot-on;
65                 vin-supply = <&vcc5v0_sys>;
66         };
67
68         vcc3v3_sys: vcc3v3-sys {
69                 compatible = "regulator-fixed";
70                 regulator-name = "vcc3v3_sys";
71                 regulator-always-on;
72                 regulator-boot-on;
73                 regulator-min-microvolt = <3300000>;
74                 regulator-max-microvolt = <3300000>;
75                 vin-supply = <&vcc5v0_sys>;
76         };
77
78         vcc5v0_host: vcc5v0-host-regulator {
79                 compatible = "regulator-fixed";
80                 enable-active-high;
81                 gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
82                 pinctrl-names = "default";
83                 pinctrl-0 = <&vcc5v0_host_en>;
84                 regulator-name = "vcc5v0_host";
85                 regulator-always-on;
86                 vin-supply = <&vcc5v0_sys>;
87         };
88
89         vcc5v0_typec: vcc5v0-typec-regulator {
90                 compatible = "regulator-fixed";
91                 enable-active-high;
92                 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
93                 pinctrl-names = "default";
94                 pinctrl-0 = <&vcc5v0_typec_en>;
95                 regulator-name = "vcc5v0_typec";
96                 regulator-always-on;
97                 vin-supply = <&vcc5v0_sys>;
98         };
99
100         vcc_lan: vcc3v3-phy-regulator {
101                 compatible = "regulator-fixed";
102                 regulator-name = "vcc_lan";
103                 regulator-always-on;
104                 regulator-boot-on;
105                 regulator-min-microvolt = <3300000>;
106                 regulator-max-microvolt = <3300000>;
107
108                 regulator-state-mem {
109                         regulator-off-in-suspend;
110                 };
111         };
112
113         vdd_log: vdd-log {
114                 compatible = "pwm-regulator";
115                 pwms = <&pwm2 0 25000 1>;
116                 regulator-name = "vdd_log";
117                 regulator-always-on;
118                 regulator-boot-on;
119                 regulator-min-microvolt = <800000>;
120                 regulator-max-microvolt = <1400000>;
121                 vin-supply = <&vcc5v0_sys>;
122         };
123 };
124
125 &cpu_l0 {
126         cpu-supply = <&vdd_cpu_l>;
127 };
128
129 &cpu_l1 {
130         cpu-supply = <&vdd_cpu_l>;
131 };
132
133 &cpu_l2 {
134         cpu-supply = <&vdd_cpu_l>;
135 };
136
137 &cpu_l3 {
138         cpu-supply = <&vdd_cpu_l>;
139 };
140
141 &cpu_b0 {
142         cpu-supply = <&vdd_cpu_b>;
143 };
144
145 &cpu_b1 {
146         cpu-supply = <&vdd_cpu_b>;
147 };
148
149 &emmc_phy {
150         status = "okay";
151 };
152
153 &gmac {
154         assigned-clocks = <&cru SCLK_RMII_SRC>;
155         assigned-clock-parents = <&clkin_gmac>;
156         clock_in_out = "input";
157         phy-supply = <&vcc_lan>;
158         phy-mode = "rgmii";
159         pinctrl-names = "default";
160         pinctrl-0 = <&rgmii_pins>;
161         snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
162         snps,reset-active-low;
163         snps,reset-delays-us = <0 10000 50000>;
164         tx_delay = <0x28>;
165         rx_delay = <0x11>;
166         status = "okay";
167 };
168
169 &gpu {
170         mali-supply = <&vdd_gpu>;
171         status = "okay";
172 };
173
174 &hdmi {
175         ddc-i2c-bus = <&i2c3>;
176         pinctrl-names = "default";
177         pinctrl-0 = <&hdmi_cec>;
178         status = "okay";
179 };
180
181 &hdmi_sound {
182         status = "okay";
183 };
184
185 &i2c0 {
186         clock-frequency = <400000>;
187         i2c-scl-rising-time-ns = <168>;
188         i2c-scl-falling-time-ns = <4>;
189         status = "okay";
190
191         rk808: pmic@1b {
192                 compatible = "rockchip,rk808";
193                 reg = <0x1b>;
194                 interrupt-parent = <&gpio1>;
195                 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
196                 #clock-cells = <1>;
197                 clock-output-names = "xin32k", "rk808-clkout2";
198                 pinctrl-names = "default";
199                 pinctrl-0 = <&pmic_int_l>;
200                 rockchip,system-power-controller;
201                 wakeup-source;
202
203                 vcc1-supply = <&vcc5v0_sys>;
204                 vcc2-supply = <&vcc5v0_sys>;
205                 vcc3-supply = <&vcc5v0_sys>;
206                 vcc4-supply = <&vcc5v0_sys>;
207                 vcc6-supply = <&vcc5v0_sys>;
208                 vcc7-supply = <&vcc5v0_sys>;
209                 vcc8-supply = <&vcc3v3_sys>;
210                 vcc9-supply = <&vcc5v0_sys>;
211                 vcc10-supply = <&vcc5v0_sys>;
212                 vcc11-supply = <&vcc5v0_sys>;
213                 vcc12-supply = <&vcc3v3_sys>;
214                 vddio-supply = <&vcc_1v8>;
215
216                 regulators {
217                         vdd_center: DCDC_REG1 {
218                                 regulator-name = "vdd_center";
219                                 regulator-always-on;
220                                 regulator-boot-on;
221                                 regulator-min-microvolt = <750000>;
222                                 regulator-max-microvolt = <1350000>;
223                                 regulator-ramp-delay = <6001>;
224                                 regulator-state-mem {
225                                         regulator-off-in-suspend;
226                                 };
227                         };
228
229                         vdd_cpu_l: DCDC_REG2 {
230                                 regulator-name = "vdd_cpu_l";
231                                 regulator-always-on;
232                                 regulator-boot-on;
233                                 regulator-min-microvolt = <750000>;
234                                 regulator-max-microvolt = <1350000>;
235                                 regulator-ramp-delay = <6001>;
236                                 regulator-state-mem {
237                                         regulator-off-in-suspend;
238                                 };
239                         };
240
241                         vcc_ddr: DCDC_REG3 {
242                                 regulator-name = "vcc_ddr";
243                                 regulator-always-on;
244                                 regulator-boot-on;
245                                 regulator-state-mem {
246                                         regulator-on-in-suspend;
247                                 };
248                         };
249
250                         vcc_1v8: DCDC_REG4 {
251                                 regulator-name = "vcc_1v8";
252                                 regulator-always-on;
253                                 regulator-boot-on;
254                                 regulator-min-microvolt = <1800000>;
255                                 regulator-max-microvolt = <1800000>;
256                                 regulator-state-mem {
257                                         regulator-on-in-suspend;
258                                         regulator-suspend-microvolt = <1800000>;
259                                 };
260                         };
261
262                         vcc1v8_codec: LDO_REG1 {
263                                 regulator-name = "vcc1v8_codec";
264                                 regulator-always-on;
265                                 regulator-boot-on;
266                                 regulator-min-microvolt = <1800000>;
267                                 regulator-max-microvolt = <1800000>;
268                                 regulator-state-mem {
269                                         regulator-off-in-suspend;
270                                 };
271                         };
272
273                         vcc1v8_hdmi: LDO_REG2 {
274                                 regulator-name = "vcc1v8_hdmi";
275                                 regulator-always-on;
276                                 regulator-boot-on;
277                                 regulator-min-microvolt = <1800000>;
278                                 regulator-max-microvolt = <1800000>;
279                                 regulator-state-mem {
280                                         regulator-off-in-suspend;
281                                 };
282                         };
283
284                         vcca_1v8: LDO_REG3 {
285                                 regulator-name = "vcca_1v8";
286                                 regulator-always-on;
287                                 regulator-boot-on;
288                                 regulator-min-microvolt = <1800000>;
289                                 regulator-max-microvolt = <1800000>;
290                                 regulator-state-mem {
291                                         regulator-on-in-suspend;
292                                         regulator-suspend-microvolt = <1800000>;
293                                 };
294                         };
295
296                         vcc_sdio: LDO_REG4 {
297                                 regulator-name = "vcc_sdio";
298                                 regulator-always-on;
299                                 regulator-boot-on;
300                                 regulator-min-microvolt = <3000000>;
301                                 regulator-max-microvolt = <3000000>;
302                                 regulator-state-mem {
303                                         regulator-on-in-suspend;
304                                         regulator-suspend-microvolt = <3000000>;
305                                 };
306                         };
307
308                         vcca3v0_codec: LDO_REG5 {
309                                 regulator-name = "vcca3v0_codec";
310                                 regulator-always-on;
311                                 regulator-boot-on;
312                                 regulator-min-microvolt = <3000000>;
313                                 regulator-max-microvolt = <3000000>;
314                                 regulator-state-mem {
315                                         regulator-off-in-suspend;
316                                 };
317                         };
318
319                         vcc_1v5: LDO_REG6 {
320                                 regulator-name = "vcc_1v5";
321                                 regulator-always-on;
322                                 regulator-boot-on;
323                                 regulator-min-microvolt = <1500000>;
324                                 regulator-max-microvolt = <1500000>;
325                                 regulator-state-mem {
326                                         regulator-on-in-suspend;
327                                         regulator-suspend-microvolt = <1500000>;
328                                 };
329                         };
330
331                         vcc0v9_hdmi: LDO_REG7 {
332                                 regulator-name = "vcc0v9_hdmi";
333                                 regulator-always-on;
334                                 regulator-boot-on;
335                                 regulator-min-microvolt = <900000>;
336                                 regulator-max-microvolt = <900000>;
337                                 regulator-state-mem {
338                                         regulator-off-in-suspend;
339                                 };
340                         };
341
342                         vcc_3v0: LDO_REG8 {
343                                 regulator-name = "vcc_3v0";
344                                 regulator-always-on;
345                                 regulator-boot-on;
346                                 regulator-min-microvolt = <3000000>;
347                                 regulator-max-microvolt = <3000000>;
348                                 regulator-state-mem {
349                                         regulator-on-in-suspend;
350                                         regulator-suspend-microvolt = <3000000>;
351                                 };
352                         };
353
354                         vcc_cam: SWITCH_REG1 {
355                                 regulator-name = "vcc_cam";
356                                 regulator-always-on;
357                                 regulator-boot-on;
358                                 regulator-min-microvolt = <3300000>;
359                                 regulator-max-microvolt = <3300000>;
360                                 regulator-state-mem {
361                                         regulator-off-in-suspend;
362                                 };
363                         };
364
365                         vcc_mipi: SWITCH_REG2 {
366                                 regulator-name = "vcc_mipi";
367                                 regulator-always-on;
368                                 regulator-boot-on;
369                                 regulator-min-microvolt = <3300000>;
370                                 regulator-max-microvolt = <3300000>;
371                                 regulator-state-mem {
372                                         regulator-off-in-suspend;
373                                 };
374                         };
375                 };
376         };
377
378         vdd_cpu_b: regulator@40 {
379                 compatible = "silergy,syr827";
380                 reg = <0x40>;
381                 fcs,suspend-voltage-selector = <1>;
382                 pinctrl-names = "default";
383                 pinctrl-0 = <&vsel1_gpio>;
384                 regulator-name = "vdd_cpu_b";
385                 regulator-min-microvolt = <712500>;
386                 regulator-max-microvolt = <1500000>;
387                 regulator-ramp-delay = <1000>;
388                 regulator-always-on;
389                 regulator-boot-on;
390                 vin-supply = <&vcc5v0_sys>;
391
392                 regulator-state-mem {
393                         regulator-off-in-suspend;
394                 };
395         };
396
397         vdd_gpu: regulator@41 {
398                 compatible = "silergy,syr828";
399                 reg = <0x41>;
400                 fcs,suspend-voltage-selector = <1>;
401                 pinctrl-names = "default";
402                 pinctrl-0 = <&vsel2_gpio>;
403                 regulator-name = "vdd_gpu";
404                 regulator-min-microvolt = <712500>;
405                 regulator-max-microvolt = <1500000>;
406                 regulator-ramp-delay = <1000>;
407                 regulator-always-on;
408                 regulator-boot-on;
409                 vin-supply = <&vcc5v0_sys>;
410
411                 regulator-state-mem {
412                         regulator-off-in-suspend;
413                 };
414         };
415 };
416
417 &i2c1 {
418         i2c-scl-rising-time-ns = <300>;
419         i2c-scl-falling-time-ns = <15>;
420         status = "okay";
421 };
422
423 &i2c3 {
424         i2c-scl-rising-time-ns = <450>;
425         i2c-scl-falling-time-ns = <15>;
426         status = "okay";
427 };
428
429 &i2c4 {
430         i2c-scl-rising-time-ns = <600>;
431         i2c-scl-falling-time-ns = <20>;
432         status = "okay";
433 };
434
435 &i2s0 {
436         rockchip,playback-channels = <8>;
437         rockchip,capture-channels = <8>;
438         status = "okay";
439 };
440
441 &i2s1 {
442         rockchip,playback-channels = <2>;
443         rockchip,capture-channels = <2>;
444         status = "okay";
445 };
446
447 &i2s2 {
448         status = "okay";
449 };
450
451 &io_domains {
452         status = "okay";
453
454         bt656-supply = <&vcc_3v0>;
455         audio-supply = <&vcc_3v0>;
456         sdmmc-supply = <&vcc_sdio>;
457         gpio1830-supply = <&vcc_3v0>;
458 };
459
460 &pmu_io_domains {
461         status = "okay";
462
463         pmu1830-supply = <&vcc_3v0>;
464 };
465
466 &pinctrl {
467         bt {
468                 bt_enable_h: bt-enable-h {
469                         rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
470                 };
471
472                 bt_host_wake_l: bt-host-wake-l {
473                         rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
474                 };
475
476                 bt_wake_l: bt-wake-l {
477                         rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
478                 };
479         };
480
481         pcie {
482                 pcie_pwr_en: pcie-pwr-en {
483                         rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
484                 };
485         };
486
487         sdio0 {
488                 sdio0_bus4: sdio0-bus4 {
489                         rockchip,pins = <2 RK_PC4 1 &pcfg_pull_up_20ma>,
490                                         <2 RK_PC5 1 &pcfg_pull_up_20ma>,
491                                         <2 RK_PC6 1 &pcfg_pull_up_20ma>,
492                                         <2 RK_PC7 1 &pcfg_pull_up_20ma>;
493                 };
494
495                 sdio0_cmd: sdio0-cmd {
496                         rockchip,pins = <2 RK_PD0 1 &pcfg_pull_up_20ma>;
497                 };
498
499                 sdio0_clk: sdio0-clk {
500                         rockchip,pins = <2 RK_PD1 1 &pcfg_pull_none_20ma>;
501                 };
502         };
503
504         pmic {
505                 pmic_int_l: pmic-int-l {
506                         rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
507                 };
508
509                 vsel1_gpio: vsel1-gpio {
510                         rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
511                 };
512
513                 vsel2_gpio: vsel2-gpio {
514                         rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
515                 };
516         };
517
518         usb-typec {
519                 vcc5v0_typec_en: vcc5v0-typec-en {
520                         rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
521                 };
522         };
523
524         usb2 {
525                 vcc5v0_host_en: vcc5v0-host-en {
526                         rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
527                 };
528         };
529
530         wifi {
531                 wifi_enable_h: wifi-enable-h {
532                         rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
533                 };
534
535                 wifi_host_wake_l: wifi-host-wake-l {
536                         rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
537                 };
538         };
539 };
540
541 &pwm2 {
542         status = "okay";
543 };
544
545 &saradc {
546         status = "okay";
547
548         vref-supply = <&vcc_1v8>;
549 };
550
551 &sdio0 {
552         #address-cells = <1>;
553         #size-cells = <0>;
554         bus-width = <4>;
555         clock-frequency = <50000000>;
556         cap-sdio-irq;
557         cap-sd-highspeed;
558         keep-power-in-suspend;
559         mmc-pwrseq = <&sdio_pwrseq>;
560         non-removable;
561         pinctrl-names = "default";
562         pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
563         sd-uhs-sdr104;
564         status = "okay";
565
566         brcmf: wifi@1 {
567                 compatible = "brcm,bcm4329-fmac";
568                 reg = <1>;
569                 interrupt-parent = <&gpio0>;
570                 interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
571                 interrupt-names = "host-wake";
572                 pinctrl-names = "default";
573                 pinctrl-0 = <&wifi_host_wake_l>;
574         };
575 };
576
577 &sdmmc {
578         bus-width = <4>;
579         cap-mmc-highspeed;
580         cap-sd-highspeed;
581         cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
582         disable-wp;
583         max-frequency = <150000000>;
584         pinctrl-names = "default";
585         pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
586         status = "okay";
587 };
588
589 &sdhci {
590         bus-width = <8>;
591         mmc-hs400-1_8v;
592         mmc-hs400-enhanced-strobe;
593         non-removable;
594         status = "okay";
595 };
596
597 &tcphy0 {
598         status = "okay";
599 };
600
601 &tcphy1 {
602         status = "okay";
603 };
604
605 &tsadc {
606         status = "okay";
607
608         /* tshut mode 0:CRU 1:GPIO */
609         rockchip,hw-tshut-mode = <1>;
610         /* tshut polarity 0:LOW 1:HIGH */
611         rockchip,hw-tshut-polarity = <1>;
612 };
613
614 &u2phy0 {
615         status = "okay";
616
617         u2phy0_otg: otg-port {
618                 status = "okay";
619         };
620
621         u2phy0_host: host-port {
622                 phy-supply = <&vcc5v0_host>;
623                 status = "okay";
624         };
625 };
626
627 &u2phy1 {
628         status = "okay";
629
630         u2phy1_otg: otg-port {
631                 status = "okay";
632         };
633
634         u2phy1_host: host-port {
635                 phy-supply = <&vcc5v0_host>;
636                 status = "okay";
637         };
638 };
639
640 &uart0 {
641         pinctrl-names = "default";
642         pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
643         status = "okay";
644
645         bluetooth {
646                 compatible = "brcm,bcm43438-bt";
647                 clocks = <&rk808 1>;
648                 clock-names = "ext_clock";
649                 device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
650                 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
651                 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
652                 pinctrl-names = "default";
653                 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
654         };
655 };
656
657 &uart2 {
658         status = "okay";
659 };
660
661 &usb_host0_ehci {
662         status = "okay";
663 };
664
665 &usb_host0_ohci {
666         status = "okay";
667 };
668
669 &usb_host1_ehci {
670         status = "okay";
671 };
672
673 &usb_host1_ohci {
674         status = "okay";
675 };
676
677 &usbdrd3_0 {
678         status = "okay";
679 };
680
681 &usbdrd_dwc3_0 {
682         status = "okay";
683         dr_mode = "otg";
684 };
685
686 &usbdrd3_1 {
687         status = "okay";
688 };
689
690 &usbdrd_dwc3_1 {
691         status = "okay";
692         dr_mode = "host";
693 };
694
695 &vopb {
696         status = "okay";
697 };
698
699 &vopb_mmu {
700         status = "okay";
701 };
702
703 &vopl {
704         status = "okay";
705 };
706
707 &vopl_mmu {
708         status = "okay";
709 };