f9c592adbbd3fb27886b2f769c6d896ad917a3f2
[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_3p3v: regulator1 {
133                 compatible = "regulator-fixed";
134                 regulator-name = "fixed-3.3V";
135                 regulator-min-microvolt = <3300000>;
136                 regulator-max-microvolt = <3300000>;
137                 regulator-boot-on;
138                 regulator-always-on;
139         };
140
141         vbus0_usb2: regulator-vbus0-usb2 {
142                 compatible = "regulator-fixed";
143
144                 regulator-name = "USB20_VBUS_CN";
145                 regulator-min-microvolt = <5000000>;
146                 regulator-max-microvolt = <5000000>;
147
148                 gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>;
149                 enable-active-high;
150         };
151
152         rsnd_ak4613: sound {
153                 compatible = "simple-scu-audio-card";
154
155                 simple-audio-card,name = "rsnd-ak4613";
156                 simple-audio-card,format = "left_j";
157                 simple-audio-card,bitclock-master = <&sndcpu>;
158                 simple-audio-card,frame-master = <&sndcpu>;
159
160                 simple-audio-card,prefix = "ak4613";
161                 simple-audio-card,routing = "ak4613 Playback", "DAI0 Playback",
162                 "DAI0 Capture", "ak4613 Capture";
163                 sndcpu: simple-audio-card,cpu {
164                         sound-dai = <&rcar_sound>;
165                 };
166
167                 sndcodec: simple-audio-card,codec {
168                         sound-dai = <&ak4613>;
169                 };
170         };
171
172         x12_clk: x12 {
173                 compatible = "fixed-clock";
174                 #clock-cells = <0>;
175                 clock-frequency = <24576000>;
176         };
177
178         x13_clk: x13 {
179                 compatible = "fixed-clock";
180                 #clock-cells = <0>;
181                 clock-frequency = <74250000>;
182         };
183 };
184
185 &audio_clk_a {
186         clock-frequency = <22579200>;
187 };
188
189 &avb {
190         pinctrl-0 = <&avb_pins>;
191         pinctrl-names = "default";
192         renesas,no-ether-link;
193         phy-handle = <&phy0>;
194         phy-mode = "rgmii-txid";
195         status = "okay";
196
197         phy0: ethernet-phy@0 {
198                 rxc-skew-ps = <1500>;
199                 reg = <0>;
200                 interrupt-parent = <&gpio2>;
201                 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
202                 reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
203         };
204 };
205
206 &csi40 {
207         status = "okay";
208
209         ports {
210                 port@0 {
211                         reg = <0>;
212
213                         csi40_in: endpoint {
214                                 clock-lanes = <0>;
215                                 data-lanes = <1 2>;
216                                 remote-endpoint = <&adv7482_txa>;
217                         };
218                 };
219         };
220 };
221
222 &du {
223         pinctrl-0 = <&du_pins>;
224         pinctrl-names = "default";
225         status = "okay";
226
227         clocks = <&cpg CPG_MOD 724>,
228                  <&cpg CPG_MOD 723>,
229                  <&x13_clk>;
230         clock-names = "du.0", "du.1", "dclkin.0";
231
232         ports {
233                 port@0 {
234                         endpoint {
235                                 remote-endpoint = <&adv7123_in>;
236                         };
237                 };
238         };
239 };
240
241 &ehci0 {
242         dr_mode = "otg";
243         status = "okay";
244 };
245
246 &extal_clk {
247         clock-frequency = <48000000>;
248 };
249
250 &hsusb {
251         dr_mode = "otg";
252         status = "okay";
253 };
254
255 &i2c0 {
256         status = "okay";
257
258         hdmi-encoder@39 {
259                 compatible = "adi,adv7511w";
260                 reg = <0x39>;
261                 interrupt-parent = <&gpio1>;
262                 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
263
264                 adi,input-depth = <8>;
265                 adi,input-colorspace = "rgb";
266                 adi,input-clock = "1x";
267                 adi,input-style = <1>;
268                 adi,input-justification = "evenly";
269
270                 ports {
271                         #address-cells = <1>;
272                         #size-cells = <0>;
273
274                         port@0 {
275                                 reg = <0>;
276                                 adv7511_in: endpoint {
277                                         remote-endpoint = <&thc63lvd1024_out>;
278                                 };
279                         };
280
281                         port@1 {
282                                 reg = <1>;
283                                 adv7511_out: endpoint {
284                                         remote-endpoint = <&hdmi_con_out>;
285                                 };
286                         };
287                 };
288         };
289
290         video-receiver@70 {
291                 compatible = "adi,adv7482";
292                 reg = <0x70>;
293
294                 #address-cells = <1>;
295                 #size-cells = <0>;
296
297                 interrupt-parent = <&gpio0>;
298                 interrupt-names = "intrq1", "intrq2";
299                 interrupts = <7 IRQ_TYPE_LEVEL_LOW>,
300                              <17 IRQ_TYPE_LEVEL_LOW>;
301
302                 port@7 {
303                         reg = <7>;
304
305                         adv7482_ain7: endpoint {
306                                 remote-endpoint = <&cvbs_con>;
307                         };
308                 };
309
310                 port@8 {
311                         reg = <8>;
312
313                         adv7482_hdmi: endpoint {
314                                 remote-endpoint = <&hdmi_in_con>;
315                         };
316                 };
317
318                 port@a {
319                         reg = <0xa>;
320
321                         adv7482_txa: endpoint {
322                                 clock-lanes = <0>;
323                                 data-lanes = <1 2>;
324                                 remote-endpoint = <&csi40_in>;
325                         };
326                 };
327         };
328 };
329
330 &i2c3 {
331         status = "okay";
332
333         ak4613: codec@10 {
334                 compatible = "asahi-kasei,ak4613";
335                 #sound-dai-cells = <0>;
336                 reg = <0x10>;
337                 clocks = <&rcar_sound 3>;
338
339                 asahi-kasei,in1-single-end;
340                 asahi-kasei,in2-single-end;
341                 asahi-kasei,out1-single-end;
342                 asahi-kasei,out2-single-end;
343                 asahi-kasei,out3-single-end;
344                 asahi-kasei,out4-single-end;
345                 asahi-kasei,out5-single-end;
346                 asahi-kasei,out6-single-end;
347         };
348
349         cs2000: clk-multiplier@4f {
350                 #clock-cells = <0>;
351                 compatible = "cirrus,cs2000-cp";
352                 reg = <0x4f>;
353                 clocks = <&audio_clkout>, <&x12_clk>;
354                 clock-names = "clk_in", "ref_clk";
355
356                 assigned-clocks = <&cs2000>;
357                 assigned-clock-rates = <24576000>; /* 1/1 divide */
358         };
359 };
360
361 &lvds0 {
362         status = "okay";
363
364         clocks = <&cpg CPG_MOD 727>,
365                  <&x13_clk>,
366                  <&extal_clk>;
367         clock-names = "fck", "dclkin.0", "extal";
368
369         ports {
370                 port@1 {
371                         lvds0_out: endpoint {
372                                 remote-endpoint = <&thc63lvd1024_in>;
373                         };
374                 };
375         };
376 };
377
378 &lvds1 {
379         clocks = <&cpg CPG_MOD 727>,
380                  <&x13_clk>,
381                  <&extal_clk>;
382         clock-names = "fck", "dclkin.0", "extal";
383 };
384
385 &ohci0 {
386         dr_mode = "otg";
387         status = "okay";
388 };
389
390 &pfc {
391         avb_pins: avb {
392                 mux {
393                         groups = "avb_link", "avb_mii";
394                         function = "avb";
395                 };
396         };
397
398         du_pins: du {
399                 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
400                 function = "du";
401         };
402
403         pwm3_pins: pwm3 {
404                 groups = "pwm3_b";
405                 function = "pwm3";
406         };
407
408         pwm5_pins: pwm5 {
409                 groups = "pwm5_a";
410                 function = "pwm5";
411         };
412
413         sound_pins: sound {
414                 groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data";
415                 function = "ssi";
416         };
417
418         sound_clk_pins: sound_clk {
419                 groups = "audio_clk_a", "audio_clk_b_a", "audio_clk_c_a",
420                          "audio_clkout_a", "audio_clkout1_a";
421                 function = "audio_clk";
422         };
423
424         scif2_pins: scif2 {
425                 groups = "scif2_data_a";
426                 function = "scif2";
427         };
428
429         usb0_pins: usb {
430                 groups = "usb0_b", "usb0_id";
431                 function = "usb0";
432         };
433
434         usb30_pins: usb30 {
435                 groups = "usb30";
436                 function = "usb30";
437         };
438 };
439
440 &pwm3 {
441         pinctrl-0 = <&pwm3_pins>;
442         pinctrl-names = "default";
443
444         status = "okay";
445 };
446
447 &pwm5 {
448         pinctrl-0 = <&pwm5_pins>;
449         pinctrl-names = "default";
450
451         status = "okay";
452 };
453
454 &rcar_sound {
455         pinctrl-0 = <&sound_pins &sound_clk_pins>;
456         pinctrl-names = "default";
457
458         /* Single DAI */
459         #sound-dai-cells = <0>;
460
461         /* audio_clkout0/1/2/3 */
462         #clock-cells = <1>;
463         clock-frequency = <12288000 11289600>;
464         clkout-lr-synchronous;
465
466         status = "okay";
467
468         /* update <audio_clk_b> to <cs2000> */
469         clocks = <&cpg CPG_MOD 1005>,
470                  <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
471                  <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
472                  <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
473                  <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
474                  <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
475                  <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
476                  <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
477                  <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
478                  <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
479                  <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
480                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
481                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
482                  <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
483                  <&audio_clk_a>, <&cs2000>, <&audio_clk_c>,
484                  <&cpg CPG_CORE R8A77990_CLK_ZA2>;
485
486         rcar_sound,dai {
487                 dai0 {
488                         playback = <&ssi0 &src0 &dvc0>;
489                         capture  = <&ssi1 &src1 &dvc1>;
490                 };
491         };
492
493 };
494
495 &rwdt {
496         timeout-sec = <60>;
497         status = "okay";
498 };
499
500 &scif2 {
501         pinctrl-0 = <&scif2_pins>;
502         pinctrl-names = "default";
503
504         status = "okay";
505 };
506
507 &ssi1 {
508         shared-pin;
509 };
510
511 &usb2_phy0 {
512         pinctrl-0 = <&usb0_pins>;
513         pinctrl-names = "default";
514
515         vbus-supply = <&vbus0_usb2>;
516         status = "okay";
517 };
518
519 &usb3_peri0 {
520         companion = <&xhci0>;
521         status = "okay";
522 };
523
524 &vin4 {
525         status = "okay";
526 };
527
528 &xhci0 {
529         pinctrl-0 = <&usb30_pins>;
530         pinctrl-names = "default";
531
532         status = "okay";
533 };