Linux Audio

Check our new training course

Embedded Linux training

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