developer | f596c1a | 2023-07-19 17:17:49 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (c) 2022 MediaTek Inc. |
| 4 | * Author: Sam Shih <sam.shih@mediatek.com> |
| 5 | */ |
| 6 | |
| 7 | #include <dt-bindings/interrupt-controller/irq.h> |
| 8 | #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 9 | #include <dt-bindings/clock/mt7988-clk.h> |
| 10 | #include <dt-bindings/reset/mt7988-reset.h> |
| 11 | #include <dt-bindings/gpio/gpio.h> |
developer | 4c813af | 2024-01-22 10:07:54 +0800 | [diff] [blame] | 12 | #include <dt-bindings/pinctrl/mt65xx.h> |
Frank Wunderlich | 7950d17 | 2023-08-03 20:00:01 +0200 | [diff] [blame] | 13 | #include <dt-bindings/phy/phy.h> |
developer | f596c1a | 2023-07-19 17:17:49 +0800 | [diff] [blame] | 14 | |
| 15 | / { |
| 16 | compatible = "mediatek,mt7988-rfb"; |
| 17 | interrupt-parent = <&gic>; |
| 18 | #address-cells = <2>; |
| 19 | #size-cells = <2>; |
| 20 | |
| 21 | cpus { |
| 22 | #address-cells = <1>; |
| 23 | #size-cells = <0>; |
| 24 | |
| 25 | cpu0: cpu@0 { |
| 26 | device_type = "cpu"; |
| 27 | compatible = "arm,cortex-a73"; |
| 28 | reg = <0x0>; |
| 29 | mediatek,hwver = <&hwver>; |
| 30 | }; |
| 31 | |
| 32 | cpu1: cpu@1 { |
| 33 | device_type = "cpu"; |
| 34 | compatible = "arm,cortex-a73"; |
| 35 | reg = <0x1>; |
| 36 | mediatek,hwver = <&hwver>; |
| 37 | }; |
| 38 | |
| 39 | cpu2: cpu@2 { |
| 40 | device_type = "cpu"; |
| 41 | compatible = "arm,cortex-a73"; |
| 42 | reg = <0x2>; |
| 43 | mediatek,hwver = <&hwver>; |
| 44 | }; |
| 45 | |
| 46 | cpu3: cpu@3 { |
| 47 | device_type = "cpu"; |
| 48 | compatible = "arm,cortex-a73"; |
| 49 | reg = <0x3>; |
| 50 | mediatek,hwver = <&hwver>; |
| 51 | }; |
| 52 | }; |
| 53 | |
| 54 | system_clk: dummy40m { |
| 55 | compatible = "fixed-clock"; |
| 56 | clock-frequency = <40000000>; |
| 57 | #clock-cells = <0>; |
| 58 | }; |
| 59 | |
| 60 | spi_clk: dummy208m { |
| 61 | compatible = "fixed-clock"; |
| 62 | clock-frequency = <208000000>; |
| 63 | #clock-cells = <0>; |
| 64 | }; |
| 65 | |
| 66 | hwver: hwver { |
| 67 | compatible = "mediatek,hwver", "syscon"; |
| 68 | reg = <0 0x8000000 0 0x1000>; |
| 69 | }; |
| 70 | |
| 71 | timer { |
| 72 | compatible = "arm,armv8-timer"; |
| 73 | interrupt-parent = <&gic>; |
| 74 | clock-frequency = <13000000>; |
| 75 | interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, |
| 76 | <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, |
| 77 | <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, |
| 78 | <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; |
| 79 | }; |
| 80 | |
| 81 | watchdog: watchdog@1001c000 { |
| 82 | compatible = "mediatek,mt7622-wdt", |
| 83 | "mediatek,mt6589-wdt", |
| 84 | "syscon"; |
| 85 | reg = <0 0x1001c000 0 0x1000>; |
| 86 | interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; |
| 87 | #reset-cells = <1>; |
| 88 | }; |
| 89 | |
| 90 | gic: interrupt-controller@c000000 { |
| 91 | compatible = "arm,gic-v3"; |
| 92 | #interrupt-cells = <3>; |
| 93 | interrupt-parent = <&gic>; |
| 94 | interrupt-controller; |
| 95 | reg = <0 0x0c000000 0 0x40000>, /* GICD */ |
| 96 | <0 0x0c080000 0 0x200000>; /* GICR */ |
| 97 | interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; |
| 98 | }; |
| 99 | |
| 100 | infracfg_ao_cgs: infracfg_ao_cgs@10001000 { |
| 101 | compatible = "mediatek,mt7988-infracfg_ao_cgs", "syscon"; |
| 102 | reg = <0 0x10001000 0 0x1000>; |
| 103 | clock-parent = <&infracfg_ao>; |
| 104 | #clock-cells = <1>; |
| 105 | }; |
| 106 | |
| 107 | apmixedsys: apmixedsys@1001e000 { |
| 108 | compatible = "mediatek,mt7988-fixed-plls", "syscon"; |
| 109 | reg = <0 0x1001e000 0 0x1000>; |
| 110 | #clock-cells = <1>; |
| 111 | }; |
| 112 | |
| 113 | topckgen: topckgen@1001b000 { |
| 114 | compatible = "mediatek,mt7988-topckgen", "syscon"; |
| 115 | reg = <0 0x1001b000 0 0x1000>; |
| 116 | clock-parent = <&apmixedsys>; |
| 117 | #clock-cells = <1>; |
| 118 | }; |
| 119 | |
| 120 | pinctrl: pinctrl@1001f000 { |
| 121 | compatible = "mediatek,mt7988-pinctrl"; |
| 122 | reg = <0 0x1001f000 0 0x1000>, |
| 123 | <0 0x11c10000 0 0x1000>, |
| 124 | <0 0x11d00000 0 0x1000>, |
| 125 | <0 0x11d20000 0 0x1000>, |
| 126 | <0 0x11e00000 0 0x1000>, |
| 127 | <0 0x11f00000 0 0x1000>, |
| 128 | <0 0x1000b000 0 0x1000>; |
| 129 | reg-names = "gpio_base", "iocfg_tr_base", "iocfg_br_base", |
| 130 | "iocfg_rb_base", "iocfg_lb_base", "iocfg_tl_base", |
| 131 | "eint"; |
| 132 | gpio: gpio-controller { |
| 133 | gpio-controller; |
| 134 | #gpio-cells = <2>; |
| 135 | }; |
| 136 | }; |
| 137 | |
| 138 | sgmiisys0: syscon@10060000 { |
| 139 | compatible = "mediatek,mt7988-sgmiisys_0", "syscon"; |
| 140 | reg = <0 0x10060000 0 0x1000>; |
| 141 | clock-parent = <&topckgen>; |
| 142 | #clock-cells = <1>; |
| 143 | }; |
| 144 | |
| 145 | sgmiisys1: syscon@10070000 { |
| 146 | compatible = "mediatek,mt7988-sgmiisys_1", "syscon"; |
| 147 | reg = <0 0x10070000 0 0x1000>; |
| 148 | clock-parent = <&topckgen>; |
| 149 | #clock-cells = <1>; |
| 150 | }; |
| 151 | |
| 152 | usxgmiisys0: syscon@10080000 { |
| 153 | compatible = "mediatek,mt7988-usxgmiisys_0", "syscon"; |
| 154 | reg = <0 0x10080000 0 0x1000>; |
| 155 | clock-parent = <&topckgen>; |
| 156 | #clock-cells = <1>; |
| 157 | }; |
| 158 | |
| 159 | usxgmiisys1: syscon@10081000 { |
| 160 | compatible = "mediatek,mt7988-usxgmiisys_1", "syscon"; |
| 161 | reg = <0 0x10081000 0 0x1000>; |
| 162 | clock-parent = <&topckgen>; |
| 163 | #clock-cells = <1>; |
| 164 | }; |
| 165 | |
Frank Wunderlich | 7950d17 | 2023-08-03 20:00:01 +0200 | [diff] [blame] | 166 | dummy_clk: dummy12m { |
| 167 | compatible = "fixed-clock"; |
| 168 | clock-frequency = <12000000>; |
| 169 | #clock-cells = <0>; |
| 170 | /* must need this line, or uart uanable to get dummy_clk */ |
| 171 | bootph-all; |
| 172 | }; |
| 173 | |
| 174 | xhci1: xhci@11200000 { |
| 175 | compatible = "mediatek,mt7988-xhci", |
| 176 | "mediatek,mtk-xhci"; |
| 177 | reg = <0 0x11200000 0 0x2e00>, |
| 178 | <0 0x11203e00 0 0x0100>; |
| 179 | reg-names = "mac", "ippc"; |
| 180 | interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>; |
| 181 | phys = <&tphyu2port0 PHY_TYPE_USB2>, |
| 182 | <&tphyu3port0 PHY_TYPE_USB3>; |
| 183 | clocks = <&dummy_clk>, |
| 184 | <&dummy_clk>, |
| 185 | <&dummy_clk>, |
| 186 | <&dummy_clk>, |
| 187 | <&dummy_clk>; |
| 188 | clock-names = "sys_ck", |
| 189 | "xhci_ck", |
| 190 | "ref_ck", |
| 191 | "mcu_ck", |
| 192 | "dma_ck"; |
| 193 | #address-cells = <2>; |
| 194 | #size-cells = <2>; |
| 195 | status = "okay"; |
| 196 | }; |
| 197 | |
| 198 | usbtphy: usb-phy@11c50000 { |
| 199 | compatible = "mediatek,mt7988", |
| 200 | "mediatek,generic-tphy-v2"; |
| 201 | #address-cells = <2>; |
| 202 | #size-cells = <2>; |
| 203 | ranges; |
| 204 | status = "okay"; |
| 205 | |
| 206 | tphyu2port0: usb-phy@11c50000 { |
| 207 | reg = <0 0x11c50000 0 0x700>; |
| 208 | clocks = <&dummy_clk>; |
| 209 | clock-names = "ref"; |
| 210 | #phy-cells = <1>; |
| 211 | status = "okay"; |
| 212 | }; |
| 213 | |
| 214 | tphyu3port0: usb-phy@11c50700 { |
| 215 | reg = <0 0x11c50700 0 0x900>; |
| 216 | clocks = <&dummy_clk>; |
| 217 | clock-names = "ref"; |
| 218 | #phy-cells = <1>; |
| 219 | mediatek,usb3-pll-ssc-delta; |
| 220 | mediatek,usb3-pll-ssc-delta1; |
| 221 | status = "okay"; |
| 222 | }; |
| 223 | }; |
| 224 | |
developer | f596c1a | 2023-07-19 17:17:49 +0800 | [diff] [blame] | 225 | xfi_pextp0: syscon@11f20000 { |
| 226 | compatible = "mediatek,mt7988-xfi_pextp_0", "syscon"; |
| 227 | reg = <0 0x11f20000 0 0x10000>; |
| 228 | clock-parent = <&topckgen>; |
| 229 | #clock-cells = <1>; |
| 230 | }; |
| 231 | |
| 232 | xfi_pextp1: syscon@11f30000 { |
| 233 | compatible = "mediatek,mt7988-xfi_pextp_1", "syscon"; |
| 234 | reg = <0 0x11f30000 0 0x10000>; |
| 235 | clock-parent = <&topckgen>; |
| 236 | #clock-cells = <1>; |
| 237 | }; |
| 238 | |
| 239 | xfi_pll: syscon@11f40000 { |
| 240 | compatible = "mediatek,mt7988-xfi_pll", "syscon"; |
| 241 | reg = <0 0x11f40000 0 0x1000>; |
| 242 | clock-parent = <&topckgen>; |
| 243 | #clock-cells = <1>; |
| 244 | }; |
| 245 | |
| 246 | topmisc: topmisc@11d10000 { |
| 247 | compatible = "mediatek,mt7988-topmisc", "syscon", |
| 248 | "mediatek,mt7988-power-controller"; |
| 249 | reg = <0 0x11d10000 0 0x10000>; |
| 250 | clock-parent = <&topckgen>; |
| 251 | #clock-cells = <1>; |
| 252 | }; |
| 253 | |
| 254 | infracfg_ao: infracfg@10001000 { |
| 255 | compatible = "mediatek,mt7988-infracfg", "syscon"; |
| 256 | reg = <0 0x10001000 0 0x1000>; |
| 257 | clock-parent = <&topckgen>; |
| 258 | #clock-cells = <1>; |
| 259 | }; |
| 260 | |
| 261 | uart0: serial@11000000 { |
| 262 | compatible = "mediatek,hsuart"; |
| 263 | reg = <0 0x11000000 0 0x100>; |
| 264 | interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; |
| 265 | clocks = <&infracfg_ao_cgs CK_INFRA_52M_UART0_CK>; |
| 266 | assigned-clocks = <&topckgen CK_TOP_UART_SEL>, |
| 267 | <&infracfg_ao CK_INFRA_MUX_UART0_SEL>; |
| 268 | assigned-clock-parents = <&topckgen CK_TOP_CB_CKSQ_40M>, |
| 269 | <&infracfg_ao CK_INFRA_UART_O0>; |
| 270 | status = "disabled"; |
| 271 | }; |
| 272 | |
| 273 | uart1: serial@11000100 { |
| 274 | compatible = "mediatek,hsuart"; |
| 275 | reg = <0 0x11000100 0 0x100>; |
| 276 | interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>; |
| 277 | clocks = <&infracfg_ao_cgs CK_INFRA_52M_UART1_CK>; |
| 278 | assigned-clocks = <&topckgen CK_TOP_UART_SEL>, |
| 279 | <&infracfg_ao CK_INFRA_MUX_UART1_SEL>; |
| 280 | assigned-clock-parents = <&topckgen CK_TOP_CB_CKSQ_40M>, |
| 281 | <&infracfg_ao CK_INFRA_UART_O1>; |
| 282 | status = "disabled"; |
| 283 | }; |
| 284 | |
| 285 | uart2: serial@11000200 { |
| 286 | compatible = "mediatek,hsuart"; |
| 287 | reg = <0 0x11000200 0 0x100>; |
| 288 | interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>; |
| 289 | clocks = <&infracfg_ao_cgs CK_INFRA_52M_UART2_CK>; |
| 290 | assigned-clocks = <&topckgen CK_TOP_UART_SEL>, |
| 291 | <&infracfg_ao CK_INFRA_MUX_UART2_SEL>; |
| 292 | assigned-clock-parents = <&topckgen CK_TOP_CB_CKSQ_40M>, |
| 293 | <&infracfg_ao CK_INFRA_UART_O2>; |
| 294 | status = "disabled"; |
| 295 | }; |
| 296 | |
| 297 | i2c0: i2c@11003000 { |
| 298 | compatible = "mediatek,mt7988-i2c", |
| 299 | "mediatek,mt7981-i2c"; |
| 300 | reg = <0 0x11003000 0 0x1000>, |
| 301 | <0 0x10217080 0 0x80>; |
| 302 | interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>; |
| 303 | clock-div = <1>; |
| 304 | clocks = <&infracfg_ao CK_INFRA_I2C_BCK>, |
| 305 | <&infracfg_ao CK_INFRA_66M_AP_DMA_BCK>; |
| 306 | clock-names = "main", "dma"; |
| 307 | #address-cells = <1>; |
| 308 | #size-cells = <0>; |
| 309 | status = "disabled"; |
| 310 | }; |
| 311 | |
| 312 | i2c1: i2c@11004000 { |
| 313 | compatible = "mediatek,mt7988-i2c", |
| 314 | "mediatek,mt7981-i2c"; |
| 315 | reg = <0 0x11004000 0 0x1000>, |
| 316 | <0 0x10217100 0 0x80>; |
| 317 | interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>; |
| 318 | clock-div = <1>; |
| 319 | clocks = <&infracfg_ao CK_INFRA_I2C_BCK>, |
| 320 | <&infracfg_ao CK_INFRA_66M_AP_DMA_BCK>; |
| 321 | clock-names = "main", "dma"; |
| 322 | #address-cells = <1>; |
| 323 | #size-cells = <0>; |
| 324 | status = "disabled"; |
| 325 | }; |
| 326 | |
| 327 | i2c2: i2c@11005000 { |
| 328 | compatible = "mediatek,mt7988-i2c", |
| 329 | "mediatek,mt7981-i2c"; |
| 330 | reg = <0 0x11005000 0 0x1000>, |
| 331 | <0 0x10217180 0 0x80>; |
| 332 | interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>; |
| 333 | clock-div = <1>; |
| 334 | clocks = <&infracfg_ao CK_INFRA_I2C_BCK>, |
| 335 | <&infracfg_ao CK_INFRA_66M_AP_DMA_BCK>; |
| 336 | clock-names = "main", "dma"; |
| 337 | #address-cells = <1>; |
| 338 | #size-cells = <0>; |
| 339 | status = "disabled"; |
| 340 | }; |
| 341 | |
| 342 | pwm: pwm@10048000 { |
| 343 | compatible = "mediatek,mt7988-pwm"; |
| 344 | reg = <0 0x10048000 0 0x1000>; |
| 345 | #pwm-cells = <2>; |
| 346 | clocks = <&infracfg_ao CK_INFRA_66M_PWM_BCK>, |
| 347 | <&infracfg_ao CK_INFRA_66M_PWM_HCK>, |
| 348 | <&infracfg_ao CK_INFRA_66M_PWM_CK1>, |
| 349 | <&infracfg_ao CK_INFRA_66M_PWM_CK2>, |
| 350 | <&infracfg_ao CK_INFRA_66M_PWM_CK3>, |
| 351 | <&infracfg_ao CK_INFRA_66M_PWM_CK4>, |
| 352 | <&infracfg_ao CK_INFRA_66M_PWM_CK5>, |
| 353 | <&infracfg_ao CK_INFRA_66M_PWM_CK6>, |
| 354 | <&infracfg_ao CK_INFRA_66M_PWM_CK7>, |
| 355 | <&infracfg_ao CK_INFRA_66M_PWM_CK8>; |
| 356 | clock-names = "top", "main", "pwm1", "pwm2", "pwm3", |
| 357 | "pwm4","pwm5","pwm6","pwm7","pwm8"; |
| 358 | status = "disabled"; |
| 359 | }; |
| 360 | |
| 361 | snand: snand@11001000 { |
| 362 | compatible = "mediatek,mt7988-snand", |
| 363 | "mediatek,mt7986-snand"; |
| 364 | reg = <0 0x11001000 0 0x1000>, |
| 365 | <0 0x11002000 0 0x1000>; |
| 366 | reg-names = "nfi", "ecc"; |
| 367 | interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>; |
| 368 | clocks = <&infracfg_ao CK_INFRA_SPINFI>, |
| 369 | <&infracfg_ao CK_INFRA_NFI>, |
| 370 | <&infracfg_ao CK_INFRA_66M_NFI_HCK>; |
| 371 | clock-names = "pad_clk", "nfi_clk", "nfi_hclk"; |
| 372 | assigned-clocks = <&topckgen CK_TOP_SPINFI_SEL>, |
| 373 | <&topckgen CK_TOP_NFI1X_SEL>; |
| 374 | assigned-clock-parents = <&topckgen CK_TOP_CB_M_D8>, |
| 375 | <&topckgen CK_TOP_CB_M_D8>; |
| 376 | status = "disabled"; |
| 377 | }; |
| 378 | |
| 379 | spi0: spi@1100a000 { |
| 380 | compatible = "mediatek,ipm-spi"; |
| 381 | reg = <0 0x11007000 0 0x100>; |
| 382 | clocks = <&spi_clk>, |
| 383 | <&spi_clk>; |
| 384 | clock-names = "sel-clk", "spi-clk"; |
| 385 | interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>; |
| 386 | status = "disabled"; |
| 387 | }; |
| 388 | |
| 389 | spi1: spi@1100b000 { |
| 390 | compatible = "mediatek,ipm-spi"; |
| 391 | reg = <0 0x11008000 0 0x100>; |
| 392 | interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>; |
| 393 | status = "disabled"; |
| 394 | }; |
| 395 | |
| 396 | spi2: spi@11009000 { |
| 397 | compatible = "mediatek,ipm-spi"; |
| 398 | reg = <0 0x11009000 0 0x100>; |
| 399 | clocks = <&spi_clk>, |
| 400 | <&spi_clk>; |
| 401 | clock-names = "sel-clk", "spi-clk"; |
| 402 | interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>; |
| 403 | status = "disabled"; |
| 404 | }; |
| 405 | |
| 406 | mmc0: mmc@11230000 { |
| 407 | compatible = "mediatek,mt7988-mmc", |
| 408 | "mediatek,mt7986-mmc"; |
| 409 | reg = <0 0x11230000 0 0x1000>; |
| 410 | interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; |
| 411 | clocks = <&infracfg_ao_cgs CK_INFRA_MSDC400>, |
| 412 | <&infracfg_ao_cgs CK_INFRA_MSDC2_HCK>, |
| 413 | <&infracfg_ao_cgs CK_INFRA_133M_MSDC_0_HCK>, |
| 414 | <&infracfg_ao_cgs CK_INFRA_66M_MSDC_0_HCK>; |
| 415 | clock-names = "source", "hclk", "source_cg", "axi_cg"; |
| 416 | status = "disabled"; |
| 417 | }; |
| 418 | |
| 419 | ethdma: syscon@15000000 { |
| 420 | compatible = "mediatek,mt7988-ethdma", "syscon"; |
| 421 | reg = <0 0x15000000 0 0x20000>; |
| 422 | clock-parent = <&topckgen>; |
| 423 | #clock-cells = <1>; |
| 424 | #reset-cells = <1>; |
| 425 | }; |
| 426 | |
| 427 | ethwarp: syscon@15031000 { |
| 428 | compatible = "mediatek,mt7988-ethwarp", "syscon"; |
| 429 | reg = <0 0x15031000 0 0x1000>; |
| 430 | clock-parent = <&topckgen>; |
| 431 | #clock-cells = <1>; |
| 432 | #reset-cells = <1>; |
| 433 | }; |
| 434 | |
| 435 | eth: ethernet@15100000 { |
| 436 | compatible = "mediatek,mt7988-eth", "syscon"; |
| 437 | reg = <0 0x15100000 0 0x20000>; |
| 438 | mediatek,ethsys = <ðdma>; |
| 439 | mediatek,sgmiisys = <&sgmiisys0>; |
| 440 | mediatek,usxgmiisys = <&usxgmiisys0>; |
| 441 | mediatek,xfi_pextp = <&xfi_pextp0>; |
| 442 | mediatek,xfi_pll = <&xfi_pll>; |
| 443 | mediatek,infracfg = <&topmisc>; |
| 444 | mediatek,toprgu = <&watchdog>; |
| 445 | resets = <ðdma ETHDMA_FE_RST>, <ðwarp ETHWARP_GSW_RST>; |
| 446 | reset-names = "fe", "mcm"; |
| 447 | #address-cells = <1>; |
| 448 | #size-cells = <0>; |
| 449 | mediatek,mcm; |
| 450 | status = "disabled"; |
| 451 | }; |
| 452 | }; |