13443c1c4SWadim Egorov// SPDX-License-Identifier: GPL-2.0 23443c1c4SWadim Egorov/* 33443c1c4SWadim Egorov * Copyright (C) 2022 - 2023 PHYTEC Messtechnik GmbH 43443c1c4SWadim Egorov * Author: Wadim Egorov <w.egorov@phytec.de> 53443c1c4SWadim Egorov * 63443c1c4SWadim Egorov * Product homepage: 73443c1c4SWadim Egorov * https://www.phytec.com/product/phyboard-am62x 83443c1c4SWadim Egorov */ 93443c1c4SWadim Egorov 103443c1c4SWadim Egorov#include <dt-bindings/gpio/gpio.h> 113443c1c4SWadim Egorov#include <dt-bindings/input/input.h> 123443c1c4SWadim Egorov#include <dt-bindings/leds/common.h> 133443c1c4SWadim Egorov#include <dt-bindings/net/ti-dp83867.h> 143443c1c4SWadim Egorov#include "k3-am625.dtsi" 153443c1c4SWadim Egorov#include "k3-am62-phycore-som.dtsi" 163443c1c4SWadim Egorov 173443c1c4SWadim Egorov/ { 183443c1c4SWadim Egorov compatible = "phytec,am625-phyboard-lyra-rdk", 193443c1c4SWadim Egorov "phytec,am62-phycore-som", "ti,am625"; 203443c1c4SWadim Egorov model = "PHYTEC phyBOARD-Lyra AM625"; 213443c1c4SWadim Egorov 223443c1c4SWadim Egorov aliases { 233443c1c4SWadim Egorov serial2 = &main_uart0; 243443c1c4SWadim Egorov serial3 = &main_uart1; 253443c1c4SWadim Egorov mmc1 = &sdhci1; 263443c1c4SWadim Egorov usb0 = &usb0; 273443c1c4SWadim Egorov usb1 = &usb1; 283443c1c4SWadim Egorov ethernet1 = &cpsw_port2; 293443c1c4SWadim Egorov }; 303443c1c4SWadim Egorov 313443c1c4SWadim Egorov can_tc1: can-phy0 { 323443c1c4SWadim Egorov compatible = "ti,tcan1042"; 333443c1c4SWadim Egorov #phy-cells = <0>; 343443c1c4SWadim Egorov max-bitrate = <5000000>; 353443c1c4SWadim Egorov standby-gpios = <&gpio_exp 1 GPIO_ACTIVE_HIGH>; 363443c1c4SWadim Egorov }; 373443c1c4SWadim Egorov 383443c1c4SWadim Egorov keys { 393443c1c4SWadim Egorov compatible = "gpio-keys"; 403443c1c4SWadim Egorov autorepeat; 413443c1c4SWadim Egorov pinctrl-names = "default"; 423443c1c4SWadim Egorov pinctrl-0 = <&gpio_keys_pins_default>; 433443c1c4SWadim Egorov 443443c1c4SWadim Egorov key-home { 453443c1c4SWadim Egorov label = "home"; 463443c1c4SWadim Egorov linux,code = <KEY_HOME>; 473443c1c4SWadim Egorov gpios = <&main_gpio1 23 GPIO_ACTIVE_HIGH>; 483443c1c4SWadim Egorov }; 493443c1c4SWadim Egorov 503443c1c4SWadim Egorov key-menu { 513443c1c4SWadim Egorov label = "menu"; 523443c1c4SWadim Egorov linux,code = <KEY_MENU>; 533443c1c4SWadim Egorov gpios = <&gpio_exp 4 GPIO_ACTIVE_HIGH>; 543443c1c4SWadim Egorov }; 553443c1c4SWadim Egorov }; 563443c1c4SWadim Egorov 573443c1c4SWadim Egorov leds { 583443c1c4SWadim Egorov compatible = "gpio-leds"; 593443c1c4SWadim Egorov pinctrl-names = "default"; 603443c1c4SWadim Egorov pinctrl-0 = <&leds_pins_default>, <&user_leds_pins_default>; 613443c1c4SWadim Egorov 623443c1c4SWadim Egorov led-1 { 633443c1c4SWadim Egorov gpios = <&main_gpio0 32 GPIO_ACTIVE_HIGH>; 643443c1c4SWadim Egorov linux,default-trigger = "mmc0"; 653443c1c4SWadim Egorov }; 663443c1c4SWadim Egorov 673443c1c4SWadim Egorov led-2 { 683443c1c4SWadim Egorov gpios = <&gpio_exp 2 GPIO_ACTIVE_HIGH>; 693443c1c4SWadim Egorov linux,default-trigger = "mmc1"; 703443c1c4SWadim Egorov }; 713443c1c4SWadim Egorov }; 723443c1c4SWadim Egorov 733443c1c4SWadim Egorov vcc_3v3_mmc: regulator-vcc-3v3-mmc { 743443c1c4SWadim Egorov compatible = "regulator-fixed"; 753443c1c4SWadim Egorov regulator-name = "VCC_3V3_MMC"; 763443c1c4SWadim Egorov regulator-min-microvolt = <3300000>; 773443c1c4SWadim Egorov regulator-max-microvolt = <3300000>; 783443c1c4SWadim Egorov regulator-always-on; 793443c1c4SWadim Egorov regulator-boot-on; 803443c1c4SWadim Egorov }; 813443c1c4SWadim Egorov}; 823443c1c4SWadim Egorov 833443c1c4SWadim Egorov&main_pmx0 { 84*a4956811STony Lindgren gpio_keys_pins_default: gpio-keys-default-pins { 853443c1c4SWadim Egorov pinctrl-single,pins = < 863443c1c4SWadim Egorov AM62X_IOPAD(0x1d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */ 873443c1c4SWadim Egorov >; 883443c1c4SWadim Egorov }; 893443c1c4SWadim Egorov 90*a4956811STony Lindgren gpio_exp_int_pins_default: gpio-exp-int-default-pins { 913443c1c4SWadim Egorov pinctrl-single,pins = < 923443c1c4SWadim Egorov AM62X_IOPAD(0x244, PIN_INPUT, 7) /* (C17) MMC1_SDWP.GPIO1_49 */ 933443c1c4SWadim Egorov >; 943443c1c4SWadim Egorov }; 953443c1c4SWadim Egorov 96*a4956811STony Lindgren main_i2c1_pins_default: main-i2c1-default-pins { 973443c1c4SWadim Egorov pinctrl-single,pins = < 983443c1c4SWadim Egorov AM62X_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17) I2C1_SCL */ 993443c1c4SWadim Egorov AM62X_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17) I2C1_SDA */ 1003443c1c4SWadim Egorov >; 1013443c1c4SWadim Egorov }; 1023443c1c4SWadim Egorov 103*a4956811STony Lindgren main_mcan0_pins_default: main-mcan0-default-pins { 1043443c1c4SWadim Egorov pinctrl-single,pins = < 1053443c1c4SWadim Egorov AM62X_IOPAD(0x1dc, PIN_INPUT, 0) /* (E15) MCAN0_RX */ 1063443c1c4SWadim Egorov AM62X_IOPAD(0x1d8, PIN_OUTPUT, 0) /* (C15) MCAN0_TX */ 1073443c1c4SWadim Egorov >; 1083443c1c4SWadim Egorov }; 1093443c1c4SWadim Egorov 110*a4956811STony Lindgren main_mmc1_pins_default: main-mmc1-default-pins { 1113443c1c4SWadim Egorov pinctrl-single,pins = < 1123443c1c4SWadim Egorov AM62X_IOPAD(0x23c, PIN_INPUT_PULLUP, 0) /* (A21) MMC1_CMD */ 1133443c1c4SWadim Egorov AM62X_IOPAD(0x234, PIN_INPUT_PULLDOWN, 0) /* (B22) MMC1_CLK */ 1143443c1c4SWadim Egorov AM62X_IOPAD(0x230, PIN_INPUT_PULLUP, 0) /* (A22) MMC1_DAT0 */ 1153443c1c4SWadim Egorov AM62X_IOPAD(0x22c, PIN_INPUT_PULLUP, 0) /* (B21) MMC1_DAT1 */ 1163443c1c4SWadim Egorov AM62X_IOPAD(0x228, PIN_INPUT_PULLUP, 0) /* (C21) MMC1_DAT2 */ 1173443c1c4SWadim Egorov AM62X_IOPAD(0x224, PIN_INPUT_PULLUP, 0) /* (D22) MMC1_DAT3 */ 1183443c1c4SWadim Egorov AM62X_IOPAD(0x240, PIN_INPUT_PULLUP, 0) /* (D17) MMC1_SDCD */ 1193443c1c4SWadim Egorov >; 1203443c1c4SWadim Egorov }; 1213443c1c4SWadim Egorov 122*a4956811STony Lindgren main_rgmii2_pins_default: main-rgmii2-default-pins { 1233443c1c4SWadim Egorov pinctrl-single,pins = < 1243443c1c4SWadim Egorov AM62X_IOPAD(0x184, PIN_INPUT, 0) /* (AE23) RGMII2_RD0 */ 1253443c1c4SWadim Egorov AM62X_IOPAD(0x188, PIN_INPUT, 0) /* (AB20) RGMII2_RD1 */ 1263443c1c4SWadim Egorov AM62X_IOPAD(0x18c, PIN_INPUT, 0) /* (AC21) RGMII2_RD2 */ 1273443c1c4SWadim Egorov AM62X_IOPAD(0x190, PIN_INPUT, 0) /* (AE22) RGMII2_RD3 */ 1283443c1c4SWadim Egorov AM62X_IOPAD(0x180, PIN_INPUT, 0) /* (AD23) RGMII2_RXC */ 1293443c1c4SWadim Egorov AM62X_IOPAD(0x17c, PIN_INPUT, 0) /* (AD22) RGMII2_RX_CTL */ 1303443c1c4SWadim Egorov AM62X_IOPAD(0x16c, PIN_OUTPUT, 0) /* (Y18) RGMII2_TD0 */ 1313443c1c4SWadim Egorov AM62X_IOPAD(0x170, PIN_OUTPUT, 0) /* (AA18) RGMII2_TD1 */ 1323443c1c4SWadim Egorov AM62X_IOPAD(0x174, PIN_OUTPUT, 0) /* (AD21) RGMII2_TD2 */ 1333443c1c4SWadim Egorov AM62X_IOPAD(0x178, PIN_OUTPUT, 0) /* (AC20) RGMII2_TD3 */ 1343443c1c4SWadim Egorov AM62X_IOPAD(0x168, PIN_OUTPUT, 0) /* (AE21) RGMII2_TXC */ 1353443c1c4SWadim Egorov AM62X_IOPAD(0x164, PIN_OUTPUT, 0) /* (AA19) RGMII2_TX_CTL */ 1363443c1c4SWadim Egorov >; 1373443c1c4SWadim Egorov }; 1383443c1c4SWadim Egorov 139*a4956811STony Lindgren main_uart0_pins_default: main-uart0-default-pins { 1403443c1c4SWadim Egorov pinctrl-single,pins = < 1413443c1c4SWadim Egorov AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14) UART0_RXD */ 1423443c1c4SWadim Egorov AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14) UART0_TXD */ 1433443c1c4SWadim Egorov >; 1443443c1c4SWadim Egorov }; 1453443c1c4SWadim Egorov 146*a4956811STony Lindgren main_uart1_pins_default: main-uart1-default-pins { 1473443c1c4SWadim Egorov pinctrl-single,pins = < 1483443c1c4SWadim Egorov AM62X_IOPAD(0x194, PIN_INPUT, 2) /* (B19) MCASP0_AXR3.UART1_CTSn */ 1493443c1c4SWadim Egorov AM62X_IOPAD(0x198, PIN_OUTPUT, 2) /* (A19) MCASP0_AXR2.UART1_RTSn */ 1503443c1c4SWadim Egorov AM62X_IOPAD(0x1ac, PIN_INPUT, 2) /* (E19) MCASP0_AFSR.UART1_RXD */ 1513443c1c4SWadim Egorov AM62X_IOPAD(0x1b0, PIN_OUTPUT, 2) /* (A20) MCASP0_ACLKR.UART1_TXD */ 1523443c1c4SWadim Egorov >; 1533443c1c4SWadim Egorov }; 1543443c1c4SWadim Egorov 155*a4956811STony Lindgren main_usb1_pins_default: main-usb1-default-pins { 1563443c1c4SWadim Egorov pinctrl-single,pins = < 1573443c1c4SWadim Egorov AM62X_IOPAD(0x258, PIN_OUTPUT, 0) /* (F18) USB1_DRVVBUS */ 1583443c1c4SWadim Egorov >; 1593443c1c4SWadim Egorov }; 1603443c1c4SWadim Egorov 161*a4956811STony Lindgren user_leds_pins_default: user-leds-default-pins { 1623443c1c4SWadim Egorov pinctrl-single,pins = < 1633443c1c4SWadim Egorov AM62X_IOPAD(0x084, PIN_OUTPUT, 7) /* (L23) GPMC0_ADVn_ALE.GPIO0_32 */ 1643443c1c4SWadim Egorov >; 1653443c1c4SWadim Egorov }; 1663443c1c4SWadim Egorov}; 1673443c1c4SWadim Egorov 1683443c1c4SWadim Egorov&cpsw3g { 1693443c1c4SWadim Egorov pinctrl-names = "default"; 1703443c1c4SWadim Egorov pinctrl-0 = <&main_rgmii1_pins_default>, <&main_rgmii2_pins_default>; 1713443c1c4SWadim Egorov}; 1723443c1c4SWadim Egorov 1733443c1c4SWadim Egorov&cpsw_port2 { 1743443c1c4SWadim Egorov phy-mode = "rgmii-rxid"; 1753443c1c4SWadim Egorov phy-handle = <&cpsw3g_phy3>; 1763443c1c4SWadim Egorov}; 1773443c1c4SWadim Egorov 1783443c1c4SWadim Egorov&cpsw3g_mdio { 1793443c1c4SWadim Egorov cpsw3g_phy3: ethernet-phy@3 { 1803443c1c4SWadim Egorov compatible = "ethernet-phy-id2000.a231", "ethernet-phy-ieee802.3-c22"; 1813443c1c4SWadim Egorov reg = <3>; 1823443c1c4SWadim Egorov ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; 1833443c1c4SWadim Egorov ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; 1843443c1c4SWadim Egorov }; 1853443c1c4SWadim Egorov}; 1863443c1c4SWadim Egorov 1873443c1c4SWadim Egorov&main_i2c1 { 1883443c1c4SWadim Egorov pinctrl-names = "default"; 1893443c1c4SWadim Egorov pinctrl-0 = <&main_i2c1_pins_default>; 1903443c1c4SWadim Egorov clock-frequency = <400000>; 1913443c1c4SWadim Egorov status = "okay"; 1923443c1c4SWadim Egorov 1933443c1c4SWadim Egorov gpio_exp: gpio-expander@21 { 1943443c1c4SWadim Egorov pinctrl-names = "default"; 1953443c1c4SWadim Egorov pinctrl-0 = <&gpio_exp_int_pins_default>; 1963443c1c4SWadim Egorov compatible = "nxp,pcf8574"; 1973443c1c4SWadim Egorov reg = <0x21>; 1983443c1c4SWadim Egorov interrupt-parent = <&main_gpio1>; 1993443c1c4SWadim Egorov interrupts = <49 0>; 2003443c1c4SWadim Egorov #gpio-cells = <2>; 2013443c1c4SWadim Egorov gpio-controller; 2023443c1c4SWadim Egorov interrupt-controller; 2033443c1c4SWadim Egorov #interrupt-cells = <2>; 2043443c1c4SWadim Egorov gpio-line-names = "GPIO0_HDMI_RST", "GPIO1_CAN0_nEN", 2053443c1c4SWadim Egorov "GPIO2_LED2", "GPIO3_LVDS_GPIO", 2063443c1c4SWadim Egorov "GPIO4_BUT2", "GPIO5_LVDS_BKLT_EN", 2073443c1c4SWadim Egorov "GPIO6_ETH1_USER_RESET", "GPIO7_AUDIO_USER_RESET"; 2083443c1c4SWadim Egorov }; 2093443c1c4SWadim Egorov 2103443c1c4SWadim Egorov eeprom@51 { 2113443c1c4SWadim Egorov compatible = "atmel,24c02"; 2123443c1c4SWadim Egorov pagesize = <16>; 2133443c1c4SWadim Egorov reg = <0x51>; 2143443c1c4SWadim Egorov }; 2153443c1c4SWadim Egorov}; 2163443c1c4SWadim Egorov 2173443c1c4SWadim Egorov&main_mcan0 { 2183443c1c4SWadim Egorov pinctrl-names = "default"; 2193443c1c4SWadim Egorov pinctrl-0 = <&main_mcan0_pins_default>; 2203443c1c4SWadim Egorov phys = <&can_tc1>; 2213443c1c4SWadim Egorov status = "okay"; 2223443c1c4SWadim Egorov}; 2233443c1c4SWadim Egorov 2243443c1c4SWadim Egorov&main_uart0 { 2253443c1c4SWadim Egorov pinctrl-names = "default"; 2263443c1c4SWadim Egorov pinctrl-0 = <&main_uart0_pins_default>; 2273443c1c4SWadim Egorov status = "okay"; 2283443c1c4SWadim Egorov}; 2293443c1c4SWadim Egorov 2303443c1c4SWadim Egorov&main_uart1 { 2313443c1c4SWadim Egorov pinctrl-names = "default"; 2323443c1c4SWadim Egorov pinctrl-0 = <&main_uart1_pins_default>; 2333443c1c4SWadim Egorov /* Main UART1 may be used by TIFS firmware */ 2343443c1c4SWadim Egorov status = "okay"; 2353443c1c4SWadim Egorov}; 2363443c1c4SWadim Egorov 2373443c1c4SWadim Egorov&sdhci1 { 2383443c1c4SWadim Egorov vmmc-supply = <&vcc_3v3_mmc>; 2393443c1c4SWadim Egorov vqmmc-supply = <&vddshv5_sdio>; 2403443c1c4SWadim Egorov pinctrl-names = "default"; 2413443c1c4SWadim Egorov pinctrl-0 = <&main_mmc1_pins_default>; 2423443c1c4SWadim Egorov ti,driver-strength-ohm = <50>; 2433443c1c4SWadim Egorov disable-wp; 2443443c1c4SWadim Egorov no-1-8-v; 2453443c1c4SWadim Egorov status = "okay"; 2463443c1c4SWadim Egorov}; 2473443c1c4SWadim Egorov 2483443c1c4SWadim Egorov&usbss0 { 2493443c1c4SWadim Egorov ti,vbus-divider; 2503443c1c4SWadim Egorov status = "okay"; 2513443c1c4SWadim Egorov}; 2523443c1c4SWadim Egorov 2533443c1c4SWadim Egorov&usbss1 { 2543443c1c4SWadim Egorov ti,vbus-divider; 2553443c1c4SWadim Egorov status = "okay"; 2563443c1c4SWadim Egorov}; 2573443c1c4SWadim Egorov 2583443c1c4SWadim Egorov&usb0 { 2593443c1c4SWadim Egorov dr_mode = "peripheral"; 2603443c1c4SWadim Egorov}; 2613443c1c4SWadim Egorov 2623443c1c4SWadim Egorov&usb1 { 2633443c1c4SWadim Egorov dr_mode = "host"; 2643443c1c4SWadim Egorov pinctrl-names = "default"; 2653443c1c4SWadim Egorov pinctrl-0 = <&main_usb1_pins_default>; 2663443c1c4SWadim Egorov}; 267