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