1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2022 - 2023 PHYTEC Messtechnik GmbH 4 * Author: Wadim Egorov <w.egorov@phytec.de> 5 * 6 * Product homepage: 7 * https://www.phytec.com/product/phyboard-am62x 8 */ 9 10#include <dt-bindings/gpio/gpio.h> 11#include <dt-bindings/input/input.h> 12#include <dt-bindings/leds/common.h> 13#include <dt-bindings/net/ti-dp83867.h> 14#include "k3-am625.dtsi" 15#include "k3-am62-phycore-som.dtsi" 16 17/ { 18 compatible = "phytec,am625-phyboard-lyra-rdk", 19 "phytec,am62-phycore-som", "ti,am625"; 20 model = "PHYTEC phyBOARD-Lyra AM625"; 21 22 aliases { 23 serial2 = &main_uart0; 24 serial3 = &main_uart1; 25 mmc1 = &sdhci1; 26 usb0 = &usb0; 27 usb1 = &usb1; 28 ethernet1 = &cpsw_port2; 29 }; 30 31 can_tc1: can-phy0 { 32 compatible = "ti,tcan1042"; 33 #phy-cells = <0>; 34 max-bitrate = <5000000>; 35 standby-gpios = <&gpio_exp 1 GPIO_ACTIVE_HIGH>; 36 }; 37 38 hdmi0: connector-hdmi { 39 compatible = "hdmi-connector"; 40 label = "hdmi"; 41 type = "a"; 42 43 port { 44 hdmi_connector_in: endpoint { 45 remote-endpoint = <&sii9022_out>; 46 }; 47 }; 48 }; 49 50 keys { 51 compatible = "gpio-keys"; 52 autorepeat; 53 pinctrl-names = "default"; 54 pinctrl-0 = <&gpio_keys_pins_default>; 55 56 key-home { 57 label = "home"; 58 linux,code = <KEY_HOME>; 59 gpios = <&main_gpio1 23 GPIO_ACTIVE_HIGH>; 60 }; 61 62 key-menu { 63 label = "menu"; 64 linux,code = <KEY_MENU>; 65 gpios = <&gpio_exp 4 GPIO_ACTIVE_HIGH>; 66 }; 67 }; 68 69 leds { 70 compatible = "gpio-leds"; 71 pinctrl-names = "default"; 72 pinctrl-0 = <&leds_pins_default>, <&user_leds_pins_default>; 73 74 led-1 { 75 gpios = <&main_gpio0 32 GPIO_ACTIVE_HIGH>; 76 linux,default-trigger = "mmc0"; 77 }; 78 79 led-2 { 80 gpios = <&gpio_exp 2 GPIO_ACTIVE_HIGH>; 81 linux,default-trigger = "mmc1"; 82 }; 83 }; 84 85 vcc_3v3_mmc: regulator-vcc-3v3-mmc { 86 compatible = "regulator-fixed"; 87 regulator-name = "VCC_3V3_MMC"; 88 regulator-min-microvolt = <3300000>; 89 regulator-max-microvolt = <3300000>; 90 regulator-always-on; 91 regulator-boot-on; 92 }; 93}; 94 95&main_pmx0 { 96 gpio_keys_pins_default: gpio-keys-default-pins { 97 pinctrl-single,pins = < 98 AM62X_IOPAD(0x1d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */ 99 >; 100 }; 101 102 gpio_exp_int_pins_default: gpio-exp-int-default-pins { 103 pinctrl-single,pins = < 104 AM62X_IOPAD(0x244, PIN_INPUT, 7) /* (C17) MMC1_SDWP.GPIO1_49 */ 105 >; 106 }; 107 108 hdmi_int_pins_default: hdmi-int-default-pins { 109 pinctrl-single,pins = < 110 AM62X_IOPAD(0x040, PIN_INPUT, 7) /* (N23) GPMC0_AD1.GPIO0_16 */ 111 >; 112 }; 113 114 main_dss0_pins_default: main-dss0-default-pins { 115 pinctrl-single,pins = < 116 AM62X_IOPAD(0x0b8, PIN_OUTPUT, 0) /* (U22) VOUT0_DATA0 */ 117 AM62X_IOPAD(0x0bc, PIN_OUTPUT, 0) /* (V24) VOUT0_DATA1 */ 118 AM62X_IOPAD(0x0e0, PIN_OUTPUT, 0) /* (V20) VOUT0_DATA10 */ 119 AM62X_IOPAD(0x0e4, PIN_OUTPUT, 0) /* (AA23) VOUT0_DATA11 */ 120 AM62X_IOPAD(0x0e8, PIN_OUTPUT, 0) /* (AB25) VOUT0_DATA12 */ 121 AM62X_IOPAD(0x0ec, PIN_OUTPUT, 0) /* (AA24) VOUT0_DATA13 */ 122 AM62X_IOPAD(0x0f0, PIN_OUTPUT, 0) /* (Y22) VOUT0_DATA14 */ 123 AM62X_IOPAD(0x0f4, PIN_OUTPUT, 0) /* (AA21) VOUT0_DATA15 */ 124 AM62X_IOPAD(0x0c0, PIN_OUTPUT, 0) /* (W25) VOUT0_DATA2 */ 125 AM62X_IOPAD(0x0c4, PIN_OUTPUT, 0) /* (W24) VOUT0_DATA3 */ 126 AM62X_IOPAD(0x0c8, PIN_OUTPUT, 0) /* (Y25) VOUT0_DATA4 */ 127 AM62X_IOPAD(0x0cc, PIN_OUTPUT, 0) /* (Y24) VOUT0_DATA5 */ 128 AM62X_IOPAD(0x0d0, PIN_OUTPUT, 0) /* (Y23) VOUT0_DATA6 */ 129 AM62X_IOPAD(0x0d4, PIN_OUTPUT, 0) /* (AA25) VOUT0_DATA7 */ 130 AM62X_IOPAD(0x0d8, PIN_OUTPUT, 0) /* (V21) VOUT0_DATA8 */ 131 AM62X_IOPAD(0x0dc, PIN_OUTPUT, 0) /* (W21) VOUT0_DATA9 */ 132 AM62X_IOPAD(0x0fc, PIN_OUTPUT, 0) /* (Y20) VOUT0_DE */ 133 AM62X_IOPAD(0x0f8, PIN_OUTPUT, 0) /* (AB24) VOUT0_HSYNC */ 134 AM62X_IOPAD(0x104, PIN_OUTPUT, 0) /* (AC24) VOUT0_PCLK */ 135 AM62X_IOPAD(0x100, PIN_OUTPUT, 0) /* (AC25) VOUT0_VSYNC */ 136 >; 137 }; 138 139 main_i2c1_pins_default: main-i2c1-default-pins { 140 pinctrl-single,pins = < 141 AM62X_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17) I2C1_SCL */ 142 AM62X_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17) I2C1_SDA */ 143 >; 144 }; 145 146 main_mcan0_pins_default: main-mcan0-default-pins { 147 pinctrl-single,pins = < 148 AM62X_IOPAD(0x1dc, PIN_INPUT, 0) /* (E15) MCAN0_RX */ 149 AM62X_IOPAD(0x1d8, PIN_OUTPUT, 0) /* (C15) MCAN0_TX */ 150 >; 151 }; 152 153 main_mmc1_pins_default: main-mmc1-default-pins { 154 pinctrl-single,pins = < 155 AM62X_IOPAD(0x23c, PIN_INPUT_PULLUP, 0) /* (A21) MMC1_CMD */ 156 AM62X_IOPAD(0x234, PIN_INPUT_PULLDOWN, 0) /* (B22) MMC1_CLK */ 157 AM62X_IOPAD(0x230, PIN_INPUT_PULLUP, 0) /* (A22) MMC1_DAT0 */ 158 AM62X_IOPAD(0x22c, PIN_INPUT_PULLUP, 0) /* (B21) MMC1_DAT1 */ 159 AM62X_IOPAD(0x228, PIN_INPUT_PULLUP, 0) /* (C21) MMC1_DAT2 */ 160 AM62X_IOPAD(0x224, PIN_INPUT_PULLUP, 0) /* (D22) MMC1_DAT3 */ 161 AM62X_IOPAD(0x240, PIN_INPUT_PULLUP, 0) /* (D17) MMC1_SDCD */ 162 >; 163 }; 164 165 main_rgmii2_pins_default: main-rgmii2-default-pins { 166 pinctrl-single,pins = < 167 AM62X_IOPAD(0x184, PIN_INPUT, 0) /* (AE23) RGMII2_RD0 */ 168 AM62X_IOPAD(0x188, PIN_INPUT, 0) /* (AB20) RGMII2_RD1 */ 169 AM62X_IOPAD(0x18c, PIN_INPUT, 0) /* (AC21) RGMII2_RD2 */ 170 AM62X_IOPAD(0x190, PIN_INPUT, 0) /* (AE22) RGMII2_RD3 */ 171 AM62X_IOPAD(0x180, PIN_INPUT, 0) /* (AD23) RGMII2_RXC */ 172 AM62X_IOPAD(0x17c, PIN_INPUT, 0) /* (AD22) RGMII2_RX_CTL */ 173 AM62X_IOPAD(0x16c, PIN_OUTPUT, 0) /* (Y18) RGMII2_TD0 */ 174 AM62X_IOPAD(0x170, PIN_OUTPUT, 0) /* (AA18) RGMII2_TD1 */ 175 AM62X_IOPAD(0x174, PIN_OUTPUT, 0) /* (AD21) RGMII2_TD2 */ 176 AM62X_IOPAD(0x178, PIN_OUTPUT, 0) /* (AC20) RGMII2_TD3 */ 177 AM62X_IOPAD(0x168, PIN_OUTPUT, 0) /* (AE21) RGMII2_TXC */ 178 AM62X_IOPAD(0x164, PIN_OUTPUT, 0) /* (AA19) RGMII2_TX_CTL */ 179 >; 180 }; 181 182 main_uart0_pins_default: main-uart0-default-pins { 183 pinctrl-single,pins = < 184 AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14) UART0_RXD */ 185 AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14) UART0_TXD */ 186 >; 187 }; 188 189 main_uart1_pins_default: main-uart1-default-pins { 190 pinctrl-single,pins = < 191 AM62X_IOPAD(0x194, PIN_INPUT, 2) /* (B19) MCASP0_AXR3.UART1_CTSn */ 192 AM62X_IOPAD(0x198, PIN_OUTPUT, 2) /* (A19) MCASP0_AXR2.UART1_RTSn */ 193 AM62X_IOPAD(0x1ac, PIN_INPUT, 2) /* (E19) MCASP0_AFSR.UART1_RXD */ 194 AM62X_IOPAD(0x1b0, PIN_OUTPUT, 2) /* (A20) MCASP0_ACLKR.UART1_TXD */ 195 >; 196 }; 197 198 main_usb1_pins_default: main-usb1-default-pins { 199 pinctrl-single,pins = < 200 AM62X_IOPAD(0x258, PIN_OUTPUT, 0) /* (F18) USB1_DRVVBUS */ 201 >; 202 }; 203 204 user_leds_pins_default: user-leds-default-pins { 205 pinctrl-single,pins = < 206 AM62X_IOPAD(0x084, PIN_OUTPUT, 7) /* (L23) GPMC0_ADVn_ALE.GPIO0_32 */ 207 >; 208 }; 209}; 210 211&cpsw3g { 212 pinctrl-names = "default"; 213 pinctrl-0 = <&main_rgmii1_pins_default>, <&main_rgmii2_pins_default>; 214}; 215 216&cpsw_port2 { 217 phy-mode = "rgmii-rxid"; 218 phy-handle = <&cpsw3g_phy3>; 219}; 220 221&cpsw3g_mdio { 222 cpsw3g_phy3: ethernet-phy@3 { 223 compatible = "ethernet-phy-id2000.a231", "ethernet-phy-ieee802.3-c22"; 224 reg = <3>; 225 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; 226 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; 227 }; 228}; 229 230&dss { 231 pinctrl-names = "default"; 232 pinctrl-0 = <&main_dss0_pins_default>; 233 status = "okay"; 234}; 235 236&dss_ports { 237 #address-cells = <1>; 238 #size-cells = <0>; 239 240 /* VP2: DPI/HDMI Output */ 241 port@1 { 242 reg = <1>; 243 244 dpi1_out: endpoint { 245 remote-endpoint = <&sii9022_in>; 246 }; 247 }; 248}; 249 250&main_i2c1 { 251 pinctrl-names = "default"; 252 pinctrl-0 = <&main_i2c1_pins_default>; 253 clock-frequency = <100000>; 254 status = "okay"; 255 256 gpio_exp: gpio-expander@21 { 257 pinctrl-names = "default"; 258 pinctrl-0 = <&gpio_exp_int_pins_default>; 259 compatible = "nxp,pcf8574"; 260 reg = <0x21>; 261 interrupt-parent = <&main_gpio1>; 262 interrupts = <49 0>; 263 #gpio-cells = <2>; 264 gpio-controller; 265 interrupt-controller; 266 #interrupt-cells = <2>; 267 gpio-line-names = "", "GPIO1_CAN0_nEN", 268 "GPIO2_LED2", "GPIO3_LVDS_GPIO", 269 "GPIO4_BUT2", "GPIO5_LVDS_BKLT_EN", 270 "GPIO6_ETH1_USER_RESET", "GPIO7_AUDIO_USER_RESET"; 271 }; 272 273 sii9022: bridge-hdmi@39 { 274 compatible = "sil,sii9022"; 275 reg = <0x39>; 276 277 interrupt-parent = <&main_gpio0>; 278 interrupts = <16 IRQ_TYPE_EDGE_FALLING>; 279 pinctrl-names = "default"; 280 pinctrl-0 = <&hdmi_int_pins_default>; 281 282 ports { 283 #address-cells = <1>; 284 #size-cells = <0>; 285 286 port@0 { 287 reg = <0>; 288 289 sii9022_in: endpoint { 290 remote-endpoint = <&dpi1_out>; 291 }; 292 }; 293 294 port@1 { 295 reg = <1>; 296 297 sii9022_out: endpoint { 298 remote-endpoint = <&hdmi_connector_in>; 299 }; 300 }; 301 }; 302 }; 303 304 eeprom@51 { 305 compatible = "atmel,24c02"; 306 pagesize = <16>; 307 reg = <0x51>; 308 }; 309}; 310 311&main_mcan0 { 312 pinctrl-names = "default"; 313 pinctrl-0 = <&main_mcan0_pins_default>; 314 phys = <&can_tc1>; 315 status = "okay"; 316}; 317 318&main_uart0 { 319 pinctrl-names = "default"; 320 pinctrl-0 = <&main_uart0_pins_default>; 321 status = "okay"; 322}; 323 324&main_uart1 { 325 pinctrl-names = "default"; 326 pinctrl-0 = <&main_uart1_pins_default>; 327 /* Main UART1 may be used by TIFS firmware */ 328 status = "okay"; 329}; 330 331&sdhci1 { 332 vmmc-supply = <&vcc_3v3_mmc>; 333 vqmmc-supply = <&vddshv5_sdio>; 334 pinctrl-names = "default"; 335 pinctrl-0 = <&main_mmc1_pins_default>; 336 ti,driver-strength-ohm = <50>; 337 disable-wp; 338 no-1-8-v; 339 status = "okay"; 340}; 341 342&usbss0 { 343 ti,vbus-divider; 344 status = "okay"; 345}; 346 347&usbss1 { 348 ti,vbus-divider; 349 status = "okay"; 350}; 351 352&usb0 { 353 dr_mode = "peripheral"; 354}; 355 356&usb1 { 357 dr_mode = "host"; 358 pinctrl-names = "default"; 359 pinctrl-0 = <&main_usb1_pins_default>; 360}; 361