1// SPDX-License-Identifier: GPL-2.0
2/dts-v1/;
3#include "imx28.dtsi"
4
5/ {
6	model = "Bluegiga APX4 Development Kit";
7	compatible = "bluegiga,apx4devkit", "fsl,imx28";
8
9	memory@40000000 {
10		device_type = "memory";
11		reg = <0x40000000 0x04000000>;
12	};
13
14	regulators {
15		compatible = "simple-bus";
16		#address-cells = <1>;
17		#size-cells = <0>;
18
19		reg_3p3v: regulator@0 {
20			compatible = "regulator-fixed";
21			reg = <0>;
22			regulator-name = "3P3V";
23			regulator-min-microvolt = <3300000>;
24			regulator-max-microvolt = <3300000>;
25			regulator-always-on;
26		};
27	};
28
29	sound {
30		compatible = "bluegiga,apx4devkit-sgtl5000",
31			     "fsl,mxs-audio-sgtl5000";
32		model = "apx4devkit-sgtl5000";
33		saif-controllers = <&saif0 &saif1>;
34		audio-codec = <&sgtl5000>;
35	};
36
37	leds {
38		compatible = "gpio-leds";
39
40		user {
41			label = "Heartbeat";
42			gpios = <&gpio3 28 0>;
43			linux,default-trigger = "heartbeat";
44		};
45	};
46};
47
48&auart0 {
49	pinctrl-names = "default";
50	pinctrl-0 = <&auart0_pins_a>;
51	status = "okay";
52};
53
54&auart1 {
55	pinctrl-names = "default";
56	pinctrl-0 = <&auart1_2pins_a>;
57	status = "okay";
58};
59
60&auart2 {
61	pinctrl-names = "default";
62	pinctrl-0 = <&auart2_2pins_a>;
63	status = "okay";
64};
65
66&duart {
67	pinctrl-names = "default";
68	pinctrl-0 = <&duart_pins_a>;
69	status = "okay";
70};
71
72&gpmi {
73	pinctrl-names = "default";
74	pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
75	status = "okay";
76};
77
78&lcdif {
79	pinctrl-names = "default";
80	pinctrl-0 = <&lcdif_24bit_pins_a
81		     &lcdif_pins_apx4>;
82	display = <&display0>;
83	status = "okay";
84
85	display0: display0 {
86		bits-per-pixel = <32>;
87		bus-width = <24>;
88
89		display-timings {
90			native-mode = <&timing0>;
91			timing0: timing0 {
92				clock-frequency = <30000000>;
93				hactive = <800>;
94				vactive = <480>;
95				hback-porch = <88>;
96				hfront-porch = <40>;
97				vback-porch = <32>;
98				vfront-porch = <13>;
99				hsync-len = <48>;
100				vsync-len = <3>;
101				hsync-active = <1>;
102				vsync-active = <1>;
103				de-active = <1>;
104				pixelclk-active = <0>;
105			};
106		};
107	};
108};
109
110&i2c0 {
111	pinctrl-names = "default";
112	pinctrl-0 = <&i2c0_pins_a>;
113	status = "okay";
114
115	sgtl5000: codec@a {
116		compatible = "fsl,sgtl5000";
117		reg = <0x0a>;
118		#sound-dai-cells = <0>;
119		VDDA-supply = <&reg_3p3v>;
120		VDDIO-supply = <&reg_3p3v>;
121		clocks = <&saif0>;
122	};
123
124	pcf8563: rtc@51 {
125		compatible = "phg,pcf8563";
126		reg = <0x51>;
127	};
128};
129
130&mac0 {
131	phy-mode = "rmii";
132	pinctrl-names = "default";
133	pinctrl-0 = <&mac0_pins_a>;
134	status = "okay";
135};
136
137&pinctrl {
138	pinctrl-names = "default";
139	pinctrl-0 = <&hog_pins_a>;
140
141	hog_pins_a: hog@0 {
142		reg = <0>;
143		fsl,pinmux-ids = <
144			MX28_PAD_GPMI_CE1N__GPIO_0_17
145			MX28_PAD_GPMI_RDY1__GPIO_0_21
146			MX28_PAD_SSP2_MISO__GPIO_2_18
147			MX28_PAD_SSP2_SS0__AUART3_TX /* was: 0x2131 - MX28_PAD_SSP2_SS0__GPIO_2_19 */
148			MX28_PAD_PWM3__GPIO_3_28
149			MX28_PAD_LCD_RESET__GPIO_3_30
150			MX28_PAD_JTAG_RTCK__GPIO_4_20
151		>;
152		fsl,drive-strength = <MXS_DRIVE_4mA>;
153		fsl,voltage = <MXS_VOLTAGE_HIGH>;
154		fsl,pull-up = <MXS_PULL_DISABLE>;
155	};
156
157	lcdif_pins_apx4: lcdif-apx4@0 {
158		reg = <0>;
159		fsl,pinmux-ids = <
160			MX28_PAD_LCD_RD_E__LCD_VSYNC
161			MX28_PAD_LCD_WR_RWN__LCD_HSYNC
162			MX28_PAD_LCD_RS__LCD_DOTCLK
163			MX28_PAD_LCD_CS__LCD_ENABLE
164		>;
165		fsl,drive-strength = <MXS_DRIVE_4mA>;
166		fsl,voltage = <MXS_VOLTAGE_HIGH>;
167		fsl,pull-up = <MXS_PULL_DISABLE>;
168	};
169
170	mmc2_4bit_pins_apx4: mmc2-4bit-apx4@0 {
171		reg = <0>;
172		fsl,pinmux-ids = <
173			MX28_PAD_SSP0_DATA4__SSP2_D0
174			MX28_PAD_SSP0_DATA5__SSP2_D3
175			MX28_PAD_SSP0_DATA6__SSP2_CMD
176			MX28_PAD_SSP0_DATA7__SSP2_SCK
177			MX28_PAD_SSP2_SS1__SSP2_D1
178			MX28_PAD_SSP2_SS2__SSP2_D2
179		>;
180		fsl,drive-strength = <MXS_DRIVE_8mA>;
181		fsl,voltage = <MXS_VOLTAGE_HIGH>;
182		fsl,pull-up = <MXS_PULL_ENABLE>;
183	};
184
185	mmc2_sck_cfg_apx4: mmc2-sck-cfg-apx4@0 {
186		reg = <0>;
187		fsl,pinmux-ids = <
188			MX28_PAD_SSP0_DATA7__SSP2_SCK
189		>;
190		fsl,drive-strength = <MXS_DRIVE_12mA>;
191		fsl,pull-up = <MXS_PULL_DISABLE>;
192	};
193};
194
195&saif0 {
196	pinctrl-names = "default";
197	pinctrl-0 = <&saif0_pins_a>;
198	status = "okay";
199};
200
201&saif1 {
202	pinctrl-names = "default";
203	pinctrl-0 = <&saif1_pins_a>;
204	fsl,saif-master = <&saif0>;
205	status = "okay";
206};
207
208&ssp0 {
209	compatible = "fsl,imx28-mmc";
210	pinctrl-names = "default";
211	pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_sck_cfg>;
212	bus-width = <4>;
213	status = "okay";
214};
215
216&ssp2 {
217	compatible = "fsl,imx28-mmc";
218	pinctrl-names = "default";
219	pinctrl-0 = <&mmc2_4bit_pins_apx4 &mmc2_sck_cfg_apx4>;
220	bus-width = <4>;
221	status = "okay";
222};
223
224&usb1 {
225      status = "okay";
226};
227
228&usbphy1 {
229	pinctrl-names = "default";
230	pinctrl-0 = <&usb1_pins_a>;
231	status = "okay";
232};
233