Debian Codegraph @

arch/arm/boot/dts/renesas/r8a7794-silk.dts

raw
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Device Tree Source for the SILK board
4 *
5 * Copyright (C) 2014 Renesas Electronics Corporation
6 * Copyright (C) 2014-2015 Renesas Solutions Corp.
7 * Copyright (C) 2014-2015 Cogent Embedded, Inc.
8 */
9
10 /*
11 * SSI-AK4643
12 *
13 * SW1: 2-1: AK4643
14 * 2-3: ADV7511
15 *
16 * This command is required before playback/capture:
17 *
18 * amixer set "LINEOUT Mixer DACL" on
19 */
20
21 /dts-v1/;
22 #include "r8a7794.dtsi"
23 #include <dt-bindings/gpio/gpio.h>
24 #include <dt-bindings/input/input.h>
25
26 / {
27 model = "SILK";
28 compatible = "renesas,silk", "renesas,r8a7794";
29
30 aliases {
31 serial0 = &scif2;
32 i2c9 = &gpioi2c1;
33 i2c10 = &i2chdmi;
34 mmc0 = &mmcif0;
35 mmc1 = &sdhi1;
36 };
37
38 chosen {
39 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
40 stdout-path = "serial0:115200n8";
41 };
42
43 memory@40000000 {
44 device_type = "memory";
45 reg = <0 0x40000000 0 0x40000000>;
46 };
47
48 keyboard {
49 compatible = "gpio-keys";
50
51 pinctrl-0 = <&keyboard_pins>;
52 pinctrl-names = "default";
53
54 key-3 {
55 gpios = <&gpio5 10 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_3>;
57 label = "SW3";
58 wakeup-source;
59 debounce-interval = <20>;
60 };
61 key-4 {
62 gpios = <&gpio5 11 GPIO_ACTIVE_LOW>;
63 linux,code = <KEY_4>;
64 label = "SW4";
65 wakeup-source;
66 debounce-interval = <20>;
67 };
68 key-6 {
69 gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
70 linux,code = <KEY_6>;
71 label = "SW6";
72 wakeup-source;
73 debounce-interval = <20>;
74 };
75 key-a {
76 gpios = <&gpio3 9 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_A>;
78 label = "SW12-1";
79 wakeup-source;
80 debounce-interval = <20>;
81 };
82 key-b {
83 gpios = <&gpio3 10 GPIO_ACTIVE_LOW>;
84 linux,code = <KEY_B>;
85 label = "SW12-2";
86 wakeup-source;
87 debounce-interval = <20>;
88 };
89 key-c {
90 gpios = <&gpio3 11 GPIO_ACTIVE_LOW>;
91 linux,code = <KEY_C>;
92 label = "SW12-3";
93 wakeup-source;
94 debounce-interval = <20>;
95 };
96 key-d {
97 gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
98 linux,code = <KEY_D>;
99 label = "SW12-4";
100 wakeup-source;
101 debounce-interval = <20>;
102 };
103 };
104
105 d1_8v: regulator-d1-8v {
106 compatible = "regulator-fixed";
107 regulator-name = "D1.8V";
108 regulator-min-microvolt = <1800000>;
109 regulator-max-microvolt = <1800000>;
110 regulator-boot-on;
111 regulator-always-on;
112 };
113
114 d3_3v: regulator-d3-3v {
115 compatible = "regulator-fixed";
116 regulator-name = "D3.3V";
117 regulator-min-microvolt = <3300000>;
118 regulator-max-microvolt = <3300000>;
119 regulator-boot-on;
120 regulator-always-on;
121 };
122
123 vcc_sdhi1: regulator-vcc-sdhi1 {
124 compatible = "regulator-fixed";
125
126 regulator-name = "SDHI1 Vcc";
127 regulator-min-microvolt = <3300000>;
128 regulator-max-microvolt = <3300000>;
129
130 gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
131 enable-active-high;
132 };
133
134 vccq_sdhi1: regulator-vccq-sdhi1 {
135 compatible = "regulator-gpio";
136
137 regulator-name = "SDHI1 VccQ";
138 regulator-min-microvolt = <1800000>;
139 regulator-max-microvolt = <3300000>;
140
141 gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
142 gpios-states = <1>;
143 states = <3300000 1>, <1800000 0>;
144 };
145
146 vga-encoder {
147 compatible = "adi,adv7123";
148
149 ports {
150 #address-cells = <1>;
151 #size-cells = <0>;
152
153 port@0 {
154 reg = <0>;
155 adv7123_in: endpoint {
156 remote-endpoint = <&du_out_rgb1>;
157 };
158 };
159 port@1 {
160 reg = <1>;
161 adv7123_out: endpoint {
162 remote-endpoint = <&vga_in>;
163 };
164 };
165 };
166 };
167
168 hdmi-out {
169 compatible = "hdmi-connector";
170 type = "a";
171
172 port {
173 hdmi_con: endpoint {
174 remote-endpoint = <&adv7511_out>;
175 };
176 };
177 };
178
179 vga {
180 compatible = "vga-connector";
181
182 port {
183 vga_in: endpoint {
184 remote-endpoint = <&adv7123_out>;
185 };
186 };
187 };
188
189 x2_clk: x2-clock {
190 compatible = "fixed-clock";
191 #clock-cells = <0>;
192 clock-frequency = <148500000>;
193 };
194
195 x3_clk: x3-clock {
196 compatible = "fixed-clock";
197 #clock-cells = <0>;
198 clock-frequency = <74250000>;
199 };
200
201 x9_clk: audio_clock {
202 compatible = "fixed-clock";
203 #clock-cells = <0>;
204 clock-frequency = <12288000>;
205 };
206
207 sound {
208 compatible = "simple-audio-card";
209
210 simple-audio-card,format = "left_j";
211 simple-audio-card,bitclock-master = <&soundcodec>;
212 simple-audio-card,frame-master = <&soundcodec>;
213
214 simple-audio-card,cpu {
215 sound-dai = <&rcar_sound>;
216 };
217
218 soundcodec: simple-audio-card,codec {
219 sound-dai = <&ak4643>;
220 clocks = <&x9_clk>;
221 };
222 };
223
224 gpioi2c1: i2c-9 {
225 #address-cells = <1>;
226 #size-cells = <0>;
227 compatible = "i2c-gpio";
228 status = "disabled";
229 scl-gpios = <&gpio4 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
230 sda-gpios = <&gpio4 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
231 i2c-gpio,delay-us = <5>;
232 };
233
234 /*
235 * A fallback to GPIO is provided for I2C1.
236 */
237 i2chdmi: i2c-mux1 {
238 compatible = "i2c-demux-pinctrl";
239 i2c-parent = <&i2c1>, <&gpioi2c1>;
240 i2c-bus-name = "i2c-hdmi";
241 #address-cells = <1>;
242 #size-cells = <0>;
243
244 ak4643: codec@12 {
245 compatible = "asahi-kasei,ak4643";
246 #sound-dai-cells = <0>;
247 reg = <0x12>;
248 };
249
250 composite-in@20 {
251 compatible = "adi,adv7180";
252 reg = <0x20>;
253
254 port {
255 adv7180: endpoint {
256 bus-width = <8>;
257 remote-endpoint = <&vin0ep>;
258 };
259 };
260 };
261
262 hdmi@39 {
263 compatible = "adi,adv7511w";
264 reg = <0x39>;
265 interrupts-extended = <&gpio5 23 IRQ_TYPE_LEVEL_LOW>;
266
267 avdd-supply = <&d1_8v>;
268 dvdd-supply = <&d1_8v>;
269 pvdd-supply = <&d1_8v>;
270 dvdd-3v-supply = <&d3_3v>;
271 bgvdd-supply = <&d1_8v>;
272
273 adi,input-depth = <8>;
274 adi,input-colorspace = "rgb";
275 adi,input-clock = "1x";
276
277 ports {
278 #address-cells = <1>;
279 #size-cells = <0>;
280
281 port@0 {
282 reg = <0>;
283 adv7511_in: endpoint {
284 remote-endpoint = <&du_out_rgb0>;
285 };
286 };
287
288 port@1 {
289 reg = <1>;
290 adv7511_out: endpoint {
291 remote-endpoint = <&hdmi_con>;
292 };
293 };
294 };
295 };
296
297 eeprom@50 {
298 compatible = "renesas,r1ex24002", "atmel,24c02";
299 reg = <0x50>;
300 pagesize = <16>;
301 };
302 };
303 };
304
305 &extal_clk {
306 clock-frequency = <20000000>;
307 };
308
309 &pfc {
310 pinctrl-0 = <&scif_clk_pins>;
311 pinctrl-names = "default";
312
313 scif2_pins: scif2 {
314 groups = "scif2_data";
315 function = "scif2";
316 };
317
318 scif_clk_pins: scif_clk {
319 groups = "scif_clk";
320 function = "scif_clk";
321 };
322
323 ether_pins: ether {
324 groups = "eth_link", "eth_mdio", "eth_rmii";
325 function = "eth";
326 };
327
328 phy1_pins: phy1 {
329 groups = "intc_irq8";
330 function = "intc";
331 };
332
333 i2c1_pins: i2c1 {
334 groups = "i2c1";
335 function = "i2c1";
336 };
337
338 mmcif0_pins: mmcif0 {
339 groups = "mmc_data8", "mmc_ctrl";
340 function = "mmc";
341 };
342
343 sdhi1_pins: sd1 {
344 groups = "sdhi1_data4", "sdhi1_ctrl";
345 function = "sdhi1";
346 };
347
348 qspi_pins: qspi {
349 groups = "qspi_ctrl", "qspi_data4";
350 function = "qspi";
351 };
352
353 vin0_pins: vin0 {
354 groups = "vin0_data8", "vin0_clk";
355 function = "vin0";
356 };
357
358 usb0_pins: usb0 {
359 groups = "usb0";
360 function = "usb0";
361 };
362
363 usb1_pins: usb1 {
364 groups = "usb1";
365 function = "usb1";
366 };
367
368 du0_pins: du0 {
369 groups = "du0_rgb888", "du0_sync", "du0_disp", "du0_clk0_out";
370 function = "du0";
371 };
372
373 du1_pins: du1 {
374 groups = "du1_rgb666", "du1_sync", "du1_disp", "du1_clk0_out";
375 function = "du1";
376 };
377
378 keyboard_pins: keyboard {
379 pins = "GP_3_9", "GP_3_10", "GP_3_11", "GP_3_12";
380 bias-pull-up;
381 };
382
383 ssi_pins: sound {
384 groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
385 function = "ssi";
386 };
387
388 audio_clk_pins: audio_clk {
389 groups = "audio_clkc";
390 function = "audio_clk";
391 };
392 };
393
394 &scif2 {
395 pinctrl-0 = <&scif2_pins>;
396 pinctrl-names = "default";
397 bootph-all;
398
399 status = "okay";
400 };
401
402 &scif_clk {
403 clock-frequency = <14745600>;
404 };
405
406 &ether {
407 pinctrl-0 = <&ether_pins>, <&phy1_pins>;
408 pinctrl-names = "default";
409
410 phy-handle = <&phy1>;
411 renesas,ether-link-active-low;
412 status = "okay";
413
414 phy1: ethernet-phy@1 {
415 compatible = "ethernet-phy-id0022.1537",
416 "ethernet-phy-ieee802.3-c22";
417 reg = <1>;
418 interrupts-extended = <&irqc0 8 IRQ_TYPE_LEVEL_LOW>;
419 micrel,led-mode = <1>;
420 reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
421 };
422 };
423
424 &i2c1 {
425 pinctrl-0 = <&i2c1_pins>;
426 pinctrl-names = "i2c-hdmi";
427
428 clock-frequency = <400000>;
429 };
430
431 &i2c7 {
432 status = "okay";
433 clock-frequency = <100000>;
434
435 pmic@58 {
436 compatible = "dlg,da9063";
437 reg = <0x58>;
438 interrupts-extended = <&gpio3 31 IRQ_TYPE_LEVEL_LOW>;
439 interrupt-controller;
440 #interrupt-cells = <2>;
441
442 onkey {
443 compatible = "dlg,da9063-onkey";
444 };
445
446 rtc {
447 compatible = "dlg,da9063-rtc";
448 };
449
450 watchdog {
451 compatible = "dlg,da9063-watchdog";
452 };
453 };
454 };
455
456 &mmcif0 {
457 pinctrl-0 = <&mmcif0_pins>;
458 pinctrl-names = "default";
459
460 vmmc-supply = <&d3_3v>;
461 vqmmc-supply = <&d3_3v>;
462 bus-width = <8>;
463 non-removable;
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 status = "okay";
475 };
476
477 &qspi {
478 pinctrl-0 = <&qspi_pins>;
479 pinctrl-names = "default";
480
481 status = "okay";
482
483 flash@0 {
484 compatible = "spansion,s25fl512s", "jedec,spi-nor";
485 reg = <0>;
486 spi-max-frequency = <30000000>;
487 spi-tx-bus-width = <4>;
488 spi-rx-bus-width = <4>;
489 spi-cpol;
490 spi-cpha;
491 m25p,fast-read;
492
493 partitions {
494 compatible = "fixed-partitions";
495 #address-cells = <1>;
496 #size-cells = <1>;
497
498 partition@0 {
499 label = "loader";
500 reg = <0x00000000 0x00040000>;
501 read-only;
502 };
503 partition@40000 {
504 label = "user";
505 reg = <0x00040000 0x00400000>;
506 read-only;
507 };
508 partition@440000 {
509 label = "flash";
510 reg = <0x00440000 0x03bc0000>;
511 };
512 };
513 };
514 };
515
516 /* composite video input */
517 &vin0 {
518 status = "okay";
519 pinctrl-0 = <&vin0_pins>;
520 pinctrl-names = "default";
521
522 port {
523 vin0ep: endpoint {
524 remote-endpoint = <&adv7180>;
525 bus-width = <8>;
526 };
527 };
528 };
529
530 &pci0 {
531 status = "okay";
532 pinctrl-0 = <&usb0_pins>;
533 pinctrl-names = "default";
534 };
535
536 &pci1 {
537 status = "okay";
538 pinctrl-0 = <&usb1_pins>;
539 pinctrl-names = "default";
540 };
541
542 &usbphy {
543 status = "okay";
544 };
545
546 &du {
547 pinctrl-0 = <&du0_pins>, <&du1_pins>;
548 pinctrl-names = "default";
549 status = "okay";
550
551 clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
552 <&x2_clk>, <&x3_clk>;
553 clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
554
555 ports {
556 port@0 {
557 endpoint {
558 remote-endpoint = <&adv7511_in>;
559 };
560 };
561 port@1 {
562 endpoint {
563 remote-endpoint = <&adv7123_in>;
564 };
565 };
566 };
567 };
568
569 &rcar_sound {
570 pinctrl-0 = <&ssi_pins>, <&audio_clk_pins>;
571 pinctrl-names = "default";
572 status = "okay";
573
574 /* Single DAI */
575 #sound-dai-cells = <0>;
576
577 rcar_sound,dai {
578 dai0 {
579 playback = <&ssi0>;
580 capture = <&ssi1>;
581 };
582 };
583 };
584
585 &rwdt {
586 timeout-sec = <60>;
587 status = "okay";
588 };
589
590 &ssi1 {
591 shared-pin;
592 };