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