arm64: dts: renesas: beacon: Don't make vccq_sdhi0 always on
[linux-2.6-microblaze.git] / arch / arm64 / boot / dts / renesas / beacon-renesom-baseboard.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright 2020, Compass Electronics Group, LLC
4  */
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10         backlight_lvds: backlight-lvds {
11                 compatible = "pwm-backlight";
12                 power-supply = <&reg_lcd>;
13                 enable-gpios = <&gpio_exp1 3 GPIO_ACTIVE_HIGH>;
14                 pwms = <&pwm2 0 25000>;
15                 brightness-levels = <0 4 8 16 32 64 128 255>;
16                 default-brightness-level = <6>;
17         };
18
19         backlight_dpi: backlight-dpi {
20                 compatible = "pwm-backlight";
21                 power-supply = <&reg_lcd>;
22                 enable-gpios = <&gpio_exp1 7 GPIO_ACTIVE_LOW>;
23                 pwms = <&pwm0 0 25000>;
24                 brightness-levels = <0 25 33 50 63 75 88 100>;
25                 default-brightness-level = <6>;
26         };
27
28         hdmi0-out {
29                 compatible = "hdmi-connector";
30                 type = "a";
31
32                 port {
33                         hdmi0_con: endpoint {
34                                 remote-endpoint = <&rcar_dw_hdmi0_out>;
35                         };
36                 };
37         };
38
39         keys {
40                 compatible = "gpio-keys";
41
42                 key-1 {
43                         gpios = <&gpio4 6 GPIO_ACTIVE_LOW>;
44                         linux,code = <KEY_1>;
45                         label = "Switch-1";
46                         wakeup-source;
47                         debounce-interval = <20>;
48                 };
49                 key-2 {
50                         gpios = <&gpio3 13 GPIO_ACTIVE_LOW>;
51                         linux,code = <KEY_2>;
52                         label = "Switch-2";
53                         wakeup-source;
54                         debounce-interval = <20>;
55                 };
56                 key-3 {
57                         gpios = <&gpio5 17 GPIO_ACTIVE_LOW>;
58                         linux,code = <KEY_3>;
59                         label = "Switch-3";
60                         wakeup-source;
61                         debounce-interval = <20>;
62                 };
63                 key-4 {
64                         gpios = <&gpio5 20 GPIO_ACTIVE_LOW>;
65                         linux,code = <KEY_4>;
66                         label = "Switch-4";
67                         wakeup-source;
68                         debounce-interval = <20>;
69                 };
70                 key-5 {
71                         gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
72                         linux,code = <KEY_5>;
73                         label = "Switch-4";
74                         wakeup-source;
75                         debounce-interval = <20>;
76                 };
77         };
78
79         leds {
80                 compatible = "gpio-leds";
81                 pinctrl-0 = <&led_pins>;
82                 pinctrl-names = "default";
83
84                 led0 {
85                         gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
86                         label = "LED0";
87                         linux,default-trigger = "heartbeat";
88                 };
89                 led1 {
90                         gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
91                         label = "LED1";
92                 };
93                 led2 {
94                         gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
95                         label = "LED2";
96                 };
97                 led3 {
98                         gpios = <&gpio7 3 GPIO_ACTIVE_HIGH>;
99                         label = "LED3";
100                 };
101         };
102
103         lvds {
104                 compatible = "panel-lvds";
105                 power-supply = <&reg_lcd_reset>;
106                 width-mm = <223>;
107                 height-mm = <125>;
108                 backlight = <&backlight_lvds>;
109                 data-mapping = "vesa-24";
110
111                 panel-timing {
112                         /* 800x480@60Hz */
113                         clock-frequency = <30000000>;
114                         hactive = <800>;
115                         vactive = <480>;
116                         hsync-len = <48>;
117                         hfront-porch = <40>;
118                         hback-porch = <40>;
119                         vfront-porch = <13>;
120                         vback-porch = <29>;
121                         vsync-len = <1>;
122                         hsync-active = <1>;
123                         vsync-active = <3>;
124                         de-active = <1>;
125                         pixelclk-active = <0>;
126                 };
127
128                 port {
129                         panel_in: endpoint {
130                                 remote-endpoint = <&lvds0_out>;
131                         };
132                 };
133         };
134
135         rgb {
136                 /* Different LCD with compatible timings */
137                 compatible = "rocktech,rk070er9427";
138                 backlight = <&backlight_dpi>;
139                 enable-gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
140                 power-supply = <&reg_lcd>;
141                 port {
142                         rgb_panel: endpoint {
143                                 remote-endpoint = <&du_out_rgb>;
144                         };
145                 };
146         };
147
148         reg_audio: regulator_audio {
149                 compatible = "regulator-fixed";
150                 regulator-name = "audio-1.8V";
151                 regulator-min-microvolt = <1800000>;
152                 regulator-max-microvolt = <1800000>;
153                 gpio = <&gpio_exp4 1 GPIO_ACTIVE_HIGH>;
154                 enable-active-high;
155         };
156
157         reg_lcd: regulator-lcd {
158                 compatible = "regulator-fixed";
159                 regulator-name = "lcd_panel_pwr";
160                 regulator-min-microvolt = <3300000>;
161                 regulator-max-microvolt = <3300000>;
162                 gpio = <&gpio_exp1 1 GPIO_ACTIVE_HIGH>;
163                 enable-active-high;
164         };
165
166         reg_lcd_reset: regulator-lcd-reset {
167                 compatible = "regulator-fixed";
168                 regulator-name = "nLCD_RESET";
169                 regulator-min-microvolt = <3300000>;
170                 regulator-max-microvolt = <3300000>;
171                 gpio = <&gpio5 3 GPIO_ACTIVE_HIGH>;
172                 enable-active-high;
173                 vin-supply = <&reg_lcd>;
174         };
175
176         reg_cam0: regulator_camera {
177                 compatible = "regulator-fixed";
178                 regulator-name = "reg_cam0";
179                 regulator-min-microvolt = <1800000>;
180                 regulator-max-microvolt = <1800000>;
181                 gpio = <&gpio_exp2 2 GPIO_ACTIVE_HIGH>;
182                 enable-active-high;
183         };
184
185         reg_cam1: regulator_camera {
186                 compatible = "regulator-fixed";
187                 regulator-name = "reg_cam1";
188                 regulator-min-microvolt = <1800000>;
189                 regulator-max-microvolt = <1800000>;
190                 gpio = <&gpio_exp2 5 GPIO_ACTIVE_HIGH>;
191                 enable-active-high;
192                 startup-delay-us = <100000>;
193         };
194
195         sound_card {
196                 compatible = "audio-graph-card";
197                 label = "rcar-sound";
198                 dais = <&rsnd_port0>, <&rsnd_port1>;
199         };
200
201         vccq_sdhi0: regulator-vccq-sdhi0 {
202                 compatible = "regulator-gpio";
203                 regulator-name = "SDHI0 VccQ";
204                 regulator-min-microvolt = <1800000>;
205                 regulator-max-microvolt = <3300000>;
206                 gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
207                 gpios-states = <1>;
208                 states = <3300000 1>, <1800000 0>;
209         };
210
211         /* External DU dot clocks */
212         x302_clk: x302-clock {
213                 compatible = "fixed-clock";
214                 #clock-cells = <0>;
215                 clock-frequency = <33000000>;
216         };
217
218         x304_clk: x304-clock {
219                 compatible = "fixed-clock";
220                 #clock-cells = <0>;
221                 clock-frequency = <25000000>;
222         };
223
224         connector {
225                 compatible = "usb-c-connector";
226                 label = "USB-C";
227                 data-role = "dual";
228
229                 ports {
230                         #address-cells = <1>;
231                         #size-cells = <0>;
232                         port@0 {
233                                 reg = <0>;
234                                 hs_ep: endpoint {
235                                         remote-endpoint = <&usb3_hs_ep>;
236                                 };
237                         };
238                         port@1 {
239                                 reg = <1>;
240                                 ss_ep: endpoint {
241                                         remote-endpoint = <&hd3ss3220_in_ep>;
242                                 };
243                         };
244                 };
245         };
246 };
247
248 &audio_clk_a {
249         clock-frequency = <24576000>;
250         assigned-clocks = <&versaclock6_bb 4>;
251         assigned-clock-rates = <24576000>;
252 };
253
254 &audio_clk_b {
255         clock-frequency = <22579200>;
256 };
257
258 &can0 {
259         pinctrl-0 = <&can0_pins>;
260         pinctrl-names = "default";
261         renesas,can-clock-select = <0x0>;
262         status = "okay";
263 };
264
265 &can1 {
266         pinctrl-0 = <&can1_pins>;
267         pinctrl-names = "default";
268         renesas,can-clock-select = <0x0>;
269         status = "okay";
270 };
271
272 &du {
273         pinctrl-0 = <&du_pins>;
274         pinctrl-names = "default";
275         status = "okay";
276
277         clocks = <&cpg CPG_MOD 724>,
278                 <&cpg CPG_MOD 723>,
279                 <&cpg CPG_MOD 722>,
280                 <&versaclock5 1>,
281                 <&x302_clk>,
282                 <&versaclock5 2>;
283         clock-names = "du.0", "du.1", "du.2",
284                 "dclkin.0", "dclkin.1", "dclkin.2";
285 };
286
287 &du_out_rgb {
288         remote-endpoint = <&rgb_panel>;
289 };
290
291 &ehci0 {
292         dr_mode = "otg";
293         status = "okay";
294         clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
295 };
296
297 &ehci1 {
298         status = "okay";
299         clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
300 };
301
302 &hdmi0 {
303         status = "okay";
304         ports {
305                 #address-cells = <1>;
306                 #size-cells = <0>;
307                 port@0 {
308                         reg = <0>;
309                         dw_hdmi0_in: endpoint {
310                                 remote-endpoint = <&du_out_hdmi0>;
311                         };
312                 };
313                 port@1 {
314                         reg = <1>;
315                         rcar_dw_hdmi0_out: endpoint {
316                                 remote-endpoint = <&hdmi0_con>;
317                         };
318                 };
319                 port@2 {
320                         reg = <2>;
321                         dw_hdmi0_snd_in: endpoint {
322                                 remote-endpoint = <&rsnd_endpoint1>;
323                         };
324                 };
325         };
326 };
327
328 &hscif1 {
329         pinctrl-0 = <&hscif1_pins>;
330         pinctrl-names = "default";
331         uart-has-rtscts;
332         status = "okay";
333 };
334
335 &hsusb {
336         dr_mode = "otg";
337         status = "okay";
338 };
339
340 &i2c2 {
341         status = "okay";
342         clock-frequency = <100000>;
343         pinctrl-0 = <&i2c2_pins>;
344         pinctrl-names = "default";
345
346         gpio_exp2: gpio@21 {
347                 compatible = "onnn,pca9654";
348                 reg = <0x21>;
349                 gpio-controller;
350                 #gpio-cells = <2>;
351         };
352
353         gpio_exp3: gpio@22 {
354                 compatible = "onnn,pca9654";
355                 reg = <0x22>;
356                 gpio-controller;
357                 #gpio-cells = <2>;
358         };
359
360         gpio_exp4: gpio@23 {
361                 compatible = "onnn,pca9654";
362                 reg = <0x23>;
363                 gpio-controller;
364                 #gpio-cells = <2>;
365         };
366
367         versaclock6_bb: clock-controller@6a {
368                 compatible = "idt,5p49v6965";
369                 reg = <0x6a>;
370                 #clock-cells = <1>;
371                 clocks = <&x304_clk>;
372                 clock-names = "xin";
373                 /* CSI0_MCLK, CSI1_MCLK, AUDIO_CLKIN, USB_HUB_MCLK_BB */
374                 assigned-clocks = <&versaclock6_bb 1>,
375                                    <&versaclock6_bb 2>,
376                                    <&versaclock6_bb 3>,
377                                    <&versaclock6_bb 4>;
378                 assigned-clock-rates =  <24000000>, <24000000>, <24000000>, <24576000>;
379         };
380 };
381
382 &i2c0 {
383         status = "okay";
384         clock-frequency = <400000>;
385
386         pinctrl-0 = <&i2c0_pins>;
387         pinctrl-names = "default";
388 };
389
390 &i2c5 {
391         status = "okay";
392         clock-frequency = <100000>;
393         pinctrl-0 = <&i2c5_pins>;
394         pinctrl-names = "default";
395
396         codec: wm8962@1a {
397                 compatible = "wlf,wm8962";
398                 reg = <0x1a>;
399                 DCVDD-supply = <&reg_audio>;
400                 DBVDD-supply = <&reg_audio>;
401                 AVDD-supply = <&reg_audio>;
402                 CPVDD-supply = <&reg_audio>;
403                 MICVDD-supply = <&reg_audio>;
404                 PLLVDD-supply = <&reg_audio>;
405                 SPKVDD1-supply = <&reg_audio>;
406                 SPKVDD2-supply = <&reg_audio>;
407                 gpio-cfg = <
408                         0x0000 /* 0:Default */
409                         0x0000 /* 1:Default */
410                         0x0000 /* 2:Default */
411                         0x0000 /* 3:Default */
412                         0x0000 /* 4:Default */
413                         0x0000 /* 5:Default */
414                 >;
415                 port {
416                         wm8962_endpoint: endpoint {
417                                 remote-endpoint = <&rsnd_endpoint0>;
418                         };
419                 };
420         };
421
422         /* 0 - lcd_reset */
423         /* 1 - lcd_pwr */
424         /* 2 - lcd_select */
425         /* 3 - backlight-enable */
426         /* 4 - Touch_shdwn */
427         /* 5 - LCD_H_pol */
428         /* 6 - lcd_V_pol */
429         gpio_exp1: gpio@20 {
430                 compatible = "onnn,pca9654";
431                 reg = <0x20>;
432                 gpio-controller;
433                 #gpio-cells = <2>;
434         };
435
436         touchscreen@26 {
437                 compatible = "ilitek,ili2117";
438                 reg = <0x26>;
439                 interrupt-parent = <&gpio5>;
440                 interrupts = <9 IRQ_TYPE_EDGE_RISING>;
441                 wakeup-source;
442         };
443
444         hd3ss3220@47 {
445                 compatible = "ti,hd3ss3220";
446                 reg = <0x47>;
447                 interrupt-parent = <&gpio6>;
448                 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
449
450                 ports {
451                         #address-cells = <1>;
452                         #size-cells = <0>;
453                         port@0 {
454                                 reg = <0>;
455                                 hd3ss3220_in_ep: endpoint {
456                                         remote-endpoint = <&ss_ep>;
457                                 };
458                         };
459                         port@1 {
460                                 reg = <1>;
461                                 hd3ss3220_out_ep: endpoint {
462                                         remote-endpoint = <&usb3_role_switch>;
463                                 };
464                         };
465                 };
466         };
467 };
468
469 &lvds0 {
470         status = "okay";
471
472         ports {
473                 port@1 {
474                         lvds0_out: endpoint {
475                                 remote-endpoint = <&panel_in>;
476                         };
477                 };
478         };
479 };
480
481 &ohci0 {
482         dr_mode = "otg";
483         status = "okay";
484 };
485
486 &ohci1 {
487         status = "okay";
488 };
489
490 &pciec0 {
491         status = "okay";
492 };
493
494 &pciec1 {
495         status = "okay";
496 };
497
498 &pcie_bus_clk {
499         clock-frequency = <100000000>;
500 };
501
502 &pfc {
503         can0_pins: can0 {
504                 groups = "can0_data_a";
505                 function = "can0";
506         };
507
508         can1_pins: can1 {
509                 groups = "can1_data";
510                 function = "can1";
511         };
512
513         du_pins: du {
514                 groups = "du_rgb888", "du_sync", "du_clk_out_1", "du_disp";
515                 function = "du";
516         };
517
518         i2c2_pins: i2c2 {
519                 groups = "i2c2_a";
520                 function = "i2c2";
521         };
522
523         i2c5_pins: i2c5 {
524                 groups = "i2c5";
525                 function = "i2c5";
526         };
527
528         led_pins: leds {
529                 /* GP_0_4 , AVS1, AVS2, GP_7_3 */
530                 pins = "GP_0_4", "GP_7_0", "GP_7_1", "GP_7_3";
531                 bias-pull-down;
532         };
533
534         pwm0_pins: pwm0 {
535                 groups = "pwm0";
536                 function = "pwm0";
537         };
538
539         pwm2_pins: pwm2 {
540                 groups = "pwm2_a";
541                 function = "pwm2";
542         };
543
544         sdhi0_pins: sd0 {
545                 groups = "sdhi0_data4", "sdhi0_ctrl";
546                 function = "sdhi0";
547                 power-source = <3300>;
548         };
549
550         sdhi0_pins_uhs: sd0_uhs {
551                 groups = "sdhi0_data4", "sdhi0_ctrl";
552                 function = "sdhi0";
553                 power-source = <1800>;
554         };
555
556         sound_pins: sound {
557                 groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
558                 function = "ssi";
559         };
560
561         sound_clk_pins: sound_clk {
562                 groups = "audio_clk_a_a";
563                 function = "audio_clk";
564         };
565
566         usb0_pins: usb0 {
567                 mux {
568                         groups = "usb0";
569                         function = "usb0";
570                 };
571         };
572
573         usb1_pins: usb1 {
574                 mux {
575                         groups = "usb1";
576                         function = "usb1";
577                 };
578         };
579
580         usb30_pins: usb30 {
581                 mux {
582                         groups = "usb30";
583                         function = "usb30";
584                 };
585         };
586 };
587
588 &pwm0 {
589         pinctrl-0 = <&pwm0_pins>;
590         pinctrl-names = "default";
591         status = "okay";
592 };
593
594 &pwm2 {
595         pinctrl-0 = <&pwm2_pins>;
596         pinctrl-names = "default";
597         status = "okay";
598 };
599
600 &rcar_sound {
601         pinctrl-0 = <&sound_pins &sound_clk_pins>;
602         pinctrl-names = "default";
603
604         /* Single DAI */
605         #sound-dai-cells = <0>;
606
607         /* audio_clkout0/1/2/3 */
608         #clock-cells = <1>;
609         clock-frequency = <11289600>;
610
611         status = "okay";
612
613         clocks = <&cpg CPG_MOD 1005>,
614                  <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
615                  <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
616                  <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
617                  <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
618                  <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
619                  <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
620                  <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
621                  <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
622                  <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
623                  <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
624                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
625                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
626                  <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
627                  <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>,
628                  <&cpg CPG_CORE R8A774A1_CLK_S0D4>;
629
630         ports {
631                 #address-cells = <1>;
632                 #size-cells = <0>;
633                 rsnd_port0: port@0 {
634                         reg = <0>;
635                         rsnd_endpoint0: endpoint {
636                                 remote-endpoint = <&wm8962_endpoint>;
637
638                                 dai-format = "i2s";
639                                 bitclock-master = <&rsnd_endpoint0>;
640                                 frame-master = <&rsnd_endpoint0>;
641
642                                 playback = <&ssi1 &dvc1 &src1>;
643                                 capture = <&ssi0>;
644                         };
645                 };
646                 rsnd_port1: port@1 {
647                     reg = <0x01>;
648                         rsnd_endpoint1: endpoint {
649                                 remote-endpoint = <&dw_hdmi0_snd_in>;
650
651                                 dai-format = "i2s";
652                                 bitclock-master = <&rsnd_endpoint1>;
653                                 frame-master = <&rsnd_endpoint1>;
654
655                                 playback = <&ssi2>;
656                         };
657                 };
658         };
659 };
660
661 &rwdt {
662         status = "okay";
663         timeout-sec = <60>;
664 };
665
666 &scif0 {
667         pinctrl-0 = <&scif0_pins>;
668         pinctrl-names = "default";
669         status = "okay";
670 };
671
672 &scif5 {
673         pinctrl-0 = <&scif5_pins>;
674         pinctrl-names = "default";
675         status = "okay";
676 };
677
678 &scif_clk {
679         clock-frequency = <14745600>;
680 };
681
682 &sdhi0 {
683         pinctrl-0 = <&sdhi0_pins>;
684         pinctrl-1 = <&sdhi0_pins_uhs>;
685         pinctrl-names = "default", "state_uhs";
686         vmmc-supply = <&reg_3p3v>;
687         vqmmc-supply = <&vccq_sdhi0>;
688         cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
689         bus-width = <4>;
690         sd-uhs-sdr50;
691         sd-uhs-sdr104;
692         status = "okay";
693 };
694
695 &ssi1 {
696         shared-pin;
697 };
698
699 &tmu0 {
700         status = "okay";
701 };
702
703 &tmu1 {
704         status = "okay";
705 };
706
707 &tmu2 {
708         status = "okay";
709 };
710
711 &tmu3 {
712         status = "okay";
713 };
714
715 &tmu4 {
716         status = "okay";
717 };
718
719 &usb2_phy0 {
720         pinctrl-0 = <&usb0_pins>;
721         pinctrl-names = "default";
722         status = "okay";
723 };
724
725 &usb2_phy1 {
726         pinctrl-0 = <&usb1_pins>;
727         pinctrl-names = "default";
728         status = "okay";
729 };
730
731 &usb3_peri0 {
732         companion = <&xhci0>;
733         status = "okay";
734         usb-role-switch;
735
736         ports {
737                 #address-cells = <1>;
738                 #size-cells = <0>;
739                 port@0 {
740                         reg = <0>;
741                         usb3_hs_ep: endpoint {
742                                 remote-endpoint = <&hs_ep>;
743                         };
744                 };
745                 port@1 {
746                         reg = <1>;
747                         usb3_role_switch: endpoint {
748                                 remote-endpoint = <&hd3ss3220_out_ep>;
749                         };
750                 };
751         };
752 };
753
754 &usb3_phy0 {
755         status = "okay";
756 };
757
758 &vin0 {
759         status = "okay";
760 };
761 &vin1 {
762         status = "okay";
763 };
764 &vin2 {
765         status = "okay";
766 };
767 &vin3 {
768         status = "okay";
769 };
770 &vin4 {
771         status = "okay";
772 };
773 &vin5 {
774         status = "okay";
775 };
776 &vin6 {
777         status = "okay";
778 };
779 &vin7 {
780         status = "okay";
781 };
782
783 &xhci0
784 {
785         pinctrl-0 = <&usb30_pins>;
786         pinctrl-names = "default";
787         status = "okay";
788 };