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