arm64: dts: renesas: ebisu: Add and enable SDHI device nodes
[linux-2.6-block.git] / arch / arm64 / boot / dts / renesas / r8a77990-ebisu.dts
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Device Tree Source for the ebisu board
4  *
5  * Copyright (C) 2018 Renesas Electronics Corp.
6  */
7
8 /dts-v1/;
9 #include "r8a77990.dtsi"
10 #include <dt-bindings/gpio/gpio.h>
11
12 / {
13         model = "Renesas Ebisu board based on r8a77990";
14         compatible = "renesas,ebisu", "renesas,r8a77990";
15
16         aliases {
17                 serial0 = &scif2;
18                 ethernet0 = &avb;
19         };
20
21         chosen {
22                 bootargs = "ignore_loglevel";
23                 stdout-path = "serial0:115200n8";
24         };
25
26         memory@48000000 {
27                 device_type = "memory";
28                 /* first 128MB is reserved for secure area. */
29                 reg = <0x0 0x48000000 0x0 0x38000000>;
30         };
31
32         audio_clkout: audio-clkout {
33                 /*
34                  * This is same as <&rcar_sound 0>
35                  * but needed to avoid cs2000/rcar_sound probe dead-lock
36                  */
37                 compatible = "fixed-clock";
38                 #clock-cells = <0>;
39                 clock-frequency = <11289600>;
40         };
41
42         cvbs-in {
43                 compatible = "composite-video-connector";
44                 label = "CVBS IN";
45
46                 port {
47                         cvbs_con: endpoint {
48                                 remote-endpoint = <&adv7482_ain7>;
49                         };
50                 };
51         };
52
53         hdmi-in {
54                 compatible = "hdmi-connector";
55                 label = "HDMI IN";
56                 type = "a";
57
58                 port {
59                         hdmi_in_con: endpoint {
60                                 remote-endpoint = <&adv7482_hdmi>;
61                         };
62                 };
63         };
64
65         hdmi-out {
66                 compatible = "hdmi-connector";
67                 type = "a";
68
69                 port {
70                         hdmi_con_out: endpoint {
71                                 remote-endpoint = <&adv7511_out>;
72                         };
73                 };
74         };
75
76         lvds-decoder {
77                 compatible = "thine,thc63lvd1024";
78                 vcc-supply = <&reg_3p3v>;
79
80                 ports {
81                         #address-cells = <1>;
82                         #size-cells = <0>;
83
84                         port@0 {
85                                 reg = <0>;
86                                 thc63lvd1024_in: endpoint {
87                                         remote-endpoint = <&lvds0_out>;
88                                 };
89                         };
90
91                         port@2 {
92                                 reg = <2>;
93                                 thc63lvd1024_out: endpoint {
94                                         remote-endpoint = <&adv7511_in>;
95                                 };
96                         };
97                 };
98         };
99
100         vga {
101                 compatible = "vga-connector";
102
103                 port {
104                         vga_in: endpoint {
105                                 remote-endpoint = <&adv7123_out>;
106                         };
107                 };
108         };
109
110         vga-encoder {
111                 compatible = "adi,adv7123";
112
113                 ports {
114                         #address-cells = <1>;
115                         #size-cells = <0>;
116
117                         port@0 {
118                                 reg = <0>;
119                                 adv7123_in: endpoint {
120                                         remote-endpoint = <&du_out_rgb>;
121                                 };
122                         };
123                         port@1 {
124                                 reg = <1>;
125                                 adv7123_out: endpoint {
126                                         remote-endpoint = <&vga_in>;
127                                 };
128                         };
129                 };
130         };
131
132         reg_1p8v: regulator0 {
133                 compatible = "regulator-fixed";
134                 regulator-name = "fixed-1.8V";
135                 regulator-min-microvolt = <1800000>;
136                 regulator-max-microvolt = <1800000>;
137                 regulator-boot-on;
138                 regulator-always-on;
139         };
140
141         reg_3p3v: regulator1 {
142                 compatible = "regulator-fixed";
143                 regulator-name = "fixed-3.3V";
144                 regulator-min-microvolt = <3300000>;
145                 regulator-max-microvolt = <3300000>;
146                 regulator-boot-on;
147                 regulator-always-on;
148         };
149
150         vbus0_usb2: regulator-vbus0-usb2 {
151                 compatible = "regulator-fixed";
152
153                 regulator-name = "USB20_VBUS_CN";
154                 regulator-min-microvolt = <5000000>;
155                 regulator-max-microvolt = <5000000>;
156
157                 gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>;
158                 enable-active-high;
159         };
160
161         rsnd_ak4613: sound {
162                 compatible = "simple-scu-audio-card";
163
164                 simple-audio-card,name = "rsnd-ak4613";
165                 simple-audio-card,format = "left_j";
166                 simple-audio-card,bitclock-master = <&sndcpu>;
167                 simple-audio-card,frame-master = <&sndcpu>;
168
169                 simple-audio-card,prefix = "ak4613";
170                 simple-audio-card,routing = "ak4613 Playback", "DAI0 Playback",
171                 "DAI0 Capture", "ak4613 Capture";
172                 sndcpu: simple-audio-card,cpu {
173                         sound-dai = <&rcar_sound>;
174                 };
175
176                 sndcodec: simple-audio-card,codec {
177                         sound-dai = <&ak4613>;
178                 };
179         };
180
181         x12_clk: x12 {
182                 compatible = "fixed-clock";
183                 #clock-cells = <0>;
184                 clock-frequency = <24576000>;
185         };
186
187         x13_clk: x13 {
188                 compatible = "fixed-clock";
189                 #clock-cells = <0>;
190                 clock-frequency = <74250000>;
191         };
192
193         vcc_sdhi0: regulator-vcc-sdhi0 {
194                 compatible = "regulator-fixed";
195
196                 regulator-name = "SDHI0 Vcc";
197                 regulator-min-microvolt = <3300000>;
198                 regulator-max-microvolt = <3300000>;
199
200                 gpio = <&gpio5 17 GPIO_ACTIVE_HIGH>;
201                 enable-active-high;
202         };
203
204         vccq_sdhi0: regulator-vccq-sdhi0 {
205                 compatible = "regulator-gpio";
206
207                 regulator-name = "SDHI0 VccQ";
208                 regulator-min-microvolt = <1800000>;
209                 regulator-max-microvolt = <3300000>;
210
211                 gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>;
212                 gpios-states = <1>;
213                 states = <3300000 1
214                           1800000 0>;
215         };
216
217         vcc_sdhi1: regulator-vcc-sdhi1 {
218                 compatible = "regulator-fixed";
219
220                 regulator-name = "SDHI1 Vcc";
221                 regulator-min-microvolt = <3300000>;
222                 regulator-max-microvolt = <3300000>;
223
224                 gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
225                 enable-active-high;
226         };
227
228         vccq_sdhi1: regulator-vccq-sdhi1 {
229                 compatible = "regulator-gpio";
230
231                 regulator-name = "SDHI1 VccQ";
232                 regulator-min-microvolt = <1800000>;
233                 regulator-max-microvolt = <3300000>;
234
235                 gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>;
236                 gpios-states = <1>;
237                 states = <3300000 1
238                           1800000 0>;
239         };
240 };
241
242 &audio_clk_a {
243         clock-frequency = <22579200>;
244 };
245
246 &avb {
247         pinctrl-0 = <&avb_pins>;
248         pinctrl-names = "default";
249         renesas,no-ether-link;
250         phy-handle = <&phy0>;
251         phy-mode = "rgmii-txid";
252         status = "okay";
253
254         phy0: ethernet-phy@0 {
255                 rxc-skew-ps = <1500>;
256                 reg = <0>;
257                 interrupt-parent = <&gpio2>;
258                 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
259                 reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
260         };
261 };
262
263 &csi40 {
264         status = "okay";
265
266         ports {
267                 port@0 {
268                         reg = <0>;
269
270                         csi40_in: endpoint {
271                                 clock-lanes = <0>;
272                                 data-lanes = <1 2>;
273                                 remote-endpoint = <&adv7482_txa>;
274                         };
275                 };
276         };
277 };
278
279 &du {
280         pinctrl-0 = <&du_pins>;
281         pinctrl-names = "default";
282         status = "okay";
283
284         clocks = <&cpg CPG_MOD 724>,
285                  <&cpg CPG_MOD 723>,
286                  <&x13_clk>;
287         clock-names = "du.0", "du.1", "dclkin.0";
288
289         ports {
290                 port@0 {
291                         endpoint {
292                                 remote-endpoint = <&adv7123_in>;
293                         };
294                 };
295         };
296 };
297
298 &ehci0 {
299         dr_mode = "otg";
300         status = "okay";
301 };
302
303 &extal_clk {
304         clock-frequency = <48000000>;
305 };
306
307 &hsusb {
308         dr_mode = "otg";
309         status = "okay";
310 };
311
312 &i2c0 {
313         status = "okay";
314
315         hdmi-encoder@39 {
316                 compatible = "adi,adv7511w";
317                 reg = <0x39>;
318                 interrupt-parent = <&gpio1>;
319                 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
320
321                 adi,input-depth = <8>;
322                 adi,input-colorspace = "rgb";
323                 adi,input-clock = "1x";
324                 adi,input-style = <1>;
325                 adi,input-justification = "evenly";
326
327                 ports {
328                         #address-cells = <1>;
329                         #size-cells = <0>;
330
331                         port@0 {
332                                 reg = <0>;
333                                 adv7511_in: endpoint {
334                                         remote-endpoint = <&thc63lvd1024_out>;
335                                 };
336                         };
337
338                         port@1 {
339                                 reg = <1>;
340                                 adv7511_out: endpoint {
341                                         remote-endpoint = <&hdmi_con_out>;
342                                 };
343                         };
344                 };
345         };
346
347         video-receiver@70 {
348                 compatible = "adi,adv7482";
349                 reg = <0x70>;
350
351                 #address-cells = <1>;
352                 #size-cells = <0>;
353
354                 interrupt-parent = <&gpio0>;
355                 interrupt-names = "intrq1", "intrq2";
356                 interrupts = <7 IRQ_TYPE_LEVEL_LOW>,
357                              <17 IRQ_TYPE_LEVEL_LOW>;
358
359                 port@7 {
360                         reg = <7>;
361
362                         adv7482_ain7: endpoint {
363                                 remote-endpoint = <&cvbs_con>;
364                         };
365                 };
366
367                 port@8 {
368                         reg = <8>;
369
370                         adv7482_hdmi: endpoint {
371                                 remote-endpoint = <&hdmi_in_con>;
372                         };
373                 };
374
375                 port@a {
376                         reg = <0xa>;
377
378                         adv7482_txa: endpoint {
379                                 clock-lanes = <0>;
380                                 data-lanes = <1 2>;
381                                 remote-endpoint = <&csi40_in>;
382                         };
383                 };
384         };
385 };
386
387 &i2c3 {
388         status = "okay";
389
390         ak4613: codec@10 {
391                 compatible = "asahi-kasei,ak4613";
392                 #sound-dai-cells = <0>;
393                 reg = <0x10>;
394                 clocks = <&rcar_sound 3>;
395
396                 asahi-kasei,in1-single-end;
397                 asahi-kasei,in2-single-end;
398                 asahi-kasei,out1-single-end;
399                 asahi-kasei,out2-single-end;
400                 asahi-kasei,out3-single-end;
401                 asahi-kasei,out4-single-end;
402                 asahi-kasei,out5-single-end;
403                 asahi-kasei,out6-single-end;
404         };
405
406         cs2000: clk-multiplier@4f {
407                 #clock-cells = <0>;
408                 compatible = "cirrus,cs2000-cp";
409                 reg = <0x4f>;
410                 clocks = <&audio_clkout>, <&x12_clk>;
411                 clock-names = "clk_in", "ref_clk";
412
413                 assigned-clocks = <&cs2000>;
414                 assigned-clock-rates = <24576000>; /* 1/1 divide */
415         };
416 };
417
418 &lvds0 {
419         status = "okay";
420
421         clocks = <&cpg CPG_MOD 727>,
422                  <&x13_clk>,
423                  <&extal_clk>;
424         clock-names = "fck", "dclkin.0", "extal";
425
426         ports {
427                 port@1 {
428                         lvds0_out: endpoint {
429                                 remote-endpoint = <&thc63lvd1024_in>;
430                         };
431                 };
432         };
433 };
434
435 &lvds1 {
436         clocks = <&cpg CPG_MOD 727>,
437                  <&x13_clk>,
438                  <&extal_clk>;
439         clock-names = "fck", "dclkin.0", "extal";
440 };
441
442 &ohci0 {
443         dr_mode = "otg";
444         status = "okay";
445 };
446
447 &pfc {
448         avb_pins: avb {
449                 mux {
450                         groups = "avb_link", "avb_mii";
451                         function = "avb";
452                 };
453         };
454
455         du_pins: du {
456                 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
457                 function = "du";
458         };
459
460         pwm3_pins: pwm3 {
461                 groups = "pwm3_b";
462                 function = "pwm3";
463         };
464
465         pwm5_pins: pwm5 {
466                 groups = "pwm5_a";
467                 function = "pwm5";
468         };
469
470         sdhi0_pins: sd0 {
471                 groups = "sdhi0_data4", "sdhi0_ctrl";
472                 function = "sdhi0";
473                 power-source = <3300>;
474         };
475
476         sdhi0_pins_uhs: sd0_uhs {
477                 groups = "sdhi0_data4", "sdhi0_ctrl";
478                 function = "sdhi0";
479                 power-source = <1800>;
480         };
481
482         sdhi1_pins: sd1 {
483                 groups = "sdhi1_data4", "sdhi1_ctrl";
484                 function = "sdhi1";
485                 power-source = <3300>;
486         };
487
488         sdhi1_pins_uhs: sd1_uhs {
489                 groups = "sdhi1_data4", "sdhi1_ctrl";
490                 function = "sdhi1";
491                 power-source = <1800>;
492         };
493
494         sdhi3_pins: sd3 {
495                 groups = "sdhi3_data8", "sdhi3_ctrl", "sdhi3_ds";
496                 function = "sdhi3";
497                 power-source = <1800>;
498         };
499
500         sound_pins: sound {
501                 groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data";
502                 function = "ssi";
503         };
504
505         sound_clk_pins: sound_clk {
506                 groups = "audio_clk_a", "audio_clk_b_a", "audio_clk_c_a",
507                          "audio_clkout_a", "audio_clkout1_a";
508                 function = "audio_clk";
509         };
510
511         scif2_pins: scif2 {
512                 groups = "scif2_data_a";
513                 function = "scif2";
514         };
515
516         usb0_pins: usb {
517                 groups = "usb0_b", "usb0_id";
518                 function = "usb0";
519         };
520
521         usb30_pins: usb30 {
522                 groups = "usb30";
523                 function = "usb30";
524         };
525 };
526
527 &pwm3 {
528         pinctrl-0 = <&pwm3_pins>;
529         pinctrl-names = "default";
530
531         status = "okay";
532 };
533
534 &pwm5 {
535         pinctrl-0 = <&pwm5_pins>;
536         pinctrl-names = "default";
537
538         status = "okay";
539 };
540
541 &rcar_sound {
542         pinctrl-0 = <&sound_pins &sound_clk_pins>;
543         pinctrl-names = "default";
544
545         /* Single DAI */
546         #sound-dai-cells = <0>;
547
548         /* audio_clkout0/1/2/3 */
549         #clock-cells = <1>;
550         clock-frequency = <12288000 11289600>;
551         clkout-lr-synchronous;
552
553         status = "okay";
554
555         /* update <audio_clk_b> to <cs2000> */
556         clocks = <&cpg CPG_MOD 1005>,
557                  <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
558                  <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
559                  <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
560                  <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
561                  <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
562                  <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
563                  <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
564                  <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
565                  <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
566                  <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
567                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
568                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
569                  <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
570                  <&audio_clk_a>, <&cs2000>, <&audio_clk_c>,
571                  <&cpg CPG_CORE R8A77990_CLK_ZA2>;
572
573         rcar_sound,dai {
574                 dai0 {
575                         playback = <&ssi0 &src0 &dvc0>;
576                         capture  = <&ssi1 &src1 &dvc1>;
577                 };
578         };
579
580 };
581
582 &rwdt {
583         timeout-sec = <60>;
584         status = "okay";
585 };
586
587 &scif2 {
588         pinctrl-0 = <&scif2_pins>;
589         pinctrl-names = "default";
590
591         status = "okay";
592 };
593
594 &ssi1 {
595         shared-pin;
596 };
597
598 &usb2_phy0 {
599         pinctrl-0 = <&usb0_pins>;
600         pinctrl-names = "default";
601
602         vbus-supply = <&vbus0_usb2>;
603         status = "okay";
604 };
605
606 &usb3_peri0 {
607         companion = <&xhci0>;
608         status = "okay";
609 };
610
611 &vin4 {
612         status = "okay";
613 };
614
615 &xhci0 {
616         pinctrl-0 = <&usb30_pins>;
617         pinctrl-names = "default";
618
619         status = "okay";
620 };
621
622 &sdhi0 {
623         pinctrl-0 = <&sdhi0_pins>;
624         pinctrl-1 = <&sdhi0_pins_uhs>;
625         pinctrl-names = "default", "state_uhs";
626
627         vmmc-supply = <&vcc_sdhi0>;
628         vqmmc-supply = <&vccq_sdhi0>;
629         cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
630         wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
631         bus-width = <4>;
632         sd-uhs-sdr50;
633         sd-uhs-sdr104;
634         status = "okay";
635 };
636
637 &sdhi1 {
638         pinctrl-0 = <&sdhi1_pins>;
639         pinctrl-1 = <&sdhi1_pins_uhs>;
640         pinctrl-names = "default", "state_uhs";
641
642         vmmc-supply = <&vcc_sdhi1>;
643         vqmmc-supply = <&vccq_sdhi1>;
644         cd-gpios = <&gpio3 14 GPIO_ACTIVE_LOW>;
645         bus-width = <4>;
646         sd-uhs-sdr50;
647         sd-uhs-sdr104;
648         status = "okay";
649 };
650
651 &sdhi3 {
652         /* used for on-board 8bit eMMC */
653         pinctrl-0 = <&sdhi3_pins>;
654         pinctrl-1 = <&sdhi3_pins>;
655         pinctrl-names = "default", "state_uhs";
656
657         vmmc-supply = <&reg_3p3v>;
658         vqmmc-supply = <&reg_1p8v>;
659         mmc-hs200-1_8v;
660         bus-width = <8>;
661         non-removable;
662         status = "okay";
663 };