1// SPDX-License-Identifier: GPL-2.0 2/* 3 * AM62A SK: https://www.ti.com/lit/zip/sprr459 4 * 5 * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ 6 */ 7 8/dts-v1/; 9 10#include <dt-bindings/leds/common.h> 11#include <dt-bindings/gpio/gpio.h> 12#include <dt-bindings/net/ti-dp83867.h> 13#include "k3-am62a7.dtsi" 14 15/ { 16 compatible = "ti,am62a7-sk", "ti,am62a7"; 17 model = "Texas Instruments AM62A7 SK"; 18 19 aliases { 20 serial0 = &wkup_uart0; 21 serial2 = &main_uart0; 22 serial3 = &main_uart1; 23 mmc1 = &sdhci1; 24 }; 25 26 chosen { 27 stdout-path = "serial2:115200n8"; 28 }; 29 30 memory@80000000 { 31 device_type = "memory"; 32 /* 4G RAM */ 33 reg = <0x00000000 0x80000000 0x00000000 0x80000000>, 34 <0x00000008 0x80000000 0x00000000 0x80000000>; 35 }; 36 37 reserved-memory { 38 #address-cells = <2>; 39 #size-cells = <2>; 40 ranges; 41 42 secure_tfa_ddr: tfa@9e780000 { 43 reg = <0x00 0x9e780000 0x00 0x80000>; 44 alignment = <0x1000>; 45 no-map; 46 }; 47 48 secure_ddr: optee@9e800000 { 49 reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */ 50 alignment = <0x1000>; 51 no-map; 52 }; 53 54 wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 { 55 compatible = "shared-dma-pool"; 56 reg = <0x00 0x9c900000 0x00 0x01e00000>; 57 no-map; 58 }; 59 }; 60 61 vmain_pd: regulator-0 { 62 /* TPS25750 PD CONTROLLER OUTPUT */ 63 compatible = "regulator-fixed"; 64 regulator-name = "vmain_pd"; 65 regulator-min-microvolt = <5000000>; 66 regulator-max-microvolt = <5000000>; 67 regulator-always-on; 68 regulator-boot-on; 69 }; 70 71 vcc_5v0: regulator-1 { 72 /* Output of TPS63070 */ 73 compatible = "regulator-fixed"; 74 regulator-name = "vcc_5v0"; 75 regulator-min-microvolt = <5000000>; 76 regulator-max-microvolt = <5000000>; 77 vin-supply = <&vmain_pd>; 78 regulator-always-on; 79 regulator-boot-on; 80 }; 81 82 vcc_3v3_main: regulator-2 { 83 /* output of LM5141-Q1 */ 84 compatible = "regulator-fixed"; 85 regulator-name = "vcc_3v3_main"; 86 regulator-min-microvolt = <3300000>; 87 regulator-max-microvolt = <3300000>; 88 vin-supply = <&vmain_pd>; 89 regulator-always-on; 90 regulator-boot-on; 91 }; 92 93 vdd_mmc1: regulator-3 { 94 /* TPS22918DBVR */ 95 compatible = "regulator-fixed"; 96 regulator-name = "vdd_mmc1"; 97 regulator-min-microvolt = <3300000>; 98 regulator-max-microvolt = <3300000>; 99 regulator-boot-on; 100 enable-active-high; 101 gpio = <&exp1 3 GPIO_ACTIVE_HIGH>; 102 }; 103 104 vcc_3v3_sys: regulator-4 { 105 /* output of TPS222965DSGT */ 106 compatible = "regulator-fixed"; 107 regulator-name = "vcc_3v3_sys"; 108 regulator-min-microvolt = <3300000>; 109 regulator-max-microvolt = <3300000>; 110 vin-supply = <&vcc_3v3_main>; 111 regulator-always-on; 112 regulator-boot-on; 113 }; 114 115 leds { 116 compatible = "gpio-leds"; 117 pinctrl-names = "default"; 118 pinctrl-0 = <&usr_led_pins_default>; 119 120 led-0 { 121 label = "am62a-sk:green:heartbeat"; 122 gpios = <&main_gpio1 49 GPIO_ACTIVE_HIGH>; 123 linux,default-trigger = "heartbeat"; 124 function = LED_FUNCTION_HEARTBEAT; 125 default-state = "off"; 126 }; 127 }; 128 129 tlv320_mclk: clk-0 { 130 #clock-cells = <0>; 131 compatible = "fixed-clock"; 132 clock-frequency = <12288000>; 133 }; 134 135 codec_audio: sound { 136 compatible = "simple-audio-card"; 137 simple-audio-card,name = "AM62Ax-SKEVM"; 138 simple-audio-card,widgets = 139 "Headphone", "Headphone Jack", 140 "Line", "Line In", 141 "Microphone", "Microphone Jack"; 142 simple-audio-card,routing = 143 "Headphone Jack", "HPLOUT", 144 "Headphone Jack", "HPROUT", 145 "LINE1L", "Line In", 146 "LINE1R", "Line In", 147 "MIC3R", "Microphone Jack", 148 "Microphone Jack", "Mic Bias"; 149 simple-audio-card,format = "dsp_b"; 150 simple-audio-card,bitclock-master = <&sound_master>; 151 simple-audio-card,frame-master = <&sound_master>; 152 simple-audio-card,bitclock-inversion; 153 154 simple-audio-card,cpu { 155 sound-dai = <&mcasp1>; 156 }; 157 158 sound_master: simple-audio-card,codec { 159 sound-dai = <&tlv320aic3106>; 160 clocks = <&tlv320_mclk>; 161 }; 162 }; 163}; 164 165&mcu_pmx0 { 166 wkup_uart0_pins_default: wkup-uart0-default-pins { 167 pinctrl-single,pins = < 168 AM62AX_MCU_IOPAD(0x0024, PIN_INPUT, 0) /* (C9) WKUP_UART0_RXD */ 169 AM62AX_MCU_IOPAD(0x0028, PIN_OUTPUT, 0) /* (E9) WKUP_UART0_TXD */ 170 AM62AX_MCU_IOPAD(0x002c, PIN_INPUT, 0) /* (C10) WKUP_UART0_CTSn */ 171 AM62AX_MCU_IOPAD(0x0030, PIN_OUTPUT, 0) /* (C8) WKUP_UART0_RTSn */ 172 >; 173 }; 174}; 175 176/* WKUP UART0 is used for DM firmware logs */ 177&wkup_uart0 { 178 pinctrl-names = "default"; 179 pinctrl-0 = <&wkup_uart0_pins_default>; 180 status = "reserved"; 181}; 182 183&main_pmx0 { 184 main_uart0_pins_default: main-uart0-default-pins { 185 pinctrl-single,pins = < 186 AM62AX_IOPAD(0x1c8, PIN_INPUT, 0) /* (E14) UART0_RXD */ 187 AM62AX_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (D15) UART0_TXD */ 188 >; 189 }; 190 191 main_uart1_pins_default: main-uart1-default-pins { 192 pinctrl-single,pins = < 193 AM62AX_IOPAD(0x01e8, PIN_INPUT, 1) /* (C17) I2C1_SCL.UART1_RXD */ 194 AM62AX_IOPAD(0x01ec, PIN_OUTPUT, 1) /* (E17) I2C1_SDA.UART1_TXD */ 195 AM62AX_IOPAD(0x0194, PIN_INPUT, 2) /* (C19) MCASP0_AXR3.UART1_CTSn */ 196 AM62AX_IOPAD(0x0198, PIN_OUTPUT, 2) /* (B19) MCASP0_AXR2.UART1_RTSn */ 197 >; 198 }; 199 200 main_i2c0_pins_default: main-i2c0-default-pins { 201 pinctrl-single,pins = < 202 AM62AX_IOPAD(0x1e0, PIN_INPUT_PULLUP, 0) /* (B16) I2C0_SCL */ 203 AM62AX_IOPAD(0x1e4, PIN_INPUT_PULLUP, 0) /* (A16) I2C0_SDA */ 204 >; 205 }; 206 207 main_i2c1_pins_default: main-i2c1-default-pins { 208 pinctrl-single,pins = < 209 AM62AX_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17) I2C1_SCL */ 210 AM62AX_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17) I2C1_SDA */ 211 >; 212 }; 213 214 main_i2c2_pins_default: main-i2c2-default-pins { 215 pinctrl-single,pins = < 216 AM62AX_IOPAD(0x0b0, PIN_INPUT_PULLUP, 1) /* (K22) GPMC0_CSn2.I2C2_SCL */ 217 AM62AX_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */ 218 >; 219 }; 220 221 main_mmc1_pins_default: main-mmc1-default-pins { 222 pinctrl-single,pins = < 223 AM62AX_IOPAD(0x23c, PIN_INPUT, 0) /* (A21) MMC1_CMD */ 224 AM62AX_IOPAD(0x234, PIN_INPUT, 0) /* (B22) MMC1_CLK */ 225 AM62AX_IOPAD(0x230, PIN_INPUT, 0) /* (A22) MMC1_DAT0 */ 226 AM62AX_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */ 227 AM62AX_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */ 228 AM62AX_IOPAD(0x224, PIN_INPUT, 0) /* (D22) MMC1_DAT3 */ 229 AM62AX_IOPAD(0x240, PIN_INPUT, 0) /* (D17) MMC1_SDCD */ 230 >; 231 }; 232 233 usr_led_pins_default: usr-led-default-pins { 234 pinctrl-single,pins = < 235 AM62AX_IOPAD(0x244, PIN_OUTPUT, 7) /* (D18) MMC1_SDWP.GPIO1_49 */ 236 >; 237 }; 238 239 main_usb1_pins_default: main-usb1-default-pins { 240 pinctrl-single,pins = < 241 AM62AX_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18) USB1_DRVVBUS */ 242 >; 243 }; 244 245 main_mdio1_pins_default: main-mdio1-default-pins { 246 pinctrl-single,pins = < 247 AM62AX_IOPAD(0x160, PIN_OUTPUT, 0) /* (V12) MDIO0_MDC */ 248 AM62AX_IOPAD(0x15c, PIN_INPUT, 0) /* (V13) MDIO0_MDIO */ 249 >; 250 }; 251 252 main_rgmii1_pins_default: main-rgmii1-default-pins { 253 pinctrl-single,pins = < 254 AM62AX_IOPAD(0x14c, PIN_INPUT, 0) /* (AB16) RGMII1_RD0 */ 255 AM62AX_IOPAD(0x150, PIN_INPUT, 0) /* (V15) RGMII1_RD1 */ 256 AM62AX_IOPAD(0x154, PIN_INPUT, 0) /* (W15) RGMII1_RD2 */ 257 AM62AX_IOPAD(0x158, PIN_INPUT, 0) /* (V14) RGMII1_RD3 */ 258 AM62AX_IOPAD(0x148, PIN_INPUT, 0) /* (AA16) RGMII1_RXC */ 259 AM62AX_IOPAD(0x144, PIN_INPUT, 0) /* (AA15) RGMII1_RX_CTL */ 260 AM62AX_IOPAD(0x134, PIN_INPUT, 0) /* (Y17) RGMII1_TD0 */ 261 AM62AX_IOPAD(0x138, PIN_INPUT, 0) /* (V16) RGMII1_TD1 */ 262 AM62AX_IOPAD(0x13c, PIN_INPUT, 0) /* (Y16) RGMII1_TD2 */ 263 AM62AX_IOPAD(0x140, PIN_INPUT, 0) /* (AA17) RGMII1_TD3 */ 264 AM62AX_IOPAD(0x130, PIN_INPUT, 0) /* (AB17) RGMII1_TXC */ 265 AM62AX_IOPAD(0x12c, PIN_INPUT, 0) /* (W16) RGMII1_TX_CTL */ 266 >; 267 }; 268 269 main_mcasp1_pins_default: main-mcasp1-default-pins { 270 pinctrl-single,pins = < 271 AM62AX_IOPAD(0x090, PIN_INPUT, 2) /* (L19) GPMC0_BE0n_CLE.MCASP1_ACLKX */ 272 AM62AX_IOPAD(0x098, PIN_INPUT, 2) /* (R18) GPMC0_WAIT0.MCASP1_AFSX */ 273 AM62AX_IOPAD(0x08c, PIN_OUTPUT, 2) /* (K19) GPMC0_WEn.MCASP1_AXR0 */ 274 AM62AX_IOPAD(0x084, PIN_INPUT, 2) /* (L18) GPMC0_ADVn_ALE.MCASP1_AXR2 */ 275 >; 276 }; 277 278 main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-default-pins { 279 pinctrl-single,pins = < 280 AM62AX_IOPAD(0x01d4, PIN_INPUT, 7) /* (C15) UART0_RTSn.GPIO1_23 */ 281 >; 282 }; 283}; 284 285&mcu_pmx0 { 286 status = "okay"; 287 288 pmic_irq_pins_default: pmic-irq-default-pins { 289 pinctrl-single,pins = < 290 AM62AX_MCU_IOPAD(0x000, PIN_INPUT, 7) /* (E11) MCU_GPIO0_0 */ 291 >; 292 }; 293}; 294 295&mcu_gpio0 { 296 status = "okay"; 297}; 298 299&main_i2c0 { 300 status = "okay"; 301 pinctrl-names = "default"; 302 pinctrl-0 = <&main_i2c0_pins_default>; 303 clock-frequency = <400000>; 304 305 typec_pd0: usb-power-controller@3f { 306 compatible = "ti,tps6598x"; 307 reg = <0x3f>; 308 309 connector { 310 compatible = "usb-c-connector"; 311 label = "USB-C"; 312 self-powered; 313 data-role = "dual"; 314 power-role = "sink"; 315 port { 316 usb_con_hs: endpoint { 317 remote-endpoint = <&usb0_hs_ep>; 318 }; 319 }; 320 }; 321 }; 322 323 tps659312: pmic@48 { 324 compatible = "ti,tps6593-q1"; 325 reg = <0x48>; 326 ti,primary-pmic; 327 system-power-controller; 328 329 gpio-controller; 330 #gpio-cells = <2>; 331 332 pinctrl-names = "default"; 333 pinctrl-0 = <&pmic_irq_pins_default>; 334 interrupt-parent = <&mcu_gpio0>; 335 interrupts = <0 IRQ_TYPE_EDGE_FALLING>; 336 337 buck123-supply = <&vcc_3v3_sys>; 338 buck4-supply = <&vcc_3v3_sys>; 339 buck5-supply = <&vcc_3v3_sys>; 340 ldo1-supply = <&vcc_3v3_sys>; 341 ldo2-supply = <&vcc_3v3_sys>; 342 ldo3-supply = <&buck5>; 343 ldo4-supply = <&vcc_3v3_sys>; 344 345 regulators { 346 buck123: buck123 { 347 regulator-name = "vcc_core"; 348 regulator-min-microvolt = <715000>; 349 regulator-max-microvolt = <895000>; 350 regulator-boot-on; 351 regulator-always-on; 352 }; 353 354 buck4: buck4 { 355 regulator-name = "vcc_1v1"; 356 regulator-min-microvolt = <1100000>; 357 regulator-max-microvolt = <1100000>; 358 regulator-boot-on; 359 regulator-always-on; 360 }; 361 362 buck5: buck5 { 363 regulator-name = "vcc_1v8_sys"; 364 regulator-min-microvolt = <1800000>; 365 regulator-max-microvolt = <1800000>; 366 regulator-boot-on; 367 regulator-always-on; 368 }; 369 370 ldo1: ldo1 { 371 regulator-name = "vddshv5_sdio"; 372 regulator-min-microvolt = <3300000>; 373 regulator-max-microvolt = <3300000>; 374 regulator-boot-on; 375 regulator-always-on; 376 }; 377 378 ldo2: ldo2 { 379 regulator-name = "vpp_1v8"; 380 regulator-min-microvolt = <1800000>; 381 regulator-max-microvolt = <1800000>; 382 regulator-boot-on; 383 regulator-always-on; 384 }; 385 386 ldo3: ldo3 { 387 regulator-name = "vcc_0v85"; 388 regulator-min-microvolt = <850000>; 389 regulator-max-microvolt = <850000>; 390 regulator-boot-on; 391 regulator-always-on; 392 }; 393 394 ldo4: ldo4 { 395 regulator-name = "vdda_1v8"; 396 regulator-min-microvolt = <1800000>; 397 regulator-max-microvolt = <1800000>; 398 regulator-boot-on; 399 regulator-always-on; 400 }; 401 }; 402 }; 403}; 404 405&main_i2c1 { 406 status = "okay"; 407 pinctrl-names = "default"; 408 pinctrl-0 = <&main_i2c1_pins_default>; 409 clock-frequency = <100000>; 410 411 exp1: gpio@22 { 412 compatible = "ti,tca6424"; 413 reg = <0x22>; 414 gpio-controller; 415 #gpio-cells = <2>; 416 interrupt-parent = <&main_gpio1>; 417 interrupts = <23 IRQ_TYPE_EDGE_FALLING>; 418 interrupt-controller; 419 #interrupt-cells = <2>; 420 pinctrl-names = "default"; 421 pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>; 422 423 gpio-line-names = "GPIO_CPSW2_RST", "GPIO_CPSW1_RST", 424 "BT_EN_SOC", "MMC1_SD_EN", 425 "VPP_EN", "EXP_PS_3V3_En", 426 "EXP_PS_5V0_En", "EXP_HAT_DETECT", 427 "GPIO_AUD_RSTn", "GPIO_eMMC_RSTn", 428 "UART1_FET_BUF_EN", "BT_UART_WAKE_SOC", 429 "GPIO_HDMI_RSTn", "CSI_GPIO0", 430 "CSI_GPIO1", "WLAN_ALERTn", 431 "HDMI_INTn", "TEST_GPIO2", 432 "MCASP1_FET_EN", "MCASP1_BUF_BT_EN", 433 "MCASP1_FET_SEL", "UART1_FET_SEL", 434 "PD_I2C_IRQ", "IO_EXP_TEST_LED"; 435 }; 436 437 tlv320aic3106: audio-codec@1b { 438 #sound-dai-cells = <0>; 439 compatible = "ti,tlv320aic3106"; 440 reg = <0x1b>; 441 ai3x-micbias-vg = <1>; /* 2.0V */ 442 443 /* Regulators */ 444 AVDD-supply = <&vcc_3v3_sys>; 445 IOVDD-supply = <&vcc_3v3_sys>; 446 DRVDD-supply = <&vcc_3v3_sys>; 447 DVDD-supply = <&buck5>; 448 }; 449 450 exp2: gpio@23 { 451 compatible = "ti,tca6424"; 452 reg = <0x23>; 453 gpio-controller; 454 #gpio-cells = <2>; 455 456 gpio-line-names = "", "", 457 "", "", 458 "", "", 459 "", "", 460 "WL_LT_EN", "CSI_RSTz", 461 "", "", 462 "", "", 463 "", "", 464 "SPI0_FET_SEL", "SPI0_FET_OE", 465 "RGMII2_BRD_CONN_DET", "CSI_SEL2", 466 "CSI_EN", "AUTO_100M_1000M_CONFIG", 467 "CSI_VLDO_SEL", "SoC_WLAN_SDIO_RST"; 468 }; 469}; 470 471&main_i2c2 { 472 status = "okay"; 473 pinctrl-names = "default"; 474 pinctrl-0 = <&main_i2c2_pins_default>; 475 clock-frequency = <400000>; 476}; 477 478&sdhci1 { 479 /* SD/MMC */ 480 status = "okay"; 481 vmmc-supply = <&vdd_mmc1>; 482 pinctrl-names = "default"; 483 pinctrl-0 = <&main_mmc1_pins_default>; 484 ti,driver-strength-ohm = <50>; 485 disable-wp; 486}; 487 488&main_gpio0 { 489 status = "okay"; 490}; 491 492&main_gpio1 { 493 status = "okay"; 494}; 495 496&main_gpio_intr { 497 status = "okay"; 498}; 499 500&main_uart0 { 501 status = "okay"; 502 pinctrl-names = "default"; 503 pinctrl-0 = <&main_uart0_pins_default>; 504}; 505 506/* Main UART1 is used for TIFS firmware logs */ 507&main_uart1 { 508 pinctrl-names = "default"; 509 pinctrl-0 = <&main_uart1_pins_default>; 510 status = "reserved"; 511}; 512 513&usbss0 { 514 status = "okay"; 515 ti,vbus-divider; 516}; 517 518&usb0 { 519 usb-role-switch; 520 521 port { 522 usb0_hs_ep: endpoint { 523 remote-endpoint = <&usb_con_hs>; 524 }; 525 }; 526}; 527 528&usbss1 { 529 status = "okay"; 530}; 531 532&usb1 { 533 dr_mode = "host"; 534 pinctrl-names = "default"; 535 pinctrl-0 = <&main_usb1_pins_default>; 536}; 537 538&cpsw3g { 539 status = "okay"; 540 pinctrl-names = "default"; 541 pinctrl-0 = <&main_rgmii1_pins_default>; 542}; 543 544&cpsw_port1 { 545 status = "okay"; 546 phy-mode = "rgmii-rxid"; 547 phy-handle = <&cpsw3g_phy0>; 548}; 549 550&cpsw_port2 { 551 status = "disabled"; 552}; 553 554&cpsw3g_mdio { 555 status = "okay"; 556 pinctrl-names = "default"; 557 pinctrl-0 = <&main_mdio1_pins_default>; 558 559 cpsw3g_phy0: ethernet-phy@0 { 560 reg = <0>; 561 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; 562 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; 563 ti,min-output-impedance; 564 }; 565}; 566 567&mcasp1 { 568 status = "okay"; 569 #sound-dai-cells = <0>; 570 571 pinctrl-names = "default"; 572 pinctrl-0 = <&main_mcasp1_pins_default>; 573 574 op-mode = <0>; /* MCASP_IIS_MODE */ 575 tdm-slots = <2>; 576 577 serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ 578 1 0 2 0 579 0 0 0 0 580 0 0 0 0 581 0 0 0 0 582 >; 583 tx-num-evt = <32>; 584 rx-num-evt = <32>; 585}; 586