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