1c9ccf3a3SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2c9ccf3a3SEmmanuel Vadot/*
3c9ccf3a3SEmmanuel Vadot * Copyright 2022 Toradex
4c9ccf3a3SEmmanuel Vadot */
5c9ccf3a3SEmmanuel Vadot
6c9ccf3a3SEmmanuel Vadot/ {
7c9ccf3a3SEmmanuel Vadot	sound_card: sound-card {
8c9ccf3a3SEmmanuel Vadot		compatible = "simple-audio-card";
9c9ccf3a3SEmmanuel Vadot		simple-audio-card,bitclock-master = <&dailink_master>;
10c9ccf3a3SEmmanuel Vadot		simple-audio-card,format = "i2s";
11c9ccf3a3SEmmanuel Vadot		simple-audio-card,frame-master = <&dailink_master>;
128bab661aSEmmanuel Vadot		simple-audio-card,mclk-fs = <256>;
13c9ccf3a3SEmmanuel Vadot		simple-audio-card,name = "imx8mm-nau8822";
14c9ccf3a3SEmmanuel Vadot		simple-audio-card,routing =
15c9ccf3a3SEmmanuel Vadot			"Headphones", "LHP",
16c9ccf3a3SEmmanuel Vadot			"Headphones", "RHP",
17c9ccf3a3SEmmanuel Vadot			"Speaker", "LSPK",
18c9ccf3a3SEmmanuel Vadot			"Speaker", "RSPK",
19c9ccf3a3SEmmanuel Vadot			"Line Out", "AUXOUT1",
20c9ccf3a3SEmmanuel Vadot			"Line Out", "AUXOUT2",
21c9ccf3a3SEmmanuel Vadot			"LAUX", "Line In",
22c9ccf3a3SEmmanuel Vadot			"RAUX", "Line In",
23c9ccf3a3SEmmanuel Vadot			"LMICP", "Mic In",
24c9ccf3a3SEmmanuel Vadot			"RMICP", "Mic In";
25c9ccf3a3SEmmanuel Vadot		simple-audio-card,widgets =
26c9ccf3a3SEmmanuel Vadot			"Headphones", "Headphones",
27c9ccf3a3SEmmanuel Vadot			"Line Out", "Line Out",
28c9ccf3a3SEmmanuel Vadot			"Speaker", "Speaker",
29c9ccf3a3SEmmanuel Vadot			"Microphone", "Mic In",
30c9ccf3a3SEmmanuel Vadot			"Line", "Line In";
31c9ccf3a3SEmmanuel Vadot
32c9ccf3a3SEmmanuel Vadot		dailink_master: simple-audio-card,codec {
33c9ccf3a3SEmmanuel Vadot			clocks = <&clk IMX8MM_CLK_SAI2_ROOT>;
34c9ccf3a3SEmmanuel Vadot			sound-dai = <&nau8822_1a>;
35c9ccf3a3SEmmanuel Vadot		};
36c9ccf3a3SEmmanuel Vadot
37c9ccf3a3SEmmanuel Vadot		simple-audio-card,cpu {
38c9ccf3a3SEmmanuel Vadot			sound-dai = <&sai2>;
39c9ccf3a3SEmmanuel Vadot		};
40c9ccf3a3SEmmanuel Vadot	};
41c9ccf3a3SEmmanuel Vadot};
42c9ccf3a3SEmmanuel Vadot
43*cb7aa33aSEmmanuel Vadot/* Verdin SPI_1 */
44*cb7aa33aSEmmanuel Vadot&ecspi2 {
45*cb7aa33aSEmmanuel Vadot	status = "okay";
46*cb7aa33aSEmmanuel Vadot};
47*cb7aa33aSEmmanuel Vadot
48*cb7aa33aSEmmanuel Vadot/* EEPROM on display adapter boards */
49*cb7aa33aSEmmanuel Vadot&eeprom_display_adapter {
50*cb7aa33aSEmmanuel Vadot	status = "okay";
51*cb7aa33aSEmmanuel Vadot};
52*cb7aa33aSEmmanuel Vadot
53*cb7aa33aSEmmanuel Vadot/* EEPROM on Verdin Development board */
54*cb7aa33aSEmmanuel Vadot&eeprom_carrier_board {
55*cb7aa33aSEmmanuel Vadot	status = "okay";
56*cb7aa33aSEmmanuel Vadot};
57*cb7aa33aSEmmanuel Vadot
58*cb7aa33aSEmmanuel Vadot&fec1 {
59*cb7aa33aSEmmanuel Vadot	status = "okay";
60*cb7aa33aSEmmanuel Vadot};
61*cb7aa33aSEmmanuel Vadot
62*cb7aa33aSEmmanuel Vadot/* Verdin QSPI_1 */
63*cb7aa33aSEmmanuel Vadot&flexspi {
64*cb7aa33aSEmmanuel Vadot	status = "okay";
65*cb7aa33aSEmmanuel Vadot};
66*cb7aa33aSEmmanuel Vadot
67*cb7aa33aSEmmanuel Vadot/* Current measurement into module VCC */
68*cb7aa33aSEmmanuel Vadot&hwmon {
69*cb7aa33aSEmmanuel Vadot	status = "okay";
70*cb7aa33aSEmmanuel Vadot};
71*cb7aa33aSEmmanuel Vadot
72*cb7aa33aSEmmanuel Vadot&hwmon_temp {
73*cb7aa33aSEmmanuel Vadot	vs-supply = <&reg_1p8v>;
74*cb7aa33aSEmmanuel Vadot	status = "okay";
75*cb7aa33aSEmmanuel Vadot};
76*cb7aa33aSEmmanuel Vadot
77*cb7aa33aSEmmanuel Vadot&i2c3 {
78*cb7aa33aSEmmanuel Vadot	status = "okay";
79*cb7aa33aSEmmanuel Vadot};
80*cb7aa33aSEmmanuel Vadot
81c9ccf3a3SEmmanuel Vadot&gpio_expander_21 {
82c9ccf3a3SEmmanuel Vadot	status = "okay";
83c9ccf3a3SEmmanuel Vadot};
84c9ccf3a3SEmmanuel Vadot
85c9ccf3a3SEmmanuel Vadot/* Verdin I2C_1 */
86c9ccf3a3SEmmanuel Vadot&i2c4 {
87*cb7aa33aSEmmanuel Vadot	status = "okay";
88*cb7aa33aSEmmanuel Vadot
89c9ccf3a3SEmmanuel Vadot	/* Audio Codec */
90c9ccf3a3SEmmanuel Vadot	nau8822_1a: audio-codec@1a {
91c9ccf3a3SEmmanuel Vadot		compatible = "nuvoton,nau8822";
92c9ccf3a3SEmmanuel Vadot		reg = <0x1a>;
93*cb7aa33aSEmmanuel Vadot		#sound-dai-cells = <0>;
94c9ccf3a3SEmmanuel Vadot	};
95c9ccf3a3SEmmanuel Vadot};
96c9ccf3a3SEmmanuel Vadot
97*cb7aa33aSEmmanuel Vadot/* Verdin PCIE_1 */
98*cb7aa33aSEmmanuel Vadot&pcie0 {
99*cb7aa33aSEmmanuel Vadot	status = "okay";
100*cb7aa33aSEmmanuel Vadot};
101*cb7aa33aSEmmanuel Vadot
102*cb7aa33aSEmmanuel Vadot&pcie_phy {
103*cb7aa33aSEmmanuel Vadot	status = "okay";
104*cb7aa33aSEmmanuel Vadot};
105*cb7aa33aSEmmanuel Vadot
106*cb7aa33aSEmmanuel Vadot/* Verdin PWM_3_DSI */
107*cb7aa33aSEmmanuel Vadot&pwm1 {
108*cb7aa33aSEmmanuel Vadot	status = "okay";
109*cb7aa33aSEmmanuel Vadot};
110*cb7aa33aSEmmanuel Vadot
111*cb7aa33aSEmmanuel Vadot/* Verdin PWM_1 */
112*cb7aa33aSEmmanuel Vadot&pwm2 {
113*cb7aa33aSEmmanuel Vadot	status = "okay";
114*cb7aa33aSEmmanuel Vadot};
115*cb7aa33aSEmmanuel Vadot
116*cb7aa33aSEmmanuel Vadot/* Verdin PWM_2 */
117*cb7aa33aSEmmanuel Vadot&pwm3 {
118*cb7aa33aSEmmanuel Vadot	status = "okay";
119*cb7aa33aSEmmanuel Vadot};
120*cb7aa33aSEmmanuel Vadot
121*cb7aa33aSEmmanuel Vadot/* Verdin I2S_1 */
122*cb7aa33aSEmmanuel Vadot&sai2 {
123*cb7aa33aSEmmanuel Vadot	status = "okay";
124*cb7aa33aSEmmanuel Vadot};
125*cb7aa33aSEmmanuel Vadot
126*cb7aa33aSEmmanuel Vadot/* Verdin UART_3 */
127*cb7aa33aSEmmanuel Vadot&uart1 {
128*cb7aa33aSEmmanuel Vadot	status = "okay";
129*cb7aa33aSEmmanuel Vadot};
130*cb7aa33aSEmmanuel Vadot
131c9ccf3a3SEmmanuel Vadot/* Verdin UART_1, connector X50 through RS485 transceiver */
132c9ccf3a3SEmmanuel Vadot&uart2 {
133c9ccf3a3SEmmanuel Vadot	linux,rs485-enabled-at-boot-time;
134c9ccf3a3SEmmanuel Vadot	rs485-rts-active-low;
135c9ccf3a3SEmmanuel Vadot	rs485-rx-during-tx;
136*cb7aa33aSEmmanuel Vadot	status = "okay";
137*cb7aa33aSEmmanuel Vadot};
138*cb7aa33aSEmmanuel Vadot
139*cb7aa33aSEmmanuel Vadot/* Verdin UART_2 */
140*cb7aa33aSEmmanuel Vadot&uart3 {
141*cb7aa33aSEmmanuel Vadot	status = "okay";
142*cb7aa33aSEmmanuel Vadot};
143*cb7aa33aSEmmanuel Vadot
144*cb7aa33aSEmmanuel Vadot/* Verdin USB_1 */
145*cb7aa33aSEmmanuel Vadot&usbotg1 {
146*cb7aa33aSEmmanuel Vadot	disable-over-current;
147*cb7aa33aSEmmanuel Vadot	status = "okay";
148*cb7aa33aSEmmanuel Vadot};
149*cb7aa33aSEmmanuel Vadot
150*cb7aa33aSEmmanuel Vadot/* Verdin USB_2 */
151*cb7aa33aSEmmanuel Vadot&usbotg2 {
152*cb7aa33aSEmmanuel Vadot	disable-over-current;
153*cb7aa33aSEmmanuel Vadot	status = "okay";
154c9ccf3a3SEmmanuel Vadot};
155c9ccf3a3SEmmanuel Vadot
156c9ccf3a3SEmmanuel Vadot/* Limit frequency on dev board due to long traces and bad signal integrity */
157c9ccf3a3SEmmanuel Vadot&usdhc2 {
158c9ccf3a3SEmmanuel Vadot	max-frequency = <100000000>;
159*cb7aa33aSEmmanuel Vadot	status = "okay";
160c9ccf3a3SEmmanuel Vadot};
161