1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright 2012 Armadeus Systems - <support@armadeus.com>
4 */
5
6/* APF28Dev is a docking board for the APF28 SOM */
7#include "imx28-apf28.dts"
8
9/ {
10	model = "Armadeus Systems APF28Dev docking/development board";
11	compatible = "armadeus,imx28-apf28dev", "armadeus,imx28-apf28", "fsl,imx28";
12
13	reg_usb0_vbus: regulator-0 {
14		compatible = "regulator-fixed";
15		regulator-name = "usb0_vbus";
16		regulator-min-microvolt = <5000000>;
17		regulator-max-microvolt = <5000000>;
18		gpio = <&gpio1 23 1>;
19		enable-active-high;
20	};
21
22	reg_can0_vcc: regulator-1 {
23		compatible = "regulator-fixed";
24		regulator-name = "can0_vcc";
25		regulator-min-microvolt = <5000000>;
26		regulator-max-microvolt = <5000000>;
27	};
28
29	leds {
30		compatible = "gpio-leds";
31
32		user {
33			label = "Heartbeat";
34			gpios = <&gpio0 21 0>;
35			linux,default-trigger = "heartbeat";
36		};
37	};
38
39	backlight {
40		compatible = "pwm-backlight";
41
42		pwms = <&pwm 3 191000>;
43		brightness-levels = <0 4 8 16 32 64 128 255>;
44		default-brightness-level = <6>;
45	};
46
47	gpio-keys {
48		compatible = "gpio-keys";
49
50		user-button {
51			label = "User button";
52			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
53			linux,code = <0x100>;
54			wakeup-source;
55		};
56	};
57};
58
59&auart0 {
60	pinctrl-names = "default";
61	pinctrl-0 = <&auart0_pins_a>;
62	uart-has-rtscts;
63	status = "okay";
64};
65
66&can0 {
67	pinctrl-names = "default";
68	pinctrl-0 = <&can0_pins_a>;
69	xceiver-supply = <&reg_can0_vcc>;
70	status = "okay";
71};
72
73&i2c0 {
74	pinctrl-names = "default";
75	pinctrl-0 = <&i2c0_pins_a>;
76	status = "okay";
77};
78
79&lcdif {
80	pinctrl-names = "default";
81	pinctrl-0 = <&lcdif_16bit_pins_a
82		     &lcdif_pins_apf28dev>;
83	display = <&display0>;
84	status = "okay";
85
86	display0: display0 {
87		bits-per-pixel = <16>;
88		bus-width = <16>;
89
90		display-timings {
91			native-mode = <&timing0>;
92			timing0: timing0 {
93				clock-frequency = <33000033>;
94				hactive = <800>;
95				vactive = <480>;
96				hback-porch = <96>;
97				hfront-porch = <96>;
98				vback-porch = <20>;
99				vfront-porch = <21>;
100				hsync-len = <64>;
101				vsync-len = <4>;
102				hsync-active = <1>;
103				vsync-active = <1>;
104				de-active = <1>;
105				pixelclk-active = <0>;
106			};
107		};
108	};
109};
110
111&lradc {
112	fsl,lradc-touchscreen-wires = <4>;
113	status = "okay";
114};
115
116&mac1 {
117	phy-mode = "rmii";
118	pinctrl-names = "default";
119	pinctrl-0 = <&mac1_pins_a>;
120	phy-reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
121	status = "okay";
122};
123
124&pinctrl {
125	pinctrl-names = "default";
126	pinctrl-0 = <&hog_pins_apf28dev>;
127
128	hog_pins_apf28dev: hog@0 {
129		reg = <0>;
130		fsl,pinmux-ids = <
131			MX28_PAD_LCD_D16__GPIO_1_16
132			MX28_PAD_LCD_D17__GPIO_1_17
133			MX28_PAD_LCD_D18__GPIO_1_18
134			MX28_PAD_LCD_D19__GPIO_1_19
135			MX28_PAD_LCD_D20__GPIO_1_20
136			MX28_PAD_LCD_D21__GPIO_1_21
137			MX28_PAD_LCD_D22__GPIO_1_22
138			MX28_PAD_GPMI_CE1N__GPIO_0_17
139		>;
140		fsl,drive-strength = <MXS_DRIVE_4mA>;
141		fsl,voltage = <MXS_VOLTAGE_HIGH>;
142		fsl,pull-up = <MXS_PULL_DISABLE>;
143	};
144
145	lcdif_pins_apf28dev: lcdif-apf28dev@0 {
146		reg = <0>;
147		fsl,pinmux-ids = <
148			MX28_PAD_LCD_RD_E__LCD_VSYNC
149			MX28_PAD_LCD_WR_RWN__LCD_HSYNC
150			MX28_PAD_LCD_RS__LCD_DOTCLK
151			MX28_PAD_LCD_CS__LCD_ENABLE
152		>;
153		fsl,drive-strength = <MXS_DRIVE_4mA>;
154		fsl,voltage = <MXS_VOLTAGE_HIGH>;
155		fsl,pull-up = <MXS_PULL_DISABLE>;
156	};
157
158	usb0_otg_apf28dev: otg-apf28dev@0 {
159		reg = <0>;
160		fsl,pinmux-ids = <
161			MX28_PAD_LCD_D23__GPIO_1_23
162		>;
163		fsl,drive-strength = <MXS_DRIVE_4mA>;
164		fsl,voltage = <MXS_VOLTAGE_HIGH>;
165		fsl,pull-up = <MXS_PULL_DISABLE>;
166	};
167};
168
169&pwm {
170	pinctrl-names = "default";
171	pinctrl-0 = <&pwm3_pins_a &pwm4_pins_a>;
172	status = "okay";
173};
174
175&ssp0 {
176	compatible = "fsl,imx28-mmc";
177	pinctrl-names = "default";
178	pinctrl-0 = <&mmc0_4bit_pins_a
179		     &mmc0_cd_cfg &mmc0_sck_cfg>;
180	bus-width = <4>;
181	status = "okay";
182};
183
184&ssp2 {
185	compatible = "fsl,imx28-spi";
186	pinctrl-names = "default";
187	pinctrl-0 = <&spi2_pins_a>;
188	status = "okay";
189};
190
191&usb0 {
192	pinctrl-names = "default";
193	pinctrl-0 = <&usb0_otg_apf28dev
194		     &usb0_id_pins_b>;
195	vbus-supply = <&reg_usb0_vbus>;
196	status = "okay";
197};
198
199&usb1 {
200	status = "okay";
201};
202
203&usbphy0 {
204	status = "okay";
205};
206
207&usbphy1 {
208	status = "okay";
209};
210