• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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@0a {
152		compatible = "fsl,sgtl5000";
153		reg = <0x0a>;
154		VDDA-supply = <&reg_3p3v>;
155		VDDIO-supply = <&reg_3p3v>;
156		clocks = <&saif0>;
157	};
158};
159
160&lcdif {
161	pinctrl-names = "default";
162	pinctrl-0 = <&lcdif_18bit_pins_a &lcdif_pins_mbmx28lc>;
163	lcd-supply = <&reg_lcd_3v3>;
164	display = <&display0>;
165	status = "okay";
166
167	display0: display0 {
168		model = "43WVF1G-0";
169		bits-per-pixel = <16>;
170		bus-width = <18>;
171
172		display-timings {
173			native-mode = <&timing0>;
174			timing0: timing0 {
175				clock-frequency = <9072000>;
176				hactive = <480>;
177				vactive = <272>;
178				hback-porch = <10>;
179				hfront-porch = <5>;
180				vback-porch = <8>;
181				vfront-porch = <8>;
182				hsync-len = <40>;
183				vsync-len = <10>;
184				hsync-active = <0>;
185				vsync-active = <0>;
186				de-active = <1>;
187				pixelclk-active = <1>;
188			};
189		};
190	};
191};
192
193&lradc {
194	fsl,lradc-touchscreen-wires = <4>;
195	status = "okay";
196};
197
198&pinctrl {
199	gpio_button_sw3_pins_mbmx28lc: gpio-button-sw3-mbmx28lc@0 {
200		reg = <0>;
201		fsl,pinmux-ids = <
202			MX28_PAD_LCD_D21__GPIO_1_21
203		>;
204		fsl,drive-strength = <MXS_DRIVE_4mA>;
205		fsl,voltage = <MXS_VOLTAGE_HIGH>;
206		fsl,pull-up = <MXS_PULL_DISABLE>;
207	};
208
209	gpio_button_sw4_pins_mbmx28lc: gpio-button-sw4-mbmx28lc@0 {
210		reg = <0>;
211		fsl,pinmux-ids = <
212			MX28_PAD_LCD_D20__GPIO_1_20
213		>;
214		fsl,drive-strength = <MXS_DRIVE_4mA>;
215		fsl,voltage = <MXS_VOLTAGE_HIGH>;
216		fsl,pull-up = <MXS_PULL_DISABLE>;
217	};
218
219	lcdif_pins_mbmx28lc: lcdif-mbmx28lc@0 {
220		reg = <0>;
221		fsl,pinmux-ids = <
222			MX28_PAD_LCD_VSYNC__LCD_VSYNC
223			MX28_PAD_LCD_HSYNC__LCD_HSYNC
224			MX28_PAD_LCD_DOTCLK__LCD_DOTCLK
225			MX28_PAD_LCD_ENABLE__LCD_ENABLE
226		>;
227		fsl,drive-strength = <MXS_DRIVE_4mA>;
228		fsl,voltage = <MXS_VOLTAGE_HIGH>;
229		fsl,pull-up = <MXS_PULL_DISABLE>;
230	};
231
232	led_d6_pins_mbmx28lc: led-d6-mbmx28lc@0 {
233		reg = <0>;
234		fsl,pinmux-ids = <
235			MX28_PAD_LCD_D23__GPIO_1_23
236		>;
237		fsl,drive-strength = <MXS_DRIVE_4mA>;
238		fsl,voltage = <MXS_VOLTAGE_HIGH>;
239		fsl,pull-up = <MXS_PULL_DISABLE>;
240	};
241
242	led_d7_pins_mbmx28lc: led-d7-mbmx28lc@0 {
243		reg = <0>;
244		fsl,pinmux-ids = <
245			MX28_PAD_LCD_D22__GPIO_1_22
246		>;
247		fsl,drive-strength = <MXS_DRIVE_4mA>;
248		fsl,voltage = <MXS_VOLTAGE_HIGH>;
249		fsl,pull-up = <MXS_PULL_DISABLE>;
250	};
251
252	reg_lcd_3v3_pins_mbmx28lc: lcd-3v3-mbmx28lc@0 {
253		reg = <0>;
254		fsl,pinmux-ids = <
255			MX28_PAD_LCD_RESET__GPIO_3_30
256		>;
257		fsl,drive-strength = <MXS_DRIVE_4mA>;
258		fsl,voltage = <MXS_VOLTAGE_HIGH>;
259		fsl,pull-up = <MXS_PULL_DISABLE>;
260	};
261
262	reg_usb0_vbus_pins_mbmx28lc: reg-usb0-vbus-mbmx28lc@0 {
263		reg = <0>;
264		fsl,pinmux-ids = <
265			MX28_PAD_LCD_D18__GPIO_1_18
266		>;
267		fsl,drive-strength = <MXS_DRIVE_4mA>;
268		fsl,voltage = <MXS_VOLTAGE_HIGH>;
269		fsl,pull-up = <MXS_PULL_DISABLE>;
270	};
271
272	reg_usb1_vbus_pins_mbmx28lc: reg-usb1-vbus-mbmx28lc@0 {
273		reg = <0>;
274		fsl,pinmux-ids = <
275			MX28_PAD_LCD_D19__GPIO_1_19
276		>;
277		fsl,drive-strength = <MXS_DRIVE_4mA>;
278		fsl,voltage = <MXS_VOLTAGE_HIGH>;
279		fsl,pull-up = <MXS_PULL_DISABLE>;
280	};
281};
282
283&pwm {
284	pinctrl-names = "default";
285	pinctrl-0 = <&pwm4_pins_a>;
286	status = "okay";
287};
288
289&saif0 {
290	pinctrl-names = "default";
291	pinctrl-0 = <&saif0_pins_a>;
292	status = "okay";
293};
294
295&saif1 {
296	pinctrl-names = "default";
297	pinctrl-0 = <&saif1_pins_a>;
298	fsl,saif-master = <&saif0>;
299	status = "okay";
300};
301
302&ssp0 {
303	compatible = "fsl,imx28-mmc";
304	pinctrl-names = "default";
305	pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_cd_cfg &mmc0_sck_cfg>;
306	bus-width = <4>;
307	cd-inverted;
308	status = "okay";
309};
310
311&usb0 {
312	disable-over-current;
313	vbus-supply = <&reg_usb0_vbus>;
314	status = "okay";
315	pinctrl-names = "default";
316	pinctrl-0 = <&usb0_id_pins_b>;
317};
318
319&usb1 {
320	vbus-supply = <&reg_usb1_vbus>;
321	status = "okay";
322};
323
324&usbphy0 {
325	status = "okay";
326};
327
328&usbphy1 {
329	status = "okay";
330};
331