Linux Audio

Check our new training course

Loading...
v6.2
  1// SPDX-License-Identifier: GPL-2.0
  2/*
  3 * Device Tree Source for the iWave-RZ/G1M/G1N Qseven 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/ {
 32	aliases {
 33		serial0 = &scif0;
 34		serial3 = &scifb1;
 35		ethernet0 = &avb;
 36	};
 37
 38	chosen {
 39		bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
 40		stdout-path = "serial0:115200n8";
 41	};
 42
 43	audio_clock: audio_clock {
 44		compatible = "fixed-clock";
 45		#clock-cells = <0>;
 46		clock-frequency = <26000000>;
 47	};
 48
 49	lcd_backlight: backlight {
 50		compatible = "pwm-backlight";
 51
 52		pwms = <&pwm3 0 5000000 0>;
 53		brightness-levels = <0 4 8 16 32 64 128 255>;
 54		default-brightness-level = <7>;
 55		enable-gpios = <&gpio5 14 GPIO_ACTIVE_HIGH>;
 56	};
 57
 58	lvds-receiver {
 59		compatible = "ti,ds90cf384a", "lvds-decoder";
 60		power-supply = <&vcc_3v3_tft1>;
 61
 62		ports {
 63			#address-cells = <1>;
 64			#size-cells = <0>;
 65
 66			port@0 {
 67				reg = <0>;
 68				lvds_receiver_in: endpoint {
 69					remote-endpoint = <&lvds0_out>;
 70				};
 71			};
 72			port@1 {
 73				reg = <1>;
 74				lvds_receiver_out: endpoint {
 75					remote-endpoint = <&panel_in>;
 76				};
 77			};
 78		};
 79	};
 80
 81	panel {
 82		compatible = "edt,etm0700g0dh6";
 83		backlight = <&lcd_backlight>;
 84		power-supply = <&vcc_3v3_tft1>;
 85
 86		port {
 87			panel_in: endpoint {
 88				remote-endpoint = <&lvds_receiver_out>;
 89			};
 90		};
 91	};
 92
 93	reg_1p5v: 1p5v {
 94		compatible = "regulator-fixed";
 95		regulator-name = "1P5V";
 96		regulator-min-microvolt = <1500000>;
 97		regulator-max-microvolt = <1500000>;
 98		regulator-always-on;
 99	};
100
101	rsnd_sgtl5000: sound {
102		compatible = "simple-audio-card";
103
104		simple-audio-card,format = "i2s";
105		simple-audio-card,bitclock-master = <&sndcodec>;
106		simple-audio-card,frame-master = <&sndcodec>;
107
108		sndcpu: simple-audio-card,cpu {
109			sound-dai = <&rcar_sound>;
110		};
111
112		sndcodec: simple-audio-card,codec {
113			sound-dai = <&sgtl5000>;
114		};
115	};
116
117	vcc_3v3_tft1: regulator-panel {
118		compatible = "regulator-fixed";
119
120		regulator-name = "vcc-3v3-tft1";
121		regulator-min-microvolt = <3300000>;
122		regulator-max-microvolt = <3300000>;
123		enable-active-high;
124		startup-delay-us = <500>;
125		gpio = <&gpio7 25 GPIO_ACTIVE_HIGH>;
126	};
127
128	vcc_sdhi1: regulator-vcc-sdhi1 {
129		compatible = "regulator-fixed";
130
131		regulator-name = "SDHI1 Vcc";
132		regulator-min-microvolt = <3300000>;
133		regulator-max-microvolt = <3300000>;
134
135		gpio = <&gpio1 16 GPIO_ACTIVE_LOW>;
136	};
137
138	vccq_sdhi1: regulator-vccq-sdhi1 {
139		compatible = "regulator-gpio";
140
141		regulator-name = "SDHI1 VccQ";
142		regulator-min-microvolt = <1800000>;
143		regulator-max-microvolt = <3300000>;
144
145		gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>;
146		gpios-states = <1>;
147		states = <3300000 1>, <1800000 0>;
 
148	};
149};
150
151&avb {
152	pinctrl-0 = <&avb_pins>;
153	pinctrl-names = "default";
154
155	phy-handle = <&phy3>;
156	phy-mode = "gmii";
157	renesas,no-ether-link;
158	status = "okay";
159
160	phy3: ethernet-phy@3 {
161		compatible = "ethernet-phy-id0022.1622",
162			     "ethernet-phy-ieee802.3-c22";
163		reg = <3>;
164		micrel,led-mode = <1>;
165	};
166};
167
168&can0 {
169	pinctrl-0 = <&can0_pins>;
170	pinctrl-names = "default";
171
172	status = "okay";
173};
174
175&cmt0 {
176	status = "okay";
177};
178
179&du {
180	status = "okay";
181};
182
183&gpio2 {
184	touch-interrupt-hog {
185		gpio-hog;
186		gpios = <12 GPIO_ACTIVE_LOW>;
187		input;
188	};
189};
190
191&hsusb {
192	status = "okay";
193	pinctrl-0 = <&usb0_pins>;
194	pinctrl-names = "default";
195};
196
197&i2c2 {
198	pinctrl-0 = <&i2c2_pins>;
199	pinctrl-names = "default";
200
201	status = "okay";
202	clock-frequency = <400000>;
203
204	rtc@68 {
205		compatible = "ti,bq32000";
206		reg = <0x68>;
207	};
208
209	sgtl5000: codec@a {
210		compatible = "fsl,sgtl5000";
211		#sound-dai-cells = <0>;
212		reg = <0x0a>;
213		clocks = <&audio_clock>;
214		VDDA-supply = <&reg_3p3v>;
215		VDDIO-supply = <&reg_3p3v>;
216		VDDD-supply = <&reg_1p5v>;
217	};
218
219	touch: touchpanel@38 {
220		compatible = "edt,edt-ft5406";
221		reg = <0x38>;
222		interrupt-parent = <&gpio2>;
223		interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
224		vcc-supply = <&vcc_3v3_tft1>;
225	};
226};
227
228&lvds0 {
229	status = "okay";
230
231	ports {
232		port@1 {
233			lvds0_out: endpoint {
234				remote-endpoint = <&lvds_receiver_in>;
235			};
236		};
237	};
238};
239
240&pci0 {
241	pinctrl-0 = <&usb0_pins>;
242	pinctrl-names = "default";
243};
244
245&pci1 {
246	status = "okay";
247	pinctrl-0 = <&usb1_pins>;
248	pinctrl-names = "default";
249};
250
251&pcie_bus_clk {
252	clock-frequency = <100000000>;
253};
254
 
 
 
 
255&pfc {
256	can0_pins: can0 {
257		groups = "can0_data_d";
258		function = "can0";
259	};
260
261	avb_pins: avb {
262		groups = "avb_mdio", "avb_gmii";
263		function = "avb";
264	};
265
266	i2c2_pins: i2c2 {
267		groups = "i2c2";
268		function = "i2c2";
269	};
270
271	pwm3_pins: pwm3 {
272		groups = "pwm3";
273		function = "pwm3";
274	};
275
276	scif0_pins: scif0 {
277		groups = "scif0_data_d";
278		function = "scif0";
279	};
280
281	scifb1_pins: scifb1 {
282		groups = "scifb1_data_d", "scifb1_ctrl";
283		function = "scifb1";
284	};
285
286	sdhi1_pins: sd1 {
287		groups = "sdhi1_data4", "sdhi1_ctrl";
288		function = "sdhi1";
289		power-source = <3300>;
290	};
291
292	sdhi1_pins_uhs: sd1_uhs {
293		groups = "sdhi1_data4", "sdhi1_ctrl";
294		function = "sdhi1";
295		power-source = <1800>;
296	};
297
298	sound_pins: sound {
299		groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
300		function = "ssi";
301	};
302
303	usb0_pins: usb0 {
304		groups = "usb0";
305		function = "usb0";
306	};
307
308	usb1_pins: usb1 {
309		groups = "usb1";
310		function = "usb1";
311	};
312};
313
314&pwm3 {
315	pinctrl-0 = <&pwm3_pins>;
316	pinctrl-names = "default";
317	status = "okay";
318};
319
320&rcar_sound {
321	pinctrl-0 = <&sound_pins>;
322	pinctrl-names = "default";
323	status = "okay";
324
325	/* Single DAI */
326	#sound-dai-cells = <0>;
327
328	rcar_sound,dai {
329		dai0 {
330			playback = <&ssi1>, <&src3>, <&dvc1>;
331			capture = <&ssi0>, <&src2>, <&dvc0>;
332		};
333	};
334};
335
336&rwdt {
337	timeout-sec = <60>;
338	status = "okay";
339};
340
341&scif0 {
342	pinctrl-0 = <&scif0_pins>;
343	pinctrl-names = "default";
344
345	status = "okay";
346};
347
348&scifb1 {
349	pinctrl-0 = <&scifb1_pins>;
350	pinctrl-names = "default";
351
352	uart-has-rtscts;
353	status = "okay";
354};
355
356&sdhi1 {
357	pinctrl-0 = <&sdhi1_pins>;
358	pinctrl-1 = <&sdhi1_pins_uhs>;
359	pinctrl-names = "default", "state_uhs";
360
361	vmmc-supply = <&vcc_sdhi1>;
362	vqmmc-supply = <&vccq_sdhi1>;
363	cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
364	wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
365	sd-uhs-sdr50;
366	status = "okay";
367};
368
369&ssi1 {
370	shared-pin;
371};
372
373&usbphy {
374	status = "okay";
375};
v4.17
 
  1/*
  2 * Device Tree Source for the iWave-RZ/G1M/G1N Qseven 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/ {
 35	aliases {
 36		serial0 = &scif0;
 37		serial3 = &scifb1;
 38		ethernet0 = &avb;
 39	};
 40
 41	chosen {
 42		bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
 43		stdout-path = "serial0:115200n8";
 44	};
 45
 46	audio_clock: audio_clock {
 47		compatible = "fixed-clock";
 48		#clock-cells = <0>;
 49		clock-frequency = <26000000>;
 50	};
 51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 52	reg_1p5v: 1p5v {
 53		compatible = "regulator-fixed";
 54		regulator-name = "1P5V";
 55		regulator-min-microvolt = <1500000>;
 56		regulator-max-microvolt = <1500000>;
 57		regulator-always-on;
 58	};
 59
 60	rsnd_sgtl5000: sound {
 61		compatible = "simple-audio-card";
 62
 63		simple-audio-card,format = "i2s";
 64		simple-audio-card,bitclock-master = <&sndcodec>;
 65		simple-audio-card,frame-master = <&sndcodec>;
 66
 67		sndcpu: simple-audio-card,cpu {
 68			sound-dai = <&rcar_sound>;
 69		};
 70
 71		sndcodec: simple-audio-card,codec {
 72			sound-dai = <&sgtl5000>;
 73		};
 74	};
 75
 
 
 
 
 
 
 
 
 
 
 
 76	vcc_sdhi1: regulator-vcc-sdhi1 {
 77		compatible = "regulator-fixed";
 78
 79		regulator-name = "SDHI1 Vcc";
 80		regulator-min-microvolt = <3300000>;
 81		regulator-max-microvolt = <3300000>;
 82
 83		gpio = <&gpio1 16 GPIO_ACTIVE_LOW>;
 84	};
 85
 86	vccq_sdhi1: regulator-vccq-sdhi1 {
 87		compatible = "regulator-gpio";
 88
 89		regulator-name = "SDHI1 VccQ";
 90		regulator-min-microvolt = <1800000>;
 91		regulator-max-microvolt = <3300000>;
 92
 93		gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;
 94		gpios-states = <1>;
 95		states = <3300000 1
 96			  1800000 0>;
 97	};
 98};
 99
100&avb {
101	pinctrl-0 = <&avb_pins>;
102	pinctrl-names = "default";
103
104	phy-handle = <&phy3>;
105	phy-mode = "gmii";
106	renesas,no-ether-link;
107	status = "okay";
108
109	phy3: ethernet-phy@3 {
 
 
110		reg = <3>;
111		micrel,led-mode = <1>;
112	};
113};
114
115&can0 {
116	pinctrl-0 = <&can0_pins>;
117	pinctrl-names = "default";
118
119	status = "okay";
120};
121
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122&hsusb {
123	status = "okay";
124	pinctrl-0 = <&usb0_pins>;
125	pinctrl-names = "default";
126};
127
128&i2c2 {
129	pinctrl-0 = <&i2c2_pins>;
130	pinctrl-names = "default";
131
132	status = "okay";
133	clock-frequency = <400000>;
134
135	rtc@68 {
136		compatible = "ti,bq32000";
137		reg = <0x68>;
138	};
139
140	sgtl5000: codec@a {
141		compatible = "fsl,sgtl5000";
142		#sound-dai-cells = <0>;
143		reg = <0x0a>;
144		clocks = <&audio_clock>;
145		VDDA-supply = <&reg_3p3v>;
146		VDDIO-supply = <&reg_3p3v>;
147		VDDD-supply = <&reg_1p5v>;
148	};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149};
150
151&pci0 {
152	pinctrl-0 = <&usb0_pins>;
153	pinctrl-names = "default";
154};
155
156&pci1 {
157	status = "okay";
158	pinctrl-0 = <&usb1_pins>;
159	pinctrl-names = "default";
160};
161
162&pcie_bus_clk {
163	clock-frequency = <100000000>;
164};
165
166&pciec {
167	status = "okay";
168};
169
170&pfc {
171	can0_pins: can0 {
172		groups = "can0_data_d";
173		function = "can0";
174	};
175
176	avb_pins: avb {
177		groups = "avb_mdio", "avb_gmii";
178		function = "avb";
179	};
180
181	i2c2_pins: i2c2 {
182		groups = "i2c2";
183		function = "i2c2";
184	};
185
 
 
 
 
 
186	scif0_pins: scif0 {
187		groups = "scif0_data_d";
188		function = "scif0";
189	};
190
191	scifb1_pins: scifb1 {
192		groups = "scifb1_data_d", "scifb1_ctrl";
193		function = "scifb1";
194	};
195
196	sdhi1_pins: sd1 {
197		groups = "sdhi1_data4", "sdhi1_ctrl";
198		function = "sdhi1";
199		power-source = <3300>;
200	};
201
202	sdhi1_pins_uhs: sd1_uhs {
203		groups = "sdhi1_data4", "sdhi1_ctrl";
204		function = "sdhi1";
205		power-source = <1800>;
206	};
207
208	sound_pins: sound {
209		groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
210		function = "ssi";
211	};
212
213	usb0_pins: usb0 {
214		groups = "usb0";
215		function = "usb0";
216	};
217
218	usb1_pins: usb1 {
219		groups = "usb1";
220		function = "usb1";
221	};
222};
223
 
 
 
 
 
 
224&rcar_sound {
225	pinctrl-0 = <&sound_pins>;
226	pinctrl-names = "default";
227	status = "okay";
228
229	/* Single DAI */
230	#sound-dai-cells = <0>;
231
232	rcar_sound,dai {
233		dai0 {
234			playback = <&ssi1 &src3 &dvc1>;
235			capture = <&ssi0 &src2 &dvc0>;
236		};
237	};
 
 
 
 
 
238};
239
240&scif0 {
241	pinctrl-0 = <&scif0_pins>;
242	pinctrl-names = "default";
243
244	status = "okay";
245};
246
247&scifb1 {
248	pinctrl-0 = <&scifb1_pins>;
249	pinctrl-names = "default";
250
251	uart-has-rtscts;
252	status = "okay";
253};
254
255&sdhi1 {
256	pinctrl-0 = <&sdhi1_pins>;
257	pinctrl-1 = <&sdhi1_pins_uhs>;
258	pinctrl-names = "default", "state_uhs";
259
260	vmmc-supply = <&vcc_sdhi1>;
261	vqmmc-supply = <&vccq_sdhi1>;
262	cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
263	wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
264	sd-uhs-sdr50;
265	status = "okay";
266};
267
268&ssi1 {
269	shared-pin;
270};
271
272&usbphy {
273	status = "okay";
274};