Loading...
Note: File does not exist in v6.13.7.
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for the Gose board
4 *
5 * Copyright (C) 2014-2015 Renesas Electronics Corporation
6 */
7
8/*
9 * SSI-AK4643
10 *
11 * SW1: 1: AK4643
12 * 2: CN22
13 * 3: ADV7511
14 *
15 * This command is required when Playback/Capture
16 *
17 * amixer set "LINEOUT Mixer DACL" on
18 * amixer set "DVC Out" 100%
19 * amixer set "DVC In" 100%
20 *
21 * You can use Mute
22 *
23 * amixer set "DVC Out Mute" on
24 * amixer set "DVC In Mute" on
25 *
26 * You can use Volume Ramp
27 *
28 * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps"
29 * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
30 * amixer set "DVC Out Ramp" on
31 * aplay xxx.wav &
32 * amixer set "DVC Out" 80% // Volume Down
33 * amixer set "DVC Out" 100% // Volume Up
34 */
35
36/dts-v1/;
37#include "r8a7793.dtsi"
38#include <dt-bindings/gpio/gpio.h>
39#include <dt-bindings/input/input.h>
40
41/ {
42 model = "Gose";
43 compatible = "renesas,gose", "renesas,r8a7793";
44
45 aliases {
46 serial0 = &scif0;
47 serial1 = &scif1;
48 i2c9 = &gpioi2c2;
49 i2c10 = &gpioi2c4;
50 i2c11 = &i2chdmi;
51 i2c12 = &i2cexio4;
52 };
53
54 chosen {
55 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
56 stdout-path = "serial0:115200n8";
57 };
58
59 memory@40000000 {
60 device_type = "memory";
61 reg = <0 0x40000000 0 0x40000000>;
62 };
63
64 gpio-keys {
65 compatible = "gpio-keys";
66
67 key-1 {
68 gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
69 linux,code = <KEY_1>;
70 label = "SW2-1";
71 wakeup-source;
72 debounce-interval = <20>;
73 };
74 key-2 {
75 gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
76 linux,code = <KEY_2>;
77 label = "SW2-2";
78 wakeup-source;
79 debounce-interval = <20>;
80 };
81 key-3 {
82 gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
83 linux,code = <KEY_3>;
84 label = "SW2-3";
85 wakeup-source;
86 debounce-interval = <20>;
87 };
88 key-4 {
89 gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
90 linux,code = <KEY_4>;
91 label = "SW2-4";
92 wakeup-source;
93 debounce-interval = <20>;
94 };
95 key-a {
96 gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
97 linux,code = <KEY_A>;
98 label = "SW30";
99 wakeup-source;
100 debounce-interval = <20>;
101 };
102 key-b {
103 gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
104 linux,code = <KEY_B>;
105 label = "SW31";
106 wakeup-source;
107 debounce-interval = <20>;
108 };
109 key-c {
110 gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
111 linux,code = <KEY_C>;
112 label = "SW32";
113 wakeup-source;
114 debounce-interval = <20>;
115 };
116 key-d {
117 gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
118 linux,code = <KEY_D>;
119 label = "SW33";
120 wakeup-source;
121 debounce-interval = <20>;
122 };
123 key-e {
124 gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
125 linux,code = <KEY_E>;
126 label = "SW34";
127 wakeup-source;
128 debounce-interval = <20>;
129 };
130 key-f {
131 gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
132 linux,code = <KEY_F>;
133 label = "SW35";
134 wakeup-source;
135 debounce-interval = <20>;
136 };
137 key-g {
138 gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
139 linux,code = <KEY_G>;
140 label = "SW36";
141 wakeup-source;
142 debounce-interval = <20>;
143 };
144 };
145
146 leds {
147 compatible = "gpio-leds";
148 led6 {
149 gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
150 label = "LED6";
151 };
152 led7 {
153 gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
154 label = "LED7";
155 };
156 led8 {
157 gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
158 label = "LED8";
159 };
160 };
161
162 vcc_sdhi0: regulator-vcc-sdhi0 {
163 compatible = "regulator-fixed";
164
165 regulator-name = "SDHI0 Vcc";
166 regulator-min-microvolt = <3300000>;
167 regulator-max-microvolt = <3300000>;
168
169 gpio = <&gpio7 17 GPIO_ACTIVE_HIGH>;
170 enable-active-high;
171 };
172
173 vccq_sdhi0: regulator-vccq-sdhi0 {
174 compatible = "regulator-gpio";
175
176 regulator-name = "SDHI0 VccQ";
177 regulator-min-microvolt = <1800000>;
178 regulator-max-microvolt = <3300000>;
179
180 gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
181 gpios-states = <1>;
182 states = <3300000 1>, <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>, <1800000 0>;
206 };
207
208 vcc_sdhi2: regulator-vcc-sdhi2 {
209 compatible = "regulator-fixed";
210
211 regulator-name = "SDHI2 Vcc";
212 regulator-min-microvolt = <3300000>;
213 regulator-max-microvolt = <3300000>;
214
215 gpio = <&gpio7 19 GPIO_ACTIVE_HIGH>;
216 enable-active-high;
217 };
218
219 vccq_sdhi2: regulator-vccq-sdhi2 {
220 compatible = "regulator-gpio";
221
222 regulator-name = "SDHI2 VccQ";
223 regulator-min-microvolt = <1800000>;
224 regulator-max-microvolt = <3300000>;
225
226 gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
227 gpios-states = <1>;
228 states = <3300000 1>, <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 gpioi2c2: i2c-9 {
299 #address-cells = <1>;
300 #size-cells = <0>;
301 compatible = "i2c-gpio";
302 status = "disabled";
303 scl-gpios = <&gpio2 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
304 sda-gpios = <&gpio2 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
305 i2c-gpio,delay-us = <5>;
306 };
307
308 gpioi2c4: i2c-10 {
309 #address-cells = <1>;
310 #size-cells = <0>;
311 compatible = "i2c-gpio";
312 status = "disabled";
313 scl-gpios = <&gpio7 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
314 sda-gpios = <&gpio7 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
315 i2c-gpio,delay-us = <5>;
316 };
317
318 /*
319 * A fallback to GPIO is provided for I2C2.
320 */
321 i2chdmi: i2c-11 {
322 compatible = "i2c-demux-pinctrl";
323 i2c-parent = <&i2c2>, <&gpioi2c2>;
324 i2c-bus-name = "i2c-hdmi";
325 #address-cells = <1>;
326 #size-cells = <0>;
327
328 ak4643: codec@12 {
329 compatible = "asahi-kasei,ak4643";
330 #sound-dai-cells = <0>;
331 reg = <0x12>;
332 };
333
334 composite-in@20 {
335 compatible = "adi,adv7180cp";
336 reg = <0x20>;
337
338 ports {
339 #address-cells = <1>;
340 #size-cells = <0>;
341
342 port@0 {
343 reg = <0>;
344 adv7180_in: endpoint {
345 remote-endpoint = <&composite_con_in>;
346 };
347 };
348
349 port@3 {
350 reg = <3>;
351 adv7180_out: endpoint {
352 bus-width = <8>;
353 remote-endpoint = <&vin1ep>;
354 };
355 };
356 };
357 };
358
359 hdmi@39 {
360 compatible = "adi,adv7511w";
361 reg = <0x39>;
362 interrupt-parent = <&gpio3>;
363 interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
364
365 adi,input-depth = <8>;
366 adi,input-colorspace = "rgb";
367 adi,input-clock = "1x";
368
369 ports {
370 #address-cells = <1>;
371 #size-cells = <0>;
372
373 port@0 {
374 reg = <0>;
375 adv7511_in: endpoint {
376 remote-endpoint = <&du_out_rgb>;
377 };
378 };
379
380 port@1 {
381 reg = <1>;
382 adv7511_out: endpoint {
383 remote-endpoint = <&hdmi_con_out>;
384 };
385 };
386 };
387 };
388
389 hdmi-in@4c {
390 compatible = "adi,adv7612";
391 reg = <0x4c>;
392 interrupt-parent = <&gpio4>;
393 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
394 default-input = <0>;
395
396 ports {
397 #address-cells = <1>;
398 #size-cells = <0>;
399
400 port@0 {
401 reg = <0>;
402 adv7612_in: endpoint {
403 remote-endpoint = <&hdmi_con_in>;
404 };
405 };
406
407 port@2 {
408 reg = <2>;
409 adv7612_out: endpoint {
410 remote-endpoint = <&vin0ep2>;
411 };
412 };
413 };
414 };
415
416 eeprom@50 {
417 compatible = "renesas,r1ex24002", "atmel,24c02";
418 reg = <0x50>;
419 pagesize = <16>;
420 };
421 };
422
423 /*
424 * I2C4 is routed to EXIO connector E, pins 37 (SCL) + 39 (SDA).
425 * A fallback to GPIO is provided.
426 */
427 i2cexio4: i2c-12 {
428 compatible = "i2c-demux-pinctrl";
429 i2c-parent = <&i2c4>, <&gpioi2c4>;
430 i2c-bus-name = "i2c-exio4";
431 #address-cells = <1>;
432 #size-cells = <0>;
433 };
434};
435
436&du {
437 pinctrl-0 = <&du_pins>;
438 pinctrl-names = "default";
439 status = "okay";
440
441 clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
442 <&x13_clk>, <&x2_clk>;
443 clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
444
445 ports {
446 port@0 {
447 endpoint {
448 remote-endpoint = <&adv7511_in>;
449 };
450 };
451 };
452};
453
454&lvds0 {
455 ports {
456 port@1 {
457 lvds_connector: endpoint {
458 };
459 };
460 };
461};
462
463&extal_clk {
464 clock-frequency = <20000000>;
465};
466
467&pfc {
468 pinctrl-0 = <&scif_clk_pins>;
469 pinctrl-names = "default";
470
471 i2c2_pins: i2c2 {
472 groups = "i2c2";
473 function = "i2c2";
474 };
475
476 i2c4_pins: i2c4 {
477 groups = "i2c4_c";
478 function = "i2c4";
479 };
480
481 du_pins: du {
482 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
483 function = "du";
484 };
485
486 scif0_pins: scif0 {
487 groups = "scif0_data_d";
488 function = "scif0";
489 };
490
491 scif1_pins: scif1 {
492 groups = "scif1_data_d";
493 function = "scif1";
494 };
495
496 scif_clk_pins: scif_clk {
497 groups = "scif_clk";
498 function = "scif_clk";
499 };
500
501 ether_pins: ether {
502 groups = "eth_link", "eth_mdio", "eth_rmii";
503 function = "eth";
504 };
505
506 phy1_pins: phy1 {
507 groups = "intc_irq0";
508 function = "intc";
509 };
510
511 pmic_irq_pins: pmicirq {
512 groups = "intc_irq2";
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ðer {
579 pinctrl-0 = <ðer_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 reset-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
592 };
593};
594
595&cmt0 {
596 status = "okay";
597};
598
599&cpu0 {
600 cpu0-supply = <&vdd_dvfs>;
601};
602
603&rwdt {
604 timeout-sec = <60>;
605 status = "okay";
606};
607
608&scif0 {
609 pinctrl-0 = <&scif0_pins>;
610 pinctrl-names = "default";
611
612 status = "okay";
613};
614
615&scif1 {
616 pinctrl-0 = <&scif1_pins>;
617 pinctrl-names = "default";
618
619 status = "okay";
620};
621
622&scif_clk {
623 clock-frequency = <14745600>;
624};
625
626&sdhi0 {
627 pinctrl-0 = <&sdhi0_pins>;
628 pinctrl-1 = <&sdhi0_pins_uhs>;
629 pinctrl-names = "default", "state_uhs";
630
631 vmmc-supply = <&vcc_sdhi0>;
632 vqmmc-supply = <&vccq_sdhi0>;
633 cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
634 wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
635 sd-uhs-sdr50;
636 sd-uhs-sdr104;
637 status = "okay";
638};
639
640&sdhi1 {
641 pinctrl-0 = <&sdhi1_pins>;
642 pinctrl-1 = <&sdhi1_pins_uhs>;
643 pinctrl-names = "default", "state_uhs";
644
645 vmmc-supply = <&vcc_sdhi1>;
646 vqmmc-supply = <&vccq_sdhi1>;
647 cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
648 wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
649 sd-uhs-sdr50;
650 status = "okay";
651};
652
653&sdhi2 {
654 pinctrl-0 = <&sdhi2_pins>;
655 pinctrl-1 = <&sdhi2_pins_uhs>;
656 pinctrl-names = "default", "state_uhs";
657
658 vmmc-supply = <&vcc_sdhi2>;
659 vqmmc-supply = <&vccq_sdhi2>;
660 cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
661 sd-uhs-sdr50;
662 status = "okay";
663};
664
665&qspi {
666 pinctrl-0 = <&qspi_pins>;
667 pinctrl-names = "default";
668
669 status = "okay";
670
671 flash@0 {
672 compatible = "spansion,s25fl512s", "jedec,spi-nor";
673 reg = <0>;
674 spi-max-frequency = <30000000>;
675 spi-tx-bus-width = <4>;
676 spi-rx-bus-width = <4>;
677 spi-cpol;
678 spi-cpha;
679 m25p,fast-read;
680
681 partitions {
682 compatible = "fixed-partitions";
683 #address-cells = <1>;
684 #size-cells = <1>;
685
686 partition@0 {
687 label = "loader";
688 reg = <0x00000000 0x00040000>;
689 read-only;
690 };
691 partition@40000 {
692 label = "user";
693 reg = <0x00040000 0x00400000>;
694 read-only;
695 };
696 partition@440000 {
697 label = "flash";
698 reg = <0x00440000 0x03bc0000>;
699 };
700 };
701 };
702};
703
704&i2c2 {
705 pinctrl-0 = <&i2c2_pins>;
706 pinctrl-names = "i2c-hdmi";
707
708 status = "okay";
709 clock-frequency = <100000>;
710
711};
712
713&i2c6 {
714 pinctrl-names = "default";
715 pinctrl-0 = <&pmic_irq_pins>;
716 status = "okay";
717 clock-frequency = <100000>;
718
719 pmic@58 {
720 compatible = "dlg,da9063";
721 reg = <0x58>;
722 interrupt-parent = <&irqc0>;
723 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
724 interrupt-controller;
725
726 rtc {
727 compatible = "dlg,da9063-rtc";
728 };
729
730 wdt {
731 compatible = "dlg,da9063-watchdog";
732 };
733 };
734
735 vdd_dvfs: regulator@68 {
736 compatible = "dlg,da9210";
737 reg = <0x68>;
738 interrupt-parent = <&irqc0>;
739 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
740
741 regulator-min-microvolt = <1000000>;
742 regulator-max-microvolt = <1000000>;
743 regulator-boot-on;
744 regulator-always-on;
745 };
746};
747
748&i2c4 {
749 pinctrl-0 = <&i2c4_pins>;
750 pinctrl-names = "i2c-exio4";
751};
752
753&rcar_sound {
754 pinctrl-0 = <&sound_pins &sound_clk_pins>;
755 pinctrl-names = "default";
756
757 /* Single DAI */
758 #sound-dai-cells = <0>;
759
760 status = "okay";
761
762 rcar_sound,dai {
763 dai0 {
764 playback = <&ssi0 &src2 &dvc0>;
765 capture = <&ssi1 &src3 &dvc1>;
766 };
767 };
768};
769
770&ssi1 {
771 shared-pin;
772};
773
774/* HDMI video input */
775&vin0 {
776 status = "okay";
777 pinctrl-0 = <&vin0_pins>;
778 pinctrl-names = "default";
779
780 port {
781 vin0ep2: endpoint {
782 remote-endpoint = <&adv7612_out>;
783 bus-width = <24>;
784 hsync-active = <0>;
785 vsync-active = <0>;
786 pclk-sample = <1>;
787 data-active = <1>;
788 };
789 };
790};
791
792/* composite video input */
793&vin1 {
794 pinctrl-0 = <&vin1_pins>;
795 pinctrl-names = "default";
796
797 status = "okay";
798
799 port {
800 vin1ep: endpoint {
801 remote-endpoint = <&adv7180_out>;
802 bus-width = <8>;
803 };
804 };
805};