xref: /openbmc/linux/arch/arm/boot/dts/nxp/imx/mba6ulx.dtsi (revision 6dc6657d)
1// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
2/*
3 * Copyright 2018-2022 TQ-Systems GmbH
4 * Author: Markus Niebel <Markus.Niebel@tq-group.com>
5 */
6
7/ {
8	model = "TQ-Systems MBA6ULx Baseboard";
9
10	aliases {
11		mmc0 = &usdhc2;
12		mmc1 = &usdhc1;
13		rtc0 = &rtc0;
14		rtc1 = &snvs_rtc;
15	};
16
17	chosen {
18		stdout-path = &uart1;
19	};
20
21	backlight: backlight {
22		compatible = "pwm-backlight";
23		power-supply = <&reg_mba6ul_3v3>;
24		enable-gpios = <&expander_out0 4 GPIO_ACTIVE_HIGH>;
25		status = "disabled";
26	};
27
28	beeper: beeper {
29		compatible = "gpio-beeper";
30		gpios = <&expander_out1 6 GPIO_ACTIVE_HIGH>;
31	};
32
33	gpio_buttons: gpio-keys {
34		compatible = "gpio-keys";
35		pinctrl-names = "default";
36		pinctrl-0 = <&pinctrl_buttons>;
37
38		button1 {
39			label = "s14";
40			linux,code = <KEY_1>;
41			gpios = <&expander_in0 0 GPIO_ACTIVE_LOW>;
42		};
43
44		button2 {
45			label = "s6";
46			linux,code = <KEY_2>;
47			gpios = <&expander_in0 1 GPIO_ACTIVE_LOW>;
48		};
49
50		button3 {
51			label = "s7";
52			linux,code = <KEY_3>;
53			gpios = <&expander_in0 2 GPIO_ACTIVE_LOW>;
54		};
55
56		power-button {
57			label = "POWER";
58			linux,code = <KEY_POWER>;
59			gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
60			wakeup-source;
61		};
62	};
63
64	gpio-leds {
65		compatible = "gpio-leds";
66		status = "okay";
67
68		led1 {
69			label = "led1";
70			gpios = <&expander_out1 4 GPIO_ACTIVE_HIGH>;
71			linux,default-trigger = "default-on";
72		};
73
74		led2 {
75			label = "led2";
76			gpios = <&expander_out1 5 GPIO_ACTIVE_HIGH>;
77			linux,default-trigger = "heartbeat";
78		};
79	};
80
81	reg_lcd_pwr: regulator-lcd-pwr {
82		compatible = "regulator-fixed";
83		regulator-name = "lcd-pwr";
84		gpio = <&expander_out0 1 GPIO_ACTIVE_HIGH>;
85		enable-active-high;
86		status = "disabled";
87	};
88
89	reg_mba6ul_3v3: regulator-mba6ul-3v3 {
90		compatible = "regulator-fixed";
91		regulator-name = "supply-mba6ul-3v3";
92		regulator-min-microvolt = <3300000>;
93		regulator-max-microvolt = <3300000>;
94		regulator-always-on;
95	};
96
97	reg_mba6ul_5v0: regulator-mba6ul-5v0 {
98		compatible = "regulator-fixed";
99		regulator-name = "supply-mba6ul-5v0";
100		regulator-min-microvolt = <5000000>;
101		regulator-max-microvolt = <5000000>;
102		regulator-always-on;
103	};
104
105	reg_mpcie: regulator-mpcie-3v3 {
106		compatible = "regulator-fixed";
107		regulator-name = "mpcie-3v3";
108		regulator-min-microvolt = <3300000>;
109		regulator-max-microvolt = <3300000>;
110		gpio = <&expander_out0 2 GPIO_ACTIVE_HIGH>;
111		enable-active-high;
112		regulator-always-on;
113		startup-delay-us = <500000>;
114		vin-supply = <&reg_mba6ul_3v3>;
115	};
116
117	reg_otg2vbus_5v0: regulator-otg2-vbus-5v0 {
118		compatible = "regulator-fixed";
119		gpio = <&expander_out1 0 GPIO_ACTIVE_HIGH>;
120		enable-active-high;
121		regulator-name = "otg2-vbus-supply-5v0";
122		regulator-min-microvolt = <5000000>;
123		regulator-max-microvolt = <5000000>;
124		vin-supply = <&reg_mpcie>;
125	};
126
127	reserved-memory {
128		#address-cells = <1>;
129		#size-cells = <1>;
130		ranges;
131
132		linux,cma {
133			compatible = "shared-dma-pool";
134			reusable;
135			size = <0x6000000>;
136			linux,cma-default;
137		};
138	};
139
140	sound {
141		compatible = "fsl,imx-audio-tlv320aic32x4";
142		model = "imx-audio-tlv320aic32x4";
143		ssi-controller = <&sai1>;
144		audio-codec = <&tlv320aic32x4>;
145		audio-asrc = <&asrc>;
146	};
147};
148
149&can1 {
150	pinctrl-names = "default";
151	pinctrl-0 = <&pinctrl_flexcan1>;
152	xceiver-supply = <&reg_mba6ul_3v3>;
153	status = "okay";
154};
155
156&can2 {
157	pinctrl-names = "default";
158	pinctrl-0 = <&pinctrl_flexcan2>;
159	xceiver-supply = <&reg_mba6ul_3v3>;
160	status = "okay";
161};
162
163&clks {
164	assigned-clocks = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
165	assigned-clock-rates = <768000000>;
166};
167
168&ecspi2 {
169	pinctrl-names = "default";
170	pinctrl-0 = <&pinctrl_ecspi2>;
171	num-cs = <1>;
172	status = "okay";
173};
174
175&fec1 {
176	pinctrl-names = "default";
177	pinctrl-0 = <&pinctrl_enet1>;
178	phy-mode = "rmii";
179	phy-handle = <&ethphy0>;
180	phy-supply = <&reg_mba6ul_3v3>;
181	phy-reset-gpios = <&expander_out1 1 GPIO_ACTIVE_LOW>;
182	phy-reset-duration = <25>;
183	phy-reset-post-delay = <1>;
184	status = "okay";
185};
186
187&fec2 {
188	pinctrl-names = "default";
189	pinctrl-0 = <&pinctrl_enet2>, <&pinctrl_enet2_mdc>;
190	phy-mode = "rmii";
191	phy-handle = <&ethphy1>;
192	phy-supply = <&reg_mba6ul_3v3>;
193	phy-reset-gpios = <&expander_out1 2 GPIO_ACTIVE_LOW>;
194	phy-reset-duration = <25>;
195	phy-reset-post-delay = <1>;
196	status = "okay";
197
198	mdio {
199		#address-cells = <1>;
200		#size-cells = <0>;
201
202		ethphy0: ethernet-phy@0 {
203			compatible = "ethernet-phy-ieee802.3-c22";
204			clocks = <&clks IMX6UL_CLK_ENET_REF>;
205			reg = <0>;
206			max-speed = <100>;
207		};
208
209		ethphy1: ethernet-phy@1 {
210			compatible = "ethernet-phy-ieee802.3-c22";
211			clocks = <&clks IMX6UL_CLK_ENET2_REF_125M>;
212			reg = <1>;
213			max-speed = <100>;
214		};
215	};
216};
217
218&i2c4 {
219	tlv320aic32x4: audio-codec@18 {
220		compatible = "ti,tlv320aic32x4";
221		reg = <0x18>;
222		clocks = <&clks IMX6UL_CLK_SAI1>;
223		clock-names = "mclk";
224		ldoin-supply = <&reg_mba6ul_3v3>;
225		iov-supply = <&reg_mba6ul_3v3>;
226	};
227
228	jc42: temperature-sensor@19 {
229		compatible = "nxp,se97b", "jedec,jc-42.4-temp";
230		reg = <0x19>;
231	};
232
233	expander_out0: gpio-expander@20 {
234		compatible = "nxp,pca9554";
235		reg = <0x20>;
236		gpio-controller;
237		#gpio-cells = <2>;
238		vcc-supply = <&reg_mba6ul_3v3>;
239	};
240
241	expander_in0: gpio-expander@21 {
242		compatible = "nxp,pca9554";
243		reg = <0x21>;
244		pinctrl-names = "default";
245		pinctrl-0 = <&pinctrl_expander_in0>;
246		interrupt-parent = <&gpio4>;
247		interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
248		interrupt-controller;
249		#interrupt-cells = <2>;
250		gpio-controller;
251		#gpio-cells = <2>;
252		vcc-supply = <&reg_mba6ul_3v3>;
253
254		enet1_int-hog {
255			gpio-hog;
256			gpios = <6 0>;
257			input;
258		};
259
260		enet2_int-hog {
261			gpio-hog;
262			gpios = <7 0>;
263			input;
264		};
265	};
266
267	expander_out1: gpio-expander@22 {
268		compatible = "nxp,pca9554";
269		reg = <0x22>;
270		gpio-controller;
271		#gpio-cells = <2>;
272		vcc-supply = <&reg_mba6ul_3v3>;
273	};
274
275	analog_touch: touchscreen@41 {
276		compatible = "st,stmpe811";
277		reg = <0x41>;
278		interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
279		interrupt-parent = <&gpio4>;
280		interrupt-controller;
281		status = "disabled";
282
283		stmpe_touchscreen {
284			compatible = "st,stmpe-ts";
285			st,adc-freq = <1>;      /* 3.25 MHz ADC clock speed */
286			st,ave-ctrl = <3>;      /* 8 sample average control */
287			st,fraction-z = <7>;    /* 7 length fractional part in z */
288			/*
289			 * 50 mA typical 80 mA max touchscreen drivers
290			 * current limit value
291			 */
292			st,i-drive = <1>;
293			st,mod-12b = <1>;       /* 12-bit ADC */
294			st,ref-sel = <0>;       /* internal ADC reference */
295			st,sample-time = <4>;   /* ADC converstion time: 80 clocks */
296			st,settling = <3>;      /* 1 ms panel driver settling time */
297			st,touch-det-delay = <5>; /* 5 ms touch detect interrupt delay */
298		};
299	};
300
301	/* NXP SE97BTP with temperature sensor + eeprom */
302	se97b: eeprom@51 {
303		compatible = "nxp,se97b", "atmel,24c02";
304		reg = <0x51>;
305		pagesize = <16>;
306		vcc-supply = <&reg_mba6ul_3v3>;
307	};
308};
309
310&pwm2 {
311	pinctrl-names = "default";
312	pinctrl-0 = <&pinctrl_pwm2>;
313	status = "okay";
314};
315
316&sai1 {
317	pinctrl-names = "default";
318	pinctrl-0 = <&pinctrl_sai1>;
319	assigned-clocks = <&clks IMX6UL_CLK_SAI1_SEL>,
320			  <&clks IMX6UL_CLK_SAI1>;
321	assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
322	assigned-clock-rates = <0>, <24000000>;
323	fsl,sai-mclk-direction-output;
324	status = "okay";
325};
326
327&uart1 {
328	pinctrl-names = "default";
329	pinctrl-0 = <&pinctrl_uart1>;
330	status = "okay";
331};
332
333&uart3 {
334	pinctrl-names = "default";
335	pinctrl-0 = <&pinctrl_uart3>;
336	status = "okay";
337};
338
339&uart6 {
340	pinctrl-names = "default";
341	pinctrl-0 = <&pinctrl_uart6>;
342	/* for DTE mode, add below change */
343	/* fsl,dte-mode; */
344	/* pinctrl-0 = <&pinctrl_uart6dte>; */
345	uart-has-rtscts;
346	linux,rs485-enabled-at-boot-time;
347	rs485-rts-active-low;
348	rs485-rx-during-tx;
349	status = "okay";
350};
351
352/* otg-port */
353&usbotg1 {
354	pinctrl-names = "default";
355	pinctrl-0 = <&pinctrl_usb_otg1>;
356	power-active-high;
357	over-current-active-low;
358	/* we implement only dual role but not a fully featured OTG */
359	hnp-disable;
360	srp-disable;
361	adp-disable;
362	dr_mode = "otg";
363	status = "okay";
364};
365
366/* 7-port usb hub */
367/* id, pwr, oc pins not connected */
368&usbotg2 {
369	disable-over-current;
370	vbus-supply = <&reg_otg2vbus_5v0>;
371	dr_mode = "host";
372	status = "okay";
373};
374
375&usdhc1 {
376	pinctrl-names = "default";
377	pinctrl-0 = <&pinctrl_usdhc1>;
378	cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
379	wp-gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
380	bus-width = <4>;
381	vmmc-supply = <&reg_mba6ul_3v3>;
382	vqmmc-supply = <&reg_vccsd>;
383	no-1-8-v;
384	no-mmc;
385	no-sdio;
386	status = "okay";
387};
388
389&wdog1 {
390	pinctrl-names = "default";
391	pinctrl-0 = <&pinctrl_wdog1>;
392	fsl,ext-reset-output;
393	status = "okay";
394};
395
396&iomuxc {
397	pinctrl_buttons: buttonsgrp {
398		fsl,pins = <
399			MX6UL_PAD_GPIO1_IO03__GPIO1_IO03	0x100b0
400		>;
401	};
402
403	pinctrl_ecspi2: ecspi2grp {
404		fsl,pins = <
405			MX6UL_PAD_UART4_TX_DATA__ECSPI2_SCLK	0x1b020
406			MX6UL_PAD_UART5_RX_DATA__ECSPI2_MISO	0x1b020
407			MX6UL_PAD_UART5_TX_DATA__ECSPI2_MOSI	0x1b020
408			MX6UL_PAD_UART4_RX_DATA__ECSPI2_SS0	0x1b020
409		>;
410	};
411
412	pinctrl_enet1: enet1grp {
413		fsl,pins = <
414			MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN	0x1b0b0
415			MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER	0x1b0b0
416			MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00	0x1b0b0
417			MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01	0x1b0b0
418			MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00	0x1b0b0
419			MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01	0x1b0b0
420			MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN	0x1b0b0
421			MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1	0x4001b0a8
422		>;
423	};
424
425	pinctrl_enet2: enet2grp {
426		fsl,pins = <
427			MX6UL_PAD_ENET2_RX_EN__ENET2_RX_EN	0x1b0b0
428			MX6UL_PAD_ENET2_RX_ER__ENET2_RX_ER	0x1b0b0
429			MX6UL_PAD_ENET2_RX_DATA0__ENET2_RDATA00	0x1b0b0
430			MX6UL_PAD_ENET2_RX_DATA1__ENET2_RDATA01	0x1b0b0
431			MX6UL_PAD_ENET2_TX_DATA0__ENET2_TDATA00	0x1b0a0
432			MX6UL_PAD_ENET2_TX_DATA1__ENET2_TDATA01	0x1b0a0
433			MX6UL_PAD_ENET2_TX_EN__ENET2_TX_EN	0x1b0b0
434			MX6UL_PAD_ENET2_TX_CLK__ENET2_REF_CLK2	0x4001b0a8
435		>;
436	};
437
438	pinctrl_enet2_mdc: enet2mdcgrp {
439		fsl,pins = <
440			/* mdio */
441			MX6UL_PAD_GPIO1_IO07__ENET2_MDC		0x1b0b0
442			MX6UL_PAD_GPIO1_IO06__ENET2_MDIO	0x1b0b0
443		>;
444	};
445
446	pinctrl_expander_in0: expanderin0grp {
447		fsl,pins = <
448			MX6UL_PAD_CSI_DATA02__GPIO4_IO23	0x1b0b1
449		>;
450	};
451
452	pinctrl_flexcan1: flexcan1grp {
453		fsl,pins = <
454			MX6UL_PAD_UART3_RTS_B__FLEXCAN1_RX	0x1b020
455			MX6UL_PAD_UART3_CTS_B__FLEXCAN1_TX	0x1b020
456		>;
457	};
458
459	pinctrl_flexcan2: flexcan2grp {
460		fsl,pins = <
461			MX6UL_PAD_UART2_RTS_B__FLEXCAN2_RX	0x1b020
462			MX6UL_PAD_UART2_CTS_B__FLEXCAN2_TX	0x1b020
463		>;
464	};
465
466	pinctrl_pwm2: pwm2grp {
467		fsl,pins = <
468			/* 100 k PD, DSE 120 OHM, SPPEED LO */
469			MX6UL_PAD_GPIO1_IO09__PWM2_OUT		0x00003050
470		>;
471	};
472
473	pinctrl_sai1: sai1grp {
474		fsl,pins = <
475			MX6UL_PAD_CSI_DATA05__SAI1_TX_BCLK	0x1b0b1
476			MX6UL_PAD_CSI_DATA04__SAI1_TX_SYNC	0x1b0b1
477			MX6UL_PAD_CSI_DATA07__SAI1_TX_DATA	0x1f0b8
478			MX6UL_PAD_CSI_DATA06__SAI1_RX_DATA	0x110b0
479			MX6UL_PAD_CSI_DATA01__SAI1_MCLK		0x1b0b1
480		>;
481	};
482
483	pinctrl_uart1: uart1grp {
484		fsl,pins = <
485			MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX	0x1b0b1
486			MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX	0x1b0b1
487		>;
488	};
489
490	pinctrl_uart3: uart3grp {
491		fsl,pins = <
492			MX6UL_PAD_UART3_TX_DATA__UART3_DCE_TX	0x1b0b1
493			MX6UL_PAD_UART3_RX_DATA__UART3_DCE_RX	0x1b0b1
494		>;
495	};
496
497	pinctrl_uart6: uart6grp {
498		fsl,pins = <
499			MX6UL_PAD_CSI_MCLK__UART6_DCE_TX	0x1b0b1
500			MX6UL_PAD_CSI_PIXCLK__UART6_DCE_RX	0x1b0b1
501			MX6UL_PAD_CSI_VSYNC__UART6_DCE_RTS	0x1b0b1
502			MX6UL_PAD_CSI_HSYNC__UART6_DCE_CTS	0x1b0b1
503		>;
504	};
505
506	pinctrl_uart6dte: uart6dte {
507		fsl,pins = <
508			MX6UL_PAD_CSI_PIXCLK__UART6_DTE_TX	0x1b0b1
509			MX6UL_PAD_CSI_MCLK__UART6_DTE_RX	0x1b0b1
510			MX6UL_PAD_CSI_HSYNC__UART6_DTE_RTS	0x1b0b1
511			MX6UL_PAD_CSI_VSYNC__UART6_DTE_CTS	0x1b0b1
512		>;
513	};
514
515	pinctrl_usb_otg1: usbotg1grp {
516		fsl,pins = <
517			MX6UL_PAD_GPIO1_IO00__ANATOP_OTG1_ID	0x00017059
518			MX6UL_PAD_GPIO1_IO01__USB_OTG1_OC	0x0001b0b0
519			MX6UL_PAD_GPIO1_IO04__USB_OTG1_PWR	0x0001b099
520		>;
521	};
522
523	pinctrl_usdhc1: usdhc1grp {
524		fsl,pins = <
525			MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x00017069
526			MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x00017059
527			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x00017059
528			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x00017059
529			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x00017059
530			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x00017059
531			/* WP */
532			MX6UL_PAD_UART1_CTS_B__GPIO1_IO18	0x0001b099
533			/* CD */
534			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x0001b099
535		>;
536	};
537
538	pinctrl_usdhc1_100mhz: usdhc1grp100mhz {
539		fsl,pins = <
540			MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x00017069
541			MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x000170b9
542			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x000170b9
543			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x000170b9
544			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x000170b9
545			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x000170b9
546			/* WP */
547			MX6UL_PAD_UART1_CTS_B__GPIO1_IO18	0x0001b099
548			/* CD */
549			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x0001b099
550		>;
551	};
552
553	pinctrl_usdhc1_200mhz: usdhc1grp200mhz {
554		fsl,pins = <
555			MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x00017069
556			MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x000170f9
557			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x000170f9
558			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x000170f9
559			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x000170f9
560			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x000170f9
561			/* WP */
562			MX6UL_PAD_UART1_CTS_B__GPIO1_IO18	0x0001b099
563			/* CD */
564			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x0001b099
565		>;
566	};
567
568	pinctrl_wdog1: wdog1grp {
569		fsl,pins = <
570			MX6UL_PAD_GPIO1_IO08__WDOG1_WDOG_B	0x0001b099
571		>;
572	};
573};
574