xref: /linux/arch/arm64/boot/dts/freescale/mba8mx.dtsi (revision 55d0969c451159cff86949b38c39171cab962069)
1// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
2/*
3 * Copyright 2020-2021 TQ-Systems GmbH
4 */
5
6#include <dt-bindings/net/ti-dp83867.h>
7
8/* TQ-Systems GmbH MBa8Mx baseboard */
9
10/ {
11	backlight_lvds: backlight {
12		compatible = "pwm-backlight";
13		pwms = <&pwm3 0 5000000 0>;
14		brightness-levels = <0 4 8 16 32 64 128 255>;
15		default-brightness-level = <7>;
16		power-supply = <&reg_12v>;
17		enable-gpios = <&expander2 2 GPIO_ACTIVE_HIGH>;
18		status = "disabled";
19	};
20
21	beeper {
22		compatible = "pwm-beeper";
23		pwms = <&pwm4 0 250000 0>;
24		beeper-hz = <4000>;
25		amp-supply = <&reg_vcc_3v3>;
26	};
27
28	chosen {
29		stdout-path = &uart3;
30	};
31
32	clk_xtal25: clk-xtal25 {
33		compatible = "fixed-clock";
34		#clock-cells = <0>;
35		clock-frequency = <25000000>;
36	};
37
38	gpio-keys {
39		compatible = "gpio-keys";
40		pinctrl-names = "default";
41		pinctrl-0 = <&pinctrl_gpiobutton>;
42		autorepeat;
43
44		switch-1 {
45			label = "switch1";
46			linux,code = <BTN_0>;
47			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
48			wakeup-source;
49		};
50
51		btn2: switch-2 {
52			label = "switch2";
53			linux,code = <BTN_1>;
54			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
55			wakeup-source;
56		};
57
58		switch-3 {
59			label = "switch3";
60			linux,code = <BTN_2>;
61			gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
62			wakeup-source;
63		};
64	};
65
66	gpio_leds: gpio-leds {
67		compatible = "gpio-leds";
68		pinctrl-names = "default";
69		pinctrl-0 = <&pinctrl_gpioled>;
70
71		led1 {
72			label = "led1";
73			gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
74			linux,default-trigger = "default-on";
75		};
76
77		led2: led2 {
78			label = "led2";
79			gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
80			linux,default-trigger = "heartbeat";
81		};
82	};
83
84	gpio_delays: gpio-delays {
85		compatible = "gpio-delay";
86		#gpio-cells = <3>;
87		gpio-controller;
88		gpios = <&expander0 6 GPIO_ACTIVE_HIGH>;
89		gpio-line-names = "LVDS_BRIDGE_EN_1V8";
90	};
91
92	panel: panel-lvds {
93		/*
94		 * Display is not fixed, so compatible has to be added from
95		 * DT overlay
96		 */
97		backlight = <&backlight_lvds>;
98		power-supply = <&reg_vcc_3v3>;
99		status = "disabled";
100
101		port {
102			panel_in_lvds: endpoint {
103				remote-endpoint = <&lvds_bridge_out>;
104			};
105		};
106	};
107
108	reg_12v: regulator-12v {
109		compatible = "regulator-fixed";
110		regulator-name = "MBA8MX_12V";
111		regulator-min-microvolt = <12000000>;
112		regulator-max-microvolt = <12000000>;
113		regulator-always-on;
114	};
115
116	reg_hub_vbus: regulator-hub-vbus {
117		compatible = "regulator-fixed";
118		regulator-name = "MBA8MX_HUB_VBUS";
119		regulator-min-microvolt = <5000000>;
120		regulator-max-microvolt = <5000000>;
121	};
122
123	reg_sn65dsi83_1v8: regulator-sn65dsi83-1v8 {
124		compatible = "regulator-fixed";
125		regulator-name = "SN65DSI83_1V8";
126		regulator-min-microvolt = <1800000>;
127		regulator-max-microvolt = <1800000>;
128		gpio = <&expander0 5 GPIO_ACTIVE_HIGH>;
129		enable-active-high;
130	};
131
132	reg_vcc_3v3: regulator-3v3 {
133		compatible = "regulator-fixed";
134		regulator-name = "MBA8MX_3V3";
135		regulator-min-microvolt = <3300000>;
136		regulator-max-microvolt = <3300000>;
137	};
138
139	sound {
140		compatible = "fsl,imx-audio-tlv320aic32x4";
141		model = "imx-audio-tlv320aic32x4";
142		ssi-controller = <&sai3>;
143		audio-codec = <&tlv320aic3x04>;
144	};
145};
146
147&ecspi1 {
148	pinctrl-names = "default";
149	pinctrl-0 = <&pinctrl_ecspi1>;
150	cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
151	status = "okay";
152};
153
154&ecspi2 {
155	pinctrl-names = "default";
156	pinctrl-0 = <&pinctrl_ecspi2>;
157	cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
158	status = "okay";
159};
160
161&fec1 {
162	pinctrl-names = "default";
163	pinctrl-0 = <&pinctrl_fec1>;
164	phy-mode = "rgmii-id";
165	phy-handle = <&ethphy0>;
166	phy-supply = <&reg_vcc_3v3>;
167	fsl,magic-packet;
168	mac-address = [ 00 00 00 00 00 00 ];
169	status = "okay";
170
171	mdio {
172		#address-cells = <1>;
173		#size-cells = <0>;
174
175		ethphy0: ethernet-phy@e {
176			compatible = "ethernet-phy-ieee802.3-c22";
177			reg = <0xe>;
178			ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
179			ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
180			ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
181			ti,dp83867-rxctrl-strap-quirk;
182			ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
183			enet-phy-lane-no-swap;
184			reset-gpios = <&expander2 7 GPIO_ACTIVE_LOW>;
185			reset-assert-us = <500000>;
186			reset-deassert-us = <500>;
187			interrupt-parent = <&expander2>;
188			interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
189		};
190	};
191};
192
193&i2c1 {
194	expander0: gpio@23 {
195		compatible = "nxp,pca9555";
196		reg = <0x23>;
197		gpio-controller;
198		#gpio-cells = <2>;
199		vcc-supply = <&reg_vcc_3v3>;
200		interrupt-parent = <&gpio1>;
201		interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
202		interrupt-controller;
203		#interrupt-cells = <2>;
204		gpio-line-names = "", "", "", "",
205				  "", "", "LVDS_BRIDGE_EN", "",
206				  "", "", "", "",
207				  "", "", "", "";
208
209		sd-mux-oe-hog {
210			gpio-hog;
211			gpios = <8 0>;
212			output-low;
213			line-name = "SD_MUX_EN#";
214		};
215
216		boot-cfg-oe-hog {
217			gpio-hog;
218			gpios = <12 0>;
219			output-high;
220			line-name = "BOOT_CFG_OE#";
221		};
222
223		rst_usb_hub_hog: rst-usb-hub-hog {
224			gpio-hog;
225			gpios = <13 0>;
226			output-high;
227			line-name = "RST_USB_HUB#";
228		};
229	};
230
231	expander1: gpio@24 {
232		compatible = "nxp,pca9555";
233		reg = <0x24>;
234		gpio-controller;
235		#gpio-cells = <2>;
236		vcc-supply = <&reg_vcc_3v3>;
237	};
238};
239
240&i2c2 {
241	pinctrl-names = "default", "gpio";
242	pinctrl-0 = <&pinctrl_i2c2>;
243	pinctrl-1 = <&pinctrl_i2c2_gpio>;
244	scl-gpios = <&gpio5 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
245	sda-gpios = <&gpio5 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
246	status = "okay";
247
248	tlv320aic3x04: audio-codec@18 {
249		compatible = "ti,tlv320aic32x4";
250		reg = <0x18>;
251		reset-gpios = <&expander2 0 GPIO_ACTIVE_LOW>;
252		iov-supply = <&reg_vcc_3v3>;
253		ldoin-supply = <&reg_vcc_3v3>;
254	};
255
256	sensor1: temperator-sensor@1f {
257		compatible = "nxp,se97b", "jedec,jc-42.4-temp";
258		reg = <0x1f>;
259	};
260
261	/*
262	 * TUSB8041 is at 0x41, but not connected by default
263	 * Note: TUSB8041 only supports 100 kHz!
264	 */
265
266	eeprom3: eeprom@57 {
267		compatible = "nxp,se97b", "atmel,24c02";
268		reg = <0x57>;
269		pagesize = <16>;
270		vcc-supply = <&reg_vcc_3v3>;
271	};
272
273	pcieclk: clk@68 {
274		compatible = "renesas,9fgv0441";
275		reg = <0x68>;
276		clocks = <&clk_xtal25>;
277		#clock-cells = <1>;
278	};
279};
280
281&i2c3 {
282	pinctrl-names = "default", "gpio";
283	pinctrl-0 = <&pinctrl_i2c3>;
284	pinctrl-1 = <&pinctrl_i2c3_gpio>;
285	scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
286	sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
287	status = "okay";
288
289	dsi_lvds_bridge: bridge@2d {
290		compatible = "ti,sn65dsi84";
291		reg = <0x2d>;
292		enable-gpios = <&gpio_delays 0 130000 0>;
293		vcc-supply = <&reg_sn65dsi83_1v8>;
294		status = "disabled";
295
296		ports {
297			#address-cells = <1>;
298			#size-cells = <0>;
299
300			port@0 {
301				reg = <0>;
302
303				lvds_bridge_in: endpoint {
304					data-lanes = <1 2 3 4>;
305					remote-endpoint = <&mipi_dsi_out>;
306				};
307			};
308
309			port@2 {
310				reg = <2>;
311
312				lvds_bridge_out: endpoint {
313					remote-endpoint = <&panel_in_lvds>;
314				};
315			};
316		};
317	};
318};
319
320&mipi_dsi_out {
321	data-lanes = <1 2 3 4>;
322	remote-endpoint = <&lvds_bridge_in>;
323};
324
325&pwm3 {
326	pinctrl-names = "default";
327	pinctrl-0 = <&pinctrl_pwm3>;
328	status = "okay";
329};
330
331&pwm4 {
332	pinctrl-names = "default";
333	pinctrl-0 = <&pinctrl_pwm4>;
334	status = "okay";
335};
336
337&sai3 {
338	pinctrl-names = "default";
339	pinctrl-0 = <&pinctrl_sai3>;
340	#sound-dai-cells = <0>;
341	assigned-clock-rates = <49152000>;
342	status = "okay";
343};
344
345&snvs_pwrkey {
346	status = "okay";
347};
348
349&uart1 {
350	pinctrl-names = "default";
351	pinctrl-0 = <&pinctrl_uart1>;
352	status = "okay";
353};
354
355&uart2 {
356	pinctrl-names = "default";
357	pinctrl-0 = <&pinctrl_uart2>;
358	status = "okay";
359};
360
361/* console */
362&uart3 {
363	pinctrl-names = "default";
364	pinctrl-0 = <&pinctrl_uart3>;
365	status = "okay";
366};
367
368&usdhc2 {
369	pinctrl-names = "default", "state_100mhz", "state_200mhz";
370	pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
371	pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
372	pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
373	bus-width = <4>;
374	cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
375	disable-wp;
376	no-mmc;
377	no-sdio;
378	vmmc-supply = <&reg_usdhc2_vmmc>;
379	status = "okay";
380};
381