xref: /freebsd/sys/contrib/device-tree/src/arm64/freescale/imx95-tqma9596sa-mb-smarc-2.dts (revision 9978553d0199e7ec0bdd1c44fc7f6c7b0c11e43b)
1// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
2/*
3 * Copyright (c) 2024 TQ-Systems GmbH <linux@ew.tq-group.com>,
4 * D-82229 Seefeld, Germany.
5 * Author: Alexander Stein
6 */
7
8/dts-v1/;
9
10#include <dt-bindings/phy/phy-imx8-pcie.h>
11#include "imx95-tqma9596sa.dtsi"
12
13/ {
14	model = "TQ-Systems i.MX95 TQMa95xxSA on MB-SMARC-2";
15	compatible = "tq,imx95-tqma9596sa-mb-smarc-2", "tq,imx95-tqma9596sa", "fsl,imx95";
16
17	aliases {
18		gpio0 = &gpio1;
19		gpio1 = &gpio2;
20		gpio2 = &gpio3;
21		gpio3 = &gpio4;
22		i2c0 = &lpi2c1;
23		i2c1 = &lpi2c2;
24		i2c2 = &lpi2c3;
25		i2c3 = &lpi2c4;
26		i2c4 = &lpi2c5;
27		i2c5 = &lpi2c6;
28		i2c6 = &lpi2c7;
29		i2c7 = &lpi2c8;
30		mmc0 = &usdhc1;
31		mmc1 = &usdhc2;
32		rtc0 = &pcf85063;
33		rtc1 = &scmi_bbm;
34		serial0 = &lpuart1;
35		serial1 = &lpuart2;
36		serial2 = &lpuart3;
37		serial3 = &lpuart4;
38		serial4 = &lpuart5;
39		serial5 = &lpuart6;
40		serial6 = &lpuart7;
41		serial7 = &lpuart8;
42	};
43
44	chosen {
45		stdout-path = &lpuart7;
46	};
47
48	backlight_lvds0: backlight-lvds0 {
49		compatible = "pwm-backlight";
50		pwms = <&tpm3 0 100000 0>;
51		brightness-levels = <0 4 8 16 32 64 128 255>;
52		default-brightness-level = <7>;
53		enable-gpios = <&expander2 1 GPIO_ACTIVE_HIGH>;
54		power-supply = <&reg_12v0>;
55		status = "disabled";
56	};
57
58	backlight_lvds1: backlight-lvds1 {
59		compatible = "pwm-backlight";
60		pwms = <&tpm4 0 100000 0>;
61		brightness-levels = <0 4 8 16 32 64 128 255>;
62		default-brightness-level = <7>;
63		enable-gpios = <&expander2 3 GPIO_ACTIVE_HIGH>;
64		power-supply = <&reg_12v0>;
65		status = "disabled";
66	};
67
68	panel_lvds0: panel-lvds0 {
69		/*
70		 * Display is not fixed, so compatible has to be added from
71		 * DT overlay
72		 */
73		backlight = <&backlight_lvds0>;
74		power-supply = <&reg_lvds0>;
75		status = "disabled";
76
77		port {
78			panel_in_lvds0: endpoint {
79				/* TODO: LVDS0 out */
80			};
81		};
82	};
83
84	panel_lvds1: panel-lvds1 {
85		/*
86		 * Display is not fixed, so compatible has to be added from
87		 * DT overlay
88		 */
89		backlight = <&backlight_lvds1>;
90		power-supply = <&reg_lvds1>;
91		status = "disabled";
92
93		port {
94			panel_in_lvds1: endpoint {
95				/* TODO: LVDS1 out */
96			};
97		};
98	};
99
100	reg_1v8: regulator-1v8 {
101		compatible = "regulator-fixed";
102		regulator-name = "1V8";
103		regulator-min-microvolt = <1800000>;
104		regulator-max-microvolt = <1800000>;
105		regulator-always-on;
106	};
107
108	reg_3v3: regulator-3v3 {
109		compatible = "regulator-fixed";
110		regulator-name = "3V3";
111		regulator-min-microvolt = <3300000>;
112		regulator-max-microvolt = <3300000>;
113		regulator-always-on;
114	};
115
116	reg_12v0: regulator-12v0 {
117		compatible = "regulator-fixed";
118		regulator-name = "12V0";
119		regulator-min-microvolt = <12000000>;
120		regulator-max-microvolt = <12000000>;
121		regulator-always-on;
122	};
123
124	reg_lvds0: regulator-lvds0 {
125		compatible = "regulator-fixed";
126		regulator-name = "LCD0_VDD_EN";
127		regulator-min-microvolt = <3300000>;
128		regulator-max-microvolt = <3300000>;
129		gpio = <&expander2 2 GPIO_ACTIVE_HIGH>;
130		enable-active-high;
131	};
132
133	reg_lvds1: regulator-lvds1 {
134		compatible = "regulator-fixed";
135		regulator-name = "LCD1_VDD_EN";
136		regulator-min-microvolt = <3300000>;
137		regulator-max-microvolt = <3300000>;
138		gpio = <&expander2 4 GPIO_ACTIVE_HIGH>;
139		enable-active-high;
140	};
141
142	sound {
143		compatible = "fsl,imx-audio-tlv320aic32x4";
144		model = "tqm-tlv320aic32";
145		audio-codec = <&tlv320aic3x04>;
146		audio-cpu = <&sai3>;
147	};
148};
149
150&enetc_port0 {
151	status = "okay";
152};
153
154&enetc_port1 {
155	status = "okay";
156};
157
158&expander2 {
159	pcie1-clk-en-hog {
160		gpio-hog;
161		gpios = <14 GPIO_ACTIVE_HIGH>;
162		output-high;
163		line-name = "PCIE1_CLK_EN";
164	};
165
166	pcie2-clk-en-hog {
167		gpio-hog;
168		gpios = <15 GPIO_ACTIVE_HIGH>;
169		output-high;
170		line-name = "PCIE2_CLK_EN";
171	};
172};
173
174&flexcan1 {
175	pinctrl-names = "default";
176	pinctrl-0 = <&pinctrl_flexcan1>;
177	xceiver-supply = <&reg_3v3>;
178	status = "okay";
179};
180
181&flexcan3 {
182	pinctrl-names = "default";
183	pinctrl-0 = <&pinctrl_flexcan3>;
184	xceiver-supply = <&reg_3v3>;
185	status = "okay";
186};
187
188&lpi2c1 {
189	tlv320aic3x04: audio-codec@18 {
190		compatible = "ti,tlv320aic32x4";
191		reg = <0x18>;
192		clocks = <&scmi_clk IMX95_CLK_SAI3>;
193		clock-names = "mclk";
194		iov-supply = <&reg_1v8>;
195		ldoin-supply = <&reg_3v3>;
196	};
197
198	eeprom2: eeprom@57 {
199		compatible = "atmel,24c32";
200		reg = <0x57>;
201		pagesize = <32>;
202		vcc-supply = <&reg_3v3>;
203	};
204};
205
206&lpspi3 {
207	pinctrl-names = "default";
208	pinctrl-0 = <&pinctrl_lpspi3>;
209	cs-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>, <&gpio2 7 GPIO_ACTIVE_LOW>;
210	status = "okay";
211};
212
213/* SER0 */
214&lpuart1 {
215	status = "disabled";
216};
217
218/* SER3 */
219&lpuart5 {
220	status = "okay";
221};
222
223/* SER1 */
224&lpuart7 {
225	status = "okay";
226};
227
228/* SER2 */
229&lpuart8 {
230	status = "okay";
231};
232
233/* X44 mPCIe */
234&pcie0 {
235	pinctrl-0 = <&pinctrl_pcie0>;
236	pinctrl-names = "default";
237	clocks = <&scmi_clk IMX95_CLK_HSIO>,
238		 <&pcieclk 1>,
239		 <&scmi_clk IMX95_CLK_HSIOPLL_VCO>,
240		 <&scmi_clk IMX95_CLK_HSIOPCIEAUX>;
241	clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_aux";
242	reset-gpio = <&expander2 9 GPIO_ACTIVE_LOW>;
243	status = "okay";
244};
245
246/* X22 PCIe x1 socket */
247&pcie1 {
248	pinctrl-0 = <&pinctrl_pcie1>;
249	pinctrl-names = "default";
250	clocks = <&scmi_clk IMX95_CLK_HSIO>,
251		 <&pcieclk 0>,
252		 <&scmi_clk IMX95_CLK_HSIOPLL_VCO>,
253		 <&scmi_clk IMX95_CLK_HSIOPCIEAUX>;
254	clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_aux";
255	reset-gpio = <&expander2 10 GPIO_ACTIVE_LOW>;
256	status = "okay";
257};
258
259&reg_sdvmmc {
260	status = "okay";
261};
262
263&sai3 {
264	#sound-dai-cells = <0>;
265	pinctrl-names = "default";
266	pinctrl-0 = <&pinctrl_sai3>;
267	assigned-clocks = <&scmi_clk IMX95_CLK_AUDIOPLL1_VCO>,
268			  <&scmi_clk IMX95_CLK_AUDIOPLL2_VCO>,
269			  <&scmi_clk IMX95_CLK_AUDIOPLL1>,
270			  <&scmi_clk IMX95_CLK_AUDIOPLL2>,
271			  <&scmi_clk IMX95_CLK_SAI3>;
272	assigned-clock-parents = <0>, <0>, <0>, <0>,
273				 <&scmi_clk IMX95_CLK_AUDIOPLL1>;
274	assigned-clock-rates = <3932160000>,
275			       <3612672000>, <393216000>,
276			       <361267200>, <12288000>;
277	fsl,sai-mclk-direction-output;
278	status = "okay";
279};
280
281&sai5 {
282	#sound-dai-cells = <0>;
283	pinctrl-names = "default";
284	pinctrl-0 = <&pinctrl_sai5>;
285	assigned-clocks = <&scmi_clk IMX95_CLK_AUDIOPLL1_VCO>,
286			  <&scmi_clk IMX95_CLK_AUDIOPLL2_VCO>,
287			  <&scmi_clk IMX95_CLK_AUDIOPLL1>,
288			  <&scmi_clk IMX95_CLK_AUDIOPLL2>,
289			  <&scmi_clk IMX95_CLK_SAI5>;
290	assigned-clock-parents = <0>, <0>, <0>, <0>,
291				 <&scmi_clk IMX95_CLK_AUDIOPLL1>;
292	assigned-clock-rates = <3932160000>,
293			       <3612672000>, <393216000>,
294			       <361267200>, <12288000>;
295};
296
297/* X4 */
298&usb2 {
299	srp-disable;
300	hnp-disable;
301	adp-disable;
302	/* DR not yet supported */
303	dr_mode = "peripheral";
304	disable-over-current;
305	status = "okay";
306};
307
308
309/* X16 */
310&usdhc2 {
311	pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
312	pinctrl-0 = <&pinctrl_usdhc2>;
313	pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
314	pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
315	pinctrl-3 = <&pinctrl_usdhc2>;
316	vmmc-supply = <&reg_sdvmmc>;
317	cd-gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
318	no-1-8-v;
319	no-mmc;
320	no-sdio;
321	disable-wp;
322	bus-width = <4>;
323	status = "okay";
324};
325