]> git.ipfire.org Git - thirdparty/linux.git/blob - arch/arm/boot/dts/r8a7791-porter.dts
Merge tag 'io_uring-5.7-2020-05-22' of git://git.kernel.dk/linux-block
[thirdparty/linux.git] / arch / arm / boot / dts / r8a7791-porter.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Device Tree Source for the Porter board
4 *
5 * Copyright (C) 2015 Cogent Embedded, Inc.
6 */
7
8 /*
9 * SSI-AK4642
10 *
11 * JP3: 2-1: AK4642
12 * 2-3: ADV7511
13 *
14 * This command is required before playback/capture:
15 *
16 * amixer set "LINEOUT Mixer DACL" on
17 */
18
19 /dts-v1/;
20 #include "r8a7791.dtsi"
21 #include <dt-bindings/gpio/gpio.h>
22
23 / {
24 model = "Porter";
25 compatible = "renesas,porter", "renesas,r8a7791";
26
27 aliases {
28 serial0 = &scif0;
29 i2c9 = &gpioi2c2;
30 i2c10 = &i2chdmi;
31 };
32
33 chosen {
34 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
35 stdout-path = "serial0:115200n8";
36 };
37
38 memory@40000000 {
39 device_type = "memory";
40 reg = <0 0x40000000 0 0x40000000>;
41 };
42
43 memory@200000000 {
44 device_type = "memory";
45 reg = <2 0x00000000 0 0x40000000>;
46 };
47
48 vcc_sdhi0: regulator-vcc-sdhi0 {
49 compatible = "regulator-fixed";
50
51 regulator-name = "SDHI0 Vcc";
52 regulator-min-microvolt = <3300000>;
53 regulator-max-microvolt = <3300000>;
54 regulator-always-on;
55 };
56
57 vccq_sdhi0: regulator-vccq-sdhi0 {
58 compatible = "regulator-gpio";
59
60 regulator-name = "SDHI0 VccQ";
61 regulator-min-microvolt = <1800000>;
62 regulator-max-microvolt = <3300000>;
63
64 gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
65 gpios-states = <1>;
66 states = <3300000 1>, <1800000 0>;
67 };
68
69 vcc_sdhi2: regulator-vcc-sdhi2 {
70 compatible = "regulator-fixed";
71
72 regulator-name = "SDHI2 Vcc";
73 regulator-min-microvolt = <3300000>;
74 regulator-max-microvolt = <3300000>;
75 regulator-always-on;
76 };
77
78 vccq_sdhi2: regulator-vccq-sdhi2 {
79 compatible = "regulator-gpio";
80
81 regulator-name = "SDHI2 VccQ";
82 regulator-min-microvolt = <1800000>;
83 regulator-max-microvolt = <3300000>;
84
85 gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
86 gpios-states = <1>;
87 states = <3300000 1>, <1800000 0>;
88 };
89
90 hdmi-out {
91 compatible = "hdmi-connector";
92 type = "a";
93
94 port {
95 hdmi_con: endpoint {
96 remote-endpoint = <&adv7511_out>;
97 };
98 };
99 };
100
101 x3_clk: x3-clock {
102 compatible = "fixed-clock";
103 #clock-cells = <0>;
104 clock-frequency = <148500000>;
105 };
106
107 x16_clk: x16-clock {
108 compatible = "fixed-clock";
109 #clock-cells = <0>;
110 clock-frequency = <74250000>;
111 };
112
113 x14_clk: audio_clock {
114 compatible = "fixed-clock";
115 #clock-cells = <0>;
116 clock-frequency = <11289600>;
117 };
118
119 sound {
120 compatible = "simple-audio-card";
121
122 simple-audio-card,format = "left_j";
123 simple-audio-card,bitclock-master = <&soundcodec>;
124 simple-audio-card,frame-master = <&soundcodec>;
125
126 simple-audio-card,cpu {
127 sound-dai = <&rcar_sound>;
128 };
129
130 soundcodec: simple-audio-card,codec {
131 sound-dai = <&ak4642>;
132 clocks = <&x14_clk>;
133 };
134 };
135
136 gpioi2c2: i2c-9 {
137 #address-cells = <1>;
138 #size-cells = <0>;
139 compatible = "i2c-gpio";
140 status = "disabled";
141 scl-gpios = <&gpio2 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
142 sda-gpios = <&gpio2 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
143 i2c-gpio,delay-us = <5>;
144 };
145
146 /*
147 * A fallback to GPIO is provided for I2C2.
148 */
149 i2chdmi: i2c-10 {
150 compatible = "i2c-demux-pinctrl";
151 i2c-parent = <&i2c2>, <&gpioi2c2>;
152 i2c-bus-name = "i2c-hdmi";
153 #address-cells = <1>;
154 #size-cells = <0>;
155
156 ak4642: codec@12 {
157 compatible = "asahi-kasei,ak4642";
158 #sound-dai-cells = <0>;
159 reg = <0x12>;
160 };
161
162 composite-in@20 {
163 compatible = "adi,adv7180";
164 reg = <0x20>;
165 remote = <&vin0>;
166
167 port {
168 adv7180: endpoint {
169 bus-width = <8>;
170 remote-endpoint = <&vin0ep>;
171 };
172 };
173 };
174
175 hdmi@39 {
176 compatible = "adi,adv7511w";
177 reg = <0x39>;
178 interrupt-parent = <&gpio3>;
179 interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
180
181 adi,input-depth = <8>;
182 adi,input-colorspace = "rgb";
183 adi,input-clock = "1x";
184
185 ports {
186 #address-cells = <1>;
187 #size-cells = <0>;
188
189 port@0 {
190 reg = <0>;
191 adv7511_in: endpoint {
192 remote-endpoint = <&du_out_rgb>;
193 };
194 };
195
196 port@1 {
197 reg = <1>;
198 adv7511_out: endpoint {
199 remote-endpoint = <&hdmi_con>;
200 };
201 };
202 };
203 };
204 };
205 };
206
207 &extal_clk {
208 clock-frequency = <20000000>;
209 };
210
211 &pfc {
212 scif0_pins: scif0 {
213 groups = "scif0_data_d";
214 function = "scif0";
215 };
216
217 ether_pins: ether {
218 groups = "eth_link", "eth_mdio", "eth_rmii";
219 function = "eth";
220 };
221
222 phy1_pins: phy1 {
223 groups = "intc_irq0";
224 function = "intc";
225 };
226
227 pmic_irq_pins: pmicirq {
228 groups = "intc_irq2";
229 function = "intc";
230 };
231
232 sdhi0_pins: sd0 {
233 groups = "sdhi0_data4", "sdhi0_ctrl";
234 function = "sdhi0";
235 };
236
237 sdhi2_pins: sd2 {
238 groups = "sdhi2_data4", "sdhi2_ctrl";
239 function = "sdhi2";
240 };
241
242 qspi_pins: qspi {
243 groups = "qspi_ctrl", "qspi_data4";
244 function = "qspi";
245 };
246
247 i2c2_pins: i2c2 {
248 groups = "i2c2";
249 function = "i2c2";
250 };
251
252 usb0_pins: usb0 {
253 groups = "usb0";
254 function = "usb0";
255 };
256
257 usb1_pins: usb1 {
258 groups = "usb1";
259 function = "usb1";
260 };
261
262 vin0_pins: vin0 {
263 groups = "vin0_data8", "vin0_clk";
264 function = "vin0";
265 };
266
267 can0_pins: can0 {
268 groups = "can0_data";
269 function = "can0";
270 };
271
272 du_pins: du {
273 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
274 function = "du";
275 };
276
277 ssi_pins: sound {
278 groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
279 function = "ssi";
280 };
281
282 audio_clk_pins: audio_clk {
283 groups = "audio_clk_a";
284 function = "audio_clk";
285 };
286 };
287
288 &scif0 {
289 pinctrl-0 = <&scif0_pins>;
290 pinctrl-names = "default";
291
292 status = "okay";
293 };
294
295 &ether {
296 pinctrl-0 = <&ether_pins &phy1_pins>;
297 pinctrl-names = "default";
298
299 phy-handle = <&phy1>;
300 renesas,ether-link-active-low;
301 status = "okay";
302
303 phy1: ethernet-phy@1 {
304 reg = <1>;
305 interrupt-parent = <&irqc0>;
306 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
307 micrel,led-mode = <1>;
308 reset-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
309 };
310 };
311
312 &sdhi0 {
313 pinctrl-0 = <&sdhi0_pins>;
314 pinctrl-names = "default";
315
316 vmmc-supply = <&vcc_sdhi0>;
317 vqmmc-supply = <&vccq_sdhi0>;
318 cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
319 wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
320 status = "okay";
321 };
322
323 &sdhi2 {
324 pinctrl-0 = <&sdhi2_pins>;
325 pinctrl-names = "default";
326
327 vmmc-supply = <&vcc_sdhi2>;
328 vqmmc-supply = <&vccq_sdhi2>;
329 cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
330 status = "okay";
331 };
332
333 &qspi {
334 pinctrl-0 = <&qspi_pins>;
335 pinctrl-names = "default";
336
337 status = "okay";
338
339 flash@0 {
340 compatible = "spansion,s25fl512s", "jedec,spi-nor";
341 reg = <0>;
342 spi-max-frequency = <30000000>;
343 spi-tx-bus-width = <4>;
344 spi-rx-bus-width = <4>;
345 m25p,fast-read;
346
347 partitions {
348 compatible = "fixed-partitions";
349 #address-cells = <1>;
350 #size-cells = <1>;
351
352 partition@0 {
353 label = "loader_prg";
354 reg = <0x00000000 0x00040000>;
355 read-only;
356 };
357 partition@40000 {
358 label = "user_prg";
359 reg = <0x00040000 0x00400000>;
360 read-only;
361 };
362 partition@440000 {
363 label = "flash_fs";
364 reg = <0x00440000 0x03bc0000>;
365 };
366 };
367 };
368 };
369
370 &i2c2 {
371 pinctrl-0 = <&i2c2_pins>;
372 pinctrl-names = "i2c-hdmi";
373
374 clock-frequency = <400000>;
375 };
376
377 &i2c6 {
378 pinctrl-names = "default";
379 pinctrl-0 = <&pmic_irq_pins>;
380 status = "okay";
381 clock-frequency = <100000>;
382
383 pmic@5a {
384 compatible = "dlg,da9063l";
385 reg = <0x5a>;
386 interrupt-parent = <&irqc0>;
387 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
388 interrupt-controller;
389
390 wdt {
391 compatible = "dlg,da9063-watchdog";
392 };
393 };
394
395 vdd_dvfs: regulator@68 {
396 compatible = "dlg,da9210";
397 reg = <0x68>;
398 interrupt-parent = <&irqc0>;
399 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
400
401 regulator-min-microvolt = <1000000>;
402 regulator-max-microvolt = <1000000>;
403 regulator-boot-on;
404 regulator-always-on;
405 };
406 };
407
408 &sata0 {
409 status = "okay";
410 };
411
412 &cpu0 {
413 cpu0-supply = <&vdd_dvfs>;
414 };
415
416 /* composite video input */
417 &vin0 {
418 status = "okay";
419 pinctrl-0 = <&vin0_pins>;
420 pinctrl-names = "default";
421
422 port {
423 vin0ep: endpoint {
424 remote-endpoint = <&adv7180>;
425 bus-width = <8>;
426 };
427 };
428 };
429
430 &pci0 {
431 pinctrl-0 = <&usb0_pins>;
432 pinctrl-names = "default";
433
434 status = "okay";
435 };
436
437 &pci1 {
438 pinctrl-0 = <&usb1_pins>;
439 pinctrl-names = "default";
440
441 status = "okay";
442 };
443
444 &hsusb {
445 pinctrl-0 = <&usb0_pins>;
446 pinctrl-names = "default";
447
448 status = "okay";
449 };
450
451 &usbphy {
452 status = "okay";
453 };
454
455 &pcie_bus_clk {
456 clock-frequency = <100000000>;
457 };
458
459 &pciec {
460 status = "okay";
461 };
462
463 &can0 {
464 pinctrl-0 = <&can0_pins>;
465 pinctrl-names = "default";
466
467 status = "okay";
468 };
469
470 &du {
471 pinctrl-0 = <&du_pins>;
472 pinctrl-names = "default";
473 status = "okay";
474
475 clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
476 <&x3_clk>, <&x16_clk>;
477 clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
478
479 ports {
480 port@0 {
481 endpoint {
482 remote-endpoint = <&adv7511_in>;
483 };
484 };
485 };
486 };
487
488 &lvds0 {
489 ports {
490 port@1 {
491 lvds_connector: endpoint {
492 };
493 };
494 };
495 };
496
497 &rcar_sound {
498 pinctrl-0 = <&ssi_pins &audio_clk_pins>;
499 pinctrl-names = "default";
500 status = "okay";
501
502 /* Single DAI */
503 #sound-dai-cells = <0>;
504
505 rcar_sound,dai {
506 dai0 {
507 playback = <&ssi0>;
508 capture = <&ssi1>;
509 };
510 };
511 };
512
513 &rwdt {
514 timeout-sec = <60>;
515 status = "okay";
516 };
517
518 &ssi1 {
519 shared-pin;
520 };