1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ 4 * 5 * Base Board: https://www.ti.com/lit/zip/SPRR463 6 */ 7 8/dts-v1/; 9 10#include "k3-am68-sk-som.dtsi" 11#include <dt-bindings/net/ti-dp83867.h> 12#include <dt-bindings/phy/phy-cadence.h> 13#include <dt-bindings/phy/phy.h> 14 15#include "k3-serdes.h" 16 17/ { 18 compatible = "ti,am68-sk", "ti,j721s2"; 19 model = "Texas Instruments AM68 SK"; 20 21 chosen { 22 stdout-path = "serial2:115200n8"; 23 }; 24 25 aliases { 26 serial0 = &wkup_uart0; 27 serial1 = &mcu_uart0; 28 serial2 = &main_uart8; 29 mmc1 = &main_sdhci1; 30 can0 = &mcu_mcan0; 31 can1 = &mcu_mcan1; 32 can2 = &main_mcan6; 33 can3 = &main_mcan7; 34 }; 35 36 vusb_main: regulator-vusb-main5v0 { 37 /* USB MAIN INPUT 5V DC */ 38 compatible = "regulator-fixed"; 39 regulator-name = "vusb-main5v0"; 40 regulator-min-microvolt = <5000000>; 41 regulator-max-microvolt = <5000000>; 42 regulator-always-on; 43 regulator-boot-on; 44 }; 45 46 vsys_3v3: regulator-vsys3v3 { 47 /* Output of LM5141 */ 48 compatible = "regulator-fixed"; 49 regulator-name = "vsys_3v3"; 50 regulator-min-microvolt = <3300000>; 51 regulator-max-microvolt = <3300000>; 52 vin-supply = <&vusb_main>; 53 regulator-always-on; 54 regulator-boot-on; 55 }; 56 57 vdd_mmc1: regulator-sd { 58 /* Output of TPS22918 */ 59 compatible = "regulator-fixed"; 60 regulator-name = "vdd_mmc1"; 61 regulator-min-microvolt = <3300000>; 62 regulator-max-microvolt = <3300000>; 63 regulator-boot-on; 64 enable-active-high; 65 vin-supply = <&vsys_3v3>; 66 gpio = <&exp1 8 GPIO_ACTIVE_HIGH>; 67 }; 68 69 vdd_sd_dv: regulator-tlv71033 { 70 /* Output of TLV71033 */ 71 compatible = "regulator-gpio"; 72 regulator-name = "tlv71033"; 73 pinctrl-names = "default"; 74 pinctrl-0 = <&vdd_sd_dv_pins_default>; 75 regulator-min-microvolt = <1800000>; 76 regulator-max-microvolt = <3300000>; 77 regulator-boot-on; 78 vin-supply = <&vsys_3v3>; 79 gpios = <&main_gpio0 49 GPIO_ACTIVE_HIGH>; 80 states = <1800000 0x0>, 81 <3300000 0x1>; 82 }; 83 84 vsys_io_1v8: regulator-vsys-io-1v8 { 85 compatible = "regulator-fixed"; 86 regulator-name = "vsys_io_1v8"; 87 regulator-min-microvolt = <1800000>; 88 regulator-max-microvolt = <1800000>; 89 regulator-always-on; 90 regulator-boot-on; 91 }; 92 93 vsys_io_1v2: regulator-vsys-io-1v2 { 94 compatible = "regulator-fixed"; 95 regulator-name = "vsys_io_1v2"; 96 regulator-min-microvolt = <1200000>; 97 regulator-max-microvolt = <1200000>; 98 regulator-always-on; 99 regulator-boot-on; 100 }; 101 102 transceiver1: can-phy0 { 103 compatible = "ti,tcan1042"; 104 #phy-cells = <0>; 105 max-bitrate = <5000000>; 106 }; 107 108 transceiver2: can-phy1 { 109 compatible = "ti,tcan1042"; 110 #phy-cells = <0>; 111 max-bitrate = <5000000>; 112 }; 113 114 transceiver3: can-phy2 { 115 compatible = "ti,tcan1042"; 116 #phy-cells = <0>; 117 max-bitrate = <5000000>; 118 }; 119 120 transceiver4: can-phy3 { 121 compatible = "ti,tcan1042"; 122 #phy-cells = <0>; 123 max-bitrate = <5000000>; 124 }; 125}; 126 127&main_pmx0 { 128 main_uart8_pins_default: main-uart8-default-pins { 129 pinctrl-single,pins = < 130 J721S2_IOPAD(0x0d0, PIN_INPUT, 11) /* (AF26) SPI0_CS1.UART8_RXD */ 131 J721S2_IOPAD(0x0d4, PIN_OUTPUT, 11) /* (AH27) SPI0_CLK.UART8_TXD */ 132 >; 133 }; 134 135 main_i2c0_pins_default: main-i2c0-default-pins { 136 pinctrl-single,pins = < 137 J721S2_IOPAD(0x0e0, PIN_INPUT, 0) /* (AH25) I2C0_SCL */ 138 J721S2_IOPAD(0x0e4, PIN_INPUT, 0) /* (AE24) I2C0_SDA */ 139 >; 140 }; 141 142 main_mmc1_pins_default: main-mmc1-default-pins { 143 pinctrl-single,pins = < 144 J721S2_IOPAD(0x104, PIN_INPUT, 0) /* (P23) MMC1_CLK */ 145 J721S2_IOPAD(0x108, PIN_INPUT, 0) /* (N24) MMC1_CMD */ 146 J721S2_IOPAD(0x0fc, PIN_INPUT, 0) /* (M23) MMC1_DAT0 */ 147 J721S2_IOPAD(0x0f8, PIN_INPUT, 0) /* (P24) MMC1_DAT1 */ 148 J721S2_IOPAD(0x0f4, PIN_INPUT, 0) /* (R24) MMC1_DAT2 */ 149 J721S2_IOPAD(0x0f0, PIN_INPUT, 0) /* (R22) MMC1_DAT3 */ 150 J721S2_IOPAD(0x0e8, PIN_INPUT, 8) /* (AE25) TIMER_IO0.MMC1_SDCD */ 151 >; 152 }; 153 154 vdd_sd_dv_pins_default: vdd-sd-dv-default-pins { 155 pinctrl-single,pins = < 156 J721S2_IOPAD(0x0c4, PIN_INPUT, 7) /* (AB26) ECAP0_IN_APWM_OUT.GPIO0_49 */ 157 >; 158 }; 159 160 main_usbss0_pins_default: main-usbss0-default-pins { 161 pinctrl-single,pins = < 162 J721S2_IOPAD(0x0ec, PIN_OUTPUT, 6) /* (AG25) TIMER_IO1.USB0_DRVVBUS */ 163 >; 164 }; 165 166 main_mcan6_pins_default: main-mcan6-default-pins { 167 pinctrl-single,pins = < 168 J721S2_IOPAD(0x098, PIN_INPUT, 0) /* (V25) MCASP0_AXR10.MCAN6_RX */ 169 J721S2_IOPAD(0x094, PIN_INPUT, 0) /* (AA25) MCASP0_AXR9.MCAN6_TX */ 170 >; 171 }; 172 173 main_mcan7_pins_default: main-mcan7-default-pins { 174 pinctrl-single,pins = < 175 J721S2_IOPAD(0x0a0, PIN_INPUT, 0) /* (AB25) MCASP0_AXR12.MCAN7_RX */ 176 J721S2_IOPAD(0x09c, PIN_INPUT, 0) /* (T24) MCASP0_AXR11.MCAN7_TX */ 177 >; 178 }; 179 180 main_i2c4_pins_default: main-i2c4-default-pins { 181 pinctrl-single,pins = < 182 J721S2_IOPAD(0x010, PIN_INPUT_PULLUP, 8) /* (AF28) MCAN13_RX.I2C4_SDA */ 183 J721S2_IOPAD(0x014, PIN_INPUT_PULLUP, 8) /* (AD25) MCAN14_TX.I2C4_SCL */ 184 >; 185 }; 186 187 rpi_header_gpio0_pins_default: rpi-header-gpio0-default-pins { 188 pinctrl-single,pins = < 189 J721S2_IOPAD(0x0a8, PIN_INPUT, 7) /* (U24) MCASP0_AXR14.GPIO0_42 */ 190 J721S2_IOPAD(0x090, PIN_INPUT, 7) /* (W24) MCASP0_AXR8.GPIO0_36 */ 191 J721S2_IOPAD(0x0bc, PIN_INPUT, 7) /* (V28) MCASP1_AFSX.GPIO0_47 */ 192 J721S2_IOPAD(0x06c, PIN_INPUT, 7) /* (V26) MCAN1_TX.GPIO0_27 */ 193 J721S2_IOPAD(0x004, PIN_INPUT, 7) /* (W25) MCAN12_TX.GPIO0_1 */ 194 J721S2_IOPAD(0x008, PIN_INPUT, 7) /* (AC24) MCAN12_RX.GPIO0_2 */ 195 J721S2_IOPAD(0x0b8, PIN_INPUT, 7) /* (AA24) MCASP1_ACLKX.GPIO0_46 */ 196 J721S2_IOPAD(0x00c, PIN_INPUT, 7) /* (AE28) MCAN13_TX.GPIO0_3 */ 197 J721S2_IOPAD(0x034, PIN_INPUT, 7) /* (AD24) PMIC_WAKE0.GPIO0_13 */ 198 J721S2_IOPAD(0x0a4, PIN_INPUT, 7) /* (T23) MCASP0_AXR13.GPIO0_41 */ 199 J721S2_IOPAD(0x0c0, PIN_INPUT, 7) /* (T28) MCASP1_AXR0.GPIO0_48 */ 200 J721S2_IOPAD(0x0b4, PIN_INPUT, 7) /* (U25) MCASP1_AXR4.GPIO0_45 */ 201 J721S2_IOPAD(0x0cc, PIN_INPUT, 7) /* (AE27) SPI0_CS0.GPIO0_51 */ 202 J721S2_IOPAD(0x08c, PIN_INPUT, 7) /* (T25) MCASP0_AXR7.GPIO0_35 */ 203 >; 204 }; 205}; 206 207&wkup_pmx2 { 208 wkup_uart0_pins_default: wkup-uart0-default-pins { 209 pinctrl-single,pins = < 210 J721S2_WKUP_IOPAD(0x070, PIN_INPUT, 0) /* (E25) WKUP_GPIO0_6.WKUP_UART0_CTSn */ 211 J721S2_WKUP_IOPAD(0x074, PIN_OUTPUT, 0) /* (F28) WKUP_GPIO0_7.WKUP_UART0_RTSn */ 212 J721S2_WKUP_IOPAD(0x048, PIN_INPUT, 0) /* (D28) WKUP_UART0_RXD */ 213 J721S2_WKUP_IOPAD(0x04c, PIN_OUTPUT, 0) /* (D27) WKUP_UART0_TXD */ 214 >; 215 }; 216 217 mcu_cpsw_pins_default: mcu-cpsw-default-pins { 218 pinctrl-single,pins = < 219 J721S2_WKUP_IOPAD(0x02C, PIN_INPUT, 0) /* (B22) MCU_RGMII1_RD0 */ 220 J721S2_WKUP_IOPAD(0x028, PIN_INPUT, 0) /* (B21) MCU_RGMII1_RD1 */ 221 J721S2_WKUP_IOPAD(0x024, PIN_INPUT, 0) /* (C22) MCU_RGMII1_RD2 */ 222 J721S2_WKUP_IOPAD(0x020, PIN_INPUT, 0) /* (D23) MCU_RGMII1_RD3 */ 223 J721S2_WKUP_IOPAD(0x01C, PIN_INPUT, 0) /* (D22) MCU_RGMII1_RXC */ 224 J721S2_WKUP_IOPAD(0x004, PIN_INPUT, 0) /* (E23) MCU_RGMII1_RX_CTL */ 225 J721S2_WKUP_IOPAD(0x014, PIN_OUTPUT, 0) /* (F23) MCU_RGMII1_TD0 */ 226 J721S2_WKUP_IOPAD(0x010, PIN_OUTPUT, 0) /* (G22) MCU_RGMII1_TD1 */ 227 J721S2_WKUP_IOPAD(0x00C, PIN_OUTPUT, 0) /* (E21) MCU_RGMII1_TD2 */ 228 J721S2_WKUP_IOPAD(0x008, PIN_OUTPUT, 0) /* (E22) MCU_RGMII1_TD3 */ 229 J721S2_WKUP_IOPAD(0x018, PIN_OUTPUT, 0) /* (F21) MCU_RGMII1_TXC */ 230 J721S2_WKUP_IOPAD(0x000, PIN_OUTPUT, 0) /* (F22) MCU_RGMII1_TX_CTL */ 231 >; 232 }; 233 234 mcu_mdio_pins_default: mcu-mdio-default-pins { 235 pinctrl-single,pins = < 236 J721S2_WKUP_IOPAD(0x034, PIN_OUTPUT, 0) /* (A21) MCU_MDIO0_MDC */ 237 J721S2_WKUP_IOPAD(0x030, PIN_INPUT, 0) /* (A22) MCU_MDIO0_MDIO */ 238 >; 239 }; 240 241 mcu_mcan0_pins_default: mcu-mcan0-default-pins { 242 pinctrl-single,pins = < 243 J721S2_WKUP_IOPAD(0x054, PIN_INPUT, 0) /* (E28) MCU_MCAN0_RX */ 244 J721S2_WKUP_IOPAD(0x050, PIN_OUTPUT, 0) /* (E27) MCU_MCAN0_TX */ 245 >; 246 }; 247 248 mcu_mcan1_pins_default: mcu-mcan1-default-pins { 249 pinctrl-single,pins = < 250 J721S2_WKUP_IOPAD(0x06C, PIN_INPUT, 0) /* (F26) WKUP_GPIO0_5.MCU_MCAN1_RX */ 251 J721S2_WKUP_IOPAD(0x068, PIN_OUTPUT, 0) /* (C23) WKUP_GPIO0_4.MCU_MCAN1_TX*/ 252 >; 253 }; 254 255 mcu_i2c0_pins_default: mcu-i2c0-default-pins { 256 pinctrl-single,pins = < 257 J721S2_WKUP_IOPAD(0x0a0, PIN_INPUT, 0) /* (G24) MCU_I2C0_SCL */ 258 J721S2_WKUP_IOPAD(0x0a4, PIN_INPUT, 0) /* (J25) MCU_I2C0_SDA */ 259 >; 260 }; 261 262 mcu_i2c1_pins_default: mcu-i2c1-default-pins { 263 pinctrl-single,pins = < 264 J721S2_WKUP_IOPAD(0x078, PIN_INPUT, 0) /* (F24) WKUP_GPIO0_8.MCU_I2C1_SCL */ 265 J721S2_WKUP_IOPAD(0x07c, PIN_INPUT, 0) /* (H26) WKUP_GPIO0_9.MCU_I2C1_SDA */ 266 >; 267 }; 268 269 mcu_uart0_pins_default: mcu-uart0-default-pins { 270 pinctrl-single,pins = < 271 J721S2_WKUP_IOPAD(0x08c, PIN_INPUT, 0) /* (C24) WKUP_GPIO0_13.MCU_UART0_RXD */ 272 J721S2_WKUP_IOPAD(0x088, PIN_OUTPUT, 0) /* (C25) WKUP_GPIO0_12.MCU_UART0_TXD */ 273 >; 274 }; 275 276 mcu_rpi_header_gpio0_pins0_default: mcu-rpi-header-gpio0-pins0-default { 277 pinctrl-single,pins = < 278 J721S2_WKUP_IOPAD(0x118, PIN_INPUT, 7) /* (G25) WKUP_GPIO0_66 */ 279 J721S2_WKUP_IOPAD(0x05C, PIN_INPUT, 7) /* (E24) MCU_SPI1_D0.WKUP_GPIO0_1 */ 280 J721S2_WKUP_IOPAD(0x060, PIN_INPUT, 7) /* (C28) MCU_SPI1_D1.WKUP_GPIO0_2 */ 281 J721S2_WKUP_IOPAD(0x058, PIN_INPUT, 7) /* (D26) MCU_SPI1_CLK.WKUP_GPIO0_0 */ 282 J721S2_WKUP_IOPAD(0x094, PIN_INPUT, 7) /* (D25) MCU_SPI1_CS2.WKUP_GPIO0_15*/ 283 J721S2_WKUP_IOPAD(0x0B8, PIN_INPUT, 7) /* (G27) WKUP_GPIO0_56 */ 284 J721S2_WKUP_IOPAD(0x114, PIN_INPUT, 7) /* (J26) WKUP_GPIO0_57 */ 285 J721S2_WKUP_IOPAD(0x11C, PIN_INPUT, 7) /* (J27) WKUP_GPIO0_67 */ 286 J721S2_WKUP_IOPAD(0x064, PIN_INPUT, 7) /* (C27) MCU_SPI1_CS0.WKUP_GPIO0_3 */ 287 >; 288 }; 289}; 290 291&wkup_pmx3 { 292 mcu_rpi_header_gpio0_pins1_default: mcu-rpi-header-gpio0-pins1-default { 293 pinctrl-single,pins = < 294 J721S2_WKUP_IOPAD(0x000, PIN_INPUT, 7) /* (K26) WKUP_GPIO0_49 */ 295 >; 296 }; 297}; 298 299&main_gpio0 { 300 pinctrl-names = "default"; 301 pinctrl-0 = <&rpi_header_gpio0_pins_default>; 302}; 303 304&main_gpio2 { 305 status = "disabled"; 306}; 307 308&main_gpio4 { 309 status = "disabled"; 310}; 311 312&main_gpio6 { 313 status = "disabled"; 314}; 315 316&wkup_gpio0 { 317 pinctrl-names = "default"; 318 pinctrl-0 = <&mcu_rpi_header_gpio0_pins0_default>, <&mcu_rpi_header_gpio0_pins1_default>; 319}; 320 321&wkup_gpio1 { 322 status = "disabled"; 323}; 324 325&wkup_uart0 { 326 status = "reserved"; 327 pinctrl-names = "default"; 328 pinctrl-0 = <&wkup_uart0_pins_default>; 329}; 330 331&mcu_uart0 { 332 status = "okay"; 333 pinctrl-names = "default"; 334 pinctrl-0 = <&mcu_uart0_pins_default>; 335}; 336 337&main_uart8 { 338 status = "okay"; 339 pinctrl-names = "default"; 340 pinctrl-0 = <&main_uart8_pins_default>; 341 /* Shared with TFA on this platform */ 342 power-domains = <&k3_pds 357 TI_SCI_PD_SHARED>; 343}; 344 345&main_i2c0 { 346 pinctrl-names = "default"; 347 pinctrl-0 = <&main_i2c0_pins_default>; 348 clock-frequency = <400000>; 349 350 exp1: gpio@21 { 351 compatible = "ti,tca6416"; 352 reg = <0x21>; 353 gpio-controller; 354 #gpio-cells = <2>; 355 gpio-line-names = " ", " ", " ", " ", " ", 356 "BOARDID_EEPROM_WP", "CAN_STB", " ", 357 "GPIO_uSD_PWR_EN", " ", "IO_EXP_PCIe1_M.2_RTSz", 358 "IO_EXP_MCU_RGMII_RST#", " ", " ", " ", " "; 359 }; 360}; 361 362&main_i2c4 { 363 status = "okay"; 364 pinctrl-names = "default"; 365 pinctrl-0 = <&main_i2c4_pins_default>; 366 clock-frequency = <400000>; 367}; 368 369&mcu_i2c0 { 370 status = "okay"; 371 pinctrl-names = "default"; 372 pinctrl-0 = <&mcu_i2c0_pins_default>; 373 clock-frequency = <400000>; 374}; 375 376&main_sdhci0 { 377 /* Unused */ 378 status = "disabled"; 379}; 380 381&main_sdhci1 { 382 /* SD card */ 383 pinctrl-0 = <&main_mmc1_pins_default>; 384 pinctrl-names = "default"; 385 disable-wp; 386 vmmc-supply = <&vdd_mmc1>; 387 vqmmc-supply = <&vdd_sd_dv>; 388}; 389 390&mcu_cpsw { 391 pinctrl-names = "default"; 392 pinctrl-0 = <&mcu_cpsw_pins_default>, <&mcu_mdio_pins_default>; 393}; 394 395&davinci_mdio { 396 phy0: ethernet-phy@0 { 397 reg = <0>; 398 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; 399 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; 400 ti,min-output-impedance; 401 }; 402}; 403 404&cpsw_port1 { 405 phy-mode = "rgmii-rxid"; 406 phy-handle = <&phy0>; 407}; 408 409&mcu_mcan0 { 410 status = "okay"; 411 pinctrl-names = "default"; 412 pinctrl-0 = <&mcu_mcan0_pins_default>; 413 phys = <&transceiver1>; 414}; 415 416&mcu_mcan1 { 417 status = "okay"; 418 pinctrl-names = "default"; 419 pinctrl-0 = <&mcu_mcan1_pins_default>; 420 phys = <&transceiver2>; 421}; 422 423&main_mcan6 { 424 status = "okay"; 425 pinctrl-names = "default"; 426 pinctrl-0 = <&main_mcan6_pins_default>; 427 phys = <&transceiver3>; 428}; 429 430&main_mcan7 { 431 status = "okay"; 432 pinctrl-names = "default"; 433 pinctrl-0 = <&main_mcan7_pins_default>; 434 phys = <&transceiver4>; 435}; 436