xref: /linux/arch/arm/boot/dts/renesas/r8a7794-alt.dts (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for the Alt board
4 *
5 * Copyright (C) 2014 Renesas Electronics Corporation
6 */
7
8/dts-v1/;
9#include "r8a7794.dtsi"
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/input/input.h>
12
13/ {
14	model = "Alt";
15	compatible = "renesas,alt", "renesas,r8a7794";
16
17	aliases {
18		serial0 = &scif2;
19		i2c9 = &gpioi2c1;
20		i2c10 = &gpioi2c4;
21		i2c11 = &i2chdmi;
22		i2c12 = &i2cexio4;
23		mmc0 = &mmcif0;
24		mmc1 = &sdhi0;
25		mmc2 = &sdhi1;
26	};
27
28	chosen {
29		bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
30		stdout-path = "serial0:115200n8";
31	};
32
33	memory@40000000 {
34		device_type = "memory";
35		reg = <0 0x40000000 0 0x40000000>;
36	};
37
38	d3_3v: regulator-d3-3v {
39		compatible = "regulator-fixed";
40		regulator-name = "D3.3V";
41		regulator-min-microvolt = <3300000>;
42		regulator-max-microvolt = <3300000>;
43		regulator-boot-on;
44		regulator-always-on;
45	};
46
47	vcc_sdhi0: regulator-vcc-sdhi0 {
48		compatible = "regulator-fixed";
49
50		regulator-name = "SDHI0 Vcc";
51		regulator-min-microvolt = <3300000>;
52		regulator-max-microvolt = <3300000>;
53
54		gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>;
55		enable-active-high;
56	};
57
58	vccq_sdhi0: regulator-vccq-sdhi0 {
59		compatible = "regulator-gpio";
60
61		regulator-name = "SDHI0 VccQ";
62		regulator-min-microvolt = <1800000>;
63		regulator-max-microvolt = <3300000>;
64
65		gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>;
66		gpios-states = <1>;
67		states = <3300000 1>, <1800000 0>;
68	};
69
70	vcc_sdhi1: regulator-vcc-sdhi1 {
71		compatible = "regulator-fixed";
72
73		regulator-name = "SDHI1 Vcc";
74		regulator-min-microvolt = <3300000>;
75		regulator-max-microvolt = <3300000>;
76
77		gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
78		enable-active-high;
79	};
80
81	vccq_sdhi1: regulator-vccq-sdhi1 {
82		compatible = "regulator-gpio";
83
84		regulator-name = "SDHI1 VccQ";
85		regulator-min-microvolt = <1800000>;
86		regulator-max-microvolt = <3300000>;
87
88		gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
89		gpios-states = <1>;
90		states = <3300000 1>, <1800000 0>;
91	};
92
93	keyboard {
94		compatible = "gpio-keys";
95
96		pinctrl-0 = <&keyboard_pins>;
97		pinctrl-names = "default";
98
99		key-1 {
100			linux,code = <KEY_1>;
101			label = "SW2-1";
102			wakeup-source;
103			debounce-interval = <20>;
104			gpios = <&gpio3 9 GPIO_ACTIVE_LOW>;
105		};
106		key-2 {
107			linux,code = <KEY_2>;
108			label = "SW2-2";
109			wakeup-source;
110			debounce-interval = <20>;
111			gpios = <&gpio3 10 GPIO_ACTIVE_LOW>;
112		};
113		key-3 {
114			linux,code = <KEY_3>;
115			label = "SW2-3";
116			wakeup-source;
117			debounce-interval = <20>;
118			gpios = <&gpio3 11 GPIO_ACTIVE_LOW>;
119		};
120		key-4 {
121			linux,code = <KEY_4>;
122			label = "SW2-4";
123			wakeup-source;
124			debounce-interval = <20>;
125			gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
126		};
127	};
128
129	vga-encoder {
130		compatible = "adi,adv7123";
131
132		ports {
133			#address-cells = <1>;
134			#size-cells = <0>;
135
136			port@0 {
137				reg = <0>;
138				adv7123_in: endpoint {
139					remote-endpoint = <&du_out_rgb1>;
140				};
141			};
142			port@1 {
143				reg = <1>;
144				adv7123_out: endpoint {
145					remote-endpoint = <&vga_in>;
146				};
147			};
148		};
149	};
150
151	vga {
152		compatible = "vga-connector";
153
154		port {
155			vga_in: endpoint {
156				remote-endpoint = <&adv7123_out>;
157			};
158		};
159	};
160
161	x2_clk: x2-clock {
162		compatible = "fixed-clock";
163		#clock-cells = <0>;
164		clock-frequency = <74250000>;
165	};
166
167	x13_clk: x13-clock {
168		compatible = "fixed-clock";
169		#clock-cells = <0>;
170		clock-frequency = <148500000>;
171	};
172
173	gpioi2c1: i2c-9 {
174		#address-cells = <1>;
175		#size-cells = <0>;
176		compatible = "i2c-gpio";
177		status = "disabled";
178		scl-gpios = <&gpio4 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
179		sda-gpios = <&gpio4 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
180	};
181
182	gpioi2c4: i2c-10 {
183		#address-cells = <1>;
184		#size-cells = <0>;
185		compatible = "i2c-gpio";
186		status = "disabled";
187		scl-gpios = <&gpio4 8 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
188		sda-gpios = <&gpio4 9 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
189		i2c-gpio,delay-us = <5>;
190	};
191
192	/*
193	 * A fallback to GPIO is provided for I2C1.
194	 */
195	i2chdmi: i2c-mux1 {
196		compatible = "i2c-demux-pinctrl";
197		i2c-parent = <&i2c1>, <&gpioi2c1>;
198		i2c-bus-name = "i2c-hdmi";
199		#address-cells = <1>;
200		#size-cells = <0>;
201
202		composite-in@20 {
203			compatible = "adi,adv7180";
204			reg = <0x20>;
205
206			port {
207				adv7180: endpoint {
208					bus-width = <8>;
209					remote-endpoint = <&vin0ep>;
210				};
211			};
212		};
213
214		eeprom@50 {
215			compatible = "renesas,r1ex24002", "atmel,24c02";
216			reg = <0x50>;
217			pagesize = <16>;
218		};
219	};
220
221	/*
222	 * I2C4 is routed to EXIO connector B, pins 73 (SCL) + 74 (SDA).
223	 * A fallback to GPIO is provided.
224	 */
225	i2cexio4: i2c-mux2 {
226		compatible = "i2c-demux-pinctrl";
227		i2c-parent = <&i2c4>, <&gpioi2c4>;
228		i2c-bus-name = "i2c-exio4";
229		#address-cells = <1>;
230		#size-cells = <0>;
231	};
232};
233
234&pci0 {
235	status = "okay";
236	pinctrl-0 = <&usb0_pins>;
237	pinctrl-names = "default";
238};
239
240&pci1 {
241	status = "okay";
242	pinctrl-0 = <&usb1_pins>;
243	pinctrl-names = "default";
244};
245
246&usbphy {
247	status = "okay";
248};
249
250&du {
251	pinctrl-0 = <&du_pins>;
252	pinctrl-names = "default";
253	status = "okay";
254
255	clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
256		 <&x13_clk>, <&x2_clk>;
257	clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
258
259	ports {
260		port@1 {
261			endpoint {
262				remote-endpoint = <&adv7123_in>;
263			};
264		};
265	};
266};
267
268&extal_clk {
269	clock-frequency = <20000000>;
270};
271
272&pfc {
273	pinctrl-0 = <&scif_clk_pins>;
274	pinctrl-names = "default";
275
276	du_pins: du {
277		groups = "du1_rgb666", "du1_sync", "du1_disp", "du1_clk0_out";
278		function = "du1";
279	};
280
281	scif2_pins: scif2 {
282		groups = "scif2_data";
283		function = "scif2";
284	};
285
286	scif_clk_pins: scif_clk {
287		groups = "scif_clk";
288		function = "scif_clk";
289	};
290
291	ether_pins: ether {
292		groups = "eth_link", "eth_mdio", "eth_rmii";
293		function = "eth";
294	};
295
296	phy1_pins: phy1 {
297		groups = "intc_irq8";
298		function = "intc";
299	};
300
301	i2c1_pins: i2c1 {
302		groups = "i2c1";
303		function = "i2c1";
304	};
305
306	i2c4_pins: i2c4 {
307		groups = "i2c4";
308		function = "i2c4";
309	};
310
311	vin0_pins: vin0 {
312		groups = "vin0_data8", "vin0_clk";
313		function = "vin0";
314	};
315
316	mmcif0_pins: mmcif0 {
317		groups = "mmc_data8", "mmc_ctrl";
318		function = "mmc";
319	};
320
321	sdhi0_pins: sd0 {
322		groups = "sdhi0_data4", "sdhi0_ctrl";
323		function = "sdhi0";
324		power-source = <3300>;
325	};
326
327	sdhi0_pins_uhs: sd0_uhs {
328		groups = "sdhi0_data4", "sdhi0_ctrl";
329		function = "sdhi0";
330		power-source = <1800>;
331	};
332
333	sdhi1_pins: sd1 {
334		groups = "sdhi1_data4", "sdhi1_ctrl";
335		function = "sdhi1";
336		power-source = <3300>;
337	};
338
339	sdhi1_pins_uhs: sd1_uhs {
340		groups = "sdhi1_data4", "sdhi1_ctrl";
341		function = "sdhi1";
342		power-source = <1800>;
343	};
344
345	usb0_pins: usb0 {
346		groups = "usb0";
347		function = "usb0";
348	};
349
350	usb1_pins: usb1 {
351		groups = "usb1";
352		function = "usb1";
353	};
354
355	keyboard_pins: keyboard {
356		pins = "GP_3_9", "GP_3_10", "GP_3_11", "GP_3_12";
357		bias-pull-up;
358	};
359};
360
361&cmt0 {
362	status = "okay";
363};
364
365&pfc {
366	qspi_pins: qspi {
367		groups = "qspi_ctrl", "qspi_data4";
368		function = "qspi";
369	};
370};
371
372&ether {
373	pinctrl-0 = <&ether_pins>, <&phy1_pins>;
374	pinctrl-names = "default";
375
376	phy-handle = <&phy1>;
377	renesas,ether-link-active-low;
378	status = "okay";
379
380	phy1: ethernet-phy@1 {
381		compatible = "ethernet-phy-id0022.1537",
382			     "ethernet-phy-ieee802.3-c22";
383		reg = <1>;
384		interrupts-extended = <&irqc0 8 IRQ_TYPE_LEVEL_LOW>;
385		micrel,led-mode = <1>;
386		reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
387	};
388};
389
390&mmcif0 {
391	pinctrl-0 = <&mmcif0_pins>;
392	pinctrl-names = "default";
393
394	vmmc-supply = <&d3_3v>;
395	vqmmc-supply = <&d3_3v>;
396	bus-width = <8>;
397	non-removable;
398	status = "okay";
399};
400
401&rwdt {
402	timeout-sec = <60>;
403	status = "okay";
404};
405
406&sdhi0 {
407	pinctrl-0 = <&sdhi0_pins>;
408	pinctrl-1 = <&sdhi0_pins_uhs>;
409	pinctrl-names = "default", "state_uhs";
410
411	vmmc-supply = <&vcc_sdhi0>;
412	vqmmc-supply = <&vccq_sdhi0>;
413	cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
414	wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
415	sd-uhs-sdr50;
416	sd-uhs-sdr104;
417	status = "okay";
418};
419
420&sdhi1 {
421	pinctrl-0 = <&sdhi1_pins>;
422	pinctrl-1 = <&sdhi1_pins_uhs>;
423	pinctrl-names = "default", "state_uhs";
424
425	vmmc-supply = <&vcc_sdhi1>;
426	vqmmc-supply = <&vccq_sdhi1>;
427	cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
428	wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
429	sd-uhs-sdr50;
430	status = "okay";
431};
432
433&i2c1 {
434	pinctrl-0 = <&i2c1_pins>;
435	pinctrl-names = "i2c-hdmi";
436
437	clock-frequency = <400000>;
438};
439
440&i2c4 {
441	pinctrl-0 = <&i2c4_pins>;
442	pinctrl-names = "i2c-exio4";
443};
444
445&i2c7 {
446	status = "okay";
447	clock-frequency = <100000>;
448
449	pmic@58 {
450		compatible = "dlg,da9063";
451		reg = <0x58>;
452		interrupts-extended = <&gpio3 31 IRQ_TYPE_LEVEL_LOW>;
453		interrupt-controller;
454		#interrupt-cells = <2>;
455
456		rtc {
457			compatible = "dlg,da9063-rtc";
458		};
459
460		watchdog {
461			compatible = "dlg,da9063-watchdog";
462		};
463	};
464};
465
466&vin0 {
467	status = "okay";
468	pinctrl-0 = <&vin0_pins>;
469	pinctrl-names = "default";
470
471	port {
472		vin0ep: endpoint {
473			remote-endpoint = <&adv7180>;
474			bus-width = <8>;
475		};
476	};
477};
478
479&scif2 {
480	pinctrl-0 = <&scif2_pins>;
481	pinctrl-names = "default";
482
483	status = "okay";
484};
485
486&scif_clk {
487	clock-frequency = <14745600>;
488};
489
490&qspi {
491	pinctrl-0 = <&qspi_pins>;
492	pinctrl-names = "default";
493
494	status = "okay";
495
496	flash@0 {
497		compatible = "spansion,s25fl512s", "jedec,spi-nor";
498		reg = <0>;
499		spi-max-frequency = <30000000>;
500		spi-tx-bus-width = <4>;
501		spi-rx-bus-width = <4>;
502		spi-cpol;
503		spi-cpha;
504		m25p,fast-read;
505
506		partitions {
507			compatible = "fixed-partitions";
508			#address-cells = <1>;
509			#size-cells = <1>;
510
511			partition@0 {
512				label = "loader";
513				reg = <0x00000000 0x00040000>;
514				read-only;
515			};
516			partition@40000 {
517				label = "system";
518				reg = <0x00040000 0x00040000>;
519				read-only;
520			};
521			partition@80000 {
522				label = "user";
523				reg = <0x00080000 0x03f80000>;
524			};
525		};
526	};
527};
528