Linux Audio

Check our new training course

Loading...
v6.2
  1// SPDX-License-Identifier: GPL-2.0-or-later
  2/*
  3 * Copyright 2013 Eukréa Electromatique <eric@eukrea.com>
  4 * Copyright 2013 Eukréa Electromatique <denis@eukrea.com>
 
 
 
 
 
 
 
 
 
  5 */
  6
  7#include <dt-bindings/input/input.h>
  8#include <dt-bindings/gpio/gpio.h>
  9#include "imx28.dtsi"
 10
 11/ {
 12	model = "Eukrea Electromatique MBMX28LC";
 13	compatible = "eukrea,mbmx28lc", "fsl,imx28";
 14
 15	backlight {
 16		compatible = "pwm-backlight";
 17		pwms = <&pwm 4 1000000>;
 18		brightness-levels = <0 25 50 75 100 125 150 175 200 225 255>;
 19		default-brightness-level = <10>;
 20	};
 21
 22	gpio-keys-0 {
 23		compatible = "gpio-keys";
 24		pinctrl-names = "default";
 25		pinctrl-0 = <&gpio_button_sw3_pins_mbmx28lc>;
 26
 27		switch-sw3 {
 28			label = "SW3";
 29			gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
 30			linux,code = <BTN_MISC>;
 31			wakeup-source;
 32		};
 33	};
 34
 35	gpio-keys-1 {
 36		compatible = "gpio-keys";
 37		pinctrl-names = "default";
 38		pinctrl-0 = <&gpio_button_sw4_pins_mbmx28lc>;
 39
 40		switch-sw4 {
 41			label = "SW4";
 42			gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
 43			linux,code = <BTN_MISC>;
 44			wakeup-source;
 45		};
 46	};
 47
 48	led-d6 {
 49		compatible = "gpio-leds";
 50		pinctrl-names = "default";
 51		pinctrl-0 = <&led_d6_pins_mbmx28lc>;
 52
 53		led1 {
 54			label = "d6";
 55			gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
 56			linux,default-trigger = "heartbeat";
 57		};
 58	};
 59
 60	led-d7 {
 61		compatible = "gpio-leds";
 62		pinctrl-names = "default";
 63		pinctrl-0 = <&led_d7_pins_mbmx28lc>;
 64
 65		led1 {
 66			label = "d7";
 67			gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
 68			linux,default-trigger = "default-on";
 69		};
 70	};
 71
 72	regulators {
 73		compatible = "simple-bus";
 74		#address-cells = <1>;
 75		#size-cells = <0>;
 76
 77		reg_3p3v: regulator@0 {
 78			compatible = "regulator-fixed";
 79			reg = <0>;
 80			regulator-name = "3P3V";
 81			regulator-min-microvolt = <3300000>;
 82			regulator-max-microvolt = <3300000>;
 83			regulator-always-on;
 84		};
 85
 86		reg_lcd_3v3: regulator@1 {
 87			compatible = "regulator-fixed";
 88			reg = <1>;
 89			pinctrl-names = "default";
 90			pinctrl-0 = <&reg_lcd_3v3_pins_mbmx28lc>;
 91			regulator-name = "lcd-3v3";
 92			regulator-min-microvolt = <3300000>;
 93			regulator-max-microvolt = <3300000>;
 94			gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;
 95			enable-active-high;
 96		};
 97
 98		reg_usb0_vbus: regulator@2 {
 99			compatible = "regulator-fixed";
100			reg = <2>;
101			pinctrl-names = "default";
102			pinctrl-0 = <&reg_usb0_vbus_pins_mbmx28lc>;
103			regulator-name = "usb0_vbus";
104			regulator-min-microvolt = <5000000>;
105			regulator-max-microvolt = <5000000>;
106			gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
107			enable-active-high;
108		};
109
110		reg_usb1_vbus: regulator@3 {
111			compatible = "regulator-fixed";
112			reg = <3>;
113			pinctrl-names = "default";
114			pinctrl-0 = <&reg_usb1_vbus_pins_mbmx28lc>;
115			regulator-name = "usb1_vbus";
116			regulator-min-microvolt = <5000000>;
117			regulator-max-microvolt = <5000000>;
118			gpio = <&gpio1 19 GPIO_ACTIVE_HIGH>;
119			enable-active-high;
120		};
121	};
122
123	sound {
124		compatible = "fsl,imx28-mbmx28lc-sgtl5000",
125			     "fsl,mxs-audio-sgtl5000";
126		model = "imx28-mbmx28lc-sgtl5000";
127		saif-controllers = <&saif0 &saif1>;
128		audio-codec = <&sgtl5000>;
129	};
130};
131
132&duart {
133	pinctrl-names = "default";
134	pinctrl-0 = <&duart_4pins_a>;
135	status = "okay";
136};
137
138&i2c0 {
139	pinctrl-names = "default";
140	pinctrl-0 = <&i2c0_pins_a>;
141	status = "okay";
142
143	sgtl5000: codec@a {
144		compatible = "fsl,sgtl5000";
145		reg = <0x0a>;
146		#sound-dai-cells = <0>;
147		VDDA-supply = <&reg_3p3v>;
148		VDDIO-supply = <&reg_3p3v>;
149		clocks = <&saif0>;
150	};
151};
152
153&lcdif {
154	pinctrl-names = "default";
155	pinctrl-0 = <&lcdif_18bit_pins_a &lcdif_pins_mbmx28lc>;
156	lcd-supply = <&reg_lcd_3v3>;
157	display = <&display0>;
158	status = "okay";
159
160	display0: display0 {
161		model = "43WVF1G-0";
162		bits-per-pixel = <16>;
163		bus-width = <18>;
164
165		display-timings {
166			native-mode = <&timing0>;
167			timing0: timing0 {
168				clock-frequency = <9072000>;
169				hactive = <480>;
170				vactive = <272>;
171				hback-porch = <10>;
172				hfront-porch = <5>;
173				vback-porch = <8>;
174				vfront-porch = <8>;
175				hsync-len = <40>;
176				vsync-len = <10>;
177				hsync-active = <0>;
178				vsync-active = <0>;
179				de-active = <1>;
180				pixelclk-active = <1>;
181			};
182		};
183	};
184};
185
186&lradc {
187	fsl,lradc-touchscreen-wires = <4>;
188	status = "okay";
189};
190
191&pinctrl {
192	gpio_button_sw3_pins_mbmx28lc: gpio-button-sw3-mbmx28lc@0 {
193		reg = <0>;
194		fsl,pinmux-ids = <
195			MX28_PAD_LCD_D21__GPIO_1_21
196		>;
197		fsl,drive-strength = <MXS_DRIVE_4mA>;
198		fsl,voltage = <MXS_VOLTAGE_HIGH>;
199		fsl,pull-up = <MXS_PULL_DISABLE>;
200	};
201
202	gpio_button_sw4_pins_mbmx28lc: gpio-button-sw4-mbmx28lc@0 {
203		reg = <0>;
204		fsl,pinmux-ids = <
205			MX28_PAD_LCD_D20__GPIO_1_20
206		>;
207		fsl,drive-strength = <MXS_DRIVE_4mA>;
208		fsl,voltage = <MXS_VOLTAGE_HIGH>;
209		fsl,pull-up = <MXS_PULL_DISABLE>;
210	};
211
212	lcdif_pins_mbmx28lc: lcdif-mbmx28lc@0 {
213		reg = <0>;
214		fsl,pinmux-ids = <
215			MX28_PAD_LCD_VSYNC__LCD_VSYNC
216			MX28_PAD_LCD_HSYNC__LCD_HSYNC
217			MX28_PAD_LCD_DOTCLK__LCD_DOTCLK
218			MX28_PAD_LCD_ENABLE__LCD_ENABLE
219		>;
220		fsl,drive-strength = <MXS_DRIVE_4mA>;
221		fsl,voltage = <MXS_VOLTAGE_HIGH>;
222		fsl,pull-up = <MXS_PULL_DISABLE>;
223	};
224
225	led_d6_pins_mbmx28lc: led-d6-mbmx28lc@0 {
226		reg = <0>;
227		fsl,pinmux-ids = <
228			MX28_PAD_LCD_D23__GPIO_1_23
229		>;
230		fsl,drive-strength = <MXS_DRIVE_4mA>;
231		fsl,voltage = <MXS_VOLTAGE_HIGH>;
232		fsl,pull-up = <MXS_PULL_DISABLE>;
233	};
234
235	led_d7_pins_mbmx28lc: led-d7-mbmx28lc@0 {
236		reg = <0>;
237		fsl,pinmux-ids = <
238			MX28_PAD_LCD_D22__GPIO_1_22
239		>;
240		fsl,drive-strength = <MXS_DRIVE_4mA>;
241		fsl,voltage = <MXS_VOLTAGE_HIGH>;
242		fsl,pull-up = <MXS_PULL_DISABLE>;
243	};
244
245	reg_lcd_3v3_pins_mbmx28lc: lcd-3v3-mbmx28lc@0 {
246		reg = <0>;
247		fsl,pinmux-ids = <
248			MX28_PAD_LCD_RESET__GPIO_3_30
249		>;
250		fsl,drive-strength = <MXS_DRIVE_4mA>;
251		fsl,voltage = <MXS_VOLTAGE_HIGH>;
252		fsl,pull-up = <MXS_PULL_DISABLE>;
253	};
254
255	reg_usb0_vbus_pins_mbmx28lc: reg-usb0-vbus-mbmx28lc@0 {
256		reg = <0>;
257		fsl,pinmux-ids = <
258			MX28_PAD_LCD_D18__GPIO_1_18
259		>;
260		fsl,drive-strength = <MXS_DRIVE_4mA>;
261		fsl,voltage = <MXS_VOLTAGE_HIGH>;
262		fsl,pull-up = <MXS_PULL_DISABLE>;
263	};
264
265	reg_usb1_vbus_pins_mbmx28lc: reg-usb1-vbus-mbmx28lc@0 {
266		reg = <0>;
267		fsl,pinmux-ids = <
268			MX28_PAD_LCD_D19__GPIO_1_19
269		>;
270		fsl,drive-strength = <MXS_DRIVE_4mA>;
271		fsl,voltage = <MXS_VOLTAGE_HIGH>;
272		fsl,pull-up = <MXS_PULL_DISABLE>;
273	};
274};
275
276&pwm {
277	pinctrl-names = "default";
278	pinctrl-0 = <&pwm4_pins_a>;
279	status = "okay";
280};
281
282&saif0 {
283	pinctrl-names = "default";
284	pinctrl-0 = <&saif0_pins_a>;
285	status = "okay";
286};
287
288&saif1 {
289	pinctrl-names = "default";
290	pinctrl-0 = <&saif1_pins_a>;
291	fsl,saif-master = <&saif0>;
292	status = "okay";
293};
294
295&ssp0 {
296	compatible = "fsl,imx28-mmc";
297	pinctrl-names = "default";
298	pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_cd_cfg &mmc0_sck_cfg>;
299	bus-width = <4>;
300	cd-inverted;
301	status = "okay";
302};
303
304&usb0 {
305	disable-over-current;
306	vbus-supply = <&reg_usb0_vbus>;
307	status = "okay";
308	pinctrl-names = "default";
309	pinctrl-0 = <&usb0_id_pins_b>;
310};
311
312&usb1 {
313	vbus-supply = <&reg_usb1_vbus>;
314	status = "okay";
315};
316
317&usbphy0 {
318	status = "okay";
319};
320
321&usbphy1 {
322	status = "okay";
323};
v4.17
 
  1/*
  2 * Copyright 2013 Eukréa Electromatique <eric@eukrea.com>
  3 * Copyright 2013 Eukréa Electromatique <denis@eukrea.com>
  4 *
  5 * This program is free software; you can redistribute it and/or
  6 * modify it under the terms of the GNU General Public License
  7 * as published by the Free Software Foundation; either version 2
  8 * of the License, or (at your option) any later version.
  9 * This program is distributed in the hope that it will be useful,
 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 12 * GNU General Public License for more details.
 13 */
 14
 15#include <dt-bindings/input/input.h>
 16#include <dt-bindings/gpio/gpio.h>
 17#include "imx28.dtsi"
 18
 19/ {
 20	model = "Eukrea Electromatique MBMX28LC";
 21	compatible = "eukrea,mbmx28lc", "fsl,imx28";
 22
 23	backlight {
 24		compatible = "pwm-backlight";
 25		pwms = <&pwm 4 1000000>;
 26		brightness-levels = <0 25 50 75 100 125 150 175 200 225 255>;
 27		default-brightness-level = <10>;
 28	};
 29
 30	button-sw3 {
 31		compatible = "gpio-keys";
 32		pinctrl-names = "default";
 33		pinctrl-0 = <&gpio_button_sw3_pins_mbmx28lc>;
 34
 35		sw3 {
 36			label = "SW3";
 37			gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
 38			linux,code = <BTN_MISC>;
 39			wakeup-source;
 40		};
 41	};
 42
 43	button-sw4 {
 44		compatible = "gpio-keys";
 45		pinctrl-names = "default";
 46		pinctrl-0 = <&gpio_button_sw4_pins_mbmx28lc>;
 47
 48		sw4 {
 49			label = "SW4";
 50			gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
 51			linux,code = <BTN_MISC>;
 52			wakeup-source;
 53		};
 54	};
 55
 56	led-d6 {
 57		compatible = "gpio-leds";
 58		pinctrl-names = "default";
 59		pinctrl-0 = <&led_d6_pins_mbmx28lc>;
 60
 61		led1 {
 62			label = "d6";
 63			gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
 64			linux,default-trigger = "heartbeat";
 65		};
 66	};
 67
 68	led-d7 {
 69		compatible = "gpio-leds";
 70		pinctrl-names = "default";
 71		pinctrl-0 = <&led_d7_pins_mbmx28lc>;
 72
 73		led1 {
 74			label = "d7";
 75			gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
 76			linux,default-trigger = "default-on";
 77		};
 78	};
 79
 80	regulators {
 81		compatible = "simple-bus";
 82		#address-cells = <1>;
 83		#size-cells = <0>;
 84
 85		reg_3p3v: regulator@0 {
 86			compatible = "regulator-fixed";
 87			reg = <0>;
 88			regulator-name = "3P3V";
 89			regulator-min-microvolt = <3300000>;
 90			regulator-max-microvolt = <3300000>;
 91			regulator-always-on;
 92		};
 93
 94		reg_lcd_3v3: regulator@1 {
 95			compatible = "regulator-fixed";
 96			reg = <1>;
 97			pinctrl-names = "default";
 98			pinctrl-0 = <&reg_lcd_3v3_pins_mbmx28lc>;
 99			regulator-name = "lcd-3v3";
100			regulator-min-microvolt = <3300000>;
101			regulator-max-microvolt = <3300000>;
102			gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;
103			enable-active-high;
104		};
105
106		reg_usb0_vbus: regulator@2 {
107			compatible = "regulator-fixed";
108			reg = <2>;
109			pinctrl-names = "default";
110			pinctrl-0 = <&reg_usb0_vbus_pins_mbmx28lc>;
111			regulator-name = "usb0_vbus";
112			regulator-min-microvolt = <5000000>;
113			regulator-max-microvolt = <5000000>;
114			gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
115			enable-active-high;
116		};
117
118		reg_usb1_vbus: regulator@3 {
119			compatible = "regulator-fixed";
120			reg = <3>;
121			pinctrl-names = "default";
122			pinctrl-0 = <&reg_usb1_vbus_pins_mbmx28lc>;
123			regulator-name = "usb1_vbus";
124			regulator-min-microvolt = <5000000>;
125			regulator-max-microvolt = <5000000>;
126			gpio = <&gpio1 19 GPIO_ACTIVE_HIGH>;
127			enable-active-high;
128		};
129	};
130
131	sound {
132		compatible = "fsl,imx28-mbmx28lc-sgtl5000",
133			     "fsl,mxs-audio-sgtl5000";
134		model = "imx28-mbmx28lc-sgtl5000";
135		saif-controllers = <&saif0 &saif1>;
136		audio-codec = <&sgtl5000>;
137	};
138};
139
140&duart {
141	pinctrl-names = "default";
142	pinctrl-0 = <&duart_4pins_a>;
143	status = "okay";
144};
145
146&i2c0 {
147	pinctrl-names = "default";
148	pinctrl-0 = <&i2c0_pins_a>;
149	status = "okay";
150
151	sgtl5000: codec@a {
152		compatible = "fsl,sgtl5000";
153		reg = <0x0a>;
154		#sound-dai-cells = <0>;
155		VDDA-supply = <&reg_3p3v>;
156		VDDIO-supply = <&reg_3p3v>;
157		clocks = <&saif0>;
158	};
159};
160
161&lcdif {
162	pinctrl-names = "default";
163	pinctrl-0 = <&lcdif_18bit_pins_a &lcdif_pins_mbmx28lc>;
164	lcd-supply = <&reg_lcd_3v3>;
165	display = <&display0>;
166	status = "okay";
167
168	display0: display0 {
169		model = "43WVF1G-0";
170		bits-per-pixel = <16>;
171		bus-width = <18>;
172
173		display-timings {
174			native-mode = <&timing0>;
175			timing0: timing0 {
176				clock-frequency = <9072000>;
177				hactive = <480>;
178				vactive = <272>;
179				hback-porch = <10>;
180				hfront-porch = <5>;
181				vback-porch = <8>;
182				vfront-porch = <8>;
183				hsync-len = <40>;
184				vsync-len = <10>;
185				hsync-active = <0>;
186				vsync-active = <0>;
187				de-active = <1>;
188				pixelclk-active = <1>;
189			};
190		};
191	};
192};
193
194&lradc {
195	fsl,lradc-touchscreen-wires = <4>;
196	status = "okay";
197};
198
199&pinctrl {
200	gpio_button_sw3_pins_mbmx28lc: gpio-button-sw3-mbmx28lc@0 {
201		reg = <0>;
202		fsl,pinmux-ids = <
203			MX28_PAD_LCD_D21__GPIO_1_21
204		>;
205		fsl,drive-strength = <MXS_DRIVE_4mA>;
206		fsl,voltage = <MXS_VOLTAGE_HIGH>;
207		fsl,pull-up = <MXS_PULL_DISABLE>;
208	};
209
210	gpio_button_sw4_pins_mbmx28lc: gpio-button-sw4-mbmx28lc@0 {
211		reg = <0>;
212		fsl,pinmux-ids = <
213			MX28_PAD_LCD_D20__GPIO_1_20
214		>;
215		fsl,drive-strength = <MXS_DRIVE_4mA>;
216		fsl,voltage = <MXS_VOLTAGE_HIGH>;
217		fsl,pull-up = <MXS_PULL_DISABLE>;
218	};
219
220	lcdif_pins_mbmx28lc: lcdif-mbmx28lc@0 {
221		reg = <0>;
222		fsl,pinmux-ids = <
223			MX28_PAD_LCD_VSYNC__LCD_VSYNC
224			MX28_PAD_LCD_HSYNC__LCD_HSYNC
225			MX28_PAD_LCD_DOTCLK__LCD_DOTCLK
226			MX28_PAD_LCD_ENABLE__LCD_ENABLE
227		>;
228		fsl,drive-strength = <MXS_DRIVE_4mA>;
229		fsl,voltage = <MXS_VOLTAGE_HIGH>;
230		fsl,pull-up = <MXS_PULL_DISABLE>;
231	};
232
233	led_d6_pins_mbmx28lc: led-d6-mbmx28lc@0 {
234		reg = <0>;
235		fsl,pinmux-ids = <
236			MX28_PAD_LCD_D23__GPIO_1_23
237		>;
238		fsl,drive-strength = <MXS_DRIVE_4mA>;
239		fsl,voltage = <MXS_VOLTAGE_HIGH>;
240		fsl,pull-up = <MXS_PULL_DISABLE>;
241	};
242
243	led_d7_pins_mbmx28lc: led-d7-mbmx28lc@0 {
244		reg = <0>;
245		fsl,pinmux-ids = <
246			MX28_PAD_LCD_D22__GPIO_1_22
247		>;
248		fsl,drive-strength = <MXS_DRIVE_4mA>;
249		fsl,voltage = <MXS_VOLTAGE_HIGH>;
250		fsl,pull-up = <MXS_PULL_DISABLE>;
251	};
252
253	reg_lcd_3v3_pins_mbmx28lc: lcd-3v3-mbmx28lc@0 {
254		reg = <0>;
255		fsl,pinmux-ids = <
256			MX28_PAD_LCD_RESET__GPIO_3_30
257		>;
258		fsl,drive-strength = <MXS_DRIVE_4mA>;
259		fsl,voltage = <MXS_VOLTAGE_HIGH>;
260		fsl,pull-up = <MXS_PULL_DISABLE>;
261	};
262
263	reg_usb0_vbus_pins_mbmx28lc: reg-usb0-vbus-mbmx28lc@0 {
264		reg = <0>;
265		fsl,pinmux-ids = <
266			MX28_PAD_LCD_D18__GPIO_1_18
267		>;
268		fsl,drive-strength = <MXS_DRIVE_4mA>;
269		fsl,voltage = <MXS_VOLTAGE_HIGH>;
270		fsl,pull-up = <MXS_PULL_DISABLE>;
271	};
272
273	reg_usb1_vbus_pins_mbmx28lc: reg-usb1-vbus-mbmx28lc@0 {
274		reg = <0>;
275		fsl,pinmux-ids = <
276			MX28_PAD_LCD_D19__GPIO_1_19
277		>;
278		fsl,drive-strength = <MXS_DRIVE_4mA>;
279		fsl,voltage = <MXS_VOLTAGE_HIGH>;
280		fsl,pull-up = <MXS_PULL_DISABLE>;
281	};
282};
283
284&pwm {
285	pinctrl-names = "default";
286	pinctrl-0 = <&pwm4_pins_a>;
287	status = "okay";
288};
289
290&saif0 {
291	pinctrl-names = "default";
292	pinctrl-0 = <&saif0_pins_a>;
293	status = "okay";
294};
295
296&saif1 {
297	pinctrl-names = "default";
298	pinctrl-0 = <&saif1_pins_a>;
299	fsl,saif-master = <&saif0>;
300	status = "okay";
301};
302
303&ssp0 {
304	compatible = "fsl,imx28-mmc";
305	pinctrl-names = "default";
306	pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_cd_cfg &mmc0_sck_cfg>;
307	bus-width = <4>;
308	cd-inverted;
309	status = "okay";
310};
311
312&usb0 {
313	disable-over-current;
314	vbus-supply = <&reg_usb0_vbus>;
315	status = "okay";
316	pinctrl-names = "default";
317	pinctrl-0 = <&usb0_id_pins_b>;
318};
319
320&usb1 {
321	vbus-supply = <&reg_usb1_vbus>;
322	status = "okay";
323};
324
325&usbphy0 {
326	status = "okay";
327};
328
329&usbphy1 {
330	status = "okay";
331};