xref: /openbmc/u-boot/arch/arm/dts/r8a7793-gose.dts (revision 63e22517)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for the Gose board
4 *
5 * Copyright (C) 2014-2015 Renesas Electronics Corporation
6 */
7
8/*
9 * SSI-AK4643
10 *
11 * SW1: 1: AK4643
12 *      2: CN22
13 *      3: ADV7511
14 *
15 * This command is required when Playback/Capture
16 *
17 *	amixer set "LINEOUT Mixer DACL" on
18 *	amixer set "DVC Out" 100%
19 *	amixer set "DVC In" 100%
20 *
21 * You can use Mute
22 *
23 *	amixer set "DVC Out Mute" on
24 *	amixer set "DVC In Mute" on
25 *
26 * You can use Volume Ramp
27 *
28 *	amixer set "DVC Out Ramp Up Rate"   "0.125 dB/64 steps"
29 *	amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
30 *	amixer set "DVC Out Ramp" on
31 *	aplay xxx.wav &
32 *	amixer set "DVC Out"  80%  // Volume Down
33 *	amixer set "DVC Out" 100%  // Volume Up
34 */
35
36/dts-v1/;
37#include "r8a7793.dtsi"
38#include <dt-bindings/gpio/gpio.h>
39#include <dt-bindings/input/input.h>
40
41/ {
42	model = "Gose";
43	compatible = "renesas,gose", "renesas,r8a7793";
44
45	aliases {
46		serial0 = &scif0;
47		serial1 = &scif1;
48	};
49
50	chosen {
51		bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
52		stdout-path = "serial0:115200n8";
53	};
54
55	memory@40000000 {
56		device_type = "memory";
57		reg = <0 0x40000000 0 0x40000000>;
58	};
59
60	gpio-keys {
61		compatible = "gpio-keys";
62
63		key-1 {
64		        gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
65		        linux,code = <KEY_1>;
66		        label = "SW2-1";
67		        wakeup-source;
68		        debounce-interval = <20>;
69		};
70		key-2 {
71		        gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
72		        linux,code = <KEY_2>;
73		        label = "SW2-2";
74		        wakeup-source;
75		        debounce-interval = <20>;
76		};
77		key-3 {
78		        gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
79		        linux,code = <KEY_3>;
80		        label = "SW2-3";
81		        wakeup-source;
82		        debounce-interval = <20>;
83		};
84		key-4 {
85		        gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
86		        linux,code = <KEY_4>;
87		        label = "SW2-4";
88		        wakeup-source;
89		        debounce-interval = <20>;
90		};
91		key-a {
92		        gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
93		        linux,code = <KEY_A>;
94		        label = "SW30";
95		        wakeup-source;
96		        debounce-interval = <20>;
97		};
98		key-b {
99		        gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
100		        linux,code = <KEY_B>;
101		        label = "SW31";
102		        wakeup-source;
103		        debounce-interval = <20>;
104		};
105		key-c {
106		        gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
107		        linux,code = <KEY_C>;
108		        label = "SW32";
109		        wakeup-source;
110		        debounce-interval = <20>;
111		};
112		key-d {
113		        gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
114		        linux,code = <KEY_D>;
115		        label = "SW33";
116		        wakeup-source;
117		        debounce-interval = <20>;
118		};
119		key-e {
120		        gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
121		        linux,code = <KEY_E>;
122		        label = "SW34";
123		        wakeup-source;
124		        debounce-interval = <20>;
125		};
126		key-f {
127		        gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
128		        linux,code = <KEY_F>;
129		        label = "SW35";
130		        wakeup-source;
131		        debounce-interval = <20>;
132		};
133		key-g {
134		        gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
135		        linux,code = <KEY_G>;
136		        label = "SW36";
137		        wakeup-source;
138		        debounce-interval = <20>;
139		};
140	};
141
142	leds {
143		compatible = "gpio-leds";
144		led6 {
145			gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
146			label = "LED6";
147		};
148		led7 {
149			gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
150			label = "LED7";
151		};
152		led8 {
153			gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
154			label = "LED8";
155		};
156	};
157
158	vcc_sdhi0: regulator-vcc-sdhi0 {
159		compatible = "regulator-fixed";
160
161		regulator-name = "SDHI0 Vcc";
162		regulator-min-microvolt = <3300000>;
163		regulator-max-microvolt = <3300000>;
164
165		gpio = <&gpio7 17 GPIO_ACTIVE_HIGH>;
166		enable-active-high;
167	};
168
169	vccq_sdhi0: regulator-vccq-sdhi0 {
170		compatible = "regulator-gpio";
171
172		regulator-name = "SDHI0 VccQ";
173		regulator-min-microvolt = <1800000>;
174		regulator-max-microvolt = <3300000>;
175
176		gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
177		gpios-states = <1>;
178		states = <3300000 1
179			  1800000 0>;
180	};
181
182	vcc_sdhi1: regulator-vcc-sdhi1 {
183		compatible = "regulator-fixed";
184
185		regulator-name = "SDHI1 Vcc";
186		regulator-min-microvolt = <3300000>;
187		regulator-max-microvolt = <3300000>;
188
189		gpio = <&gpio7 18 GPIO_ACTIVE_HIGH>;
190		enable-active-high;
191	};
192
193	vccq_sdhi1: regulator-vccq-sdhi1 {
194		compatible = "regulator-gpio";
195
196		regulator-name = "SDHI1 VccQ";
197		regulator-min-microvolt = <1800000>;
198		regulator-max-microvolt = <3300000>;
199
200		gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
201		gpios-states = <1>;
202		states = <3300000 1
203			  1800000 0>;
204	};
205
206	vcc_sdhi2: regulator-vcc-sdhi2 {
207		compatible = "regulator-fixed";
208
209		regulator-name = "SDHI2 Vcc";
210		regulator-min-microvolt = <3300000>;
211		regulator-max-microvolt = <3300000>;
212
213		gpio = <&gpio7 19 GPIO_ACTIVE_HIGH>;
214		enable-active-high;
215	};
216
217	vccq_sdhi2: regulator-vccq-sdhi2 {
218		compatible = "regulator-gpio";
219
220		regulator-name = "SDHI2 VccQ";
221		regulator-min-microvolt = <1800000>;
222		regulator-max-microvolt = <3300000>;
223
224		gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
225		gpios-states = <1>;
226		states = <3300000 1
227			  1800000 0>;
228	};
229
230	audio_clock: audio_clock {
231		compatible = "fixed-clock";
232		#clock-cells = <0>;
233		clock-frequency = <11289600>;
234	};
235
236	rsnd_ak4643: sound {
237		compatible = "simple-audio-card";
238
239		simple-audio-card,format = "left_j";
240		simple-audio-card,bitclock-master = <&sndcodec>;
241		simple-audio-card,frame-master = <&sndcodec>;
242
243		sndcpu: simple-audio-card,cpu {
244			sound-dai = <&rcar_sound>;
245		};
246
247		sndcodec: simple-audio-card,codec {
248			sound-dai = <&ak4643>;
249			clocks = <&audio_clock>;
250		};
251	};
252
253	hdmi-in {
254		compatible = "hdmi-connector";
255		type = "a";
256
257		port {
258			hdmi_con_in: endpoint {
259				remote-endpoint = <&adv7612_in>;
260			};
261		};
262	};
263
264	hdmi-out {
265		compatible = "hdmi-connector";
266		type = "a";
267
268		port {
269			hdmi_con_out: endpoint {
270				remote-endpoint = <&adv7511_out>;
271			};
272		};
273	};
274
275	composite-in {
276		compatible = "composite-video-connector";
277
278		port {
279			composite_con_in: endpoint {
280				remote-endpoint = <&adv7180_in>;
281			};
282		};
283	};
284
285	x2_clk: x2-clock {
286		compatible = "fixed-clock";
287		#clock-cells = <0>;
288		clock-frequency = <74250000>;
289	};
290
291	x13_clk: x13-clock {
292		compatible = "fixed-clock";
293		#clock-cells = <0>;
294		clock-frequency = <148500000>;
295	};
296};
297
298&du {
299	pinctrl-0 = <&du_pins>;
300	pinctrl-names = "default";
301	status = "okay";
302
303	clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>, <&cpg CPG_MOD 726>,
304		 <&x13_clk>, <&x2_clk>;
305	clock-names = "du.0", "du.1", "lvds.0",
306		      "dclkin.0", "dclkin.1";
307
308	ports {
309		port@0 {
310			endpoint {
311				remote-endpoint = <&adv7511_in>;
312			};
313		};
314		port@1 {
315			lvds_connector: endpoint {
316			};
317		};
318	};
319};
320
321&extal_clk {
322	clock-frequency = <20000000>;
323};
324
325&pfc {
326	pinctrl-0 = <&scif_clk_pins>;
327	pinctrl-names = "default";
328
329	i2c2_pins: i2c2 {
330		groups = "i2c2";
331		function = "i2c2";
332	};
333
334	du_pins: du {
335		groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
336		function = "du";
337	};
338
339	scif0_pins: scif0 {
340		groups = "scif0_data_d";
341		function = "scif0";
342	};
343
344	scif1_pins: scif1 {
345		groups = "scif1_data_d";
346		function = "scif1";
347	};
348
349	scif_clk_pins: scif_clk {
350		groups = "scif_clk";
351		function = "scif_clk";
352	};
353
354	ether_pins: ether {
355		groups = "eth_link", "eth_mdio", "eth_rmii";
356		function = "eth";
357	};
358
359	phy1_pins: phy1 {
360		groups = "intc_irq0";
361		function = "intc";
362	};
363
364	sdhi0_pins: sd0 {
365		groups = "sdhi0_data4", "sdhi0_ctrl";
366		function = "sdhi0";
367		power-source = <3300>;
368	};
369
370	sdhi0_pins_uhs: sd0_uhs {
371		groups = "sdhi0_data4", "sdhi0_ctrl";
372		function = "sdhi0";
373		power-source = <1800>;
374	};
375
376	sdhi1_pins: sd1 {
377		groups = "sdhi1_data4", "sdhi1_ctrl";
378		function = "sdhi1";
379		power-source = <3300>;
380	};
381
382	sdhi1_pins_uhs: sd1_uhs {
383		groups = "sdhi1_data4", "sdhi1_ctrl";
384		function = "sdhi1";
385		power-source = <1800>;
386	};
387
388	sdhi2_pins: sd2 {
389		groups = "sdhi2_data4", "sdhi2_ctrl";
390		function = "sdhi2";
391		power-source = <3300>;
392	};
393
394	sdhi2_pins_uhs: sd2_uhs {
395		groups = "sdhi2_data4", "sdhi2_ctrl";
396		function = "sdhi2";
397		power-source = <1800>;
398	};
399
400	qspi_pins: qspi {
401		groups = "qspi_ctrl", "qspi_data4";
402		function = "qspi";
403	};
404
405	sound_pins: sound {
406		groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
407		function = "ssi";
408	};
409
410	sound_clk_pins: sound_clk {
411		groups = "audio_clk_a";
412		function = "audio_clk";
413	};
414
415	vin0_pins: vin0 {
416		groups = "vin0_data24", "vin0_sync", "vin0_clkenb", "vin0_clk";
417		function = "vin0";
418	};
419
420	vin1_pins: vin1 {
421		groups = "vin1_data8", "vin1_clk";
422		function = "vin1";
423	};
424};
425
426&ether {
427	pinctrl-0 = <&ether_pins &phy1_pins>;
428	pinctrl-names = "default";
429
430	phy-handle = <&phy1>;
431	renesas,ether-link-active-low;
432	status = "okay";
433
434	phy1: ethernet-phy@1 {
435		reg = <1>;
436		interrupt-parent = <&irqc0>;
437		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
438		micrel,led-mode = <1>;
439	};
440};
441
442&cmt0 {
443	status = "okay";
444};
445
446&scif0 {
447	pinctrl-0 = <&scif0_pins>;
448	pinctrl-names = "default";
449
450	status = "okay";
451};
452
453&scif1 {
454	pinctrl-0 = <&scif1_pins>;
455	pinctrl-names = "default";
456
457	status = "okay";
458};
459
460&scif_clk {
461	clock-frequency = <14745600>;
462};
463
464&sdhi0 {
465	pinctrl-0 = <&sdhi0_pins>;
466	pinctrl-1 = <&sdhi0_pins_uhs>;
467	pinctrl-names = "default", "state_uhs";
468
469	vmmc-supply = <&vcc_sdhi0>;
470	vqmmc-supply = <&vccq_sdhi0>;
471	cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
472	wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
473	sd-uhs-sdr50;
474	sd-uhs-sdr104;
475	status = "okay";
476};
477
478&sdhi1 {
479	pinctrl-0 = <&sdhi1_pins>;
480	pinctrl-1 = <&sdhi1_pins_uhs>;
481	pinctrl-names = "default", "state_uhs";
482
483	vmmc-supply = <&vcc_sdhi1>;
484	vqmmc-supply = <&vccq_sdhi1>;
485	cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
486	wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
487	sd-uhs-sdr50;
488	status = "okay";
489};
490
491&sdhi2 {
492	pinctrl-0 = <&sdhi2_pins>;
493	pinctrl-1 = <&sdhi2_pins_uhs>;
494	pinctrl-names = "default", "state_uhs";
495
496	vmmc-supply = <&vcc_sdhi2>;
497	vqmmc-supply = <&vccq_sdhi2>;
498	cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
499	sd-uhs-sdr50;
500	status = "okay";
501};
502
503&qspi {
504	pinctrl-0 = <&qspi_pins>;
505	pinctrl-names = "default";
506
507	status = "okay";
508
509	flash@0 {
510		compatible = "spansion,s25fl512s", "jedec,spi-nor";
511		reg = <0>;
512		spi-max-frequency = <30000000>;
513		spi-tx-bus-width = <4>;
514		spi-rx-bus-width = <4>;
515		spi-cpol;
516		spi-cpha;
517		m25p,fast-read;
518
519		partitions {
520			compatible = "fixed-partitions";
521			#address-cells = <1>;
522			#size-cells = <1>;
523
524			partition@0 {
525				label = "loader";
526				reg = <0x00000000 0x00040000>;
527				read-only;
528			};
529			partition@40000 {
530				label = "user";
531				reg = <0x00040000 0x00400000>;
532				read-only;
533			};
534			partition@440000 {
535				label = "flash";
536				reg = <0x00440000 0x03bc0000>;
537			};
538		};
539	};
540};
541
542&i2c2 {
543	pinctrl-0 = <&i2c2_pins>;
544	pinctrl-names = "default";
545
546	status = "okay";
547	clock-frequency = <100000>;
548
549	ak4643: codec@12 {
550		compatible = "asahi-kasei,ak4643";
551		#sound-dai-cells = <0>;
552		reg = <0x12>;
553	};
554
555	composite-in@20 {
556		compatible = "adi,adv7180cp";
557		reg = <0x20>;
558		remote = <&vin1>;
559
560		port {
561			#address-cells = <1>;
562			#size-cells = <0>;
563
564			port@0 {
565				reg = <0>;
566				adv7180_in: endpoint {
567					remote-endpoint = <&composite_con_in>;
568				};
569			};
570
571			port@3 {
572				reg = <3>;
573				adv7180_out: endpoint {
574					bus-width = <8>;
575					remote-endpoint = <&vin1ep>;
576				};
577			};
578		};
579	};
580
581	hdmi@39 {
582		compatible = "adi,adv7511w";
583		reg = <0x39>;
584		interrupt-parent = <&gpio3>;
585		interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
586
587		adi,input-depth = <8>;
588		adi,input-colorspace = "rgb";
589		adi,input-clock = "1x";
590		adi,input-style = <1>;
591		adi,input-justification = "evenly";
592
593		ports {
594			#address-cells = <1>;
595			#size-cells = <0>;
596
597			port@0 {
598				reg = <0>;
599				adv7511_in: endpoint {
600					remote-endpoint = <&du_out_rgb>;
601				};
602			};
603
604			port@1 {
605				reg = <1>;
606				adv7511_out: endpoint {
607					remote-endpoint = <&hdmi_con_out>;
608				};
609			};
610		};
611	};
612
613	hdmi-in@4c {
614		compatible = "adi,adv7612";
615		reg = <0x4c>;
616		interrupt-parent = <&gpio4>;
617		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
618		default-input = <0>;
619
620		port {
621			#address-cells = <1>;
622			#size-cells = <0>;
623
624			port@0 {
625				reg = <0>;
626				adv7612_in: endpoint {
627					remote-endpoint = <&hdmi_con_in>;
628				};
629			};
630
631			port@2 {
632				reg = <2>;
633				adv7612_out: endpoint {
634					remote-endpoint = <&vin0ep2>;
635				};
636			};
637		};
638	};
639
640	eeprom@50 {
641		compatible = "renesas,r1ex24002", "atmel,24c02";
642		reg = <0x50>;
643		pagesize = <16>;
644	};
645};
646
647&i2c6 {
648	status = "okay";
649	clock-frequency = <100000>;
650
651	pmic@58 {
652		compatible = "dlg,da9063";
653		reg = <0x58>;
654		interrupt-parent = <&irqc0>;
655		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
656		interrupt-controller;
657
658		rtc {
659			compatible = "dlg,da9063-rtc";
660		};
661
662		wdt {
663			compatible = "dlg,da9063-watchdog";
664		};
665	};
666};
667
668&rcar_sound {
669	pinctrl-0 = <&sound_pins &sound_clk_pins>;
670	pinctrl-names = "default";
671
672	/* Single DAI */
673	#sound-dai-cells = <0>;
674
675	status = "okay";
676
677	rcar_sound,dai {
678		dai0 {
679			playback = <&ssi0 &src2 &dvc0>;
680			capture  = <&ssi1 &src3 &dvc1>;
681		};
682	};
683};
684
685&ssi1 {
686	shared-pin;
687};
688
689/* HDMI video input */
690&vin0 {
691	status = "okay";
692	pinctrl-0 = <&vin0_pins>;
693	pinctrl-names = "default";
694
695	port {
696		#address-cells = <1>;
697		#size-cells = <0>;
698
699		vin0ep2: endpoint {
700			remote-endpoint = <&adv7612_out>;
701			bus-width = <24>;
702			hsync-active = <0>;
703			vsync-active = <0>;
704			pclk-sample = <1>;
705			data-active = <1>;
706		};
707	};
708};
709
710/* composite video input */
711&vin1 {
712	pinctrl-0 = <&vin1_pins>;
713	pinctrl-names = "default";
714
715	status = "okay";
716
717	port {
718		#address-cells = <1>;
719		#size-cells = <0>;
720
721		vin1ep: endpoint {
722			remote-endpoint = <&adv7180_out>;
723			bus-width = <8>;
724		};
725	};
726};
727