17f066473SFrancesco Dolcini// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
27f066473SFrancesco Dolcini/*
37f066473SFrancesco Dolcini * Copyright 2023 Toradex
47f066473SFrancesco Dolcini *
57f066473SFrancesco Dolcini * Common dtsi for Verdin AM62 SoM on Yavia carrier board
67f066473SFrancesco Dolcini *
77f066473SFrancesco Dolcini * https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62
87f066473SFrancesco Dolcini * https://www.toradex.com/products/carrier-board/yavia
97f066473SFrancesco Dolcini */
107f066473SFrancesco Dolcini
117f066473SFrancesco Dolcini#include <dt-bindings/leds/common.h>
127f066473SFrancesco Dolcini
137f066473SFrancesco Dolcini/ {
147f066473SFrancesco Dolcini	leds {
157f066473SFrancesco Dolcini		compatible = "gpio-leds";
167f066473SFrancesco Dolcini		pinctrl-names = "default";
177f066473SFrancesco Dolcini		pinctrl-0 = <&pinctrl_qspi1_clk_gpio>,
187f066473SFrancesco Dolcini			    <&pinctrl_qspi1_cs_gpio>,
197f066473SFrancesco Dolcini			    <&pinctrl_qspi1_io0_gpio>,
207f066473SFrancesco Dolcini			    <&pinctrl_qspi1_io1_gpio>,
217f066473SFrancesco Dolcini			    <&pinctrl_qspi1_io2_gpio>,
227f066473SFrancesco Dolcini			    <&pinctrl_qspi1_io3_gpio>;
237f066473SFrancesco Dolcini
247f066473SFrancesco Dolcini		/* SODIMM 52 - LD1_RED */
257f066473SFrancesco Dolcini		led-0 {
267f066473SFrancesco Dolcini			color = <LED_COLOR_ID_RED>;
277f066473SFrancesco Dolcini			function = LED_FUNCTION_DEBUG;
287f066473SFrancesco Dolcini			function-enumerator = <1>;
297f066473SFrancesco Dolcini			gpios = <&main_gpio0 0 GPIO_ACTIVE_HIGH>;
307f066473SFrancesco Dolcini		};
317f066473SFrancesco Dolcini		/* SODIMM 54 - LD1_GREEN */
327f066473SFrancesco Dolcini		led-1 {
337f066473SFrancesco Dolcini			color = <LED_COLOR_ID_GREEN>;
347f066473SFrancesco Dolcini			function = LED_FUNCTION_DEBUG;
357f066473SFrancesco Dolcini			function-enumerator = <1>;
367f066473SFrancesco Dolcini			gpios = <&main_gpio0 11 GPIO_ACTIVE_HIGH>;
377f066473SFrancesco Dolcini		};
387f066473SFrancesco Dolcini		/* SODIMM 56 - LD1_BLUE */
397f066473SFrancesco Dolcini		led-2 {
407f066473SFrancesco Dolcini			color = <LED_COLOR_ID_BLUE>;
417f066473SFrancesco Dolcini			function = LED_FUNCTION_DEBUG;
427f066473SFrancesco Dolcini			function-enumerator = <1>;
437f066473SFrancesco Dolcini			gpios = <&main_gpio0 3 GPIO_ACTIVE_HIGH>;
447f066473SFrancesco Dolcini		};
457f066473SFrancesco Dolcini		/* SODIMM 58 - LD2_RED */
467f066473SFrancesco Dolcini		led-3 {
477f066473SFrancesco Dolcini			color = <LED_COLOR_ID_RED>;
487f066473SFrancesco Dolcini			function = LED_FUNCTION_DEBUG;
497f066473SFrancesco Dolcini			function-enumerator = <2>;
507f066473SFrancesco Dolcini			gpios = <&main_gpio0 4 GPIO_ACTIVE_HIGH>;
517f066473SFrancesco Dolcini		};
527f066473SFrancesco Dolcini		/* SODIMM 60 - LD2_GREEN */
537f066473SFrancesco Dolcini		led-4 {
547f066473SFrancesco Dolcini			color = <LED_COLOR_ID_GREEN>;
557f066473SFrancesco Dolcini			function = LED_FUNCTION_DEBUG;
567f066473SFrancesco Dolcini			function-enumerator = <2>;
577f066473SFrancesco Dolcini			gpios = <&main_gpio0 5 GPIO_ACTIVE_HIGH>;
587f066473SFrancesco Dolcini		};
597f066473SFrancesco Dolcini		/* SODIMM 62 - LD2_BLUE */
607f066473SFrancesco Dolcini		led-5 {
617f066473SFrancesco Dolcini			color = <LED_COLOR_ID_BLUE>;
627f066473SFrancesco Dolcini			function = LED_FUNCTION_DEBUG;
637f066473SFrancesco Dolcini			function-enumerator = <2>;
647f066473SFrancesco Dolcini			gpios = <&main_gpio0 6 GPIO_ACTIVE_HIGH>;
657f066473SFrancesco Dolcini		};
667f066473SFrancesco Dolcini	};
677f066473SFrancesco Dolcini};
687f066473SFrancesco Dolcini
697f066473SFrancesco Dolcini/* Verdin ETHs */
707f066473SFrancesco Dolcini&cpsw3g {
717f066473SFrancesco Dolcini	status = "okay";
727f066473SFrancesco Dolcini};
737f066473SFrancesco Dolcini
747f066473SFrancesco Dolcini/* MDIO, shared by Verdin ETH_1 (On-module PHY) and Verdin ETH_2_RGMII */
757f066473SFrancesco Dolcini&cpsw3g_mdio {
767f066473SFrancesco Dolcini	status = "okay";
777f066473SFrancesco Dolcini};
787f066473SFrancesco Dolcini
797f066473SFrancesco Dolcini/* Verdin ETH_1 (On-module PHY) */
807f066473SFrancesco Dolcini&cpsw_port1 {
817f066473SFrancesco Dolcini	status = "okay";
827f066473SFrancesco Dolcini};
837f066473SFrancesco Dolcini
847f066473SFrancesco Dolcini/* Verdin PWM_1, PWM_2 */
857f066473SFrancesco Dolcini&epwm0 {
867f066473SFrancesco Dolcini	status = "okay";
877f066473SFrancesco Dolcini};
887f066473SFrancesco Dolcini
897f066473SFrancesco Dolcini/* Verdin PWM_3_DSI */
907f066473SFrancesco Dolcini&epwm1 {
917f066473SFrancesco Dolcini	status = "okay";
927f066473SFrancesco Dolcini};
937f066473SFrancesco Dolcini
947f066473SFrancesco Dolcini&main_gpio0 {
957f066473SFrancesco Dolcini	pinctrl-names = "default";
967f066473SFrancesco Dolcini	pinctrl-0 = <&pinctrl_ctrl_sleep_moci>,
977f066473SFrancesco Dolcini		    <&pinctrl_gpio_5>,
987f066473SFrancesco Dolcini		    <&pinctrl_gpio_6>,
997f066473SFrancesco Dolcini		    <&pinctrl_gpio_7>,
1007f066473SFrancesco Dolcini		    <&pinctrl_gpio_8>,
1017f066473SFrancesco Dolcini		    <&pinctrl_qspi1_cs2_gpio>;
1027f066473SFrancesco Dolcini};
1037f066473SFrancesco Dolcini
1047f066473SFrancesco Dolcini&main_gpio1 {
1057f066473SFrancesco Dolcini	pinctrl-names = "default";
1067f066473SFrancesco Dolcini	pinctrl-0 = <&pinctrl_qspi1_dqs_gpio>;
1077f066473SFrancesco Dolcini};
1087f066473SFrancesco Dolcini
1097f066473SFrancesco Dolcini/* Verdin I2C_1 */
1107f066473SFrancesco Dolcini&main_i2c1 {
1117f066473SFrancesco Dolcini	status = "okay";
1127f066473SFrancesco Dolcini
1137f066473SFrancesco Dolcini	/* Temperature sensor */
1147f066473SFrancesco Dolcini	sensor@4f {
1157f066473SFrancesco Dolcini		compatible = "ti,tmp75c";
1167f066473SFrancesco Dolcini		reg = <0x4f>;
1177f066473SFrancesco Dolcini	};
1187f066473SFrancesco Dolcini
1197f066473SFrancesco Dolcini	/* EEPROM */
1207f066473SFrancesco Dolcini	eeprom@57 {
1217f066473SFrancesco Dolcini		compatible = "st,24c02";
1227f066473SFrancesco Dolcini		reg = <0x57>;
1237f066473SFrancesco Dolcini		pagesize = <16>;
1247f066473SFrancesco Dolcini	};
1257f066473SFrancesco Dolcini};
1267f066473SFrancesco Dolcini
1277f066473SFrancesco Dolcini/* Verdin I2C_2_DSI */
1287f066473SFrancesco Dolcini&main_i2c2 {
1297f066473SFrancesco Dolcini	status = "okay";
1307f066473SFrancesco Dolcini};
1317f066473SFrancesco Dolcini
1327f066473SFrancesco Dolcini/* Verdin I2C_4_CSI */
1337f066473SFrancesco Dolcini&main_i2c3 {
1347f066473SFrancesco Dolcini	status = "okay";
1357f066473SFrancesco Dolcini};
1367f066473SFrancesco Dolcini
1377f066473SFrancesco Dolcini/* Verdin CAN_1 */
1387f066473SFrancesco Dolcini&main_mcan0 {
1397f066473SFrancesco Dolcini	status = "okay";
1407f066473SFrancesco Dolcini};
1417f066473SFrancesco Dolcini
1427f066473SFrancesco Dolcini/* Verdin SPI_1 */
1437f066473SFrancesco Dolcini&main_spi1 {
1447f066473SFrancesco Dolcini	status = "okay";
1457f066473SFrancesco Dolcini};
1467f066473SFrancesco Dolcini
1477f066473SFrancesco Dolcini/* Verdin UART_3 */
1487f066473SFrancesco Dolcini&main_uart0 {
1497f066473SFrancesco Dolcini	status = "okay";
1507f066473SFrancesco Dolcini};
1517f066473SFrancesco Dolcini
1527f066473SFrancesco Dolcini/* Verdin UART_1 */
1537f066473SFrancesco Dolcini&main_uart1 {
1547f066473SFrancesco Dolcini	status = "okay";
1557f066473SFrancesco Dolcini};
1567f066473SFrancesco Dolcini
1577f066473SFrancesco Dolcini&mcu_gpio0 {
1587f066473SFrancesco Dolcini	pinctrl-names = "default";
1597f066473SFrancesco Dolcini	pinctrl-0 = <&pinctrl_gpio_1>,
1607f066473SFrancesco Dolcini		    <&pinctrl_gpio_2>,
1617f066473SFrancesco Dolcini		    <&pinctrl_gpio_3>,
1627f066473SFrancesco Dolcini		    <&pinctrl_gpio_4>;
1637f066473SFrancesco Dolcini};
1647f066473SFrancesco Dolcini
1657f066473SFrancesco Dolcini/* Verdin I2C_3_HDMI */
1667f066473SFrancesco Dolcini&mcu_i2c0 {
1677f066473SFrancesco Dolcini	status = "okay";
1687f066473SFrancesco Dolcini};
1697f066473SFrancesco Dolcini
170*7480cea3SHiago De Franco/* Verdin CAN_2 */
171*7480cea3SHiago De Franco&mcu_mcan0 {
172*7480cea3SHiago De Franco	status = "okay";
173*7480cea3SHiago De Franco};
174*7480cea3SHiago De Franco
1757f066473SFrancesco Dolcini/* Verdin UART_4 */
1767f066473SFrancesco Dolcini&mcu_uart0 {
1777f066473SFrancesco Dolcini	status = "okay";
1787f066473SFrancesco Dolcini};
1797f066473SFrancesco Dolcini
1807f066473SFrancesco Dolcini/* Verdin SD_1 */
1817f066473SFrancesco Dolcini&sdhci1 {
1827f066473SFrancesco Dolcini	status = "okay";
1837f066473SFrancesco Dolcini};
1847f066473SFrancesco Dolcini
1857f066473SFrancesco Dolcini/* Verdin USB_1 */
1867f066473SFrancesco Dolcini&usbss0 {
1877f066473SFrancesco Dolcini	status = "okay";
1887f066473SFrancesco Dolcini};
1897f066473SFrancesco Dolcini
1907f066473SFrancesco Dolcini&usb0 {
1917f066473SFrancesco Dolcini	status = "okay";
1927f066473SFrancesco Dolcini};
1937f066473SFrancesco Dolcini
1947f066473SFrancesco Dolcini/* Verdin USB_2 */
1957f066473SFrancesco Dolcini&usbss1 {
1967f066473SFrancesco Dolcini	status = "okay";
1977f066473SFrancesco Dolcini};
1987f066473SFrancesco Dolcini
1997f066473SFrancesco Dolcini&usb1 {
2007f066473SFrancesco Dolcini	status = "okay";
2017f066473SFrancesco Dolcini};
2027f066473SFrancesco Dolcini
2037f066473SFrancesco Dolcini/* Verdin CTRL_WAKE1_MICO# */
2047f066473SFrancesco Dolcini&verdin_gpio_keys {
2057f066473SFrancesco Dolcini	status = "okay";
2067f066473SFrancesco Dolcini};
2077f066473SFrancesco Dolcini
2087f066473SFrancesco Dolcini/* Verdin UART_2 */
2097f066473SFrancesco Dolcini&wkup_uart0 {
2107f066473SFrancesco Dolcini	/* FIXME: WKUP UART0 is used by DM firmware */
2117f066473SFrancesco Dolcini	status = "reserved";
2127f066473SFrancesco Dolcini};
213