1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/* Copyright (C) 2025 Toradex */
3
4/dts-v1/;
5
6#include "imx8mp-toradex-smarc.dtsi"
7
8/ {
9	model = "Toradex SMARC iMX8M Plus on Toradex SMARC Development Board";
10	compatible = "toradex,smarc-imx8mp-dev",
11		     "toradex,smarc-imx8mp",
12		     "fsl,imx8mp";
13
14	hdmi-connector {
15		compatible = "hdmi-connector";
16		label = "J64";
17		type = "a";
18
19		port {
20			native_hdmi_connector_in: endpoint {
21				remote-endpoint = <&hdmi_tx_out>;
22			};
23		};
24	};
25
26	reg_carrier_1p8v: regulator-carrier-1p8v {
27		compatible = "regulator-fixed";
28		regulator-max-microvolt = <1800000>;
29		regulator-min-microvolt = <1800000>;
30		regulator-name = "On-carrier 1V8";
31	};
32
33	sound {
34		compatible = "simple-audio-card";
35		simple-audio-card,bitclock-master = <&codec_dai>;
36		simple-audio-card,format = "i2s";
37		simple-audio-card,frame-master = <&codec_dai>;
38		simple-audio-card,mclk-fs = <256>;
39		simple-audio-card,name = "tdx-smarc-wm8904";
40		simple-audio-card,routing =
41			"Headphone Jack", "HPOUTL",
42			"Headphone Jack", "HPOUTR",
43			"IN2L", "Line In Jack",
44			"IN2R", "Line In Jack",
45			"Microphone Jack", "MICBIAS",
46			"IN1L", "Microphone Jack";
47		simple-audio-card,widgets =
48			"Microphone", "Microphone Jack",
49			"Headphone", "Headphone Jack",
50			"Line", "Line In Jack";
51
52		codec_dai: simple-audio-card,codec {
53			clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>;
54			sound-dai = <&wm8904_1a>;
55		};
56
57		simple-audio-card,cpu {
58			sound-dai = <&sai1>;
59		};
60	};
61};
62
63&aud2htx {
64	status = "okay";
65};
66
67/* SMARC SPI0 */
68&ecspi1 {
69	status = "okay";
70};
71
72/* SMARC GBE0 */
73&eqos {
74	status = "okay";
75};
76
77/* SMARC GBE1 */
78&fec {
79	status = "okay";
80};
81
82/* SMARC CAN1 */
83&flexcan1 {
84	status = "okay";
85};
86
87/* SMARC CAN0 */
88&flexcan2 {
89	status = "okay";
90};
91
92&gpio1 {
93	pinctrl-names = "default";
94	pinctrl-0 = <&pinctrl_gpio7>,
95		    <&pinctrl_gpio8>,
96		    <&pinctrl_gpio9>,
97		    <&pinctrl_gpio10>,
98		    <&pinctrl_gpio11>,
99		    <&pinctrl_gpio12>,
100		    <&pinctrl_gpio13>;
101};
102
103&gpio3 {
104	pinctrl-names = "default";
105	pinctrl-0 = <&pinctrl_lvds_dsi_sel>;
106};
107
108&gpio4 {
109	pinctrl-names = "default";
110	pinctrl-0 = <&pinctrl_gpio4>, <&pinctrl_gpio6>;
111};
112
113&hdmi_pvi {
114	status = "okay";
115};
116
117/* SMARC HDMI */
118&hdmi_tx {
119	status = "okay";
120
121	ports {
122		port@1 {
123			hdmi_tx_out: endpoint {
124				remote-endpoint = <&native_hdmi_connector_in>;
125			};
126		};
127	};
128};
129
130&hdmi_tx_phy {
131	status = "okay";
132};
133
134/* SMARC I2C_LCD */
135&i2c2 {
136	status = "okay";
137
138	i2c-mux@70 {
139		compatible = "nxp,pca9543";
140		reg = <0x70>;
141		#address-cells = <1>;
142		#size-cells = <0>;
143
144		/* I2C on DSI Connector Pins 4/6 */
145		i2c_dsi_0: i2c@0 {
146			reg = <0>;
147			#address-cells = <1>;
148			#size-cells = <0>;
149		};
150
151		/* I2C on DSI Connector Pins 52/54 */
152		i2c_dsi_1: i2c@1 {
153			reg = <1>;
154			#address-cells = <1>;
155			#size-cells = <0>;
156		};
157	};
158};
159
160/* SMARC I2C_CAM0 */
161&i2c3 {
162	status = "okay";
163};
164
165/* SMARC I2C_GP */
166&i2c4 {
167	/* Audio Codec */
168	wm8904_1a: audio-codec@1a {
169		compatible = "wlf,wm8904";
170		reg = <0x1a>;
171		pinctrl-names = "default";
172		pinctrl-0 = <&pinctrl_sai1>, <&pinctrl_sai1_mclk>;
173		#sound-dai-cells = <0>;
174		clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>;
175		clock-names = "mclk";
176		AVDD-supply = <&reg_carrier_1p8v>;
177		CPVDD-supply = <&reg_carrier_1p8v>;
178		DBVDD-supply = <&reg_carrier_1p8v>;
179		DCVDD-supply = <&reg_carrier_1p8v>;
180		MICVDD-supply = <&reg_carrier_1p8v>;
181	};
182
183	/* On-Carrier Temperature Sensor */
184	temperature-sensor@4f {
185		compatible = "ti,tmp1075";
186		reg = <0x4f>;
187	};
188
189	/* On-Carrier EEPROM */
190	eeprom@57 {
191		compatible = "st,24c02", "atmel,24c02";
192		reg = <0x57>;
193		pagesize = <16>;
194	};
195};
196
197/* SMARC I2C_CAM1 */
198&i2c5 {
199	status = "okay";
200};
201
202/* SMARC I2C_PM */
203&i2c6 {
204	clock-frequency = <100000>;
205	status = "okay";
206
207	/* Fan controller */
208	fan@18 {
209		compatible = "ti,amc6821";
210		reg = <0x18>;
211	};
212
213	/* Current measurement into module VDD */
214	hwmon@40 {
215		compatible = "ti,ina226";
216		reg = <0x40>;
217		shunt-resistor = <5000>;
218	};
219};
220
221&lcdif3 {
222	status = "okay";
223};
224
225/* SMARC PCIE_A, M2 Key B */
226&pcie {
227	status = "okay";
228};
229
230&pcie_phy {
231	status = "okay";
232};
233
234/* SMARC LCD1_BKLT_PWM */
235&pwm1 {
236	status = "okay";
237};
238
239/* SMARC LCD0_BKLT_PWM */
240&pwm2 {
241	status = "okay";
242};
243
244/* SMARC I2S0 */
245&sai1 {
246	assigned-clocks = <&clk IMX8MP_CLK_SAI1>;
247	assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
248	assigned-clock-rates = <24576000>;
249	fsl,sai-mclk-direction-output;
250	status = "okay";
251};
252
253/* SMARC HDMI Audio */
254&sound_hdmi {
255	status = "okay";
256};
257
258/* SMARC SER0, RS485. Optional M.2 KEY E */
259&uart1 {
260	linux,rs485-enabled-at-boot-time;
261	rs485-rts-active-low;
262	rs485-rx-during-tx;
263	status = "okay";
264};
265
266/* SMARC SER2 */
267&uart2 {
268	status = "okay";
269};
270
271/* SMARC SER1, used as the Linux Console */
272&uart4 {
273	status = "okay";
274};
275
276/* SMARC USB0 */
277&usb3_0 {
278	status = "okay";
279};
280
281/* SMARC USB1..4 */
282&usb3_1 {
283	status = "okay";
284};
285
286&usb3_phy0 {
287	status = "okay";
288};
289
290&usb3_phy1 {
291	status = "okay";
292};
293
294/* SMARC SDIO */
295&usdhc2 {
296	status = "okay";
297};
298