Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ |
| 4 | */ |
| 5 | |
Andreas Dannenberg | 7202af9 | 2019-04-29 12:56:44 -0500 | [diff] [blame] | 6 | #include <dt-bindings/pinctrl/k3.h> |
Grygorii Strashko | 736b6c3 | 2019-02-05 17:31:26 +0530 | [diff] [blame] | 7 | #include <dt-bindings/dma/k3-udma.h> |
Grygorii Strashko | 6f2929d | 2019-07-09 10:30:36 +0530 | [diff] [blame] | 8 | #include <dt-bindings/net/ti-dp83867.h> |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 9 | |
| 10 | / { |
| 11 | chosen { |
| 12 | stdout-path = "serial2:115200n8"; |
| 13 | }; |
| 14 | |
| 15 | aliases { |
| 16 | serial2 = &main_uart0; |
Grygorii Strashko | 5195c10 | 2019-07-09 10:30:35 +0530 | [diff] [blame] | 17 | ethernet0 = &cpsw_port1; |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 18 | }; |
| 19 | }; |
| 20 | |
| 21 | &cbass_main{ |
| 22 | u-boot,dm-spl; |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 23 | |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 24 | sdhci1: sdhci@04FA0000 { |
Faiz Abbas | 3a1a0df | 2019-06-11 00:43:31 +0530 | [diff] [blame] | 25 | compatible = "ti,am654-sdhci-5.1"; |
Lokesh Vutla | 2d0eba3 | 2018-11-02 19:51:08 +0530 | [diff] [blame] | 26 | reg = <0x0 0x4FA0000 0x0 0x1000>, |
| 27 | <0x0 0x4FB0000 0x0 0x400>; |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 28 | clocks = <&k3_clks 48 1>; |
| 29 | power-domains = <&k3_pds 48>; |
| 30 | max-frequency = <25000000>; |
Faiz Abbas | bbcfaad | 2019-06-11 00:43:36 +0530 | [diff] [blame] | 31 | ti,otap-del-sel = <0x2>; |
| 32 | ti,trm-icp = <0x8>; |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 33 | }; |
| 34 | |
| 35 | }; |
| 36 | |
Lokesh Vutla | 2d0eba3 | 2018-11-02 19:51:08 +0530 | [diff] [blame] | 37 | &cbass_mcu { |
| 38 | u-boot,dm-spl; |
Grygorii Strashko | 736b6c3 | 2019-02-05 17:31:26 +0530 | [diff] [blame] | 39 | |
| 40 | navss_mcu: navss-mcu { |
| 41 | compatible = "simple-bus"; |
| 42 | #address-cells = <2>; |
| 43 | #size-cells = <2>; |
| 44 | ranges; |
| 45 | |
| 46 | ti,sci-dev-id = <119>; |
| 47 | |
| 48 | mcu_ringacc: ringacc@2b800000 { |
| 49 | compatible = "ti,am654-navss-ringacc"; |
| 50 | reg = <0x0 0x2b800000 0x0 0x400000>, |
| 51 | <0x0 0x2b000000 0x0 0x400000>, |
| 52 | <0x0 0x28590000 0x0 0x100>, |
| 53 | <0x0 0x2a500000 0x0 0x40000>; |
| 54 | reg-names = "rt", "fifos", |
| 55 | "proxy_gcfg", "proxy_target"; |
| 56 | ti,num-rings = <286>; |
| 57 | ti,sci-rm-range-gp-rings = <0x2>; /* GP ring range */ |
| 58 | ti,dma-ring-reset-quirk; |
| 59 | ti,sci = <&dmsc>; |
| 60 | ti,sci-dev-id = <195>; |
| 61 | }; |
| 62 | |
| 63 | mcu_udmap: udmap@285c0000 { |
| 64 | compatible = "ti,k3-navss-udmap"; |
| 65 | reg = <0x0 0x285c0000 0x0 0x100>, |
| 66 | <0x0 0x2a800000 0x0 0x40000>, |
| 67 | <0x0 0x2aa00000 0x0 0x40000>; |
| 68 | reg-names = "gcfg", "rchanrt", "tchanrt"; |
| 69 | #dma-cells = <3>; |
| 70 | |
| 71 | ti,ringacc = <&mcu_ringacc>; |
| 72 | ti,psil-base = <0x6000>; |
| 73 | |
| 74 | ti,sci = <&dmsc>; |
| 75 | ti,sci-dev-id = <194>; |
| 76 | |
| 77 | ti,sci-rm-range-tchan = <0x1>, /* TX_HCHAN */ |
| 78 | <0x2>; /* TX_CHAN */ |
| 79 | ti,sci-rm-range-rchan = <0x3>, /* RX_HCHAN */ |
| 80 | <0x4>; /* RX_CHAN */ |
| 81 | ti,sci-rm-range-rflow = <0x5>; /* GP RFLOW */ |
| 82 | dma-coherent; |
| 83 | }; |
| 84 | }; |
Grygorii Strashko | 5195c10 | 2019-07-09 10:30:35 +0530 | [diff] [blame] | 85 | |
| 86 | mcu_conf: scm_conf@40f00000 { |
| 87 | compatible = "syscon"; |
| 88 | reg = <0x0 0x40f00000 0x0 0x20000>; |
| 89 | }; |
| 90 | |
| 91 | mcu_cpsw: cpsw_nuss@046000000 { |
| 92 | compatible = "ti,am654-cpsw-nuss"; |
| 93 | #address-cells = <2>; |
| 94 | #size-cells = <2>; |
| 95 | reg = <0x0 0x46000000 0x0 0x200000>; |
| 96 | reg-names = "cpsw_nuss"; |
| 97 | ranges; |
| 98 | dma-coherent; |
| 99 | clocks = <&k3_clks 5 10>; |
| 100 | clock-names = "fck"; |
| 101 | power-domains = <&k3_pds 5>; |
| 102 | ti,psil-base = <0x7000>; |
| 103 | |
| 104 | dmas = <&mcu_udmap &mcu_cpsw 0 UDMA_DIR_TX>, |
| 105 | <&mcu_udmap &mcu_cpsw 1 UDMA_DIR_TX>, |
| 106 | <&mcu_udmap &mcu_cpsw 2 UDMA_DIR_TX>, |
| 107 | <&mcu_udmap &mcu_cpsw 3 UDMA_DIR_TX>, |
| 108 | <&mcu_udmap &mcu_cpsw 4 UDMA_DIR_TX>, |
| 109 | <&mcu_udmap &mcu_cpsw 5 UDMA_DIR_TX>, |
| 110 | <&mcu_udmap &mcu_cpsw 6 UDMA_DIR_TX>, |
| 111 | <&mcu_udmap &mcu_cpsw 7 UDMA_DIR_TX>, |
| 112 | <&mcu_udmap &mcu_cpsw 0 UDMA_DIR_RX>; |
| 113 | dma-names = "tx0", "tx1", "tx2", "tx3", |
| 114 | "tx4", "tx5", "tx6", "tx7", |
| 115 | "rx"; |
| 116 | |
| 117 | ports { |
| 118 | #address-cells = <1>; |
| 119 | #size-cells = <0>; |
| 120 | host: host@0 { |
| 121 | reg = <0>; |
| 122 | ti,label = "host"; |
| 123 | }; |
| 124 | |
| 125 | cpsw_port1: port@1 { |
| 126 | reg = <1>; |
| 127 | ti,mac-only; |
| 128 | ti,label = "port1"; |
| 129 | ti,syscon-efuse = <&mcu_conf 0x200>; |
| 130 | }; |
| 131 | }; |
| 132 | |
| 133 | davinci_mdio: mdio { |
| 134 | #address-cells = <1>; |
| 135 | #size-cells = <0>; |
| 136 | bus_freq = <1000000>; |
| 137 | }; |
| 138 | |
| 139 | ti,psil-config0 { |
| 140 | linux,udma-mode = <UDMA_PKT_MODE>; |
| 141 | statictr-type = <PSIL_STATIC_TR_NONE>; |
| 142 | ti,needs-epib; |
| 143 | ti,psd-size = <16>; |
| 144 | }; |
| 145 | |
| 146 | ti,psil-config1 { |
| 147 | linux,udma-mode = <UDMA_PKT_MODE>; |
| 148 | statictr-type = <PSIL_STATIC_TR_NONE>; |
| 149 | ti,needs-epib; |
| 150 | ti,psd-size = <16>; |
| 151 | }; |
| 152 | |
| 153 | ti,psil-config2 { |
| 154 | linux,udma-mode = <UDMA_PKT_MODE>; |
| 155 | statictr-type = <PSIL_STATIC_TR_NONE>; |
| 156 | ti,needs-epib; |
| 157 | ti,psd-size = <16>; |
| 158 | }; |
| 159 | |
| 160 | ti,psil-config3 { |
| 161 | linux,udma-mode = <UDMA_PKT_MODE>; |
| 162 | statictr-type = <PSIL_STATIC_TR_NONE>; |
| 163 | ti,needs-epib; |
| 164 | ti,psd-size = <16>; |
| 165 | }; |
| 166 | |
| 167 | ti,psil-config4 { |
| 168 | linux,udma-mode = <UDMA_PKT_MODE>; |
| 169 | statictr-type = <PSIL_STATIC_TR_NONE>; |
| 170 | ti,needs-epib; |
| 171 | ti,psd-size = <16>; |
| 172 | }; |
| 173 | |
| 174 | ti,psil-config5 { |
| 175 | linux,udma-mode = <UDMA_PKT_MODE>; |
| 176 | statictr-type = <PSIL_STATIC_TR_NONE>; |
| 177 | ti,needs-epib; |
| 178 | ti,psd-size = <16>; |
| 179 | }; |
| 180 | |
| 181 | ti,psil-config6 { |
| 182 | linux,udma-mode = <UDMA_PKT_MODE>; |
| 183 | statictr-type = <PSIL_STATIC_TR_NONE>; |
| 184 | ti,needs-epib; |
| 185 | ti,psd-size = <16>; |
| 186 | }; |
| 187 | |
| 188 | ti,psil-config7 { |
| 189 | linux,udma-mode = <UDMA_PKT_MODE>; |
| 190 | statictr-type = <PSIL_STATIC_TR_NONE>; |
| 191 | ti,needs-epib; |
| 192 | ti,psd-size = <16>; |
| 193 | }; |
| 194 | }; |
Lokesh Vutla | 2d0eba3 | 2018-11-02 19:51:08 +0530 | [diff] [blame] | 195 | }; |
| 196 | |
| 197 | &cbass_wakeup { |
| 198 | u-boot,dm-spl; |
| 199 | }; |
| 200 | |
| 201 | &secure_proxy_main { |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 202 | u-boot,dm-spl; |
| 203 | }; |
| 204 | |
| 205 | &dmsc { |
| 206 | u-boot,dm-spl; |
Lokesh Vutla | 2d0eba3 | 2018-11-02 19:51:08 +0530 | [diff] [blame] | 207 | k3_sysreset: sysreset-controller { |
| 208 | compatible = "ti,sci-sysreset"; |
| 209 | u-boot,dm-spl; |
| 210 | }; |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 211 | }; |
| 212 | |
| 213 | &k3_pds { |
| 214 | u-boot,dm-spl; |
| 215 | }; |
| 216 | |
| 217 | &k3_clks { |
| 218 | u-boot,dm-spl; |
| 219 | }; |
| 220 | |
| 221 | &k3_reset { |
| 222 | u-boot,dm-spl; |
| 223 | }; |
| 224 | |
| 225 | &main_pmx0 { |
| 226 | u-boot,dm-spl; |
| 227 | main_uart0_pins_default: main_uart0_pins_default { |
| 228 | pinctrl-single,pins = < |
Andreas Dannenberg | 7202af9 | 2019-04-29 12:56:44 -0500 | [diff] [blame] | 229 | AM65X_IOPAD(0x01e4, PIN_INPUT, 0) /* (AF11) UART0_RXD */ |
| 230 | AM65X_IOPAD(0x01e8, PIN_OUTPUT, 0) /* (AE11) UART0_TXD */ |
| 231 | AM65X_IOPAD(0x01ec, PIN_INPUT, 0) /* (AG11) UART0_CTSn */ |
| 232 | AM65X_IOPAD(0x01f0, PIN_OUTPUT, 0) /* (AD11) UART0_RTSn */ |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 233 | >; |
Lokesh Vutla | 2d0eba3 | 2018-11-02 19:51:08 +0530 | [diff] [blame] | 234 | u-boot,dm-spl; |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 235 | }; |
| 236 | |
| 237 | main_mmc0_pins_default: main_mmc0_pins_default { |
| 238 | pinctrl-single,pins = < |
Andreas Dannenberg | 7202af9 | 2019-04-29 12:56:44 -0500 | [diff] [blame] | 239 | AM65X_IOPAD(0x01a8, PIN_INPUT_PULLDOWN, 0) /* (B25) MMC0_CLK */ |
| 240 | AM65X_IOPAD(0x01aC, PIN_INPUT_PULLUP, 0) /* (B27) MMC0_CMD */ |
| 241 | AM65X_IOPAD(0x01a4, PIN_INPUT_PULLUP, 0) /* (A26) MMC0_DAT0 */ |
| 242 | AM65X_IOPAD(0x01a0, PIN_INPUT_PULLUP, 0) /* (E25) MMC0_DAT1 */ |
| 243 | AM65X_IOPAD(0x019c, PIN_INPUT_PULLUP, 0) /* (C26) MMC0_DAT2 */ |
| 244 | AM65X_IOPAD(0x0198, PIN_INPUT_PULLUP, 0) /* (A25) MMC0_DAT3 */ |
| 245 | AM65X_IOPAD(0x0194, PIN_INPUT_PULLUP, 0) /* (E24) MMC0_DAT4 */ |
| 246 | AM65X_IOPAD(0x0190, PIN_INPUT_PULLUP, 0) /* (A24) MMC0_DAT5 */ |
| 247 | AM65X_IOPAD(0x018c, PIN_INPUT_PULLUP, 0) /* (B26) MMC0_DAT6 */ |
| 248 | AM65X_IOPAD(0x0188, PIN_INPUT_PULLUP, 0) /* (D25) MMC0_DAT7 */ |
Faiz Abbas | 3a1a0df | 2019-06-11 00:43:31 +0530 | [diff] [blame] | 249 | AM65X_IOPAD(0x01b4, PIN_INPUT_PULLUP, 0) /* (A23) MMC0_SDCD */ |
| 250 | AM65X_IOPAD(0x01b0, PIN_INPUT, 0) /* (C25) MMC0_DS */ |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 251 | >; |
Lokesh Vutla | 2d0eba3 | 2018-11-02 19:51:08 +0530 | [diff] [blame] | 252 | u-boot,dm-spl; |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 253 | }; |
| 254 | |
| 255 | main_mmc1_pins_default: main_mmc1_pins_default { |
| 256 | pinctrl-single,pins = < |
Andreas Dannenberg | 7202af9 | 2019-04-29 12:56:44 -0500 | [diff] [blame] | 257 | AM65X_IOPAD(0x02d4, PIN_INPUT_PULLDOWN, 0) /* (C27) MMC1_CLK */ |
| 258 | AM65X_IOPAD(0x02d8, PIN_INPUT_PULLUP, 0) /* (C28) MMC1_CMD */ |
| 259 | AM65X_IOPAD(0x02d0, PIN_INPUT_PULLUP, 0) /* (D28) MMC1_DAT0 */ |
| 260 | AM65X_IOPAD(0x02cc, PIN_INPUT_PULLUP, 0) /* (E27) MMC1_DAT1 */ |
| 261 | AM65X_IOPAD(0x02c8, PIN_INPUT_PULLUP, 0) /* (D26) MMC1_DAT2 */ |
| 262 | AM65X_IOPAD(0x02c4, PIN_INPUT_PULLUP, 0) /* (D27) MMC1_DAT3 */ |
| 263 | AM65X_IOPAD(0x02dc, PIN_INPUT_PULLUP, 0) /* (B24) MMC1_SDCD */ |
| 264 | AM65X_IOPAD(0x02e0, PIN_INPUT, 0) /* (C24) MMC1_SDWP */ |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 265 | >; |
Lokesh Vutla | 2d0eba3 | 2018-11-02 19:51:08 +0530 | [diff] [blame] | 266 | u-boot,dm-spl; |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 267 | }; |
| 268 | |
| 269 | }; |
| 270 | |
| 271 | &main_pmx1 { |
| 272 | u-boot,dm-spl; |
| 273 | }; |
| 274 | |
Grygorii Strashko | 6f2929d | 2019-07-09 10:30:36 +0530 | [diff] [blame] | 275 | &wkup_pmx0 { |
| 276 | mcu_cpsw_pins_default: mcu_cpsw_pins_default { |
| 277 | pinctrl-single,pins = < |
| 278 | AM65X_WKUP_IOPAD(0x0058, PIN_OUTPUT, 0) /* (N4) MCU_RGMII1_TX_CTL */ |
| 279 | AM65X_WKUP_IOPAD(0x005c, PIN_INPUT, 0) /* (N5) MCU_RGMII1_RX_CTL */ |
| 280 | AM65X_WKUP_IOPAD(0x0060, PIN_OUTPUT, 0) /* (M2) MCU_RGMII1_TD3 */ |
| 281 | AM65X_WKUP_IOPAD(0x0064, PIN_OUTPUT, 0) /* (M3) MCU_RGMII1_TD2 */ |
| 282 | AM65X_WKUP_IOPAD(0x0068, PIN_OUTPUT, 0) /* (M4) MCU_RGMII1_TD1 */ |
| 283 | AM65X_WKUP_IOPAD(0x006c, PIN_OUTPUT, 0) /* (M5) MCU_RGMII1_TD0 */ |
| 284 | AM65X_WKUP_IOPAD(0x0078, PIN_INPUT, 0) /* (L2) MCU_RGMII1_RD3 */ |
| 285 | AM65X_WKUP_IOPAD(0x007c, PIN_INPUT, 0) /* (L5) MCU_RGMII1_RD2 */ |
| 286 | AM65X_WKUP_IOPAD(0x0080, PIN_INPUT, 0) /* (M6) MCU_RGMII1_RD1 */ |
| 287 | AM65X_WKUP_IOPAD(0x0084, PIN_INPUT, 0) /* (L6) MCU_RGMII1_RD0 */ |
| 288 | AM65X_WKUP_IOPAD(0x0070, PIN_INPUT, 0) /* (N1) MCU_RGMII1_TXC */ |
| 289 | AM65X_WKUP_IOPAD(0x0074, PIN_INPUT, 0) /* (M1) MCU_RGMII1_RXC */ |
| 290 | >; |
| 291 | }; |
| 292 | |
| 293 | mcu_mdio_pins_default: mcu_mdio1_pins_default { |
| 294 | pinctrl-single,pins = < |
| 295 | AM65X_WKUP_IOPAD(0x008c, PIN_OUTPUT, 0) /* (L1) MCU_MDIO0_MDC */ |
| 296 | AM65X_WKUP_IOPAD(0x0088, PIN_INPUT, 0) /* (L4) MCU_MDIO0_MDIO */ |
| 297 | >; |
| 298 | }; |
| 299 | }; |
| 300 | |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 301 | &main_uart0 { |
| 302 | u-boot,dm-spl; |
| 303 | pinctrl-names = "default"; |
| 304 | pinctrl-0 = <&main_uart0_pins_default>; |
| 305 | status = "okay"; |
| 306 | }; |
| 307 | |
| 308 | &sdhci0 { |
| 309 | u-boot,dm-spl; |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 310 | }; |
| 311 | |
| 312 | &sdhci1 { |
| 313 | u-boot,dm-spl; |
| 314 | status = "okay"; |
| 315 | pinctrl-names = "default"; |
| 316 | pinctrl-0 = <&main_mmc1_pins_default>; |
| 317 | sdhci-caps-mask = <0x7 0x0>; |
Faiz Abbas | bbcfaad | 2019-06-11 00:43:36 +0530 | [diff] [blame] | 318 | ti,driver-strength-ohm = <50>; |
Lokesh Vutla | 853f7f5 | 2018-08-27 15:59:09 +0530 | [diff] [blame] | 319 | }; |
Grygorii Strashko | 6f2929d | 2019-07-09 10:30:36 +0530 | [diff] [blame] | 320 | |
| 321 | &mcu_cpsw { |
| 322 | pinctrl-names = "default"; |
| 323 | pinctrl-0 = <&mcu_cpsw_pins_default &mcu_mdio_pins_default>; |
| 324 | }; |
| 325 | |
| 326 | &davinci_mdio { |
| 327 | phy0: ethernet-phy@0 { |
| 328 | reg = <0>; |
| 329 | /* TODO: phy reset: TCA9555RTWR(i2c:0x21)[p04].GPIO_MCU_RGMII_RSTN */ |
| 330 | ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; |
| 331 | ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; |
| 332 | ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; |
| 333 | }; |
| 334 | }; |
| 335 | |
| 336 | &cpsw_port1 { |
| 337 | phy-mode = "rgmii-id"; |
| 338 | phy-handle = <&phy0>; |
| 339 | }; |
| 340 | |
| 341 | &mcu_cpsw { |
| 342 | reg = <0x0 0x46000000 0x0 0x200000>, |
| 343 | <0x0 0x40f00200 0x0 0x2>; |
| 344 | reg-names = "cpsw_nuss", "mac_efuse"; |
| 345 | |
| 346 | cpsw-phy-sel@40f04040 { |
| 347 | compatible = "ti,am654-cpsw-phy-sel"; |
| 348 | reg= <0x0 0x40f04040 0x0 0x4>; |
| 349 | reg-names = "gmii-sel"; |
| 350 | }; |
| 351 | }; |