xref: /linux/arch/arm64/boot/dts/freescale/mba8mx.dtsi (revision 4b132aacb0768ac1e652cf517097ea6f237214b9)
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				data-lanes = <1 2 3 4>;
104				remote-endpoint = <&lvds_bridge_out>;
105			};
106		};
107	};
108
109	reg_12v: regulator-12v {
110		compatible = "regulator-fixed";
111		regulator-name = "MBA8MX_12V";
112		regulator-min-microvolt = <12000000>;
113		regulator-max-microvolt = <12000000>;
114		regulator-always-on;
115	};
116
117	reg_hub_vbus: regulator-hub-vbus {
118		compatible = "regulator-fixed";
119		regulator-name = "MBA8MX_HUB_VBUS";
120		regulator-min-microvolt = <5000000>;
121		regulator-max-microvolt = <5000000>;
122	};
123
124	reg_sn65dsi83_1v8: regulator-sn65dsi83-1v8 {
125		compatible = "regulator-fixed";
126		regulator-name = "SN65DSI83_1V8";
127		regulator-min-microvolt = <1800000>;
128		regulator-max-microvolt = <1800000>;
129		gpio = <&expander0 5 GPIO_ACTIVE_HIGH>;
130		enable-active-high;
131	};
132
133	reg_vcc_3v3: regulator-3v3 {
134		compatible = "regulator-fixed";
135		regulator-name = "MBA8MX_3V3";
136		regulator-min-microvolt = <3300000>;
137		regulator-max-microvolt = <3300000>;
138	};
139
140	sound {
141		compatible = "fsl,imx-audio-tlv320aic32x4";
142		model = "imx-audio-tlv320aic32x4";
143		ssi-controller = <&sai3>;
144		audio-codec = <&tlv320aic3x04>;
145	};
146};
147
148&ecspi1 {
149	pinctrl-names = "default";
150	pinctrl-0 = <&pinctrl_ecspi1>;
151	cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
152	status = "okay";
153};
154
155&ecspi2 {
156	pinctrl-names = "default";
157	pinctrl-0 = <&pinctrl_ecspi2>;
158	cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
159	status = "okay";
160};
161
162&fec1 {
163	pinctrl-names = "default";
164	pinctrl-0 = <&pinctrl_fec1>;
165	phy-mode = "rgmii-id";
166	phy-handle = <&ethphy0>;
167	phy-supply = <&reg_vcc_3v3>;
168	fsl,magic-packet;
169	mac-address = [ 00 00 00 00 00 00 ];
170	status = "okay";
171
172	mdio {
173		#address-cells = <1>;
174		#size-cells = <0>;
175
176		ethphy0: ethernet-phy@e {
177			compatible = "ethernet-phy-ieee802.3-c22";
178			reg = <0xe>;
179			ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
180			ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
181			ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
182			ti,dp83867-rxctrl-strap-quirk;
183			ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
184			enet-phy-lane-no-swap;
185			reset-gpios = <&expander2 7 GPIO_ACTIVE_LOW>;
186			reset-assert-us = <500000>;
187			reset-deassert-us = <500>;
188		};
189	};
190};
191
192&i2c1 {
193	expander0: gpio@23 {
194		compatible = "nxp,pca9555";
195		reg = <0x23>;
196		gpio-controller;
197		#gpio-cells = <2>;
198		vcc-supply = <&reg_vcc_3v3>;
199		interrupt-parent = <&gpio1>;
200		interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
201		interrupt-controller;
202		#interrupt-cells = <2>;
203		gpio-line-names = "", "", "", "",
204				  "", "", "LVDS_BRIDGE_EN", "",
205				  "", "", "", "",
206				  "", "", "", "";
207
208		sd-mux-oe-hog {
209			gpio-hog;
210			gpios = <8 0>;
211			output-low;
212			line-name = "SD_MUX_EN#";
213		};
214
215		boot-cfg-oe-hog {
216			gpio-hog;
217			gpios = <12 0>;
218			output-high;
219			line-name = "BOOT_CFG_OE#";
220		};
221
222		rst_usb_hub_hog: rst-usb-hub-hog {
223			gpio-hog;
224			gpios = <13 0>;
225			output-high;
226			line-name = "RST_USB_HUB#";
227		};
228	};
229
230	expander1: gpio@24 {
231		compatible = "nxp,pca9555";
232		reg = <0x24>;
233		gpio-controller;
234		#gpio-cells = <2>;
235		vcc-supply = <&reg_vcc_3v3>;
236	};
237};
238
239&i2c2 {
240	clock-frequency = <100000>;
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	eeprom3: eeprom@57 {
262		compatible = "nxp,se97b", "atmel,24c02";
263		reg = <0x57>;
264		pagesize = <16>;
265		vcc-supply = <&reg_vcc_3v3>;
266	};
267
268	pcieclk: clk@68 {
269		compatible = "renesas,9fgv0441";
270		reg = <0x68>;
271		clocks = <&clk_xtal25>;
272		#clock-cells = <1>;
273	};
274};
275
276&i2c3 {
277	clock-frequency = <100000>;
278	pinctrl-names = "default", "gpio";
279	pinctrl-0 = <&pinctrl_i2c3>;
280	pinctrl-1 = <&pinctrl_i2c3_gpio>;
281	scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
282	sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
283	status = "okay";
284
285	dsi_lvds_bridge: bridge@2d {
286		compatible = "ti,sn65dsi84";
287		reg = <0x2d>;
288		enable-gpios = <&gpio_delays 0 130000 0>;
289		vcc-supply = <&reg_sn65dsi83_1v8>;
290		status = "disabled";
291
292		ports {
293			#address-cells = <1>;
294			#size-cells = <0>;
295
296			port@0 {
297				reg = <0>;
298
299				lvds_bridge_in: endpoint {
300					data-lanes = <1 2 3 4>;
301					remote-endpoint = <&mipi_dsi_out>;
302				};
303			};
304
305			port@2 {
306				reg = <2>;
307
308				lvds_bridge_out: endpoint {
309					remote-endpoint = <&panel_in_lvds>;
310				};
311			};
312		};
313	};
314};
315
316&mipi_dsi {
317	samsung,burst-clock-frequency = <891000000>;
318	samsung,esc-clock-frequency = <20000000>;
319};
320
321&mipi_dsi_out {
322	data-lanes = <1 2 3 4>;
323	remote-endpoint = <&lvds_bridge_in>;
324};
325
326&pwm3 {
327	pinctrl-names = "default";
328	pinctrl-0 = <&pinctrl_pwm3>;
329	status = "okay";
330};
331
332&pwm4 {
333	pinctrl-names = "default";
334	pinctrl-0 = <&pinctrl_pwm4>;
335	status = "okay";
336};
337
338&sai3 {
339	pinctrl-names = "default";
340	pinctrl-0 = <&pinctrl_sai3>;
341	#sound-dai-cells = <0>;
342	assigned-clock-rates = <49152000>;
343	status = "okay";
344};
345
346&snvs_pwrkey {
347	status = "okay";
348};
349
350&uart1 {
351	pinctrl-names = "default";
352	pinctrl-0 = <&pinctrl_uart1>;
353	status = "okay";
354};
355
356&uart2 {
357	pinctrl-names = "default";
358	pinctrl-0 = <&pinctrl_uart2>;
359	status = "okay";
360};
361
362/* console */
363&uart3 {
364	pinctrl-names = "default";
365	pinctrl-0 = <&pinctrl_uart3>;
366	status = "okay";
367};
368
369&usdhc2 {
370	pinctrl-names = "default", "state_100mhz", "state_200mhz";
371	pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
372	pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
373	pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
374	bus-width = <4>;
375	cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
376	disable-wp;
377	no-mmc;
378	no-sdio;
379	vmmc-supply = <&reg_usdhc2_vmmc>;
380	status = "okay";
381};
382