Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / arch / arm / boot / dts / r8a7794-silk.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Device Tree Source for the SILK board
4  *
5  * Copyright (C) 2014 Renesas Electronics Corporation
6  * Copyright (C) 2014-2015 Renesas Solutions Corp.
7  * Copyright (C) 2014-2015 Cogent Embedded, Inc.
8  */
9
10 /*
11  * SSI-AK4643
12  *
13  * SW1: 2-1: AK4643
14  *      2-3: ADV7511
15  *
16  * This command is required before playback/capture:
17  *
18  *      amixer set "LINEOUT Mixer DACL" on
19  */
20
21 /dts-v1/;
22 #include "r8a7794.dtsi"
23 #include <dt-bindings/gpio/gpio.h>
24 #include <dt-bindings/input/input.h>
25
26 / {
27         model = "SILK";
28         compatible = "renesas,silk", "renesas,r8a7794";
29
30         aliases {
31                 serial0 = &scif2;
32                 i2c9 = &gpioi2c1;
33                 i2c10 = &i2chdmi;
34                 mmc0 = &mmcif0;
35                 mmc1 = &sdhi1;
36         };
37
38         chosen {
39                 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
40                 stdout-path = "serial0:115200n8";
41         };
42
43         memory@40000000 {
44                 device_type = "memory";
45                 reg = <0 0x40000000 0 0x40000000>;
46         };
47
48         gpio-keys {
49                 compatible = "gpio-keys";
50
51                 key-3 {
52                         gpios = <&gpio5 10 GPIO_ACTIVE_LOW>;
53                         linux,code = <KEY_3>;
54                         label = "SW3";
55                         wakeup-source;
56                         debounce-interval = <20>;
57                 };
58                 key-4 {
59                         gpios = <&gpio5 11 GPIO_ACTIVE_LOW>;
60                         linux,code = <KEY_4>;
61                         label = "SW4";
62                         wakeup-source;
63                         debounce-interval = <20>;
64                 };
65                 key-6 {
66                         gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
67                         linux,code = <KEY_6>;
68                         label = "SW6";
69                         wakeup-source;
70                         debounce-interval = <20>;
71                 };
72                 key-a {
73                         gpios = <&gpio3 9 GPIO_ACTIVE_LOW>;
74                         linux,code = <KEY_A>;
75                         label = "SW12-1";
76                         wakeup-source;
77                         debounce-interval = <20>;
78                 };
79                 key-b {
80                         gpios = <&gpio3 10 GPIO_ACTIVE_LOW>;
81                         linux,code = <KEY_B>;
82                         label = "SW12-2";
83                         wakeup-source;
84                         debounce-interval = <20>;
85                 };
86                 key-c {
87                         gpios = <&gpio3 11 GPIO_ACTIVE_LOW>;
88                         linux,code = <KEY_C>;
89                         label = "SW12-3";
90                         wakeup-source;
91                         debounce-interval = <20>;
92                 };
93                 key-d {
94                         gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
95                         linux,code = <KEY_D>;
96                         label = "SW12-4";
97                         wakeup-source;
98                         debounce-interval = <20>;
99                 };
100         };
101
102         d3_3v: regulator-d3-3v {
103                 compatible = "regulator-fixed";
104                 regulator-name = "D3.3V";
105                 regulator-min-microvolt = <3300000>;
106                 regulator-max-microvolt = <3300000>;
107                 regulator-boot-on;
108                 regulator-always-on;
109         };
110
111         vcc_sdhi1: regulator-vcc-sdhi1 {
112                 compatible = "regulator-fixed";
113
114                 regulator-name = "SDHI1 Vcc";
115                 regulator-min-microvolt = <3300000>;
116                 regulator-max-microvolt = <3300000>;
117
118                 gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
119                 enable-active-high;
120         };
121
122         vccq_sdhi1: regulator-vccq-sdhi1 {
123                 compatible = "regulator-gpio";
124
125                 regulator-name = "SDHI1 VccQ";
126                 regulator-min-microvolt = <1800000>;
127                 regulator-max-microvolt = <3300000>;
128
129                 gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
130                 gpios-states = <1>;
131                 states = <3300000 1>, <1800000 0>;
132         };
133
134         vga-encoder {
135                 compatible = "adi,adv7123";
136
137                 ports {
138                         #address-cells = <1>;
139                         #size-cells = <0>;
140
141                         port@0 {
142                                 reg = <0>;
143                                 adv7123_in: endpoint {
144                                         remote-endpoint = <&du_out_rgb1>;
145                                 };
146                         };
147                         port@1 {
148                                 reg = <1>;
149                                 adv7123_out: endpoint {
150                                         remote-endpoint = <&vga_in>;
151                                 };
152                         };
153                 };
154         };
155
156         hdmi-out {
157                 compatible = "hdmi-connector";
158                 type = "a";
159
160                 port {
161                         hdmi_con: endpoint {
162                                 remote-endpoint = <&adv7511_out>;
163                         };
164                 };
165         };
166
167         vga {
168                 compatible = "vga-connector";
169
170                 port {
171                         vga_in: endpoint {
172                                 remote-endpoint = <&adv7123_out>;
173                         };
174                 };
175         };
176
177         x2_clk: x2-clock {
178                 compatible = "fixed-clock";
179                 #clock-cells = <0>;
180                 clock-frequency = <148500000>;
181         };
182
183         x3_clk: x3-clock {
184                 compatible = "fixed-clock";
185                 #clock-cells = <0>;
186                 clock-frequency = <74250000>;
187         };
188
189         x9_clk: audio_clock {
190                 compatible = "fixed-clock";
191                 #clock-cells = <0>;
192                 clock-frequency = <12288000>;
193         };
194
195         sound {
196                 compatible = "simple-audio-card";
197
198                 simple-audio-card,format = "left_j";
199                 simple-audio-card,bitclock-master = <&soundcodec>;
200                 simple-audio-card,frame-master = <&soundcodec>;
201
202                 simple-audio-card,cpu {
203                         sound-dai = <&rcar_sound>;
204                 };
205
206                 soundcodec: simple-audio-card,codec {
207                         sound-dai = <&ak4643>;
208                         clocks = <&x9_clk>;
209                 };
210         };
211
212         gpioi2c1: i2c-9 {
213                 #address-cells = <1>;
214                 #size-cells = <0>;
215                 compatible = "i2c-gpio";
216                 status = "disabled";
217                 scl-gpios = <&gpio4 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
218                 sda-gpios = <&gpio4 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
219                 i2c-gpio,delay-us = <5>;
220         };
221
222         /*
223          * A fallback to GPIO is provided for I2C1.
224          */
225         i2chdmi: i2c-10 {
226                 compatible = "i2c-demux-pinctrl";
227                 i2c-parent = <&i2c1>, <&gpioi2c1>;
228                 i2c-bus-name = "i2c-hdmi";
229                 #address-cells = <1>;
230                 #size-cells = <0>;
231
232                 ak4643: codec@12 {
233                         compatible = "asahi-kasei,ak4643";
234                         #sound-dai-cells = <0>;
235                         reg = <0x12>;
236                 };
237
238                 composite-in@20 {
239                         compatible = "adi,adv7180";
240                         reg = <0x20>;
241
242                         port {
243                                 adv7180: endpoint {
244                                         bus-width = <8>;
245                                         remote-endpoint = <&vin0ep>;
246                                 };
247                         };
248                 };
249
250                 hdmi@39 {
251                         compatible = "adi,adv7511w";
252                         reg = <0x39>;
253                         interrupt-parent = <&gpio5>;
254                         interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
255
256                         adi,input-depth = <8>;
257                         adi,input-colorspace = "rgb";
258                         adi,input-clock = "1x";
259
260                         ports {
261                                 #address-cells = <1>;
262                                 #size-cells = <0>;
263
264                                 port@0 {
265                                         reg = <0>;
266                                         adv7511_in: endpoint {
267                                                 remote-endpoint = <&du_out_rgb0>;
268                                         };
269                                 };
270
271                                 port@1 {
272                                         reg = <1>;
273                                         adv7511_out: endpoint {
274                                                 remote-endpoint = <&hdmi_con>;
275                                         };
276                                 };
277                         };
278                 };
279
280                 eeprom@50 {
281                         compatible = "renesas,r1ex24002", "atmel,24c02";
282                         reg = <0x50>;
283                         pagesize = <16>;
284                 };
285         };
286 };
287
288 &extal_clk {
289         clock-frequency = <20000000>;
290 };
291
292 &pfc {
293         pinctrl-0 = <&scif_clk_pins>;
294         pinctrl-names = "default";
295
296         scif2_pins: scif2 {
297                 groups = "scif2_data";
298                 function = "scif2";
299         };
300
301         scif_clk_pins: scif_clk {
302                 groups = "scif_clk";
303                 function = "scif_clk";
304         };
305
306         ether_pins: ether {
307                 groups = "eth_link", "eth_mdio", "eth_rmii";
308                 function = "eth";
309         };
310
311         phy1_pins: phy1 {
312                 groups = "intc_irq8";
313                 function = "intc";
314         };
315
316         i2c1_pins: i2c1 {
317                 groups = "i2c1";
318                 function = "i2c1";
319         };
320
321         mmcif0_pins: mmcif0 {
322                 groups = "mmc_data8", "mmc_ctrl";
323                 function = "mmc";
324         };
325
326         sdhi1_pins: sd1 {
327                 groups = "sdhi1_data4", "sdhi1_ctrl";
328                 function = "sdhi1";
329         };
330
331         qspi_pins: qspi {
332                 groups = "qspi_ctrl", "qspi_data4";
333                 function = "qspi";
334         };
335
336         vin0_pins: vin0 {
337                 groups = "vin0_data8", "vin0_clk";
338                 function = "vin0";
339         };
340
341         usb0_pins: usb0 {
342                 groups = "usb0";
343                 function = "usb0";
344         };
345
346         usb1_pins: usb1 {
347                 groups = "usb1";
348                 function = "usb1";
349         };
350
351         du0_pins: du0 {
352                 groups = "du0_rgb888", "du0_sync", "du0_disp", "du0_clk0_out";
353                 function = "du0";
354         };
355
356         du1_pins: du1 {
357                 groups = "du1_rgb666", "du1_sync", "du1_disp", "du1_clk0_out";
358                 function = "du1";
359         };
360
361         ssi_pins: sound {
362                 groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
363                 function = "ssi";
364         };
365
366         audio_clk_pins: audio_clk {
367                 groups = "audio_clkc";
368                 function = "audio_clk";
369         };
370 };
371
372 &scif2 {
373         pinctrl-0 = <&scif2_pins>;
374         pinctrl-names = "default";
375
376         status = "okay";
377 };
378
379 &scif_clk {
380         clock-frequency = <14745600>;
381 };
382
383 &ether {
384         pinctrl-0 = <&ether_pins>, <&phy1_pins>;
385         pinctrl-names = "default";
386
387         phy-handle = <&phy1>;
388         renesas,ether-link-active-low;
389         status = "okay";
390
391         phy1: ethernet-phy@1 {
392                 reg = <1>;
393                 interrupt-parent = <&irqc0>;
394                 interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
395                 micrel,led-mode = <1>;
396                 reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
397         };
398 };
399
400 &i2c1 {
401         pinctrl-0 = <&i2c1_pins>;
402         pinctrl-names = "i2c-hdmi";
403
404         clock-frequency = <400000>;
405 };
406
407 &i2c7 {
408         status = "okay";
409         clock-frequency = <100000>;
410
411         pmic@58 {
412                 compatible = "dlg,da9063";
413                 reg = <0x58>;
414                 interrupt-parent = <&gpio3>;
415                 interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
416                 interrupt-controller;
417
418                 onkey {
419                         compatible = "dlg,da9063-onkey";
420                 };
421
422                 rtc {
423                         compatible = "dlg,da9063-rtc";
424                 };
425
426                 wdt {
427                         compatible = "dlg,da9063-watchdog";
428                 };
429         };
430 };
431
432 &mmcif0 {
433         pinctrl-0 = <&mmcif0_pins>;
434         pinctrl-names = "default";
435
436         vmmc-supply = <&d3_3v>;
437         vqmmc-supply = <&d3_3v>;
438         bus-width = <8>;
439         non-removable;
440         status = "okay";
441 };
442
443 &sdhi1 {
444         pinctrl-0 = <&sdhi1_pins>;
445         pinctrl-names = "default";
446
447         vmmc-supply = <&vcc_sdhi1>;
448         vqmmc-supply = <&vccq_sdhi1>;
449         cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
450         status = "okay";
451 };
452
453 &qspi {
454         pinctrl-0 = <&qspi_pins>;
455         pinctrl-names = "default";
456
457         status = "okay";
458
459         flash@0 {
460                 compatible = "spansion,s25fl512s", "jedec,spi-nor";
461                 reg = <0>;
462                 spi-max-frequency = <30000000>;
463                 spi-tx-bus-width = <4>;
464                 spi-rx-bus-width = <4>;
465                 spi-cpol;
466                 spi-cpha;
467                 m25p,fast-read;
468
469                 partitions {
470                         compatible = "fixed-partitions";
471                         #address-cells = <1>;
472                         #size-cells = <1>;
473
474                         partition@0 {
475                                 label = "loader";
476                                 reg = <0x00000000 0x00040000>;
477                                 read-only;
478                         };
479                         partition@40000 {
480                                 label = "user";
481                                 reg = <0x00040000 0x00400000>;
482                                 read-only;
483                         };
484                         partition@440000 {
485                                 label = "flash";
486                                 reg = <0x00440000 0x03bc0000>;
487                         };
488                 };
489         };
490 };
491
492 /* composite video input */
493 &vin0 {
494         status = "okay";
495         pinctrl-0 = <&vin0_pins>;
496         pinctrl-names = "default";
497
498         port {
499                 vin0ep: endpoint {
500                         remote-endpoint = <&adv7180>;
501                         bus-width = <8>;
502                 };
503         };
504 };
505
506 &pci0 {
507         status = "okay";
508         pinctrl-0 = <&usb0_pins>;
509         pinctrl-names = "default";
510 };
511
512 &pci1 {
513         status = "okay";
514         pinctrl-0 = <&usb1_pins>;
515         pinctrl-names = "default";
516 };
517
518 &usbphy {
519         status = "okay";
520 };
521
522 &du {
523         pinctrl-0 = <&du0_pins>, <&du1_pins>;
524         pinctrl-names = "default";
525         status = "okay";
526
527         clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
528                  <&x2_clk>, <&x3_clk>;
529         clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
530
531         ports {
532                 port@0 {
533                         endpoint {
534                                 remote-endpoint = <&adv7511_in>;
535                         };
536                 };
537                 port@1 {
538                         endpoint {
539                                 remote-endpoint = <&adv7123_in>;
540                         };
541                 };
542         };
543 };
544
545 &rcar_sound {
546         pinctrl-0 = <&ssi_pins>, <&audio_clk_pins>;
547         pinctrl-names = "default";
548         status = "okay";
549
550         /* Single DAI */
551         #sound-dai-cells = <0>;
552
553         rcar_sound,dai {
554                 dai0 {
555                         playback = <&ssi0>;
556                         capture  = <&ssi1>;
557                 };
558         };
559 };
560
561 &rwdt {
562         timeout-sec = <60>;
563         status = "okay";
564 };
565
566 &ssi1 {
567         shared-pin;
568 };