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