blob: 4316087ce3704dd7ac0f1f3fabe4da62add04d39 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0
Marek Vasut9a26fc52018-01-07 20:18:28 +01002/*
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.
Marek Vasut9a26fc52018-01-07 20:18:28 +01008 */
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
25/ {
26 model = "SILK";
27 compatible = "renesas,silk", "renesas,r8a7794";
28
29 aliases {
30 serial0 = &scif2;
31 };
32
33 chosen {
34 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
35 stdout-path = "serial0:115200n8";
36 };
37
38 memory@40000000 {
39 device_type = "memory";
40 reg = <0 0x40000000 0 0x40000000>;
41 };
42
43 d3_3v: regulator-d3-3v {
44 compatible = "regulator-fixed";
45 regulator-name = "D3.3V";
46 regulator-min-microvolt = <3300000>;
47 regulator-max-microvolt = <3300000>;
48 regulator-boot-on;
49 regulator-always-on;
50 };
51
52 vcc_sdhi1: regulator-vcc-sdhi1 {
53 compatible = "regulator-fixed";
54
55 regulator-name = "SDHI1 Vcc";
56 regulator-min-microvolt = <3300000>;
57 regulator-max-microvolt = <3300000>;
58
59 gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
60 enable-active-high;
61 };
62
63 vccq_sdhi1: regulator-vccq-sdhi1 {
64 compatible = "regulator-gpio";
65
66 regulator-name = "SDHI1 VccQ";
67 regulator-min-microvolt = <1800000>;
68 regulator-max-microvolt = <3300000>;
69
70 gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
71 gpios-states = <1>;
72 states = <3300000 1
73 1800000 0>;
74 };
75
76 vga-encoder {
77 compatible = "adi,adv7123";
78
79 ports {
80 #address-cells = <1>;
81 #size-cells = <0>;
82
83 port@0 {
84 reg = <0>;
85 adv7123_in: endpoint {
86 remote-endpoint = <&du_out_rgb1>;
87 };
88 };
89 port@1 {
90 reg = <1>;
91 adv7123_out: endpoint {
92 remote-endpoint = <&vga_in>;
93 };
94 };
95 };
96 };
97
98 hdmi-out {
99 compatible = "hdmi-connector";
100 type = "a";
101
102 port {
103 hdmi_con: endpoint {
104 remote-endpoint = <&adv7511_out>;
105 };
106 };
107 };
108
109 vga {
110 compatible = "vga-connector";
111
112 port {
113 vga_in: endpoint {
114 remote-endpoint = <&adv7123_out>;
115 };
116 };
117 };
118
119 x2_clk: x2-clock {
120 compatible = "fixed-clock";
121 #clock-cells = <0>;
122 clock-frequency = <148500000>;
123 };
124
125 x3_clk: x3-clock {
126 compatible = "fixed-clock";
127 #clock-cells = <0>;
128 clock-frequency = <74250000>;
129 };
130
131 x9_clk: audio_clock {
132 compatible = "fixed-clock";
133 #clock-cells = <0>;
134 clock-frequency = <12288000>;
135 };
136
137 sound {
138 compatible = "simple-audio-card";
139
140 simple-audio-card,format = "left_j";
141 simple-audio-card,bitclock-master = <&soundcodec>;
142 simple-audio-card,frame-master = <&soundcodec>;
143
144 simple-audio-card,cpu {
145 sound-dai = <&rcar_sound>;
146 };
147
148 soundcodec: simple-audio-card,codec {
149 sound-dai = <&ak4643>;
150 clocks = <&x9_clk>;
151 };
152 };
153};
154
155&extal_clk {
156 clock-frequency = <20000000>;
157};
158
159&pfc {
160 pinctrl-0 = <&scif_clk_pins>;
161 pinctrl-names = "default";
162
163 scif2_pins: scif2 {
164 groups = "scif2_data";
165 function = "scif2";
166 };
167
168 scif_clk_pins: scif_clk {
169 groups = "scif_clk";
170 function = "scif_clk";
171 };
172
173 ether_pins: ether {
174 groups = "eth_link", "eth_mdio", "eth_rmii";
175 function = "eth";
176 };
177
178 phy1_pins: phy1 {
179 groups = "intc_irq8";
180 function = "intc";
181 };
182
183 i2c1_pins: i2c1 {
184 groups = "i2c1";
185 function = "i2c1";
186 };
187
188 mmcif0_pins: mmcif0 {
189 groups = "mmc_data8", "mmc_ctrl";
190 function = "mmc";
191 };
192
193 sdhi1_pins: sd1 {
194 groups = "sdhi1_data4", "sdhi1_ctrl";
195 function = "sdhi1";
196 };
197
198 qspi_pins: qspi {
199 groups = "qspi_ctrl", "qspi_data4";
200 function = "qspi";
201 };
202
203 vin0_pins: vin0 {
204 groups = "vin0_data8", "vin0_clk";
205 function = "vin0";
206 };
207
208 usb0_pins: usb0 {
209 groups = "usb0";
210 function = "usb0";
211 };
212
213 usb1_pins: usb1 {
214 groups = "usb1";
215 function = "usb1";
216 };
217
218 du0_pins: du0 {
219 groups = "du0_rgb888", "du0_sync", "du0_disp", "du0_clk0_out";
220 function = "du0";
221 };
222
223 du1_pins: du1 {
224 groups = "du1_rgb666", "du1_sync", "du1_disp", "du1_clk0_out";
225 function = "du1";
226 };
227
228 ssi_pins: sound {
229 groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
230 function = "ssi";
231 };
232
233 audio_clk_pins: audio_clk {
234 groups = "audio_clkc";
235 function = "audio_clk";
236 };
237};
238
239&scif2 {
240 pinctrl-0 = <&scif2_pins>;
241 pinctrl-names = "default";
242
243 status = "okay";
244};
245
246&scif_clk {
247 clock-frequency = <14745600>;
248};
249
250&ether {
251 pinctrl-0 = <&ether_pins &phy1_pins>;
252 pinctrl-names = "default";
253
254 phy-handle = <&phy1>;
255 renesas,ether-link-active-low;
256 status = "okay";
257
258 phy1: ethernet-phy@1 {
259 reg = <1>;
260 interrupt-parent = <&irqc0>;
261 interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
262 micrel,led-mode = <1>;
263 };
264};
265
266&i2c1 {
267 pinctrl-0 = <&i2c1_pins>;
268 pinctrl-names = "default";
269
270 status = "okay";
271 clock-frequency = <400000>;
272
273 ak4643: codec@12 {
274 compatible = "asahi-kasei,ak4643";
275 #sound-dai-cells = <0>;
276 reg = <0x12>;
277 };
278
279 composite-in@20 {
280 compatible = "adi,adv7180";
281 reg = <0x20>;
282 remote = <&vin0>;
283
284 port {
285 adv7180: endpoint {
286 bus-width = <8>;
287 remote-endpoint = <&vin0ep>;
288 };
289 };
290 };
291
292 hdmi@39 {
293 compatible = "adi,adv7511w";
294 reg = <0x39>;
295 interrupt-parent = <&gpio5>;
296 interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
297
298 adi,input-depth = <8>;
299 adi,input-colorspace = "rgb";
300 adi,input-clock = "1x";
301 adi,input-style = <1>;
302 adi,input-justification = "evenly";
303
304 ports {
305 #address-cells = <1>;
306 #size-cells = <0>;
307
308 port@0 {
309 reg = <0>;
310 adv7511_in: endpoint {
311 remote-endpoint = <&du_out_rgb0>;
312 };
313 };
314
315 port@1 {
316 reg = <1>;
317 adv7511_out: endpoint {
318 remote-endpoint = <&hdmi_con>;
319 };
320 };
321 };
322 };
323};
324
325&mmcif0 {
326 pinctrl-0 = <&mmcif0_pins>;
327 pinctrl-names = "default";
328
329 vmmc-supply = <&d3_3v>;
330 vqmmc-supply = <&d3_3v>;
331 bus-width = <8>;
332 non-removable;
333 status = "okay";
334};
335
336&sdhi1 {
337 pinctrl-0 = <&sdhi1_pins>;
338 pinctrl-names = "default";
339
340 vmmc-supply = <&vcc_sdhi1>;
341 vqmmc-supply = <&vccq_sdhi1>;
342 cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
343 status = "okay";
344};
345
346&qspi {
347 pinctrl-0 = <&qspi_pins>;
348 pinctrl-names = "default";
349
350 status = "okay";
351
352 flash@0 {
353 compatible = "spansion,s25fl512s", "jedec,spi-nor";
354 reg = <0>;
355 spi-max-frequency = <30000000>;
356 spi-tx-bus-width = <4>;
357 spi-rx-bus-width = <4>;
358 spi-cpol;
359 spi-cpha;
360 m25p,fast-read;
361
362 partitions {
363 compatible = "fixed-partitions";
364 #address-cells = <1>;
365 #size-cells = <1>;
366
367 partition@0 {
368 label = "loader";
369 reg = <0x00000000 0x00040000>;
370 read-only;
371 };
372 partition@40000 {
373 label = "user";
374 reg = <0x00040000 0x00400000>;
375 read-only;
376 };
377 partition@440000 {
378 label = "flash";
379 reg = <0x00440000 0x03bc0000>;
380 };
381 };
382 };
383};
384
385/* composite video input */
386&vin0 {
387 status = "okay";
388 pinctrl-0 = <&vin0_pins>;
389 pinctrl-names = "default";
390
391 port {
392 #address-cells = <1>;
393 #size-cells = <0>;
394
395 vin0ep: endpoint {
396 remote-endpoint = <&adv7180>;
397 bus-width = <8>;
398 };
399 };
400};
401
402&pci0 {
403 status = "okay";
404 pinctrl-0 = <&usb0_pins>;
405 pinctrl-names = "default";
406};
407
408&pci1 {
409 status = "okay";
410 pinctrl-0 = <&usb1_pins>;
411 pinctrl-names = "default";
412};
413
414&usbphy {
415 status = "okay";
416};
417
418&du {
419 pinctrl-0 = <&du0_pins &du1_pins>;
420 pinctrl-names = "default";
421 status = "okay";
422
423 clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
424 <&x2_clk>, <&x3_clk>;
425 clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
426
427 ports {
428 port@0 {
429 endpoint {
430 remote-endpoint = <&adv7511_in>;
431 };
432 };
433 port@1 {
434 endpoint {
435 remote-endpoint = <&adv7123_in>;
436 };
437 };
438 };
439};
440
441&rcar_sound {
442 pinctrl-0 = <&ssi_pins &audio_clk_pins>;
443 pinctrl-names = "default";
444 status = "okay";
445
446 /* Single DAI */
447 #sound-dai-cells = <0>;
448
449 rcar_sound,dai {
450 dai0 {
451 playback = <&ssi0>;
452 capture = <&ssi1>;
453 };
454 };
455};
456
457&ssi1 {
458 shared-pin;
459};