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