Linux Audio

Check our new training course

Loading...
v4.17
 
  1/*
  2 * Device Tree Source for the iWave-RZG1E SODIMM carrier board
  3 *
  4 * Copyright (C) 2017 Renesas Electronics Corp.
  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-SGTL5000
 13 *
 14 * This command is required when Playback/Capture
 15 *
 16 *      amixer set "DVC Out" 100%
 17 *      amixer set "DVC In" 100%
 18 *
 19 * You can use Mute
 20 *
 21 *      amixer set "DVC Out Mute" on
 22 *      amixer set "DVC In Mute" on
 23 *
 24 * You can use Volume Ramp
 25 *
 26 *      amixer set "DVC Out Ramp Up Rate"   "0.125 dB/64 steps"
 27 *      amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
 28 *      amixer set "DVC Out Ramp" on
 29 *      aplay xxx.wav &
 30 *      amixer set "DVC Out"  80%  // Volume Down
 31 *      amixer set "DVC Out" 100%  // Volume Up
 32 */
 33
 34/dts-v1/;
 35#include "r8a7745-iwg22m.dtsi"
 36
 37/ {
 38	model = "iWave Systems RainboW-G22D-SODIMM board based on RZ/G1E";
 39	compatible = "iwave,g22d", "iwave,g22m", "renesas,r8a7745";
 40
 41	aliases {
 42		ethernet0 = &avb;
 43		serial3 = &scif4;
 44		serial5 = &hscif1;
 45	};
 46
 47	chosen {
 48		bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
 49		stdout-path = "serial3:115200n8";
 50	};
 51
 52	audio_clock: audio_clock {
 53		compatible = "fixed-clock";
 54		#clock-cells = <0>;
 55		clock-frequency = <26000000>;
 56	};
 57
 58	rsnd_sgtl5000: sound {
 59		compatible = "simple-audio-card";
 60		simple-audio-card,format = "i2s";
 61		simple-audio-card,bitclock-master = <&sndcodec>;
 62		simple-audio-card,frame-master = <&sndcodec>;
 63
 64		sndcpu: simple-audio-card,cpu {
 65			sound-dai = <&rcar_sound>;
 66		};
 67
 68		sndcodec: simple-audio-card,codec {
 69			sound-dai = <&sgtl5000>;
 70		};
 71	};
 72
 73	vccq_sdhi0: regulator-vccq-sdhi0 {
 74		compatible = "regulator-gpio";
 75
 76		regulator-name = "SDHI0 VccQ";
 77		regulator-min-microvolt = <1800000>;
 78		regulator-max-microvolt = <3300000>;
 79
 80		gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
 81		gpios-states = <1>;
 82		states = <3300000 1
 83			  1800000 0>;
 84	};
 85};
 86
 87&avb {
 88	pinctrl-0 = <&avb_pins>;
 89	pinctrl-names = "default";
 90
 91	phy-handle = <&phy3>;
 92	phy-mode = "gmii";
 93	renesas,no-ether-link;
 94	status = "okay";
 95
 96	phy3: ethernet-phy@3 {
 97	/*
 98	 * On some older versions of the platform (before R4.0) the phy address
 99	 * may be 1 or 3. The address is fixed to 3 for R4.0 onwards.
100	 */
101		reg = <3>;
102		micrel,led-mode = <1>;
103	};
104};
105
106&can0 {
107	pinctrl-0 = <&can0_pins>;
108	pinctrl-names = "default";
109
110	status = "okay";
111};
112
113&hscif1 {
114	pinctrl-0 = <&hscif1_pins>;
115	pinctrl-names = "default";
116
117	uart-has-rtscts;
118	status = "okay";
119};
120
121&hsusb {
122	status = "okay";
123	pinctrl-0 = <&usb0_pins>;
124	pinctrl-names = "default";
125};
126
127&i2c5 {
128	pinctrl-0 = <&i2c5_pins>;
129	pinctrl-names = "default";
130
131	status = "okay";
132	clock-frequency = <400000>;
133
134	sgtl5000: codec@a {
135		compatible = "fsl,sgtl5000";
136		#sound-dai-cells = <0>;
137		reg = <0x0a>;
138		clocks = <&audio_clock>;
139		VDDA-supply = <&reg_3p3v>;
140		VDDIO-supply = <&reg_3p3v>;
141	};
142};
143
144&pci1 {
145	status = "okay";
146	pinctrl-0 = <&usb1_pins>;
147	pinctrl-names = "default";
148};
149
150&pfc {
151	avb_pins: avb {
152		groups = "avb_mdio", "avb_gmii";
153		function = "avb";
154	};
155
156	can0_pins: can0 {
157		groups = "can0_data";
158		function = "can0";
159	};
160
161	hscif1_pins: hscif1 {
162		groups = "hscif1_data", "hscif1_ctrl";
163		function = "hscif1";
164	};
165
166	i2c5_pins: i2c5 {
167		groups = "i2c5_b";
168		function = "i2c5";
169	};
170
171	scif4_pins: scif4 {
172		groups = "scif4_data_b";
173		function = "scif4";
174	};
175
176	sdhi0_pins: sd0 {
177		groups = "sdhi0_data4", "sdhi0_ctrl";
178		function = "sdhi0";
179		power-source = <3300>;
180	};
181
182	sound_pins: sound {
183		groups = "ssi34_ctrl", "ssi3_data", "ssi4_data";
184		function = "ssi";
185	};
186
187	usb0_pins: usb0 {
188		groups = "usb0";
189		function = "usb0";
190	};
191
192	usb1_pins: usb1 {
193		groups = "usb1";
194		function = "usb1";
195	};
196};
197
198&rcar_sound {
199	pinctrl-0 = <&sound_pins>;
200	pinctrl-names = "default";
201	status = "okay";
202
203	/* Single DAI */
204
205	#sound-dai-cells = <0>;
206
207	rcar_sound,dai {
208		dai0 {
209			playback = <&ssi3 &src3 &dvc0>;
210			capture = <&ssi4 &src4 &dvc1>;
211		};
212	};
213};
214
215&scif4 {
216	pinctrl-0 = <&scif4_pins>;
217	pinctrl-names = "default";
218
219	status = "okay";
220};
221
222&sdhi0 {
223	pinctrl-0 = <&sdhi0_pins>;
224	pinctrl-names = "default";
225
226	vmmc-supply = <&reg_3p3v>;
227	vqmmc-supply = <&vccq_sdhi0>;
228	cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
229	status = "okay";
230};
231
232&ssi4 {
233	shared-pin;
234};
235
236&usbphy {
237	status = "okay";
238};
v5.4
  1// SPDX-License-Identifier: GPL-2.0
  2/*
  3 * Device Tree Source for the iWave-RZG1E SODIMM carrier board
  4 *
  5 * Copyright (C) 2017 Renesas Electronics Corp.
 
 
 
 
  6 */
  7
  8/*
  9 * SSI-SGTL5000
 10 *
 11 * This command is required when Playback/Capture
 12 *
 13 *      amixer set "DVC Out" 100%
 14 *      amixer set "DVC In" 100%
 15 *
 16 * You can use Mute
 17 *
 18 *      amixer set "DVC Out Mute" on
 19 *      amixer set "DVC In Mute" on
 20 *
 21 * You can use Volume Ramp
 22 *
 23 *      amixer set "DVC Out Ramp Up Rate"   "0.125 dB/64 steps"
 24 *      amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
 25 *      amixer set "DVC Out Ramp" on
 26 *      aplay xxx.wav &
 27 *      amixer set "DVC Out"  80%  // Volume Down
 28 *      amixer set "DVC Out" 100%  // Volume Up
 29 */
 30
 31/dts-v1/;
 32#include "r8a7745-iwg22m.dtsi"
 33
 34/ {
 35	model = "iWave Systems RainboW-G22D-SODIMM board based on RZ/G1E";
 36	compatible = "iwave,g22d", "iwave,g22m", "renesas,r8a7745";
 37
 38	aliases {
 39		ethernet0 = &avb;
 40		serial3 = &scif4;
 41		serial5 = &hscif1;
 42	};
 43
 44	chosen {
 45		bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
 46		stdout-path = "serial3:115200n8";
 47	};
 48
 49	audio_clock: audio_clock {
 50		compatible = "fixed-clock";
 51		#clock-cells = <0>;
 52		clock-frequency = <26000000>;
 53	};
 54
 55	rsnd_sgtl5000: sound {
 56		compatible = "simple-audio-card";
 57		simple-audio-card,format = "i2s";
 58		simple-audio-card,bitclock-master = <&sndcodec>;
 59		simple-audio-card,frame-master = <&sndcodec>;
 60
 61		sndcpu: simple-audio-card,cpu {
 62			sound-dai = <&rcar_sound>;
 63		};
 64
 65		sndcodec: simple-audio-card,codec {
 66			sound-dai = <&sgtl5000>;
 67		};
 68	};
 69
 70	vccq_sdhi0: regulator-vccq-sdhi0 {
 71		compatible = "regulator-gpio";
 72
 73		regulator-name = "SDHI0 VccQ";
 74		regulator-min-microvolt = <1800000>;
 75		regulator-max-microvolt = <3300000>;
 76
 77		gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
 78		gpios-states = <1>;
 79		states = <3300000 1
 80			  1800000 0>;
 81	};
 82};
 83
 84&avb {
 85	pinctrl-0 = <&avb_pins>;
 86	pinctrl-names = "default";
 87
 88	phy-handle = <&phy3>;
 89	phy-mode = "gmii";
 90	renesas,no-ether-link;
 91	status = "okay";
 92
 93	phy3: ethernet-phy@3 {
 94	/*
 95	 * On some older versions of the platform (before R4.0) the phy address
 96	 * may be 1 or 3. The address is fixed to 3 for R4.0 onwards.
 97	 */
 98		reg = <3>;
 99		micrel,led-mode = <1>;
100	};
101};
102
103&can0 {
104	pinctrl-0 = <&can0_pins>;
105	pinctrl-names = "default";
106
107	status = "okay";
108};
109
110&hscif1 {
111	pinctrl-0 = <&hscif1_pins>;
112	pinctrl-names = "default";
113
114	uart-has-rtscts;
115	status = "okay";
116};
117
118&hsusb {
119	status = "okay";
120	pinctrl-0 = <&usb0_pins>;
121	pinctrl-names = "default";
122};
123
124&i2c5 {
125	pinctrl-0 = <&i2c5_pins>;
126	pinctrl-names = "default";
127
128	status = "okay";
129	clock-frequency = <400000>;
130
131	sgtl5000: codec@a {
132		compatible = "fsl,sgtl5000";
133		#sound-dai-cells = <0>;
134		reg = <0x0a>;
135		clocks = <&audio_clock>;
136		VDDA-supply = <&reg_3p3v>;
137		VDDIO-supply = <&reg_3p3v>;
138	};
139};
140
141&pci1 {
142	status = "okay";
143	pinctrl-0 = <&usb1_pins>;
144	pinctrl-names = "default";
145};
146
147&pfc {
148	avb_pins: avb {
149		groups = "avb_mdio", "avb_gmii";
150		function = "avb";
151	};
152
153	can0_pins: can0 {
154		groups = "can0_data";
155		function = "can0";
156	};
157
158	hscif1_pins: hscif1 {
159		groups = "hscif1_data", "hscif1_ctrl";
160		function = "hscif1";
161	};
162
163	i2c5_pins: i2c5 {
164		groups = "i2c5_b";
165		function = "i2c5";
166	};
167
168	scif4_pins: scif4 {
169		groups = "scif4_data_b";
170		function = "scif4";
171	};
172
173	sdhi0_pins: sd0 {
174		groups = "sdhi0_data4", "sdhi0_ctrl";
175		function = "sdhi0";
176		power-source = <3300>;
177	};
178
179	sound_pins: sound {
180		groups = "ssi34_ctrl", "ssi3_data", "ssi4_data";
181		function = "ssi";
182	};
183
184	usb0_pins: usb0 {
185		groups = "usb0";
186		function = "usb0";
187	};
188
189	usb1_pins: usb1 {
190		groups = "usb1";
191		function = "usb1";
192	};
193};
194
195&rcar_sound {
196	pinctrl-0 = <&sound_pins>;
197	pinctrl-names = "default";
198	status = "okay";
199
200	/* Single DAI */
201
202	#sound-dai-cells = <0>;
203
204	rcar_sound,dai {
205		dai0 {
206			playback = <&ssi3 &src3 &dvc0>;
207			capture = <&ssi4 &src4 &dvc1>;
208		};
209	};
210};
211
212&scif4 {
213	pinctrl-0 = <&scif4_pins>;
214	pinctrl-names = "default";
215
216	status = "okay";
217};
218
219&sdhi0 {
220	pinctrl-0 = <&sdhi0_pins>;
221	pinctrl-names = "default";
222
223	vmmc-supply = <&reg_3p3v>;
224	vqmmc-supply = <&vccq_sdhi0>;
225	cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
226	status = "okay";
227};
228
229&ssi4 {
230	shared-pin;
231};
232
233&usbphy {
234	status = "okay";
235};