Linux Audio

Check our new training course

Linux BSP development engineering services

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