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