1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * Copyright 2022 Toradex
4 */
5
6/ {
7	sound {
8		compatible = "simple-audio-card";
9		simple-audio-card,bitclock-master = <&codec_dai>;
10		simple-audio-card,format = "i2s";
11		simple-audio-card,frame-master = <&codec_dai>;
12		simple-audio-card,mclk-fs = <256>;
13		simple-audio-card,name = "imx8mp-wm8904";
14		simple-audio-card,routing =
15			"Headphone Jack", "HPOUTL",
16			"Headphone Jack", "HPOUTR",
17			"IN2L", "Line In Jack",
18			"IN2R", "Line In Jack",
19			"Headphone Jack", "MICBIAS",
20			"IN1L", "Headphone Jack";
21		simple-audio-card,widgets =
22			"Microphone", "Headphone Jack",
23			"Headphone", "Headphone Jack",
24			"Line", "Line In Jack";
25
26		codec_dai: simple-audio-card,codec {
27			clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>;
28			sound-dai = <&wm8904_1a>;
29		};
30
31		simple-audio-card,cpu {
32			sound-dai = <&sai1>;
33		};
34	};
35};
36
37&backlight {
38	power-supply = <&reg_3p3v>;
39};
40
41/* Verdin SPI_1 */
42&ecspi1 {
43	status = "okay";
44};
45
46/* EEPROM on display adapter boards */
47&eeprom_display_adapter {
48	status = "okay";
49};
50
51/* EEPROM on Verdin Development board */
52&eeprom_carrier_board {
53	status = "okay";
54};
55
56&eqos {
57	status = "okay";
58};
59
60&flexcan1 {
61	status = "okay";
62};
63
64&flexcan2 {
65	status = "okay";
66};
67
68/* Verdin QSPI_1 */
69&flexspi {
70	status = "okay";
71};
72
73/* Current measurement into module VCC */
74&hwmon {
75	status = "okay";
76};
77
78&hwmon_temp {
79	vs-supply = <&reg_1p8v>;
80	status = "okay";
81};
82
83/* Verdin I2C_2_DSI */
84&i2c2 {
85	status = "okay";
86};
87
88&i2c3 {
89	status = "okay";
90};
91
92/* Verdin I2C_1 */
93&i2c4 {
94	status = "okay";
95
96	/* Audio Codec */
97	wm8904_1a: audio-codec@1a {
98		compatible = "wlf,wm8904";
99		reg = <0x1a>;
100		pinctrl-names = "default";
101		pinctrl-0 = <&pinctrl_sai1>;
102		#sound-dai-cells = <0>;
103		clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>;
104		clock-names = "mclk";
105		AVDD-supply = <&reg_1p8v>;
106		CPVDD-supply = <&reg_1p8v>;
107		DBVDD-supply = <&reg_1p8v>;
108		DCVDD-supply = <&reg_1p8v>;
109		MICVDD-supply = <&reg_1p8v>;
110	};
111};
112
113/* Verdin PCIE_1 */
114&pcie {
115	status = "okay";
116};
117
118&pcie_phy {
119	status = "okay";
120};
121
122/* Verdin PWM_1 */
123&pwm1 {
124	status = "okay";
125};
126
127/* Verdin PWM_2 */
128&pwm2 {
129	status = "okay";
130};
131
132/* Verdin PWM_3_DSI */
133&pwm3 {
134	status = "okay";
135};
136
137&reg_usdhc2_vmmc {
138	vin-supply = <&reg_3p3v>;
139};
140
141/* Verdin I2S_1 */
142&sai1 {
143	assigned-clocks = <&clk IMX8MP_CLK_SAI1>;
144	assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
145	assigned-clock-rates = <24576000>;
146	fsl,sai-mclk-direction-output;
147	status = "okay";
148};
149
150/* Verdin UART_1 */
151&uart1 {
152	status = "okay";
153};
154
155/* Verdin UART_2 */
156&uart2 {
157	status = "okay";
158};
159
160/* Verdin UART_3, used as the Linux Console */
161&uart3 {
162	status = "okay";
163};
164
165/* Verdin USB_1 */
166&usb3_0 {
167	status = "okay";
168};
169
170&usb3_phy0 {
171	status = "okay";
172};
173
174/* Verdin USB_2 */
175&usb3_1 {
176	fsl,permanently-attached;
177	status = "okay";
178};
179
180&usb3_phy1 {
181	status = "okay";
182};
183
184/* Verdin SD_1 */
185&usdhc2 {
186	status = "okay";
187};
188