xref: /linux/arch/arm64/boot/dts/ti/k3-am62-verdin-dev.dtsi (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * Copyright 2023 Toradex
4 *
5 * Common dtsi for Verdin AM62 SoM on Development carrier board
6 *
7 * https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62
8 * https://www.toradex.com/products/carrier-board/verdin-development-board-kit
9 */
10
11/ {
12	sound {
13		compatible = "simple-audio-card";
14		simple-audio-card,bitclock-master = <&codec_dai>;
15		simple-audio-card,format = "i2s";
16		simple-audio-card,frame-master = <&codec_dai>;
17		simple-audio-card,mclk-fs = <256>;
18		simple-audio-card,name = "verdin-nau8822";
19		simple-audio-card,routing =
20			"Headphones", "LHP",
21			"Headphones", "RHP",
22			"Speaker", "LSPK",
23			"Speaker", "RSPK",
24			"Line Out", "AUXOUT1",
25			"Line Out", "AUXOUT2",
26			"LAUX", "Line In",
27			"RAUX", "Line In",
28			"LMICP", "Mic In",
29			"RMICP", "Mic In";
30		simple-audio-card,widgets =
31			"Headphones", "Headphones",
32			"Line Out", "Line Out",
33			"Speaker", "Speaker",
34			"Microphone", "Mic In",
35			"Line", "Line In";
36
37		codec_dai: simple-audio-card,codec {
38			sound-dai = <&nau8822_1a>;
39		};
40
41		simple-audio-card,cpu {
42			sound-dai = <&mcasp0>;
43		};
44	};
45};
46
47/* Verdin ETHs */
48&cpsw3g {
49	pinctrl-names = "default";
50	pinctrl-0 = <&pinctrl_rgmii1>, <&pinctrl_rgmii2>;
51	status = "okay";
52};
53
54/* MDIO, shared by Verdin ETH_1 (On-module PHY) and Verdin ETH_2_RGMII */
55&cpsw3g_mdio {
56	status = "okay";
57
58	cpsw3g_phy1: ethernet-phy@7 {
59		compatible = "ethernet-phy-ieee802.3-c22";
60		reg = <7>;
61		interrupt-parent = <&main_gpio0>;
62		interrupts = <38 IRQ_TYPE_EDGE_FALLING>;
63		pinctrl-names = "default";
64		pinctrl-0 = <&pinctrl_eth2_rgmii_int>;
65		micrel,led-mode = <0>;
66	};
67};
68
69/* Verdin ETH_1 (On-module PHY) */
70&cpsw_port1 {
71	status = "okay";
72};
73
74/* Verdin ETH_2_RGMII */
75&cpsw_port2 {
76	phy-handle = <&cpsw3g_phy1>;
77	phy-mode = "rgmii-rxid";
78	status = "okay";
79};
80
81/* Verdin PWM_1, PWM_2 */
82&epwm0 {
83	status = "okay";
84};
85
86/* Verdin PWM_3_DSI */
87&epwm1 {
88	status = "okay";
89};
90
91&main_gpio0 {
92	pinctrl-names = "default";
93	pinctrl-0 = <&pinctrl_ctrl_sleep_moci>,
94		    <&pinctrl_gpio_5>,
95		    <&pinctrl_gpio_6>,
96		    <&pinctrl_gpio_7>,
97		    <&pinctrl_gpio_8>;
98};
99
100/* Verdin I2C_1 */
101&main_i2c1 {
102	status = "okay";
103
104	/* Audio Codec */
105	nau8822_1a: audio-codec@1a {
106		compatible = "nuvoton,nau8822";
107		reg = <0x1a>;
108		pinctrl-names = "default";
109		pinctrl-0 = <&pinctrl_i2s1_mclk>;
110		clock-names = "mclk";
111		clocks = <&audio_refclk1>;
112		#sound-dai-cells = <0>;
113	};
114
115	/* IO Expander */
116	gpio_expander_21: gpio@21 {
117		compatible = "nxp,pcal6416";
118		reg = <0x21>;
119		#gpio-cells = <2>;
120		gpio-controller;
121	};
122
123	/* Current measurement into module VCC */
124	hwmon@40 {
125		compatible = "ti,ina219";
126		reg = <0x40>;
127		shunt-resistor = <10000>;
128	};
129
130	/* Temperature sensor */
131	sensor@4f {
132		compatible = "ti,tmp75c";
133		reg = <0x4f>;
134	};
135
136	/* EEPROM */
137	eeprom@57 {
138		compatible = "st,24c02", "atmel,24c02";
139		reg = <0x57>;
140		pagesize = <16>;
141	};
142};
143
144/* Verdin I2C_2_DSI */
145&main_i2c2 {
146	status = "okay";
147};
148
149/* Verdin I2C_4_CSI */
150&main_i2c3 {
151	status = "okay";
152};
153
154/* Verdin CAN_1 */
155&main_mcan0 {
156	status = "okay";
157};
158
159/* Verdin SPI_1 */
160&main_spi1 {
161	status = "okay";
162};
163
164/* Verdin UART_3 */
165&main_uart0 {
166	status = "okay";
167};
168
169/* Verdin UART_1, connector X50 through RS485 transceiver. */
170&main_uart1 {
171	linux,rs485-enabled-at-boot-time;
172	rs485-rx-during-tx;
173	status = "okay";
174};
175
176/* Verdin I2S_1 */
177&mcasp0 {
178	status = "okay";
179};
180
181&mcu_gpio0 {
182	pinctrl-names = "default";
183	pinctrl-0 = <&pinctrl_gpio_1>,
184		    <&pinctrl_gpio_2>,
185		    <&pinctrl_gpio_3>,
186		    <&pinctrl_gpio_4>,
187		    <&pinctrl_pcie_1_reset>;
188};
189
190/* Verdin I2C_3_HDMI */
191&mcu_i2c0 {
192	status = "okay";
193};
194
195/* Verdin CAN_2 */
196&mcu_mcan0 {
197	status = "okay";
198};
199
200/* Verdin UART_4 */
201&mcu_uart0 {
202	status = "okay";
203};
204
205/* Verdin QSPI_1 */
206&ospi0 {
207	status = "okay";
208};
209
210/* Verdin SD_1 */
211&sdhci1 {
212	status = "okay";
213};
214
215/* Verdin USB_1 */
216&usbss0 {
217	status = "okay";
218};
219
220&usb0 {
221	status = "okay";
222};
223
224/* Verdin USB_2 */
225&usbss1 {
226	status = "okay";
227};
228
229&usb1 {
230	status = "okay";
231};
232
233/* Verdin CTRL_WAKE1_MICO# */
234&verdin_gpio_keys {
235	status = "okay";
236};
237
238/* Verdin PCIE_1_RESET# */
239&verdin_pcie_1_reset_hog {
240	status = "okay";
241};
242
243/* Verdin UART_2 */
244&wkup_uart0 {
245	status = "okay";
246};
247