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