Loading...
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for the Koelsch board
4 *
5 * Copyright (C) 2013 Renesas Electronics Corporation
6 * Copyright (C) 2013-2014 Renesas Solutions Corp.
7 * Copyright (C) 2014 Cogent Embedded, Inc.
8 */
9
10/*
11 * SSI-AK4643
12 *
13 * SW1: 1: AK4643
14 * 2: CN22
15 * 3: ADV7511
16 *
17 * This command is required when Playback/Capture
18 *
19 * amixer set "LINEOUT Mixer DACL" on
20 * amixer set "DVC Out" 100%
21 * amixer set "DVC In" 100%
22 *
23 * You can use Mute
24 *
25 * amixer set "DVC Out Mute" on
26 * amixer set "DVC In Mute" on
27 *
28 * You can use Volume Ramp
29 *
30 * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps"
31 * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
32 * amixer set "DVC Out Ramp" on
33 * aplay xxx.wav &
34 * amixer set "DVC Out" 80% // Volume Down
35 * amixer set "DVC Out" 100% // Volume Up
36 */
37
38/dts-v1/;
39#include "r8a7791.dtsi"
40#include <dt-bindings/gpio/gpio.h>
41#include <dt-bindings/input/input.h>
42
43/ {
44 model = "Koelsch";
45 compatible = "renesas,koelsch", "renesas,r8a7791";
46
47 aliases {
48 serial0 = &scif0;
49 serial1 = &scif1;
50 i2c9 = &gpioi2c1;
51 i2c10 = &gpioi2c2;
52 i2c11 = &gpioi2c4;
53 i2c12 = &i2cexio1;
54 i2c13 = &i2chdmi;
55 i2c14 = &i2cexio4;
56 mmc0 = &sdhi0;
57 mmc1 = &sdhi1;
58 mmc2 = &sdhi2;
59 };
60
61 chosen {
62 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
63 stdout-path = "serial0:115200n8";
64 };
65
66 memory@40000000 {
67 device_type = "memory";
68 reg = <0 0x40000000 0 0x40000000>;
69 };
70
71 memory@200000000 {
72 device_type = "memory";
73 reg = <2 0x00000000 0 0x40000000>;
74 };
75
76 lbsc {
77 #address-cells = <1>;
78 #size-cells = <1>;
79 };
80
81 keyboard {
82 compatible = "gpio-keys";
83
84 pinctrl-0 = <&keyboard_pins>;
85 pinctrl-names = "default";
86
87 key-1 {
88 gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
89 linux,code = <KEY_1>;
90 label = "SW2-1";
91 wakeup-source;
92 debounce-interval = <20>;
93 };
94 key-2 {
95 gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
96 linux,code = <KEY_2>;
97 label = "SW2-2";
98 wakeup-source;
99 debounce-interval = <20>;
100 };
101 key-3 {
102 gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
103 linux,code = <KEY_3>;
104 label = "SW2-3";
105 wakeup-source;
106 debounce-interval = <20>;
107 };
108 key-4 {
109 gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
110 linux,code = <KEY_4>;
111 label = "SW2-4";
112 wakeup-source;
113 debounce-interval = <20>;
114 };
115 key-a {
116 gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
117 linux,code = <KEY_A>;
118 label = "SW30";
119 wakeup-source;
120 debounce-interval = <20>;
121 };
122 key-b {
123 gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
124 linux,code = <KEY_B>;
125 label = "SW31";
126 wakeup-source;
127 debounce-interval = <20>;
128 };
129 key-c {
130 gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
131 linux,code = <KEY_C>;
132 label = "SW32";
133 wakeup-source;
134 debounce-interval = <20>;
135 };
136 key-d {
137 gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
138 linux,code = <KEY_D>;
139 label = "SW33";
140 wakeup-source;
141 debounce-interval = <20>;
142 };
143 key-e {
144 gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
145 linux,code = <KEY_E>;
146 label = "SW34";
147 wakeup-source;
148 debounce-interval = <20>;
149 };
150 key-f {
151 gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
152 linux,code = <KEY_F>;
153 label = "SW35";
154 wakeup-source;
155 debounce-interval = <20>;
156 };
157 key-g {
158 gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
159 linux,code = <KEY_G>;
160 label = "SW36";
161 wakeup-source;
162 debounce-interval = <20>;
163 };
164 };
165
166 leds {
167 compatible = "gpio-leds";
168 led6 {
169 gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
170 label = "LED6";
171 };
172 led7 {
173 gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
174 label = "LED7";
175 };
176 led8 {
177 gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
178 label = "LED8";
179 };
180 };
181
182 vcc_sdhi0: regulator-vcc-sdhi0 {
183 compatible = "regulator-fixed";
184
185 regulator-name = "SDHI0 Vcc";
186 regulator-min-microvolt = <3300000>;
187 regulator-max-microvolt = <3300000>;
188
189 gpio = <&gpio7 17 GPIO_ACTIVE_HIGH>;
190 enable-active-high;
191 };
192
193 vccq_sdhi0: regulator-vccq-sdhi0 {
194 compatible = "regulator-gpio";
195
196 regulator-name = "SDHI0 VccQ";
197 regulator-min-microvolt = <1800000>;
198 regulator-max-microvolt = <3300000>;
199
200 gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
201 gpios-states = <1>;
202 states = <3300000 1>, <1800000 0>;
203 };
204
205 vcc_sdhi1: regulator-vcc-sdhi1 {
206 compatible = "regulator-fixed";
207
208 regulator-name = "SDHI1 Vcc";
209 regulator-min-microvolt = <3300000>;
210 regulator-max-microvolt = <3300000>;
211
212 gpio = <&gpio7 18 GPIO_ACTIVE_HIGH>;
213 enable-active-high;
214 };
215
216 vccq_sdhi1: regulator-vccq-sdhi1 {
217 compatible = "regulator-gpio";
218
219 regulator-name = "SDHI1 VccQ";
220 regulator-min-microvolt = <1800000>;
221 regulator-max-microvolt = <3300000>;
222
223 gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
224 gpios-states = <1>;
225 states = <3300000 1>, <1800000 0>;
226 };
227
228 vcc_sdhi2: regulator-vcc-sdhi2 {
229 compatible = "regulator-fixed";
230
231 regulator-name = "SDHI2 Vcc";
232 regulator-min-microvolt = <3300000>;
233 regulator-max-microvolt = <3300000>;
234
235 gpio = <&gpio7 19 GPIO_ACTIVE_HIGH>;
236 enable-active-high;
237 };
238
239 vccq_sdhi2: regulator-vccq-sdhi2 {
240 compatible = "regulator-gpio";
241
242 regulator-name = "SDHI2 VccQ";
243 regulator-min-microvolt = <1800000>;
244 regulator-max-microvolt = <3300000>;
245
246 gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
247 gpios-states = <1>;
248 states = <3300000 1>, <1800000 0>;
249 };
250
251 audio_clock: audio_clock {
252 compatible = "fixed-clock";
253 #clock-cells = <0>;
254 clock-frequency = <11289600>;
255 };
256
257 rsnd_ak4643: sound {
258 compatible = "simple-audio-card";
259
260 simple-audio-card,format = "left_j";
261 simple-audio-card,bitclock-master = <&sndcodec>;
262 simple-audio-card,frame-master = <&sndcodec>;
263
264 sndcpu: simple-audio-card,cpu {
265 sound-dai = <&rcar_sound>;
266 };
267
268 sndcodec: simple-audio-card,codec {
269 sound-dai = <&ak4643>;
270 clocks = <&audio_clock>;
271 };
272 };
273
274 hdmi-in {
275 compatible = "hdmi-connector";
276 type = "a";
277
278 port {
279 hdmi_con_in: endpoint {
280 remote-endpoint = <&adv7612_in>;
281 };
282 };
283 };
284
285 cec_clock: cec-clock {
286 compatible = "fixed-clock";
287 #clock-cells = <0>;
288 clock-frequency = <12000000>;
289 };
290
291 hdmi-out {
292 compatible = "hdmi-connector";
293 type = "a";
294
295 port {
296 hdmi_con_out: endpoint {
297 remote-endpoint = <&adv7511_out>;
298 };
299 };
300 };
301
302 x2_clk: x2-clock {
303 compatible = "fixed-clock";
304 #clock-cells = <0>;
305 clock-frequency = <74250000>;
306 };
307
308 x13_clk: x13-clock {
309 compatible = "fixed-clock";
310 #clock-cells = <0>;
311 clock-frequency = <148500000>;
312 };
313
314 gpioi2c1: i2c-9 {
315 #address-cells = <1>;
316 #size-cells = <0>;
317 compatible = "i2c-gpio";
318 status = "disabled";
319 scl-gpios = <&gpio7 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
320 sda-gpios = <&gpio7 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
321 i2c-gpio,delay-us = <5>;
322 };
323
324 gpioi2c2: i2c-10 {
325 #address-cells = <1>;
326 #size-cells = <0>;
327 compatible = "i2c-gpio";
328 status = "disabled";
329 scl-gpios = <&gpio2 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
330 sda-gpios = <&gpio2 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
331 i2c-gpio,delay-us = <5>;
332 };
333
334 gpioi2c4: i2c-11 {
335 #address-cells = <1>;
336 #size-cells = <0>;
337 compatible = "i2c-gpio";
338 status = "disabled";
339 scl-gpios = <&gpio7 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
340 sda-gpios = <&gpio7 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
341 i2c-gpio,delay-us = <5>;
342 };
343
344 /*
345 * I2C1 is routed to EXIO connector B, pins 64 (SCL) + 66 (SDA).
346 * A fallback to GPIO is provided.
347 */
348 i2cexio1: i2c-12 {
349 compatible = "i2c-demux-pinctrl";
350 i2c-parent = <&i2c1>, <&gpioi2c1>;
351 i2c-bus-name = "i2c-exio1";
352 #address-cells = <1>;
353 #size-cells = <0>;
354 };
355
356 /*
357 * A fallback to GPIO is provided for I2C2.
358 */
359 i2chdmi: i2c-13 {
360 compatible = "i2c-demux-pinctrl";
361 i2c-parent = <&i2c2>, <&gpioi2c2>;
362 i2c-bus-name = "i2c-hdmi";
363 #address-cells = <1>;
364 #size-cells = <0>;
365
366 ak4643: codec@12 {
367 compatible = "asahi-kasei,ak4643";
368 #sound-dai-cells = <0>;
369 reg = <0x12>;
370 };
371
372 composite-in@20 {
373 compatible = "adi,adv7180";
374 reg = <0x20>;
375
376 port {
377 adv7180: endpoint {
378 bus-width = <8>;
379 remote-endpoint = <&vin1ep>;
380 };
381 };
382 };
383
384 hdmi@39 {
385 compatible = "adi,adv7511w";
386 reg = <0x39>;
387 interrupt-parent = <&gpio3>;
388 interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
389 clocks = <&cec_clock>;
390 clock-names = "cec";
391
392 adi,input-depth = <8>;
393 adi,input-colorspace = "rgb";
394 adi,input-clock = "1x";
395
396 ports {
397 #address-cells = <1>;
398 #size-cells = <0>;
399
400 port@0 {
401 reg = <0>;
402 adv7511_in: endpoint {
403 remote-endpoint = <&du_out_rgb>;
404 };
405 };
406
407 port@1 {
408 reg = <1>;
409 adv7511_out: endpoint {
410 remote-endpoint = <&hdmi_con_out>;
411 };
412 };
413 };
414 };
415
416 hdmi-in@4c {
417 compatible = "adi,adv7612";
418 reg = <0x4c>;
419 interrupt-parent = <&gpio4>;
420 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
421 default-input = <0>;
422
423 ports {
424 #address-cells = <1>;
425 #size-cells = <0>;
426
427 port@0 {
428 reg = <0>;
429 adv7612_in: endpoint {
430 remote-endpoint = <&hdmi_con_in>;
431 };
432 };
433
434 port@2 {
435 reg = <2>;
436 adv7612_out: endpoint {
437 remote-endpoint = <&vin0ep2>;
438 };
439 };
440 };
441 };
442
443 eeprom@50 {
444 compatible = "renesas,r1ex24002", "atmel,24c02";
445 reg = <0x50>;
446 pagesize = <16>;
447 };
448 };
449
450 /*
451 * I2C4 is routed to EXIO connector E, pins 37 (SCL) + 39 (SDA).
452 * A fallback to GPIO is provided.
453 */
454 i2cexio4: i2c-14 {
455 compatible = "i2c-demux-pinctrl";
456 i2c-parent = <&i2c4>, <&gpioi2c4>;
457 i2c-bus-name = "i2c-exio4";
458 #address-cells = <1>;
459 #size-cells = <0>;
460 };
461};
462
463&du {
464 pinctrl-0 = <&du_pins>;
465 pinctrl-names = "default";
466 status = "okay";
467
468 clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
469 <&x13_clk>, <&x2_clk>;
470 clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
471
472 ports {
473 port@0 {
474 endpoint {
475 remote-endpoint = <&adv7511_in>;
476 };
477 };
478 };
479};
480
481&lvds0 {
482 ports {
483 port@1 {
484 lvds_connector: endpoint {
485 };
486 };
487 };
488};
489
490&extal_clk {
491 clock-frequency = <20000000>;
492};
493
494&pfc {
495 pinctrl-0 = <&scif_clk_pins>;
496 pinctrl-names = "default";
497
498 i2c1_pins: i2c1 {
499 groups = "i2c1";
500 function = "i2c1";
501 };
502
503 i2c2_pins: i2c2 {
504 groups = "i2c2";
505 function = "i2c2";
506 };
507
508 i2c4_pins: i2c4 {
509 groups = "i2c4_c";
510 function = "i2c4";
511 };
512
513 du_pins: du {
514 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
515 function = "du";
516 };
517
518 scif0_pins: scif0 {
519 groups = "scif0_data_d";
520 function = "scif0";
521 };
522
523 scif1_pins: scif1 {
524 groups = "scif1_data_d";
525 function = "scif1";
526 };
527
528 scif_clk_pins: scif_clk {
529 groups = "scif_clk";
530 function = "scif_clk";
531 };
532
533 ether_pins: ether {
534 groups = "eth_link", "eth_mdio", "eth_rmii";
535 function = "eth";
536 };
537
538 phy1_pins: phy1 {
539 groups = "intc_irq0";
540 function = "intc";
541 };
542
543 pmic_irq_pins: pmicirq {
544 groups = "intc_irq2";
545 function = "intc";
546 };
547
548 sdhi0_pins: sd0 {
549 groups = "sdhi0_data4", "sdhi0_ctrl";
550 function = "sdhi0";
551 power-source = <3300>;
552 };
553
554 sdhi0_pins_uhs: sd0_uhs {
555 groups = "sdhi0_data4", "sdhi0_ctrl";
556 function = "sdhi0";
557 power-source = <1800>;
558 };
559
560 sdhi1_pins: sd1 {
561 groups = "sdhi1_data4", "sdhi1_ctrl";
562 function = "sdhi1";
563 power-source = <3300>;
564 };
565
566 sdhi1_pins_uhs: sd1_uhs {
567 groups = "sdhi1_data4", "sdhi1_ctrl";
568 function = "sdhi1";
569 power-source = <1800>;
570 };
571
572 sdhi2_pins: sd2 {
573 groups = "sdhi2_data4", "sdhi2_ctrl";
574 function = "sdhi2";
575 power-source = <3300>;
576 };
577
578 sdhi2_pins_uhs: sd2_uhs {
579 groups = "sdhi2_data4", "sdhi2_ctrl";
580 function = "sdhi2";
581 power-source = <1800>;
582 };
583
584 qspi_pins: qspi {
585 groups = "qspi_ctrl", "qspi_data4";
586 function = "qspi";
587 };
588
589 msiof0_pins: msiof0 {
590 groups = "msiof0_clk", "msiof0_sync", "msiof0_rx",
591 "msiof0_tx";
592 function = "msiof0";
593 };
594
595 usb0_pins: usb0 {
596 groups = "usb0";
597 function = "usb0";
598 };
599
600 usb1_pins: usb1 {
601 groups = "usb1";
602 function = "usb1";
603 };
604
605 vin0_pins: vin0 {
606 groups = "vin0_data24", "vin0_sync", "vin0_clkenb", "vin0_clk";
607 function = "vin0";
608 };
609
610 vin1_pins: vin1 {
611 groups = "vin1_data8", "vin1_clk";
612 function = "vin1";
613 };
614
615 sound_pins: sound {
616 groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
617 function = "ssi";
618 };
619
620 sound_clk_pins: sound_clk {
621 groups = "audio_clk_a";
622 function = "audio_clk";
623 };
624
625 keyboard_pins: keyboard {
626 pins = "GP_5_0", "GP_5_1", "GP_5_2", "GP_5_3";
627 bias-pull-up;
628 };
629};
630
631ðer {
632 pinctrl-0 = <ðer_pins>, <&phy1_pins>;
633 pinctrl-names = "default";
634
635 phy-handle = <&phy1>;
636 renesas,ether-link-active-low;
637 status = "okay";
638
639 phy1: ethernet-phy@1 {
640 reg = <1>;
641 interrupt-parent = <&irqc0>;
642 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
643 micrel,led-mode = <1>;
644 reset-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
645 };
646};
647
648&cmt0 {
649 status = "okay";
650};
651
652&rwdt {
653 timeout-sec = <60>;
654 status = "okay";
655};
656
657&sata0 {
658 status = "okay";
659};
660
661&scif0 {
662 pinctrl-0 = <&scif0_pins>;
663 pinctrl-names = "default";
664
665 status = "okay";
666};
667
668&scif1 {
669 pinctrl-0 = <&scif1_pins>;
670 pinctrl-names = "default";
671
672 status = "okay";
673};
674
675&scif_clk {
676 clock-frequency = <14745600>;
677};
678
679&sdhi0 {
680 pinctrl-0 = <&sdhi0_pins>;
681 pinctrl-1 = <&sdhi0_pins_uhs>;
682 pinctrl-names = "default", "state_uhs";
683
684 vmmc-supply = <&vcc_sdhi0>;
685 vqmmc-supply = <&vccq_sdhi0>;
686 cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
687 wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
688 sd-uhs-sdr50;
689 sd-uhs-sdr104;
690 status = "okay";
691};
692
693&sdhi1 {
694 pinctrl-0 = <&sdhi1_pins>;
695 pinctrl-1 = <&sdhi1_pins_uhs>;
696 pinctrl-names = "default", "state_uhs";
697
698 vmmc-supply = <&vcc_sdhi1>;
699 vqmmc-supply = <&vccq_sdhi1>;
700 cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
701 wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
702 sd-uhs-sdr50;
703 status = "okay";
704};
705
706&sdhi2 {
707 pinctrl-0 = <&sdhi2_pins>;
708 pinctrl-1 = <&sdhi2_pins_uhs>;
709 pinctrl-names = "default", "state_uhs";
710
711 vmmc-supply = <&vcc_sdhi2>;
712 vqmmc-supply = <&vccq_sdhi2>;
713 cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
714 sd-uhs-sdr50;
715 status = "okay";
716};
717
718&qspi {
719 pinctrl-0 = <&qspi_pins>;
720 pinctrl-names = "default";
721
722 status = "okay";
723
724 flash: flash@0 {
725 compatible = "spansion,s25fl512s", "jedec,spi-nor";
726 reg = <0>;
727 spi-max-frequency = <30000000>;
728 spi-tx-bus-width = <4>;
729 spi-rx-bus-width = <4>;
730 spi-cpha;
731 spi-cpol;
732 m25p,fast-read;
733
734 partitions {
735 compatible = "fixed-partitions";
736 #address-cells = <1>;
737 #size-cells = <1>;
738
739 partition@0 {
740 label = "loader";
741 reg = <0x00000000 0x00080000>;
742 read-only;
743 };
744 partition@80000 {
745 label = "user";
746 reg = <0x00080000 0x00580000>;
747 read-only;
748 };
749 partition@600000 {
750 label = "flash";
751 reg = <0x00600000 0x03a00000>;
752 };
753 };
754 };
755};
756
757&msiof0 {
758 pinctrl-0 = <&msiof0_pins>;
759 pinctrl-names = "default";
760
761 status = "okay";
762
763 pmic: pmic@0 {
764 compatible = "renesas,r2a11302ft";
765 reg = <0>;
766 spi-max-frequency = <6000000>;
767 spi-cpol;
768 spi-cpha;
769 };
770};
771
772&i2c1 {
773 pinctrl-0 = <&i2c1_pins>;
774 pinctrl-names = "i2c-exio1";
775};
776
777&i2c2 {
778 pinctrl-0 = <&i2c2_pins>;
779 pinctrl-names = "i2c-hdmi";
780
781 clock-frequency = <100000>;
782};
783
784&i2c4 {
785 pinctrl-0 = <&i2c4_pins>;
786 pinctrl-names = "i2c-exio4";
787};
788
789&i2c6 {
790 pinctrl-names = "default";
791 pinctrl-0 = <&pmic_irq_pins>;
792 status = "okay";
793 clock-frequency = <100000>;
794
795 pmic@58 {
796 compatible = "dlg,da9063";
797 reg = <0x58>;
798 interrupt-parent = <&irqc0>;
799 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
800 interrupt-controller;
801
802 rtc {
803 compatible = "dlg,da9063-rtc";
804 };
805
806 wdt {
807 compatible = "dlg,da9063-watchdog";
808 };
809 };
810
811 vdd_dvfs: regulator@68 {
812 compatible = "dlg,da9210";
813 reg = <0x68>;
814 interrupt-parent = <&irqc0>;
815 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
816
817 regulator-min-microvolt = <1000000>;
818 regulator-max-microvolt = <1000000>;
819 regulator-boot-on;
820 regulator-always-on;
821 };
822};
823
824&pci0 {
825 status = "okay";
826 pinctrl-0 = <&usb0_pins>;
827 pinctrl-names = "default";
828};
829
830&pci1 {
831 status = "okay";
832 pinctrl-0 = <&usb1_pins>;
833 pinctrl-names = "default";
834};
835
836&hsusb {
837 status = "okay";
838 pinctrl-0 = <&usb0_pins>;
839 pinctrl-names = "default";
840 renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>;
841};
842
843&usbphy {
844 status = "okay";
845};
846
847&pcie_bus_clk {
848 clock-frequency = <100000000>;
849};
850
851&pciec {
852 status = "okay";
853};
854
855&cpu0 {
856 cpu0-supply = <&vdd_dvfs>;
857};
858
859/* HDMI video input */
860&vin0 {
861 status = "okay";
862 pinctrl-0 = <&vin0_pins>;
863 pinctrl-names = "default";
864
865 port {
866 vin0ep2: endpoint {
867 remote-endpoint = <&adv7612_out>;
868 bus-width = <24>;
869 hsync-active = <0>;
870 vsync-active = <0>;
871 pclk-sample = <1>;
872 data-active = <1>;
873 };
874 };
875};
876
877/* composite video input */
878&vin1 {
879 status = "okay";
880 pinctrl-0 = <&vin1_pins>;
881 pinctrl-names = "default";
882
883 port {
884 vin1ep: endpoint {
885 remote-endpoint = <&adv7180>;
886 bus-width = <8>;
887 };
888 };
889};
890
891&rcar_sound {
892 pinctrl-0 = <&sound_pins>, <&sound_clk_pins>;
893 pinctrl-names = "default";
894
895 /* Single DAI */
896 #sound-dai-cells = <0>;
897
898 status = "okay";
899
900 rcar_sound,dai {
901 dai0 {
902 playback = <&ssi0>, <&src2>, <&dvc0>;
903 capture = <&ssi1>, <&src3>, <&dvc1>;
904 };
905 };
906};
907
908&ssi1 {
909 shared-pin;
910};
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 * You can use Volume Ramp
32 *
33 * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps"
34 * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
35 * amixer set "DVC Out Ramp" on
36 * aplay xxx.wav &
37 * amixer set "DVC Out" 80% // Volume Down
38 * amixer set "DVC Out" 100% // Volume Up
39 */
40
41/dts-v1/;
42#include "r8a7791.dtsi"
43#include <dt-bindings/gpio/gpio.h>
44#include <dt-bindings/input/input.h>
45
46/ {
47 model = "Koelsch";
48 compatible = "renesas,koelsch", "renesas,r8a7791";
49
50 aliases {
51 serial0 = &scif0;
52 serial1 = &scif1;
53 };
54
55 chosen {
56 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
57 stdout-path = "serial0:115200n8";
58 };
59
60 memory@40000000 {
61 device_type = "memory";
62 reg = <0 0x40000000 0 0x40000000>;
63 };
64
65 memory@200000000 {
66 device_type = "memory";
67 reg = <2 0x00000000 0 0x40000000>;
68 };
69
70 lbsc {
71 #address-cells = <1>;
72 #size-cells = <1>;
73 };
74
75 keyboard {
76 compatible = "gpio-keys";
77
78 key-1 {
79 gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
80 linux,code = <KEY_1>;
81 label = "SW2-1";
82 wakeup-source;
83 debounce-interval = <20>;
84 };
85 key-2 {
86 gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
87 linux,code = <KEY_2>;
88 label = "SW2-2";
89 wakeup-source;
90 debounce-interval = <20>;
91 };
92 key-3 {
93 gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
94 linux,code = <KEY_3>;
95 label = "SW2-3";
96 wakeup-source;
97 debounce-interval = <20>;
98 };
99 key-4 {
100 gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
101 linux,code = <KEY_4>;
102 label = "SW2-4";
103 wakeup-source;
104 debounce-interval = <20>;
105 };
106 key-a {
107 gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
108 linux,code = <KEY_A>;
109 label = "SW30";
110 wakeup-source;
111 debounce-interval = <20>;
112 };
113 key-b {
114 gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
115 linux,code = <KEY_B>;
116 label = "SW31";
117 wakeup-source;
118 debounce-interval = <20>;
119 };
120 key-c {
121 gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
122 linux,code = <KEY_C>;
123 label = "SW32";
124 wakeup-source;
125 debounce-interval = <20>;
126 };
127 key-d {
128 gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
129 linux,code = <KEY_D>;
130 label = "SW33";
131 wakeup-source;
132 debounce-interval = <20>;
133 };
134 key-e {
135 gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
136 linux,code = <KEY_E>;
137 label = "SW34";
138 wakeup-source;
139 debounce-interval = <20>;
140 };
141 key-f {
142 gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
143 linux,code = <KEY_F>;
144 label = "SW35";
145 wakeup-source;
146 debounce-interval = <20>;
147 };
148 key-g {
149 gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
150 linux,code = <KEY_G>;
151 label = "SW36";
152 wakeup-source;
153 debounce-interval = <20>;
154 };
155 };
156
157 leds {
158 compatible = "gpio-leds";
159 led6 {
160 gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
161 label = "LED6";
162 };
163 led7 {
164 gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
165 label = "LED7";
166 };
167 led8 {
168 gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
169 label = "LED8";
170 };
171 };
172
173 vcc_sdhi0: regulator@0 {
174 compatible = "regulator-fixed";
175
176 regulator-name = "SDHI0 Vcc";
177 regulator-min-microvolt = <3300000>;
178 regulator-max-microvolt = <3300000>;
179
180 gpio = <&gpio7 17 GPIO_ACTIVE_HIGH>;
181 enable-active-high;
182 };
183
184 vccq_sdhi0: regulator@1 {
185 compatible = "regulator-gpio";
186
187 regulator-name = "SDHI0 VccQ";
188 regulator-min-microvolt = <1800000>;
189 regulator-max-microvolt = <3300000>;
190
191 gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
192 gpios-states = <1>;
193 states = <3300000 1
194 1800000 0>;
195 };
196
197 vcc_sdhi1: regulator@2 {
198 compatible = "regulator-fixed";
199
200 regulator-name = "SDHI1 Vcc";
201 regulator-min-microvolt = <3300000>;
202 regulator-max-microvolt = <3300000>;
203
204 gpio = <&gpio7 18 GPIO_ACTIVE_HIGH>;
205 enable-active-high;
206 };
207
208 vccq_sdhi1: regulator@3 {
209 compatible = "regulator-gpio";
210
211 regulator-name = "SDHI1 VccQ";
212 regulator-min-microvolt = <1800000>;
213 regulator-max-microvolt = <3300000>;
214
215 gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
216 gpios-states = <1>;
217 states = <3300000 1
218 1800000 0>;
219 };
220
221 vcc_sdhi2: regulator@4 {
222 compatible = "regulator-fixed";
223
224 regulator-name = "SDHI2 Vcc";
225 regulator-min-microvolt = <3300000>;
226 regulator-max-microvolt = <3300000>;
227
228 gpio = <&gpio7 19 GPIO_ACTIVE_HIGH>;
229 enable-active-high;
230 };
231
232 vccq_sdhi2: regulator@5 {
233 compatible = "regulator-gpio";
234
235 regulator-name = "SDHI2 VccQ";
236 regulator-min-microvolt = <1800000>;
237 regulator-max-microvolt = <3300000>;
238
239 gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
240 gpios-states = <1>;
241 states = <3300000 1
242 1800000 0>;
243 };
244
245 audio_clock: clock {
246 compatible = "fixed-clock";
247 #clock-cells = <0>;
248 clock-frequency = <11289600>;
249 clock-output-names = "audio_clock";
250 };
251
252 rsnd_ak4643: sound {
253 compatible = "simple-audio-card";
254
255 simple-audio-card,format = "left_j";
256 simple-audio-card,bitclock-master = <&sndcodec>;
257 simple-audio-card,frame-master = <&sndcodec>;
258
259 sndcpu: simple-audio-card,cpu {
260 sound-dai = <&rcar_sound>;
261 };
262
263 sndcodec: simple-audio-card,codec {
264 sound-dai = <&ak4643>;
265 clocks = <&audio_clock>;
266 };
267 };
268
269 hdmi-out {
270 compatible = "hdmi-connector";
271 type = "a";
272
273 port {
274 hdmi_con: endpoint {
275 remote-endpoint = <&adv7511_out>;
276 };
277 };
278 };
279
280 x2_clk: x2-clock {
281 compatible = "fixed-clock";
282 #clock-cells = <0>;
283 clock-frequency = <148500000>;
284 };
285
286 x13_clk: x13-clock {
287 compatible = "fixed-clock";
288 #clock-cells = <0>;
289 clock-frequency = <148500000>;
290 };
291};
292
293&du {
294 pinctrl-0 = <&du_pins>;
295 pinctrl-names = "default";
296 status = "okay";
297
298 clocks = <&mstp7_clks R8A7791_CLK_DU0>,
299 <&mstp7_clks R8A7791_CLK_DU1>,
300 <&mstp7_clks R8A7791_CLK_LVDS0>,
301 <&x13_clk>, <&x2_clk>;
302 clock-names = "du.0", "du.1", "lvds.0",
303 "dclkin.0", "dclkin.1";
304
305 ports {
306 port@0 {
307 endpoint {
308 remote-endpoint = <&adv7511_in>;
309 };
310 };
311 port@1 {
312 lvds_connector: endpoint {
313 };
314 };
315 };
316};
317
318&extal_clk {
319 clock-frequency = <20000000>;
320};
321
322&pfc {
323 pinctrl-0 = <&scif_clk_pins>;
324 pinctrl-names = "default";
325
326 i2c2_pins: i2c2 {
327 renesas,groups = "i2c2";
328 renesas,function = "i2c2";
329 };
330
331 du_pins: du {
332 renesas,groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
333 renesas,function = "du";
334 };
335
336 scif0_pins: serial0 {
337 renesas,groups = "scif0_data_d";
338 renesas,function = "scif0";
339 };
340
341 scif1_pins: serial1 {
342 renesas,groups = "scif1_data_d";
343 renesas,function = "scif1";
344 };
345
346 scif_clk_pins: scif_clk {
347 renesas,groups = "scif_clk";
348 renesas,function = "scif_clk";
349 };
350
351 ether_pins: ether {
352 renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
353 renesas,function = "eth";
354 };
355
356 phy1_pins: phy1 {
357 renesas,groups = "intc_irq0";
358 renesas,function = "intc";
359 };
360
361 sdhi0_pins: sd0 {
362 renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
363 renesas,function = "sdhi0";
364 };
365
366 sdhi1_pins: sd1 {
367 renesas,groups = "sdhi1_data4", "sdhi1_ctrl";
368 renesas,function = "sdhi1";
369 };
370
371 sdhi2_pins: sd2 {
372 renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
373 renesas,function = "sdhi2";
374 };
375
376 qspi_pins: spi0 {
377 renesas,groups = "qspi_ctrl", "qspi_data4";
378 renesas,function = "qspi";
379 };
380
381 msiof0_pins: spi1 {
382 renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx",
383 "msiof0_tx";
384 renesas,function = "msiof0";
385 };
386
387 usb0_pins: usb0 {
388 renesas,groups = "usb0";
389 renesas,function = "usb0";
390 };
391
392 usb1_pins: usb1 {
393 renesas,groups = "usb1";
394 renesas,function = "usb1";
395 };
396
397 vin1_pins: vin1 {
398 renesas,groups = "vin1_data8", "vin1_clk";
399 renesas,function = "vin1";
400 };
401
402 sound_pins: sound {
403 renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
404 renesas,function = "ssi";
405 };
406
407 sound_clk_pins: sound_clk {
408 renesas,groups = "audio_clk_a";
409 renesas,function = "audio_clk";
410 };
411};
412
413ðer {
414 pinctrl-0 = <ðer_pins &phy1_pins>;
415 pinctrl-names = "default";
416
417 phy-handle = <&phy1>;
418 renesas,ether-link-active-low;
419 status = "okay";
420
421 phy1: ethernet-phy@1 {
422 reg = <1>;
423 interrupt-parent = <&irqc0>;
424 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
425 micrel,led-mode = <1>;
426 };
427};
428
429&cmt0 {
430 status = "okay";
431};
432
433&sata0 {
434 status = "okay";
435};
436
437&scif0 {
438 pinctrl-0 = <&scif0_pins>;
439 pinctrl-names = "default";
440
441 status = "okay";
442};
443
444&scif1 {
445 pinctrl-0 = <&scif1_pins>;
446 pinctrl-names = "default";
447
448 status = "okay";
449};
450
451&scif_clk {
452 clock-frequency = <14745600>;
453 status = "okay";
454};
455
456&sdhi0 {
457 pinctrl-0 = <&sdhi0_pins>;
458 pinctrl-names = "default";
459
460 vmmc-supply = <&vcc_sdhi0>;
461 vqmmc-supply = <&vccq_sdhi0>;
462 cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
463 wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
464 status = "okay";
465};
466
467&sdhi1 {
468 pinctrl-0 = <&sdhi1_pins>;
469 pinctrl-names = "default";
470
471 vmmc-supply = <&vcc_sdhi1>;
472 vqmmc-supply = <&vccq_sdhi1>;
473 cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
474 wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
475 status = "okay";
476};
477
478&sdhi2 {
479 pinctrl-0 = <&sdhi2_pins>;
480 pinctrl-names = "default";
481
482 vmmc-supply = <&vcc_sdhi2>;
483 vqmmc-supply = <&vccq_sdhi2>;
484 cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
485 status = "okay";
486};
487
488&qspi {
489 pinctrl-0 = <&qspi_pins>;
490 pinctrl-names = "default";
491
492 status = "okay";
493
494 flash: flash@0 {
495 compatible = "spansion,s25fl512s", "jedec,spi-nor";
496 reg = <0>;
497 spi-max-frequency = <30000000>;
498 spi-tx-bus-width = <4>;
499 spi-rx-bus-width = <4>;
500 spi-cpha;
501 spi-cpol;
502 m25p,fast-read;
503
504 partitions {
505 compatible = "fixed-partitions";
506 #address-cells = <1>;
507 #size-cells = <1>;
508
509 partition@0 {
510 label = "loader";
511 reg = <0x00000000 0x00080000>;
512 read-only;
513 };
514 partition@80000 {
515 label = "user";
516 reg = <0x00080000 0x00580000>;
517 read-only;
518 };
519 partition@600000 {
520 label = "flash";
521 reg = <0x00600000 0x03a00000>;
522 };
523 };
524 };
525};
526
527&msiof0 {
528 pinctrl-0 = <&msiof0_pins>;
529 pinctrl-names = "default";
530
531 status = "okay";
532
533 pmic: pmic@0 {
534 compatible = "renesas,r2a11302ft";
535 reg = <0>;
536 spi-max-frequency = <6000000>;
537 spi-cpol;
538 spi-cpha;
539 };
540};
541
542&i2c2 {
543 pinctrl-0 = <&i2c2_pins>;
544 pinctrl-names = "default";
545
546 status = "okay";
547 clock-frequency = <100000>;
548
549 ak4643: codec@12 {
550 compatible = "asahi-kasei,ak4643";
551 #sound-dai-cells = <0>;
552 reg = <0x12>;
553 };
554
555 composite-in@20 {
556 compatible = "adi,adv7180";
557 reg = <0x20>;
558 remote = <&vin1>;
559
560 port {
561 adv7180: endpoint {
562 bus-width = <8>;
563 remote-endpoint = <&vin1ep>;
564 };
565 };
566 };
567
568 hdmi@39 {
569 compatible = "adi,adv7511w";
570 reg = <0x39>;
571 interrupt-parent = <&gpio3>;
572 interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
573
574 adi,input-depth = <8>;
575 adi,input-colorspace = "rgb";
576 adi,input-clock = "1x";
577 adi,input-style = <1>;
578 adi,input-justification = "evenly";
579
580 ports {
581 #address-cells = <1>;
582 #size-cells = <0>;
583
584 port@0 {
585 reg = <0>;
586 adv7511_in: endpoint {
587 remote-endpoint = <&du_out_rgb>;
588 };
589 };
590
591 port@1 {
592 reg = <1>;
593 adv7511_out: endpoint {
594 remote-endpoint = <&hdmi_con>;
595 };
596 };
597 };
598 };
599
600 eeprom@50 {
601 compatible = "renesas,24c02";
602 reg = <0x50>;
603 pagesize = <16>;
604 };
605};
606
607&i2c6 {
608 status = "okay";
609 clock-frequency = <100000>;
610
611 pmic@58 {
612 compatible = "dlg,da9063";
613 reg = <0x58>;
614 interrupt-parent = <&irqc0>;
615 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
616 interrupt-controller;
617
618 rtc {
619 compatible = "dlg,da9063-rtc";
620 };
621
622 wdt {
623 compatible = "dlg,da9063-watchdog";
624 };
625 };
626
627 vdd_dvfs: regulator@68 {
628 compatible = "dlg,da9210";
629 reg = <0x68>;
630 interrupt-parent = <&irqc0>;
631 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
632
633 regulator-min-microvolt = <1000000>;
634 regulator-max-microvolt = <1000000>;
635 regulator-boot-on;
636 regulator-always-on;
637 };
638};
639
640&pci0 {
641 status = "okay";
642 pinctrl-0 = <&usb0_pins>;
643 pinctrl-names = "default";
644};
645
646&pci1 {
647 status = "okay";
648 pinctrl-0 = <&usb1_pins>;
649 pinctrl-names = "default";
650};
651
652&hsusb {
653 status = "okay";
654 pinctrl-0 = <&usb0_pins>;
655 pinctrl-names = "default";
656 renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>;
657};
658
659&usbphy {
660 status = "okay";
661};
662
663&pcie_bus_clk {
664 clock-frequency = <100000000>;
665 status = "okay";
666};
667
668&pciec {
669 status = "okay";
670};
671
672&cpu0 {
673 cpu0-supply = <&vdd_dvfs>;
674};
675
676/* composite video input */
677&vin1 {
678 status = "okay";
679 pinctrl-0 = <&vin1_pins>;
680 pinctrl-names = "default";
681
682 port {
683 #address-cells = <1>;
684 #size-cells = <0>;
685
686 vin1ep: endpoint {
687 remote-endpoint = <&adv7180>;
688 bus-width = <8>;
689 };
690 };
691};
692
693&rcar_sound {
694 pinctrl-0 = <&sound_pins &sound_clk_pins>;
695 pinctrl-names = "default";
696
697 /* Single DAI */
698 #sound-dai-cells = <0>;
699
700 status = "okay";
701
702 rcar_sound,dai {
703 dai0 {
704 playback = <&ssi0 &src2 &dvc0>;
705 capture = <&ssi1 &src3 &dvc1>;
706 };
707 };
708};
709
710&ssi1 {
711 shared-pin;
712};