Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / r8a7793-gose.dts
1 /*
2  * Device Tree Source for the Gose board
3  *
4  * Copyright (C) 2014-2015 Renesas Electronics Corporation
5  *
6  * This file is licensed under the terms of the GNU General Public License
7  * version 2.  This program is licensed "as is" without any warranty of any
8  * kind, whether express or implied.
9  */
10
11 /*
12  * SSI-AK4643
13  *
14  * SW1: 1: AK4643
15  *      2: CN22
16  *      3: ADV7511
17  *
18  * This command is required when Playback/Capture
19  *
20  *      amixer set "LINEOUT Mixer DACL" on
21  *      amixer set "DVC Out" 100%
22  *      amixer set "DVC In" 100%
23  *
24  * You can use Mute
25  *
26  *      amixer set "DVC Out Mute" on
27  *      amixer set "DVC In Mute" on
28  *
29  * You can use Volume Ramp
30  *
31  *      amixer set "DVC Out Ramp Up Rate"   "0.125 dB/64 steps"
32  *      amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
33  *      amixer set "DVC Out Ramp" on
34  *      aplay xxx.wav &
35  *      amixer set "DVC Out"  80%  // Volume Down
36  *      amixer set "DVC Out" 100%  // Volume Up
37  */
38
39 /dts-v1/;
40 #include "r8a7793.dtsi"
41 #include <dt-bindings/gpio/gpio.h>
42 #include <dt-bindings/input/input.h>
43
44 / {
45         model = "Gose";
46         compatible = "renesas,gose", "renesas,r8a7793";
47
48         aliases {
49                 serial0 = &scif0;
50                 serial1 = &scif1;
51         };
52
53         chosen {
54                 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
55                 stdout-path = "serial0:115200n8";
56         };
57
58         memory@40000000 {
59                 device_type = "memory";
60                 reg = <0 0x40000000 0 0x40000000>;
61         };
62
63         gpio-keys {
64                 compatible = "gpio-keys";
65
66                 key-1 {
67                         gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
68                         linux,code = <KEY_1>;
69                         label = "SW2-1";
70                         wakeup-source;
71                         debounce-interval = <20>;
72                 };
73                 key-2 {
74                         gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
75                         linux,code = <KEY_2>;
76                         label = "SW2-2";
77                         wakeup-source;
78                         debounce-interval = <20>;
79                 };
80                 key-3 {
81                         gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
82                         linux,code = <KEY_3>;
83                         label = "SW2-3";
84                         wakeup-source;
85                         debounce-interval = <20>;
86                 };
87                 key-4 {
88                         gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
89                         linux,code = <KEY_4>;
90                         label = "SW2-4";
91                         wakeup-source;
92                         debounce-interval = <20>;
93                 };
94                 key-a {
95                         gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
96                         linux,code = <KEY_A>;
97                         label = "SW30";
98                         wakeup-source;
99                         debounce-interval = <20>;
100                 };
101                 key-b {
102                         gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
103                         linux,code = <KEY_B>;
104                         label = "SW31";
105                         wakeup-source;
106                         debounce-interval = <20>;
107                 };
108                 key-c {
109                         gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
110                         linux,code = <KEY_C>;
111                         label = "SW32";
112                         wakeup-source;
113                         debounce-interval = <20>;
114                 };
115                 key-d {
116                         gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
117                         linux,code = <KEY_D>;
118                         label = "SW33";
119                         wakeup-source;
120                         debounce-interval = <20>;
121                 };
122                 key-e {
123                         gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
124                         linux,code = <KEY_E>;
125                         label = "SW34";
126                         wakeup-source;
127                         debounce-interval = <20>;
128                 };
129                 key-f {
130                         gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
131                         linux,code = <KEY_F>;
132                         label = "SW35";
133                         wakeup-source;
134                         debounce-interval = <20>;
135                 };
136                 key-g {
137                         gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
138                         linux,code = <KEY_G>;
139                         label = "SW36";
140                         wakeup-source;
141                         debounce-interval = <20>;
142                 };
143         };
144
145         leds {
146                 compatible = "gpio-leds";
147                 led6 {
148                         gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
149                         label = "LED6";
150                 };
151                 led7 {
152                         gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
153                         label = "LED7";
154                 };
155                 led8 {
156                         gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
157                         label = "LED8";
158                 };
159         };
160
161         vcc_sdhi0: regulator-vcc-sdhi0 {
162                 compatible = "regulator-fixed";
163
164                 regulator-name = "SDHI0 Vcc";
165                 regulator-min-microvolt = <3300000>;
166                 regulator-max-microvolt = <3300000>;
167
168                 gpio = <&gpio7 17 GPIO_ACTIVE_HIGH>;
169                 enable-active-high;
170         };
171
172         vccq_sdhi0: regulator-vccq-sdhi0 {
173                 compatible = "regulator-gpio";
174
175                 regulator-name = "SDHI0 VccQ";
176                 regulator-min-microvolt = <1800000>;
177                 regulator-max-microvolt = <3300000>;
178
179                 gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
180                 gpios-states = <1>;
181                 states = <3300000 1
182                           1800000 0>;
183         };
184
185         vcc_sdhi1: regulator-vcc-sdhi1 {
186                 compatible = "regulator-fixed";
187
188                 regulator-name = "SDHI1 Vcc";
189                 regulator-min-microvolt = <3300000>;
190                 regulator-max-microvolt = <3300000>;
191
192                 gpio = <&gpio7 18 GPIO_ACTIVE_HIGH>;
193                 enable-active-high;
194         };
195
196         vccq_sdhi1: regulator-vccq-sdhi1 {
197                 compatible = "regulator-gpio";
198
199                 regulator-name = "SDHI1 VccQ";
200                 regulator-min-microvolt = <1800000>;
201                 regulator-max-microvolt = <3300000>;
202
203                 gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
204                 gpios-states = <1>;
205                 states = <3300000 1
206                           1800000 0>;
207         };
208
209         vcc_sdhi2: regulator-vcc-sdhi2 {
210                 compatible = "regulator-fixed";
211
212                 regulator-name = "SDHI2 Vcc";
213                 regulator-min-microvolt = <3300000>;
214                 regulator-max-microvolt = <3300000>;
215
216                 gpio = <&gpio7 19 GPIO_ACTIVE_HIGH>;
217                 enable-active-high;
218         };
219
220         vccq_sdhi2: regulator-vccq-sdhi2 {
221                 compatible = "regulator-gpio";
222
223                 regulator-name = "SDHI2 VccQ";
224                 regulator-min-microvolt = <1800000>;
225                 regulator-max-microvolt = <3300000>;
226
227                 gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
228                 gpios-states = <1>;
229                 states = <3300000 1
230                           1800000 0>;
231         };
232
233         audio_clock: audio_clock {
234                 compatible = "fixed-clock";
235                 #clock-cells = <0>;
236                 clock-frequency = <11289600>;
237         };
238
239         rsnd_ak4643: sound {
240                 compatible = "simple-audio-card";
241
242                 simple-audio-card,format = "left_j";
243                 simple-audio-card,bitclock-master = <&sndcodec>;
244                 simple-audio-card,frame-master = <&sndcodec>;
245
246                 sndcpu: simple-audio-card,cpu {
247                         sound-dai = <&rcar_sound>;
248                 };
249
250                 sndcodec: simple-audio-card,codec {
251                         sound-dai = <&ak4643>;
252                         clocks = <&audio_clock>;
253                 };
254         };
255
256         hdmi-in {
257                 compatible = "hdmi-connector";
258                 type = "a";
259
260                 port {
261                         hdmi_con_in: endpoint {
262                                 remote-endpoint = <&adv7612_in>;
263                         };
264                 };
265         };
266
267         hdmi-out {
268                 compatible = "hdmi-connector";
269                 type = "a";
270
271                 port {
272                         hdmi_con_out: endpoint {
273                                 remote-endpoint = <&adv7511_out>;
274                         };
275                 };
276         };
277
278         composite-in {
279                 compatible = "composite-video-connector";
280
281                 port {
282                         composite_con_in: endpoint {
283                                 remote-endpoint = <&adv7180_in>;
284                         };
285                 };
286         };
287
288         x2_clk: x2-clock {
289                 compatible = "fixed-clock";
290                 #clock-cells = <0>;
291                 clock-frequency = <74250000>;
292         };
293
294         x13_clk: x13-clock {
295                 compatible = "fixed-clock";
296                 #clock-cells = <0>;
297                 clock-frequency = <148500000>;
298         };
299 };
300
301 &du {
302         pinctrl-0 = <&du_pins>;
303         pinctrl-names = "default";
304         status = "okay";
305
306         clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>, <&cpg CPG_MOD 726>,
307                  <&x13_clk>, <&x2_clk>;
308         clock-names = "du.0", "du.1", "lvds.0",
309                       "dclkin.0", "dclkin.1";
310
311         ports {
312                 port@0 {
313                         endpoint {
314                                 remote-endpoint = <&adv7511_in>;
315                         };
316                 };
317                 port@1 {
318                         lvds_connector: endpoint {
319                         };
320                 };
321         };
322 };
323
324 &extal_clk {
325         clock-frequency = <20000000>;
326 };
327
328 &pfc {
329         pinctrl-0 = <&scif_clk_pins>;
330         pinctrl-names = "default";
331
332         i2c2_pins: i2c2 {
333                 groups = "i2c2";
334                 function = "i2c2";
335         };
336
337         du_pins: du {
338                 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
339                 function = "du";
340         };
341
342         scif0_pins: scif0 {
343                 groups = "scif0_data_d";
344                 function = "scif0";
345         };
346
347         scif1_pins: scif1 {
348                 groups = "scif1_data_d";
349                 function = "scif1";
350         };
351
352         scif_clk_pins: scif_clk {
353                 groups = "scif_clk";
354                 function = "scif_clk";
355         };
356
357         ether_pins: ether {
358                 groups = "eth_link", "eth_mdio", "eth_rmii";
359                 function = "eth";
360         };
361
362         phy1_pins: phy1 {
363                 groups = "intc_irq0";
364                 function = "intc";
365         };
366
367         sdhi0_pins: sd0 {
368                 groups = "sdhi0_data4", "sdhi0_ctrl";
369                 function = "sdhi0";
370                 power-source = <3300>;
371         };
372
373         sdhi0_pins_uhs: sd0_uhs {
374                 groups = "sdhi0_data4", "sdhi0_ctrl";
375                 function = "sdhi0";
376                 power-source = <1800>;
377         };
378
379         sdhi1_pins: sd1 {
380                 groups = "sdhi1_data4", "sdhi1_ctrl";
381                 function = "sdhi1";
382                 power-source = <3300>;
383         };
384
385         sdhi1_pins_uhs: sd1_uhs {
386                 groups = "sdhi1_data4", "sdhi1_ctrl";
387                 function = "sdhi1";
388                 power-source = <1800>;
389         };
390
391         sdhi2_pins: sd2 {
392                 groups = "sdhi2_data4", "sdhi2_ctrl";
393                 function = "sdhi2";
394                 power-source = <3300>;
395         };
396
397         sdhi2_pins_uhs: sd2_uhs {
398                 groups = "sdhi2_data4", "sdhi2_ctrl";
399                 function = "sdhi2";
400                 power-source = <1800>;
401         };
402
403         qspi_pins: qspi {
404                 groups = "qspi_ctrl", "qspi_data4";
405                 function = "qspi";
406         };
407
408         sound_pins: sound {
409                 groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
410                 function = "ssi";
411         };
412
413         sound_clk_pins: sound_clk {
414                 groups = "audio_clk_a";
415                 function = "audio_clk";
416         };
417
418         vin0_pins: vin0 {
419                 groups = "vin0_data24", "vin0_sync", "vin0_clkenb", "vin0_clk";
420                 function = "vin0";
421         };
422
423         vin1_pins: vin1 {
424                 groups = "vin1_data8", "vin1_clk";
425                 function = "vin1";
426         };
427 };
428
429 &ether {
430         pinctrl-0 = <&ether_pins &phy1_pins>;
431         pinctrl-names = "default";
432
433         phy-handle = <&phy1>;
434         renesas,ether-link-active-low;
435         status = "okay";
436
437         phy1: ethernet-phy@1 {
438                 reg = <1>;
439                 interrupt-parent = <&irqc0>;
440                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
441                 micrel,led-mode = <1>;
442         };
443 };
444
445 &cmt0 {
446         status = "okay";
447 };
448
449 &scif0 {
450         pinctrl-0 = <&scif0_pins>;
451         pinctrl-names = "default";
452
453         status = "okay";
454 };
455
456 &scif1 {
457         pinctrl-0 = <&scif1_pins>;
458         pinctrl-names = "default";
459
460         status = "okay";
461 };
462
463 &scif_clk {
464         clock-frequency = <14745600>;
465 };
466
467 &sdhi0 {
468         pinctrl-0 = <&sdhi0_pins>;
469         pinctrl-1 = <&sdhi0_pins_uhs>;
470         pinctrl-names = "default", "state_uhs";
471
472         vmmc-supply = <&vcc_sdhi0>;
473         vqmmc-supply = <&vccq_sdhi0>;
474         cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
475         wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
476         sd-uhs-sdr50;
477         sd-uhs-sdr104;
478         status = "okay";
479 };
480
481 &sdhi1 {
482         pinctrl-0 = <&sdhi1_pins>;
483         pinctrl-1 = <&sdhi1_pins_uhs>;
484         pinctrl-names = "default", "state_uhs";
485
486         vmmc-supply = <&vcc_sdhi1>;
487         vqmmc-supply = <&vccq_sdhi1>;
488         cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
489         wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
490         sd-uhs-sdr50;
491         status = "okay";
492 };
493
494 &sdhi2 {
495         pinctrl-0 = <&sdhi2_pins>;
496         pinctrl-1 = <&sdhi2_pins_uhs>;
497         pinctrl-names = "default", "state_uhs";
498
499         vmmc-supply = <&vcc_sdhi2>;
500         vqmmc-supply = <&vccq_sdhi2>;
501         cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
502         sd-uhs-sdr50;
503         status = "okay";
504 };
505
506 &qspi {
507         pinctrl-0 = <&qspi_pins>;
508         pinctrl-names = "default";
509
510         status = "okay";
511
512         flash@0 {
513                 compatible = "spansion,s25fl512s", "jedec,spi-nor";
514                 reg = <0>;
515                 spi-max-frequency = <30000000>;
516                 spi-tx-bus-width = <4>;
517                 spi-rx-bus-width = <4>;
518                 spi-cpol;
519                 spi-cpha;
520                 m25p,fast-read;
521
522                 partitions {
523                         compatible = "fixed-partitions";
524                         #address-cells = <1>;
525                         #size-cells = <1>;
526
527                         partition@0 {
528                                 label = "loader";
529                                 reg = <0x00000000 0x00040000>;
530                                 read-only;
531                         };
532                         partition@40000 {
533                                 label = "user";
534                                 reg = <0x00040000 0x00400000>;
535                                 read-only;
536                         };
537                         partition@440000 {
538                                 label = "flash";
539                                 reg = <0x00440000 0x03bc0000>;
540                         };
541                 };
542         };
543 };
544
545 &i2c2 {
546         pinctrl-0 = <&i2c2_pins>;
547         pinctrl-names = "default";
548
549         status = "okay";
550         clock-frequency = <100000>;
551
552         ak4643: codec@12 {
553                 compatible = "asahi-kasei,ak4643";
554                 #sound-dai-cells = <0>;
555                 reg = <0x12>;
556         };
557
558         composite-in@20 {
559                 compatible = "adi,adv7180cp";
560                 reg = <0x20>;
561                 remote = <&vin1>;
562
563                 port {
564                         #address-cells = <1>;
565                         #size-cells = <0>;
566
567                         port@0 {
568                                 reg = <0>;
569                                 adv7180_in: endpoint {
570                                         remote-endpoint = <&composite_con_in>;
571                                 };
572                         };
573
574                         port@3 {
575                                 reg = <3>;
576                                 adv7180_out: endpoint {
577                                         bus-width = <8>;
578                                         remote-endpoint = <&vin1ep>;
579                                 };
580                         };
581                 };
582         };
583
584         hdmi@39 {
585                 compatible = "adi,adv7511w";
586                 reg = <0x39>;
587                 interrupt-parent = <&gpio3>;
588                 interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
589
590                 adi,input-depth = <8>;
591                 adi,input-colorspace = "rgb";
592                 adi,input-clock = "1x";
593                 adi,input-style = <1>;
594                 adi,input-justification = "evenly";
595
596                 ports {
597                         #address-cells = <1>;
598                         #size-cells = <0>;
599
600                         port@0 {
601                                 reg = <0>;
602                                 adv7511_in: endpoint {
603                                         remote-endpoint = <&du_out_rgb>;
604                                 };
605                         };
606
607                         port@1 {
608                                 reg = <1>;
609                                 adv7511_out: endpoint {
610                                         remote-endpoint = <&hdmi_con_out>;
611                                 };
612                         };
613                 };
614         };
615
616         hdmi-in@4c {
617                 compatible = "adi,adv7612";
618                 reg = <0x4c>;
619                 interrupt-parent = <&gpio4>;
620                 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
621                 default-input = <0>;
622
623                 port {
624                         #address-cells = <1>;
625                         #size-cells = <0>;
626
627                         port@0 {
628                                 reg = <0>;
629                                 adv7612_in: endpoint {
630                                         remote-endpoint = <&hdmi_con_in>;
631                                 };
632                         };
633
634                         port@2 {
635                                 reg = <2>;
636                                 adv7612_out: endpoint {
637                                         remote-endpoint = <&vin0ep2>;
638                                 };
639                         };
640                 };
641         };
642
643         eeprom@50 {
644                 compatible = "renesas,r1ex24002", "atmel,24c02";
645                 reg = <0x50>;
646                 pagesize = <16>;
647         };
648 };
649
650 &i2c6 {
651         status = "okay";
652         clock-frequency = <100000>;
653
654         pmic@58 {
655                 compatible = "dlg,da9063";
656                 reg = <0x58>;
657                 interrupt-parent = <&irqc0>;
658                 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
659                 interrupt-controller;
660
661                 rtc {
662                         compatible = "dlg,da9063-rtc";
663                 };
664
665                 wdt {
666                         compatible = "dlg,da9063-watchdog";
667                 };
668         };
669 };
670
671 &rcar_sound {
672         pinctrl-0 = <&sound_pins &sound_clk_pins>;
673         pinctrl-names = "default";
674
675         /* Single DAI */
676         #sound-dai-cells = <0>;
677
678         status = "okay";
679
680         rcar_sound,dai {
681                 dai0 {
682                         playback = <&ssi0 &src2 &dvc0>;
683                         capture  = <&ssi1 &src3 &dvc1>;
684                 };
685         };
686 };
687
688 &ssi1 {
689         shared-pin;
690 };
691
692 /* HDMI video input */
693 &vin0 {
694         status = "okay";
695         pinctrl-0 = <&vin0_pins>;
696         pinctrl-names = "default";
697
698         port {
699                 #address-cells = <1>;
700                 #size-cells = <0>;
701
702                 vin0ep2: endpoint {
703                         remote-endpoint = <&adv7612_out>;
704                         bus-width = <24>;
705                         hsync-active = <0>;
706                         vsync-active = <0>;
707                         pclk-sample = <1>;
708                         data-active = <1>;
709                 };
710         };
711 };
712
713 /* composite video input */
714 &vin1 {
715         pinctrl-0 = <&vin1_pins>;
716         pinctrl-names = "default";
717
718         status = "okay";
719
720         port {
721                 #address-cells = <1>;
722                 #size-cells = <0>;
723
724                 vin1ep: endpoint {
725                         remote-endpoint = <&adv7180_out>;
726                         bus-width = <8>;
727                 };
728         };
729 };