xref: /freebsd/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-amarula-rmm.dts (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
1*833e5d42SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2*833e5d42SEmmanuel Vadot/*
3*833e5d42SEmmanuel Vadot * Copyright (C) 2025 Amarula Solutions, Dario Binacchi <dario.binacchi@amarulasolutions.com>
4*833e5d42SEmmanuel Vadot */
5*833e5d42SEmmanuel Vadot
6*833e5d42SEmmanuel Vadot/dts-v1/;
7*833e5d42SEmmanuel Vadot
8*833e5d42SEmmanuel Vadot#include "imx28.dtsi"
9*833e5d42SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
10*833e5d42SEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
11*833e5d42SEmmanuel Vadot
12*833e5d42SEmmanuel Vadot/ {
13*833e5d42SEmmanuel Vadot	compatible = "amarula,imx28-rmm", "fsl,imx28";
14*833e5d42SEmmanuel Vadot	model = "Amarula i.MX28 rmm";
15*833e5d42SEmmanuel Vadot
16*833e5d42SEmmanuel Vadot	memory@40000000 {
17*833e5d42SEmmanuel Vadot		reg = <0x40000000 0x08000000>;
18*833e5d42SEmmanuel Vadot		device_type = "memory";
19*833e5d42SEmmanuel Vadot	};
20*833e5d42SEmmanuel Vadot
21*833e5d42SEmmanuel Vadot	backlight {
22*833e5d42SEmmanuel Vadot		compatible = "pwm-backlight";
23*833e5d42SEmmanuel Vadot		pwms = <&pwm 4 5000000 0>;
24*833e5d42SEmmanuel Vadot		brightness-levels = <0 255>;
25*833e5d42SEmmanuel Vadot		num-interpolated-steps = <255>;
26*833e5d42SEmmanuel Vadot		default-brightness-level = <255>;
27*833e5d42SEmmanuel Vadot		power-supply = <&reg_5v>;
28*833e5d42SEmmanuel Vadot	};
29*833e5d42SEmmanuel Vadot
30*833e5d42SEmmanuel Vadot	beeper {
31*833e5d42SEmmanuel Vadot		compatible = "pwm-beeper";
32*833e5d42SEmmanuel Vadot		pwms = <&pwm 7 100000 0>;
33*833e5d42SEmmanuel Vadot	};
34*833e5d42SEmmanuel Vadot
35*833e5d42SEmmanuel Vadot	leds {
36*833e5d42SEmmanuel Vadot		compatible = "gpio-leds";
37*833e5d42SEmmanuel Vadot		pinctrl-names = "default";
38*833e5d42SEmmanuel Vadot		pinctrl-0 = <&leds_pins>;
39*833e5d42SEmmanuel Vadot
40*833e5d42SEmmanuel Vadot		led-0 {
41*833e5d42SEmmanuel Vadot			gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
42*833e5d42SEmmanuel Vadot			default-state = "off";
43*833e5d42SEmmanuel Vadot		};
44*833e5d42SEmmanuel Vadot
45*833e5d42SEmmanuel Vadot		led-1 {
46*833e5d42SEmmanuel Vadot			gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
47*833e5d42SEmmanuel Vadot			default-state = "off";
48*833e5d42SEmmanuel Vadot		};
49*833e5d42SEmmanuel Vadot
50*833e5d42SEmmanuel Vadot		led-2 {
51*833e5d42SEmmanuel Vadot			gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>;
52*833e5d42SEmmanuel Vadot			default-state = "off";
53*833e5d42SEmmanuel Vadot		};
54*833e5d42SEmmanuel Vadot	};
55*833e5d42SEmmanuel Vadot
56*833e5d42SEmmanuel Vadot	reg_1v8: regulator-1v8 {
57*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
58*833e5d42SEmmanuel Vadot		regulator-name = "1v8";
59*833e5d42SEmmanuel Vadot		regulator-min-microvolt = <1800000>;
60*833e5d42SEmmanuel Vadot		regulator-max-microvolt = <1800000>;
61*833e5d42SEmmanuel Vadot	};
62*833e5d42SEmmanuel Vadot
63*833e5d42SEmmanuel Vadot	reg_3v3: regulator-3v3 {
64*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
65*833e5d42SEmmanuel Vadot		regulator-name = "3v3";
66*833e5d42SEmmanuel Vadot		regulator-min-microvolt = <3300000>;
67*833e5d42SEmmanuel Vadot		regulator-max-microvolt = <3300000>;
68*833e5d42SEmmanuel Vadot		regulator-always-on;
69*833e5d42SEmmanuel Vadot	};
70*833e5d42SEmmanuel Vadot
71*833e5d42SEmmanuel Vadot	reg_5v: regulator-5v {
72*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
73*833e5d42SEmmanuel Vadot		regulator-name = "5v";
74*833e5d42SEmmanuel Vadot		regulator-min-microvolt = <5000000>;
75*833e5d42SEmmanuel Vadot		regulator-max-microvolt = <5000000>;
76*833e5d42SEmmanuel Vadot		regulator-always-on;
77*833e5d42SEmmanuel Vadot	};
78*833e5d42SEmmanuel Vadot
79*833e5d42SEmmanuel Vadot	reg_fec_3v3: regulator-fec-3v3 {
80*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
81*833e5d42SEmmanuel Vadot		pinctrl-names = "default";
82*833e5d42SEmmanuel Vadot		pinctrl-0 = <&fec_3v3_enable_pin>;
83*833e5d42SEmmanuel Vadot		regulator-name = "fec-3v3";
84*833e5d42SEmmanuel Vadot		regulator-min-microvolt = <3300000>;
85*833e5d42SEmmanuel Vadot		regulator-max-microvolt = <3300000>;
86*833e5d42SEmmanuel Vadot		gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>;
87*833e5d42SEmmanuel Vadot		enable-active-high;
88*833e5d42SEmmanuel Vadot		startup-delay-us = <300000>;
89*833e5d42SEmmanuel Vadot		vin-supply = <&reg_5v>;
90*833e5d42SEmmanuel Vadot	};
91*833e5d42SEmmanuel Vadot
92*833e5d42SEmmanuel Vadot	reg_usb0_vbus: regulator-usb0-vbus {
93*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
94*833e5d42SEmmanuel Vadot		pinctrl-names = "default";
95*833e5d42SEmmanuel Vadot		pinctrl-0 = <&usb0_vbus_enable_pin>;
96*833e5d42SEmmanuel Vadot		regulator-name = "usb0_vbus";
97*833e5d42SEmmanuel Vadot		regulator-min-microvolt = <5000000>;
98*833e5d42SEmmanuel Vadot		regulator-max-microvolt = <5000000>;
99*833e5d42SEmmanuel Vadot		gpio = <&gpio2 5 GPIO_ACTIVE_HIGH>;
100*833e5d42SEmmanuel Vadot		enable-active-high;
101*833e5d42SEmmanuel Vadot		regulator-always-on;
102*833e5d42SEmmanuel Vadot	};
103*833e5d42SEmmanuel Vadot
104*833e5d42SEmmanuel Vadot	reg_usb1_vbus: regulator-usb1-vbus {
105*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
106*833e5d42SEmmanuel Vadot		pinctrl-names = "default";
107*833e5d42SEmmanuel Vadot		pinctrl-0 = <&usb1_vbus_enable_pin>;
108*833e5d42SEmmanuel Vadot		regulator-name = "usb1_vbus";
109*833e5d42SEmmanuel Vadot		regulator-min-microvolt = <5000000>;
110*833e5d42SEmmanuel Vadot		regulator-max-microvolt = <5000000>;
111*833e5d42SEmmanuel Vadot		gpio = <&gpio2 6 GPIO_ACTIVE_HIGH>;
112*833e5d42SEmmanuel Vadot		enable-active-high;
113*833e5d42SEmmanuel Vadot		regulator-always-on;
114*833e5d42SEmmanuel Vadot	};
115*833e5d42SEmmanuel Vadot};
116*833e5d42SEmmanuel Vadot
117*833e5d42SEmmanuel Vadot&auart0 {
118*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
119*833e5d42SEmmanuel Vadot	pinctrl-0 = <&auart0_2pins_a>;
120*833e5d42SEmmanuel Vadot	status = "okay";
121*833e5d42SEmmanuel Vadot};
122*833e5d42SEmmanuel Vadot
123*833e5d42SEmmanuel Vadot&auart1 {
124*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
125*833e5d42SEmmanuel Vadot	pinctrl-0 = <&auart1_pins_a>;
126*833e5d42SEmmanuel Vadot	status = "okay";
127*833e5d42SEmmanuel Vadot};
128*833e5d42SEmmanuel Vadot
129*833e5d42SEmmanuel Vadot&can0 {
130*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
131*833e5d42SEmmanuel Vadot	pinctrl-0 = <&can0_pins_a>;
132*833e5d42SEmmanuel Vadot	status = "okay";
133*833e5d42SEmmanuel Vadot};
134*833e5d42SEmmanuel Vadot
135*833e5d42SEmmanuel Vadot&duart {
136*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
137*833e5d42SEmmanuel Vadot	pinctrl-0 = <&duart_pins_b>;
138*833e5d42SEmmanuel Vadot	status = "okay";
139*833e5d42SEmmanuel Vadot};
140*833e5d42SEmmanuel Vadot
141*833e5d42SEmmanuel Vadot&duart_pins_b {
142*833e5d42SEmmanuel Vadot	fsl,voltage = <MXS_VOLTAGE_LOW>;
143*833e5d42SEmmanuel Vadot};
144*833e5d42SEmmanuel Vadot
145*833e5d42SEmmanuel Vadot&gpmi {
146*833e5d42SEmmanuel Vadot	#size-cells = <0>;
147*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
148*833e5d42SEmmanuel Vadot	pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
149*833e5d42SEmmanuel Vadot	status = "okay";
150*833e5d42SEmmanuel Vadot};
151*833e5d42SEmmanuel Vadot
152*833e5d42SEmmanuel Vadot&i2c0 {
153*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
154*833e5d42SEmmanuel Vadot	pinctrl-0 = <&i2c0_pins_a>;
155*833e5d42SEmmanuel Vadot	status = "okay";
156*833e5d42SEmmanuel Vadot
157*833e5d42SEmmanuel Vadot	touchscreen: touchscreen@38 {
158*833e5d42SEmmanuel Vadot		compatible = "edt,edt-ft5306";
159*833e5d42SEmmanuel Vadot		reg = <0x38>;
160*833e5d42SEmmanuel Vadot		pinctrl-names = "default";
161*833e5d42SEmmanuel Vadot		pinctrl-0 = <&edt_ft5x06_pins &edt_ft5x06_wake_pin>;
162*833e5d42SEmmanuel Vadot		interrupt-parent = <&gpio0>;
163*833e5d42SEmmanuel Vadot		interrupts = <19 IRQ_TYPE_EDGE_RISING>;
164*833e5d42SEmmanuel Vadot		reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
165*833e5d42SEmmanuel Vadot		wake-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
166*833e5d42SEmmanuel Vadot	};
167*833e5d42SEmmanuel Vadot};
168*833e5d42SEmmanuel Vadot
169*833e5d42SEmmanuel Vadot&lradc {
170*833e5d42SEmmanuel Vadot	status = "okay";
171*833e5d42SEmmanuel Vadot};
172*833e5d42SEmmanuel Vadot
173*833e5d42SEmmanuel Vadot&mac0 {
174*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
175*833e5d42SEmmanuel Vadot	pinctrl-0 = <&mac0_pins_a>;
176*833e5d42SEmmanuel Vadot	phy-mode = "rmii";
177*833e5d42SEmmanuel Vadot	phy-supply = <&reg_fec_3v3>;
178*833e5d42SEmmanuel Vadot	phy-handle = <&ethphy>;
179*833e5d42SEmmanuel Vadot	status = "okay";
180*833e5d42SEmmanuel Vadot
181*833e5d42SEmmanuel Vadot	mdio {
182*833e5d42SEmmanuel Vadot		#address-cells = <1>;
183*833e5d42SEmmanuel Vadot		#size-cells = <0>;
184*833e5d42SEmmanuel Vadot
185*833e5d42SEmmanuel Vadot		ethphy: ethernet-phy@0 {
186*833e5d42SEmmanuel Vadot			compatible = "ethernet-phy-ieee802.3-c22";
187*833e5d42SEmmanuel Vadot			reg = <0>;
188*833e5d42SEmmanuel Vadot			max-speed = <100>;
189*833e5d42SEmmanuel Vadot			reset-gpios = <&gpio3 28 GPIO_ACTIVE_LOW>;
190*833e5d42SEmmanuel Vadot			reset-assert-us = <4000>;
191*833e5d42SEmmanuel Vadot			reset-deassert-us = <4000>;
192*833e5d42SEmmanuel Vadot		};
193*833e5d42SEmmanuel Vadot	};
194*833e5d42SEmmanuel Vadot};
195*833e5d42SEmmanuel Vadot
196*833e5d42SEmmanuel Vadot&pinctrl {
197*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
198*833e5d42SEmmanuel Vadot	pinctrl-0 = <&hog_pins_a>;
199*833e5d42SEmmanuel Vadot
200*833e5d42SEmmanuel Vadot	edt_ft5x06_pins: edt-ft5x06@0 {
201*833e5d42SEmmanuel Vadot		reg = <0>;
202*833e5d42SEmmanuel Vadot		fsl,pinmux-ids = <
203*833e5d42SEmmanuel Vadot			MX28_PAD_GPMI_RDY1__GPIO_0_21 /* Reset */
204*833e5d42SEmmanuel Vadot			MX28_PAD_GPMI_CE3N__GPIO_0_19 /* Interrupt */
205*833e5d42SEmmanuel Vadot		>;
206*833e5d42SEmmanuel Vadot		fsl,drive-strength = <MXS_DRIVE_4mA>;
207*833e5d42SEmmanuel Vadot		fsl,pull-up = <MXS_PULL_ENABLE>;
208*833e5d42SEmmanuel Vadot		fsl,voltage = <MXS_VOLTAGE_HIGH>;
209*833e5d42SEmmanuel Vadot	};
210*833e5d42SEmmanuel Vadot
211*833e5d42SEmmanuel Vadot	edt_ft5x06_wake_pin: edt-ft5x06-wake@0 {
212*833e5d42SEmmanuel Vadot		reg = <0>;
213*833e5d42SEmmanuel Vadot		fsl,pinmux-ids = <MX28_PAD_GPMI_CE2N__GPIO_0_18>;
214*833e5d42SEmmanuel Vadot		fsl,drive-strength = <MXS_DRIVE_16mA>;
215*833e5d42SEmmanuel Vadot		fsl,pull-up = <MXS_PULL_DISABLE>;
216*833e5d42SEmmanuel Vadot		fsl,voltage = <MXS_VOLTAGE_HIGH>;
217*833e5d42SEmmanuel Vadot	};
218*833e5d42SEmmanuel Vadot
219*833e5d42SEmmanuel Vadot	fec_3v3_enable_pin: fec-3v3-enable@0 {
220*833e5d42SEmmanuel Vadot		reg = <0>;
221*833e5d42SEmmanuel Vadot		fsl,pinmux-ids = <MX28_PAD_SPDIF__GPIO_3_27>;
222*833e5d42SEmmanuel Vadot		fsl,drive-strength = <MXS_DRIVE_4mA>;
223*833e5d42SEmmanuel Vadot		fsl,pull-up = <MXS_PULL_DISABLE>;
224*833e5d42SEmmanuel Vadot		fsl,voltage = <MXS_VOLTAGE_HIGH>;
225*833e5d42SEmmanuel Vadot	};
226*833e5d42SEmmanuel Vadot
227*833e5d42SEmmanuel Vadot	hog_pins_a: hog@0 {
228*833e5d42SEmmanuel Vadot		reg = <0>;
229*833e5d42SEmmanuel Vadot		fsl,pinmux-ids = <
230*833e5d42SEmmanuel Vadot			MX28_PAD_SSP2_SS1__GPIO_2_20  /* External power */
231*833e5d42SEmmanuel Vadot		>;
232*833e5d42SEmmanuel Vadot		fsl,drive-strength = <MXS_DRIVE_4mA>;
233*833e5d42SEmmanuel Vadot		fsl,pull-up = <MXS_PULL_DISABLE>;
234*833e5d42SEmmanuel Vadot		fsl,voltage = <MXS_VOLTAGE_HIGH>;
235*833e5d42SEmmanuel Vadot	};
236*833e5d42SEmmanuel Vadot
237*833e5d42SEmmanuel Vadot	leds_pins: leds@0 {
238*833e5d42SEmmanuel Vadot		reg = <0>;
239*833e5d42SEmmanuel Vadot		fsl,pinmux-ids = <
240*833e5d42SEmmanuel Vadot			MX28_PAD_SSP0_DATA7__GPIO_2_7
241*833e5d42SEmmanuel Vadot			MX28_PAD_PWM0__GPIO_3_16
242*833e5d42SEmmanuel Vadot			MX28_PAD_PWM1__GPIO_3_17
243*833e5d42SEmmanuel Vadot		>;
244*833e5d42SEmmanuel Vadot		fsl,drive-strength = <MXS_DRIVE_4mA>;
245*833e5d42SEmmanuel Vadot		fsl,pull-up = <MXS_PULL_DISABLE>;
246*833e5d42SEmmanuel Vadot		fsl,voltage = <MXS_VOLTAGE_HIGH>;
247*833e5d42SEmmanuel Vadot	};
248*833e5d42SEmmanuel Vadot
249*833e5d42SEmmanuel Vadot	usb0_vbus_enable_pin: usb0-vbus-enable@0 {
250*833e5d42SEmmanuel Vadot		reg = <0>;
251*833e5d42SEmmanuel Vadot		fsl,pinmux-ids = <MX28_PAD_SSP0_DATA5__GPIO_2_5>;
252*833e5d42SEmmanuel Vadot		fsl,drive-strength = <MXS_DRIVE_4mA>;
253*833e5d42SEmmanuel Vadot		fsl,pull-up = <MXS_PULL_DISABLE>;
254*833e5d42SEmmanuel Vadot		fsl,voltage = <MXS_VOLTAGE_HIGH>;
255*833e5d42SEmmanuel Vadot	};
256*833e5d42SEmmanuel Vadot
257*833e5d42SEmmanuel Vadot	usb1_vbus_enable_pin: usb1-vbus-enable@0 {
258*833e5d42SEmmanuel Vadot		reg = <0>;
259*833e5d42SEmmanuel Vadot		fsl,pinmux-ids = <MX28_PAD_SSP0_DATA6__GPIO_2_6>;
260*833e5d42SEmmanuel Vadot		fsl,drive-strength = <MXS_DRIVE_4mA>;
261*833e5d42SEmmanuel Vadot		fsl,pull-up = <MXS_PULL_DISABLE>;
262*833e5d42SEmmanuel Vadot		fsl,voltage = <MXS_VOLTAGE_HIGH>;
263*833e5d42SEmmanuel Vadot	};
264*833e5d42SEmmanuel Vadot};
265*833e5d42SEmmanuel Vadot
266*833e5d42SEmmanuel Vadot&pwm {
267*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
268*833e5d42SEmmanuel Vadot	pinctrl-0 = <&pwm4_pins_a &pwm7_pins_a>;
269*833e5d42SEmmanuel Vadot	status = "okay";
270*833e5d42SEmmanuel Vadot};
271*833e5d42SEmmanuel Vadot
272*833e5d42SEmmanuel Vadot/* microSD */
273*833e5d42SEmmanuel Vadot&ssp0 {
274*833e5d42SEmmanuel Vadot	compatible = "fsl,imx28-mmc";
275*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
276*833e5d42SEmmanuel Vadot	pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_sck_cfg>;
277*833e5d42SEmmanuel Vadot	broken-cd;
278*833e5d42SEmmanuel Vadot	bus-width = <4>;
279*833e5d42SEmmanuel Vadot	status = "okay";
280*833e5d42SEmmanuel Vadot};
281*833e5d42SEmmanuel Vadot
282*833e5d42SEmmanuel Vadot&usb0 {
283*833e5d42SEmmanuel Vadot	dr_mode = "host";
284*833e5d42SEmmanuel Vadot	vbus-supply = <&reg_usb0_vbus>;
285*833e5d42SEmmanuel Vadot	status = "okay";
286*833e5d42SEmmanuel Vadot};
287*833e5d42SEmmanuel Vadot
288*833e5d42SEmmanuel Vadot&usb1 {
289*833e5d42SEmmanuel Vadot	dr_mode = "host";
290*833e5d42SEmmanuel Vadot	vbus-supply = <&reg_usb1_vbus>;
291*833e5d42SEmmanuel Vadot	status = "okay";
292*833e5d42SEmmanuel Vadot};
293*833e5d42SEmmanuel Vadot
294*833e5d42SEmmanuel Vadot&usbphy0 {
295*833e5d42SEmmanuel Vadot	status = "okay";
296*833e5d42SEmmanuel Vadot};
297*833e5d42SEmmanuel Vadot
298*833e5d42SEmmanuel Vadot&usbphy1 {
299*833e5d42SEmmanuel Vadot	status = "okay";
300*833e5d42SEmmanuel Vadot};
301