ARM: shmobile: koelsch: Sound DMA support via SRC on DTS
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / arm / boot / dts / r8a7791-koelsch.dts
1 /*
2  * Device Tree Source for the Koelsch board
3  *
4  * Copyright (C) 2013 Renesas Electronics Corporation
5  * Copyright (C) 2013-2014 Renesas Solutions Corp.
6  * Copyright (C) 2014 Cogent Embedded, Inc.
7  *
8  * This file is licensed under the terms of the GNU General Public License
9  * version 2.  This program is licensed "as is" without any warranty of any
10  * kind, whether express or implied.
11  */
12
13 /*
14  * SSI-AK4643
15  *
16  * SW1: 1: AK4643
17  *      2: CN22
18  *      3: ADV7511
19  *
20  * This command is required when Playback/Capture
21  *
22  *      amixer set "LINEOUT Mixer DACL" on
23  */
24
25 /dts-v1/;
26 #include "r8a7791.dtsi"
27 #include <dt-bindings/gpio/gpio.h>
28 #include <dt-bindings/input/input.h>
29
30 / {
31         model = "Koelsch";
32         compatible = "renesas,koelsch", "renesas,r8a7791";
33
34         aliases {
35                 serial6 = &scif0;
36                 serial7 = &scif1;
37         };
38
39         chosen {
40                 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
41                 stdout-path = &scif0;
42         };
43
44         memory@40000000 {
45                 device_type = "memory";
46                 reg = <0 0x40000000 0 0x40000000>;
47         };
48
49         memory@200000000 {
50                 device_type = "memory";
51                 reg = <2 0x00000000 0 0x40000000>;
52         };
53
54         lbsc {
55                 #address-cells = <1>;
56                 #size-cells = <1>;
57         };
58
59         keyboard {
60                 compatible = "gpio-keys";
61
62                 key-1 {
63                         gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
64                         linux,code = <KEY_1>;
65                         label = "SW2-1";
66                         gpio-key,wakeup;
67                         debounce-interval = <20>;
68                 };
69                 key-2 {
70                         gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
71                         linux,code = <KEY_2>;
72                         label = "SW2-2";
73                         gpio-key,wakeup;
74                         debounce-interval = <20>;
75                 };
76                 key-3 {
77                         gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
78                         linux,code = <KEY_3>;
79                         label = "SW2-3";
80                         gpio-key,wakeup;
81                         debounce-interval = <20>;
82                 };
83                 key-4 {
84                         gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
85                         linux,code = <KEY_4>;
86                         label = "SW2-4";
87                         gpio-key,wakeup;
88                         debounce-interval = <20>;
89                 };
90                 key-a {
91                         gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
92                         linux,code = <KEY_A>;
93                         label = "SW30";
94                         gpio-key,wakeup;
95                         debounce-interval = <20>;
96                 };
97                 key-b {
98                         gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
99                         linux,code = <KEY_B>;
100                         label = "SW31";
101                         gpio-key,wakeup;
102                         debounce-interval = <20>;
103                 };
104                 key-c {
105                         gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
106                         linux,code = <KEY_C>;
107                         label = "SW32";
108                         gpio-key,wakeup;
109                         debounce-interval = <20>;
110                 };
111                 key-d {
112                         gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
113                         linux,code = <KEY_D>;
114                         label = "SW33";
115                         gpio-key,wakeup;
116                         debounce-interval = <20>;
117                 };
118                 key-e {
119                         gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
120                         linux,code = <KEY_E>;
121                         label = "SW34";
122                         gpio-key,wakeup;
123                         debounce-interval = <20>;
124                 };
125                 key-f {
126                         gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
127                         linux,code = <KEY_F>;
128                         label = "SW35";
129                         gpio-key,wakeup;
130                         debounce-interval = <20>;
131                 };
132                 key-g {
133                         gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
134                         linux,code = <KEY_G>;
135                         label = "SW36";
136                         gpio-key,wakeup;
137                         debounce-interval = <20>;
138                 };
139         };
140
141         leds {
142                 compatible = "gpio-leds";
143                 led6 {
144                         gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
145                 };
146                 led7 {
147                         gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
148                 };
149                 led8 {
150                         gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
151                 };
152         };
153
154         vcc_sdhi0: regulator@0 {
155                 compatible = "regulator-fixed";
156
157                 regulator-name = "SDHI0 Vcc";
158                 regulator-min-microvolt = <3300000>;
159                 regulator-max-microvolt = <3300000>;
160
161                 gpio = <&gpio7 17 GPIO_ACTIVE_HIGH>;
162                 enable-active-high;
163         };
164
165         vccq_sdhi0: regulator@1 {
166                 compatible = "regulator-gpio";
167
168                 regulator-name = "SDHI0 VccQ";
169                 regulator-min-microvolt = <1800000>;
170                 regulator-max-microvolt = <3300000>;
171
172                 gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
173                 gpios-states = <1>;
174                 states = <3300000 1
175                           1800000 0>;
176         };
177
178         vcc_sdhi1: regulator@2 {
179                 compatible = "regulator-fixed";
180
181                 regulator-name = "SDHI1 Vcc";
182                 regulator-min-microvolt = <3300000>;
183                 regulator-max-microvolt = <3300000>;
184
185                 gpio = <&gpio7 18 GPIO_ACTIVE_HIGH>;
186                 enable-active-high;
187         };
188
189         vccq_sdhi1: regulator@3 {
190                 compatible = "regulator-gpio";
191
192                 regulator-name = "SDHI1 VccQ";
193                 regulator-min-microvolt = <1800000>;
194                 regulator-max-microvolt = <3300000>;
195
196                 gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
197                 gpios-states = <1>;
198                 states = <3300000 1
199                           1800000 0>;
200         };
201
202         vcc_sdhi2: regulator@4 {
203                 compatible = "regulator-fixed";
204
205                 regulator-name = "SDHI2 Vcc";
206                 regulator-min-microvolt = <3300000>;
207                 regulator-max-microvolt = <3300000>;
208
209                 gpio = <&gpio7 19 GPIO_ACTIVE_HIGH>;
210                 enable-active-high;
211         };
212
213         vccq_sdhi2: regulator@5 {
214                 compatible = "regulator-gpio";
215
216                 regulator-name = "SDHI2 VccQ";
217                 regulator-min-microvolt = <1800000>;
218                 regulator-max-microvolt = <3300000>;
219
220                 gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
221                 gpios-states = <1>;
222                 states = <3300000 1
223                           1800000 0>;
224         };
225
226         sound {
227                 compatible = "simple-audio-card";
228
229                 simple-audio-card,format = "left_j";
230                 simple-audio-card,bitclock-master = <&sndcodec>;
231                 simple-audio-card,frame-master = <&sndcodec>;
232
233                 sndcpu: simple-audio-card,cpu {
234                         sound-dai = <&rcar_sound>;
235                 };
236
237                 sndcodec: simple-audio-card,codec {
238                         sound-dai = <&ak4643>;
239                         system-clock-frequency = <11289600>;
240                 };
241         };
242 };
243
244 &du {
245         pinctrl-0 = <&du_pins>;
246         pinctrl-names = "default";
247         status = "okay";
248
249         ports {
250                 port@1 {
251                         lvds_connector: endpoint {
252                         };
253                 };
254         };
255 };
256
257 &extal_clk {
258         clock-frequency = <20000000>;
259 };
260
261 &pfc {
262         i2c2_pins: i2c2 {
263                 renesas,groups = "i2c2";
264                 renesas,function = "i2c2";
265         };
266
267         du_pins: du {
268                 renesas,groups = "du_rgb666", "du_sync", "du_clk_out_0";
269                 renesas,function = "du";
270         };
271
272         scif0_pins: serial0 {
273                 renesas,groups = "scif0_data_d";
274                 renesas,function = "scif0";
275         };
276
277         scif1_pins: serial1 {
278                 renesas,groups = "scif1_data_d";
279                 renesas,function = "scif1";
280         };
281
282         ether_pins: ether {
283                 renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
284                 renesas,function = "eth";
285         };
286
287         phy1_pins: phy1 {
288                 renesas,groups = "intc_irq0";
289                 renesas,function = "intc";
290         };
291
292         sdhi0_pins: sd0 {
293                 renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
294                 renesas,function = "sdhi0";
295         };
296
297         sdhi1_pins: sd1 {
298                 renesas,groups = "sdhi1_data4", "sdhi1_ctrl";
299                 renesas,function = "sdhi1";
300         };
301
302         sdhi2_pins: sd2 {
303                 renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
304                 renesas,function = "sdhi2";
305         };
306
307         qspi_pins: spi0 {
308                 renesas,groups = "qspi_ctrl", "qspi_data4";
309                 renesas,function = "qspi";
310         };
311
312         msiof0_pins: spi1 {
313                 renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx",
314                                  "msiof0_tx";
315                 renesas,function = "msiof0";
316         };
317
318         usb0_pins: usb0 {
319                 renesas,groups = "usb0";
320                 renesas,function = "usb0";
321         };
322
323         usb1_pins: usb1 {
324                 renesas,groups = "usb1";
325                 renesas,function = "usb1";
326         };
327
328         vin1_pins: vin1 {
329                 renesas,groups = "vin1_data8", "vin1_clk";
330                 renesas,function = "vin1";
331         };
332
333         sound_pins: sound {
334                 renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
335                 renesas,function = "ssi";
336         };
337
338         sound_clk_pins: sound_clk {
339                 renesas,groups = "audio_clk_a";
340                 renesas,function = "audio_clk";
341         };
342 };
343
344 &ether {
345         pinctrl-0 = <&ether_pins &phy1_pins>;
346         pinctrl-names = "default";
347
348         phy-handle = <&phy1>;
349         renesas,ether-link-active-low;
350         status = "ok";
351
352         phy1: ethernet-phy@1 {
353                 reg = <1>;
354                 interrupt-parent = <&irqc0>;
355                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
356                 micrel,led-mode = <1>;
357         };
358 };
359
360 &cmt0 {
361         status = "ok";
362 };
363
364 &sata0 {
365         status = "okay";
366 };
367
368 &scif0 {
369         pinctrl-0 = <&scif0_pins>;
370         pinctrl-names = "default";
371
372         status = "okay";
373 };
374
375 &scif1 {
376         pinctrl-0 = <&scif1_pins>;
377         pinctrl-names = "default";
378
379         status = "okay";
380 };
381
382 &sdhi0 {
383         pinctrl-0 = <&sdhi0_pins>;
384         pinctrl-names = "default";
385
386         vmmc-supply = <&vcc_sdhi0>;
387         vqmmc-supply = <&vccq_sdhi0>;
388         cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
389         wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
390         status = "okay";
391 };
392
393 &sdhi1 {
394         pinctrl-0 = <&sdhi1_pins>;
395         pinctrl-names = "default";
396
397         vmmc-supply = <&vcc_sdhi1>;
398         vqmmc-supply = <&vccq_sdhi1>;
399         cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
400         wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
401         status = "okay";
402 };
403
404 &sdhi2 {
405         pinctrl-0 = <&sdhi2_pins>;
406         pinctrl-names = "default";
407
408         vmmc-supply = <&vcc_sdhi2>;
409         vqmmc-supply = <&vccq_sdhi2>;
410         cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
411         status = "okay";
412 };
413
414 &qspi {
415         pinctrl-0 = <&qspi_pins>;
416         pinctrl-names = "default";
417
418         status = "okay";
419
420         flash: flash@0 {
421                 #address-cells = <1>;
422                 #size-cells = <1>;
423                 compatible = "spansion,s25fl512s";
424                 reg = <0>;
425                 spi-max-frequency = <30000000>;
426                 spi-tx-bus-width = <4>;
427                 spi-rx-bus-width = <4>;
428                 m25p,fast-read;
429
430                 partition@0 {
431                         label = "loader";
432                         reg = <0x00000000 0x00080000>;
433                         read-only;
434                 };
435                 partition@80000 {
436                         label = "bootenv";
437                         reg = <0x00080000 0x00080000>;
438                         read-only;
439                 };
440                 partition@100000 {
441                         label = "data";
442                         reg = <0x00100000 0x03f00000>;
443                 };
444         };
445 };
446
447 &msiof0 {
448         pinctrl-0 = <&msiof0_pins>;
449         pinctrl-names = "default";
450
451         status = "okay";
452
453         pmic: pmic@0 {
454                 compatible = "renesas,r2a11302ft";
455                 reg = <0>;
456                 spi-max-frequency = <6000000>;
457                 spi-cpol;
458                 spi-cpha;
459         };
460 };
461
462 &i2c2 {
463         pinctrl-0 = <&i2c2_pins>;
464         pinctrl-names = "default";
465
466         status = "okay";
467         clock-frequency = <100000>;
468
469         ak4643: sound-codec@12 {
470                 compatible = "asahi-kasei,ak4643";
471                 #sound-dai-cells = <0>;
472                 reg = <0x12>;
473         };
474
475         composite-in@20 {
476                 compatible = "adi,adv7180";
477                 reg = <0x20>;
478                 remote = <&vin1>;
479
480                 port {
481                         adv7180: endpoint {
482                                 bus-width = <8>;
483                                 remote-endpoint = <&vin1ep>;
484                         };
485                 };
486         };
487
488         eeprom@50 {
489                 compatible = "renesas,24c02";
490                 reg = <0x50>;
491                 pagesize = <16>;
492         };
493 };
494
495 &i2c6 {
496         status = "okay";
497         clock-frequency = <100000>;
498
499         vdd_dvfs: regulator@68 {
500                 compatible = "dlg,da9210";
501                 reg = <0x68>;
502
503                 regulator-min-microvolt = <1000000>;
504                 regulator-max-microvolt = <1000000>;
505                 regulator-boot-on;
506                 regulator-always-on;
507         };
508 };
509
510 &pci0 {
511         status = "okay";
512         pinctrl-0 = <&usb0_pins>;
513         pinctrl-names = "default";
514 };
515
516 &pci1 {
517         status = "okay";
518         pinctrl-0 = <&usb1_pins>;
519         pinctrl-names = "default";
520 };
521
522 &hsusb {
523         status = "okay";
524         pinctrl-0 = <&usb0_pins>;
525         pinctrl-names = "default";
526         renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>;
527 };
528
529 &usbphy {
530         status = "okay";
531 };
532
533 &pcie_bus_clk {
534         status = "okay";
535 };
536
537 &pciec {
538         status = "okay";
539 };
540
541 &cpu0 {
542         cpu0-supply = <&vdd_dvfs>;
543 };
544
545 /* composite video input */
546 &vin1 {
547         status = "ok";
548         pinctrl-0 = <&vin1_pins>;
549         pinctrl-names = "default";
550
551         port {
552                 #address-cells = <1>;
553                 #size-cells = <0>;
554
555                 vin1ep: endpoint {
556                         remote-endpoint = <&adv7180>;
557                         bus-width = <8>;
558                 };
559         };
560 };
561
562 &rcar_sound {
563         pinctrl-0 = <&sound_pins &sound_clk_pins>;
564         pinctrl-names = "default";
565
566         #sound-dai-cells = <0>;
567
568         status = "okay";
569
570         rcar_sound,dai {
571                 dai0 {
572                         playback = <&ssi0 &src2>;
573                         capture  = <&ssi1 &src3>;
574                 };
575         };
576 };
577
578 &ssi1 {
579         shared-pin;
580 };