Sam Shih | ac57e2b | 2020-01-10 16:30:26 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (c) 2019 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/mt7622-clk.h> |
MarkLee | 6efa450 | 2020-01-21 19:31:59 +0800 | [diff] [blame] | 10 | #include <dt-bindings/power/mt7629-power.h> |
| 11 | #include <dt-bindings/reset/mt7629-reset.h> |
| 12 | #include <dt-bindings/gpio/gpio.h> |
Frank Wunderlich | 7cf8537 | 2020-08-13 10:20:48 +0200 | [diff] [blame] | 13 | #include <dt-bindings/phy/phy.h> |
Sam Shih | ac57e2b | 2020-01-10 16:30:26 +0800 | [diff] [blame] | 14 | |
| 15 | / { |
| 16 | compatible = "mediatek,mt7622"; |
| 17 | interrupt-parent = <&sysirq>; |
| 18 | #address-cells = <1>; |
| 19 | #size-cells = <1>; |
| 20 | |
| 21 | cpus { |
| 22 | #address-cells = <1>; |
| 23 | #size-cells = <0>; |
| 24 | |
| 25 | cpu0: cpu@0 { |
| 26 | device_type = "cpu"; |
| 27 | compatible = "arm,cortex-a53"; |
| 28 | reg = <0x0>; |
| 29 | clock-frequency = <1300000000>; |
| 30 | }; |
| 31 | |
| 32 | cpu1: cpu@1 { |
| 33 | device_type = "cpu"; |
| 34 | compatible = "arm,cortex-a53"; |
| 35 | reg = <0x1>; |
| 36 | clock-frequency = <1300000000>; |
| 37 | }; |
| 38 | }; |
| 39 | |
| 40 | snfi: snfi@1100d000 { |
| 41 | compatible = "mediatek,mtk-snfi-spi"; |
| 42 | reg = <0x1100d000 0x2000>; |
| 43 | clocks = <&pericfg CLK_PERI_NFI_PD>, |
| 44 | <&pericfg CLK_PERI_SNFI_PD>; |
| 45 | clock-names = "nfi_clk", "pad_clk"; |
| 46 | assigned-clocks = <&topckgen CLK_TOP_AXI_SEL>, |
| 47 | <&topckgen CLK_TOP_NFI_INFRA_SEL>; |
| 48 | |
| 49 | assigned-clock-parents = <&topckgen CLK_TOP_SYSPLL1_D2>, |
| 50 | <&topckgen CLK_TOP_UNIVPLL2_D8>; |
| 51 | status = "disabled"; |
| 52 | #address-cells = <1>; |
| 53 | #size-cells = <0>; |
| 54 | }; |
| 55 | |
| 56 | timer { |
| 57 | compatible = "arm,armv8-timer"; |
| 58 | interrupt-parent = <&gic>; |
| 59 | interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | |
| 60 | IRQ_TYPE_LEVEL_HIGH)>, |
| 61 | <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | |
| 62 | IRQ_TYPE_LEVEL_HIGH)>, |
| 63 | <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | |
| 64 | IRQ_TYPE_LEVEL_HIGH)>, |
| 65 | <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | |
| 66 | IRQ_TYPE_LEVEL_HIGH)>; |
| 67 | arm,cpu-registers-not-fw-configured; |
| 68 | }; |
| 69 | |
| 70 | timer0: timer@10004000 { |
| 71 | compatible = "mediatek,timer"; |
| 72 | reg = <0x10004000 0x80>; |
| 73 | interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_LOW>; |
Weijie Gao | ac7a51c | 2021-01-12 13:44:11 +0800 | [diff] [blame^] | 74 | clocks = <&infracfg CLK_INFRA_APXGPT_PD>; |
Sam Shih | ac57e2b | 2020-01-10 16:30:26 +0800 | [diff] [blame] | 75 | clock-names = "system-clk"; |
| 76 | }; |
| 77 | |
Sam Shih | ac57e2b | 2020-01-10 16:30:26 +0800 | [diff] [blame] | 78 | infracfg: infracfg@10000000 { |
| 79 | compatible = "mediatek,mt7622-infracfg", |
| 80 | "syscon"; |
| 81 | reg = <0x10000000 0x1000>; |
| 82 | #clock-cells = <1>; |
| 83 | #reset-cells = <1>; |
| 84 | }; |
| 85 | |
| 86 | pericfg: pericfg@10002000 { |
| 87 | compatible = "mediatek,mt7622-pericfg", "syscon"; |
| 88 | reg = <0x10002000 0x1000>; |
| 89 | #clock-cells = <1>; |
| 90 | }; |
| 91 | |
| 92 | scpsys: scpsys@10006000 { |
| 93 | compatible = "mediatek,mt7622-scpsys", |
| 94 | "syscon"; |
| 95 | #power-domain-cells = <1>; |
| 96 | reg = <0x10006000 0x1000>; |
| 97 | interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_LOW>, |
| 98 | <GIC_SPI 166 IRQ_TYPE_LEVEL_LOW>, |
| 99 | <GIC_SPI 167 IRQ_TYPE_LEVEL_LOW>, |
| 100 | <GIC_SPI 168 IRQ_TYPE_LEVEL_LOW>; |
| 101 | infracfg = <&infracfg>; |
| 102 | clocks = <&topckgen CLK_TOP_HIF_SEL>; |
| 103 | clock-names = "hif_sel"; |
| 104 | }; |
| 105 | |
| 106 | sysirq: interrupt-controller@10200620 { |
| 107 | compatible = "mediatek,sysirq"; |
| 108 | reg = <0x10200620 0x20>; |
| 109 | interrupt-controller; |
| 110 | #interrupt-cells = <3>; |
| 111 | interrupt-parent = <&gic>; |
| 112 | }; |
| 113 | |
| 114 | apmixedsys: apmixedsys@10209000 { |
| 115 | compatible = "mediatek,mt7622-apmixedsys"; |
| 116 | reg = <0x10209000 0x1000>; |
| 117 | #clock-cells = <1>; |
| 118 | }; |
| 119 | |
| 120 | topckgen: topckgen@10210000 { |
| 121 | compatible = "mediatek,mt7622-topckgen"; |
| 122 | reg = <0x10210000 0x1000>; |
| 123 | #clock-cells = <1>; |
| 124 | }; |
| 125 | |
| 126 | pinctrl: pinctrl@10211000 { |
| 127 | compatible = "mediatek,mt7622-pinctrl"; |
| 128 | reg = <0x10211000 0x1000>; |
| 129 | gpio: gpio-controller { |
| 130 | gpio-controller; |
| 131 | #gpio-cells = <2>; |
| 132 | }; |
| 133 | }; |
| 134 | |
| 135 | watchdog: watchdog@10212000 { |
| 136 | compatible = "mediatek,wdt"; |
| 137 | reg = <0x10212000 0x800>; |
| 138 | }; |
| 139 | |
Frank Wunderlich | 35d0fdb | 2020-08-10 16:45:45 +0200 | [diff] [blame] | 140 | wdt-reboot { |
| 141 | compatible = "wdt-reboot"; |
| 142 | wdt = <&watchdog>; |
| 143 | }; |
| 144 | |
Sam Shih | ac57e2b | 2020-01-10 16:30:26 +0800 | [diff] [blame] | 145 | gic: interrupt-controller@10300000 { |
| 146 | compatible = "arm,gic-400"; |
| 147 | interrupt-controller; |
| 148 | #interrupt-cells = <3>; |
| 149 | interrupt-parent = <&gic>; |
| 150 | reg = <0x10310000 0x1000>, |
| 151 | <0x10320000 0x1000>, |
| 152 | <0x10340000 0x2000>, |
| 153 | <0x10360000 0x2000>; |
| 154 | }; |
| 155 | |
| 156 | uart0: serial@11002000 { |
| 157 | compatible = "mediatek,hsuart"; |
| 158 | reg = <0x11002000 0x400>; |
| 159 | reg-shift = <2>; |
| 160 | interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>; |
| 161 | clocks = <&topckgen CLK_TOP_UART_SEL>, |
| 162 | <&pericfg CLK_PERI_UART0_PD>; |
| 163 | clock-names = "baud", "bus"; |
| 164 | status = "disabled"; |
| 165 | assigned-clocks = <&topckgen CLK_TOP_AXI_SEL>; |
| 166 | assigned-clock-parents = <&topckgen CLK_TOP_SYSPLL1_D2>; |
| 167 | }; |
| 168 | |
| 169 | mmc0: mmc@11230000 { |
| 170 | compatible = "mediatek,mt7622-mmc"; |
| 171 | reg = <0x11230000 0x1000>; |
| 172 | interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_LOW>; |
| 173 | clocks = <&pericfg CLK_PERI_MSDC30_0_PD>, |
| 174 | <&topckgen CLK_TOP_MSDC50_0_SEL>; |
| 175 | clock-names = "source", "hclk"; |
| 176 | status = "disabled"; |
| 177 | }; |
| 178 | |
| 179 | mmc1: mmc@11240000 { |
| 180 | compatible = "mediatek,mt7622-mmc"; |
| 181 | reg = <0x11240000 0x1000>; |
| 182 | interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>; |
| 183 | clocks = <&pericfg CLK_PERI_MSDC30_1_PD>, |
| 184 | <&topckgen CLK_TOP_AXI_SEL>; |
| 185 | clock-names = "source", "hclk"; |
| 186 | status = "disabled"; |
| 187 | }; |
MarkLee | 6efa450 | 2020-01-21 19:31:59 +0800 | [diff] [blame] | 188 | |
Frank Wunderlich | a13666b | 2020-08-20 16:37:57 +0200 | [diff] [blame] | 189 | ssusbsys: ssusbsys@1a000000 { |
| 190 | compatible = "mediatek,mt7622-ssusbsys", |
| 191 | "syscon"; |
| 192 | reg = <0x1a000000 0x1000>; |
| 193 | #clock-cells = <1>; |
| 194 | #reset-cells = <1>; |
| 195 | }; |
| 196 | |
Chuanjia Liu | 0cc587d | 2020-08-10 16:17:09 +0800 | [diff] [blame] | 197 | pciesys: pciesys@1a100800 { |
| 198 | compatible = "mediatek,mt7622-pciesys", "syscon"; |
| 199 | reg = <0x1a100800 0x1000>; |
| 200 | #clock-cells = <1>; |
| 201 | #reset-cells = <1>; |
| 202 | }; |
| 203 | |
Chuanjia Liu | bb9d3ad | 2020-08-10 16:17:11 +0800 | [diff] [blame] | 204 | pcie: pcie@1a140000 { |
| 205 | compatible = "mediatek,mt7622-pcie"; |
| 206 | device_type = "pci"; |
| 207 | reg = <0x1a140000 0x1000>, |
| 208 | <0x1a143000 0x1000>, |
| 209 | <0x1a145000 0x1000>; |
| 210 | reg-names = "subsys", "port0", "port1"; |
| 211 | #address-cells = <3>; |
| 212 | #size-cells = <2>; |
| 213 | interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_LOW>, |
| 214 | <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>; |
| 215 | clocks = <&pciesys CLK_PCIE_P0_MAC_EN>, |
| 216 | <&pciesys CLK_PCIE_P1_MAC_EN>, |
| 217 | <&pciesys CLK_PCIE_P0_AHB_EN>, |
| 218 | <&pciesys CLK_PCIE_P0_AHB_EN>, |
| 219 | <&pciesys CLK_PCIE_P0_AUX_EN>, |
| 220 | <&pciesys CLK_PCIE_P1_AUX_EN>, |
| 221 | <&pciesys CLK_PCIE_P0_AXI_EN>, |
| 222 | <&pciesys CLK_PCIE_P1_AXI_EN>, |
| 223 | <&pciesys CLK_PCIE_P0_OBFF_EN>, |
| 224 | <&pciesys CLK_PCIE_P1_OBFF_EN>, |
| 225 | <&pciesys CLK_PCIE_P0_PIPE_EN>, |
| 226 | <&pciesys CLK_PCIE_P1_PIPE_EN>; |
| 227 | clock-names = "sys_ck0", "sys_ck1", "ahb_ck0", "ahb_ck1", |
| 228 | "aux_ck0", "aux_ck1", "axi_ck0", "axi_ck1", |
| 229 | "obff_ck0", "obff_ck1", "pipe_ck0", "pipe_ck1"; |
| 230 | power-domains = <&scpsys MT7629_POWER_DOMAIN_HIF0>; |
| 231 | bus-range = <0x00 0xff>; |
| 232 | ranges = <0x82000000 0 0x20000000 0x20000000 0 0x10000000>; |
| 233 | status = "disabled"; |
| 234 | |
| 235 | pcie0: pcie@0,0 { |
| 236 | reg = <0x0000 0 0 0 0>; |
| 237 | #address-cells = <3>; |
| 238 | #size-cells = <2>; |
| 239 | #interrupt-cells = <1>; |
| 240 | ranges; |
| 241 | status = "disabled"; |
| 242 | |
| 243 | interrupt-map-mask = <0 0 0 7>; |
| 244 | interrupt-map = <0 0 0 1 &pcie_intc0 0>, |
| 245 | <0 0 0 2 &pcie_intc0 1>, |
| 246 | <0 0 0 3 &pcie_intc0 2>, |
| 247 | <0 0 0 4 &pcie_intc0 3>; |
| 248 | pcie_intc0: interrupt-controller { |
| 249 | interrupt-controller; |
| 250 | #address-cells = <0>; |
| 251 | #interrupt-cells = <1>; |
| 252 | }; |
| 253 | }; |
| 254 | |
| 255 | pcie1: pcie@1,0 { |
| 256 | reg = <0x0800 0 0 0 0>; |
| 257 | #address-cells = <3>; |
| 258 | #size-cells = <2>; |
| 259 | #interrupt-cells = <1>; |
| 260 | ranges; |
| 261 | status = "disabled"; |
| 262 | |
| 263 | interrupt-map-mask = <0 0 0 7>; |
| 264 | interrupt-map = <0 0 0 1 &pcie_intc1 0>, |
| 265 | <0 0 0 2 &pcie_intc1 1>, |
| 266 | <0 0 0 3 &pcie_intc1 2>, |
| 267 | <0 0 0 4 &pcie_intc1 3>; |
| 268 | pcie_intc1: interrupt-controller { |
| 269 | interrupt-controller; |
| 270 | #address-cells = <0>; |
| 271 | #interrupt-cells = <1>; |
| 272 | }; |
| 273 | }; |
| 274 | }; |
| 275 | |
Frank Wunderlich | 7cf8537 | 2020-08-13 10:20:48 +0200 | [diff] [blame] | 276 | sata: sata@1a200000 { |
| 277 | compatible = "mediatek,mtk-ahci"; |
| 278 | reg = <0x1a200000 0x1100>; |
| 279 | resets = <&pciesys MT7622_SATA_AXI_BUS_RST>, |
| 280 | <&pciesys MT7622_SATA_PHY_SW_RST>, |
| 281 | <&pciesys MT7622_SATA_PHY_REG_RST>; |
| 282 | reset-names = "axi", "sw", "reg"; |
| 283 | mediatek,phy-mode = <&pciesys>; |
| 284 | ports-implemented = <0x1>; |
| 285 | phys = <&sata_port PHY_TYPE_SATA>; |
| 286 | phy-names = "sata-phy"; |
| 287 | status = "okay"; |
| 288 | }; |
| 289 | |
| 290 | sata_phy: sata-phy@1a243000 { |
| 291 | compatible = "mediatek,generic-tphy-v1"; |
| 292 | reg = <0x1a243000 0x0100>; |
| 293 | #address-cells = <1>; |
| 294 | #size-cells = <1>; |
| 295 | ranges; |
| 296 | status = "okay"; |
| 297 | |
| 298 | sata_port: sata-phy@1a243000 { |
| 299 | reg = <0x1a243000 0x0100>; |
| 300 | clocks = <&topckgen CLK_TOP_ETH_500M>; |
| 301 | clock-names = "ref"; |
| 302 | #phy-cells = <1>; |
| 303 | status = "okay"; |
| 304 | }; |
| 305 | }; |
| 306 | |
Frank Wunderlich | a13666b | 2020-08-20 16:37:57 +0200 | [diff] [blame] | 307 | ssusb: usb@1a0c0000 { |
| 308 | compatible = "mediatek,mt7622-xhci", |
| 309 | "mediatek,mtk-xhci"; |
| 310 | reg = <0x1a0c0000 0x01000>, |
| 311 | <0x1a0c4700 0x0100>; |
| 312 | reg-names = "mac", "ippc"; |
| 313 | interrupts = <GIC_SPI 232 IRQ_TYPE_LEVEL_LOW>; |
| 314 | power-domains = <&scpsys MT7629_POWER_DOMAIN_HIF1>; |
| 315 | clocks = <&ssusbsys CLK_SSUSB_SYS_EN>, |
| 316 | <&ssusbsys CLK_SSUSB_REF_EN>, |
| 317 | <&ssusbsys CLK_SSUSB_MCU_EN>, |
| 318 | <&ssusbsys CLK_SSUSB_DMA_EN>; |
| 319 | clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck"; |
| 320 | phys = <&u2port0 PHY_TYPE_USB2>, |
| 321 | <&u3port0 PHY_TYPE_USB3>, |
| 322 | <&u2port1 PHY_TYPE_USB2>; |
| 323 | status = "disabled"; |
| 324 | }; |
| 325 | |
| 326 | u3phy: usb-phy@1a0c4000 { |
| 327 | compatible = "mediatek,mt7622-u3phy", |
| 328 | "mediatek,generic-tphy-v1"; |
| 329 | reg = <0x1a0c4000 0x700>; |
| 330 | #address-cells = <1>; |
| 331 | #size-cells = <1>; |
| 332 | ranges; |
| 333 | status = "disabled"; |
| 334 | |
| 335 | u2port0: usb-phy@1a0c4800 { |
| 336 | reg = <0x1a0c4800 0x0100>; |
| 337 | #phy-cells = <1>; |
| 338 | clocks = <&ssusbsys CLK_SSUSB_U2_PHY_EN>; |
| 339 | clock-names = "ref"; |
| 340 | }; |
| 341 | |
| 342 | u3port0: usb-phy@1a0c4900 { |
| 343 | reg = <0x1a0c4900 0x0700>; |
| 344 | #phy-cells = <1>; |
| 345 | }; |
| 346 | |
| 347 | u2port1: usb-phy@1a0c5000 { |
| 348 | reg = <0x1a0c5000 0x0100>; |
| 349 | #phy-cells = <1>; |
| 350 | clocks = <&ssusbsys CLK_SSUSB_U2_PHY_1P_EN>; |
| 351 | clock-names = "ref"; |
| 352 | }; |
| 353 | }; |
| 354 | |
MarkLee | 6efa450 | 2020-01-21 19:31:59 +0800 | [diff] [blame] | 355 | ethsys: syscon@1b000000 { |
| 356 | compatible = "mediatek,mt7622-ethsys", "syscon"; |
| 357 | reg = <0x1b000000 0x1000>; |
| 358 | #clock-cells = <1>; |
| 359 | #reset-cells = <1>; |
| 360 | }; |
| 361 | |
| 362 | eth: ethernet@1b100000 { |
| 363 | compatible = "mediatek,mt7622-eth", "syscon"; |
| 364 | reg = <0x1b100000 0x20000>; |
| 365 | clocks = <&topckgen CLK_TOP_ETH_SEL>, |
| 366 | <ðsys CLK_ETH_ESW_EN>, |
| 367 | <ðsys CLK_ETH_GP0_EN>, |
| 368 | <ðsys CLK_ETH_GP1_EN>, |
| 369 | <ðsys CLK_ETH_GP2_EN>, |
| 370 | <&sgmiisys CLK_SGMII_TX250M_EN>, |
| 371 | <&sgmiisys CLK_SGMII_RX250M_EN>, |
| 372 | <&sgmiisys CLK_SGMII_CDR_REF>, |
| 373 | <&sgmiisys CLK_SGMII_CDR_FB>, |
| 374 | <&topckgen CLK_TOP_SGMIIPLL>, |
| 375 | <&apmixedsys CLK_APMIXED_ETH2PLL>; |
| 376 | clock-names = "ethif", "esw", "gp0", "gp1", "gp2", |
| 377 | "sgmii_tx250m", "sgmii_rx250m", |
| 378 | "sgmii_cdr_ref", "sgmii_cdr_fb", "sgmii_ck", |
| 379 | "eth2pll"; |
| 380 | power-domains = <&scpsys MT7629_POWER_DOMAIN_ETHSYS>; |
| 381 | resets = <ðsys ETHSYS_FE_RST>; |
| 382 | reset-names = "fe"; |
| 383 | mediatek,ethsys = <ðsys>; |
| 384 | mediatek,sgmiisys = <&sgmiisys>; |
| 385 | #address-cells = <1>; |
| 386 | #size-cells = <0>; |
| 387 | status = "disabled"; |
| 388 | }; |
| 389 | |
| 390 | sgmiisys: sgmiisys@1b128000 { |
| 391 | compatible = "mediatek,mt7622-sgmiisys", "syscon"; |
| 392 | reg = <0x1b128000 0x3000>; |
| 393 | #clock-cells = <1>; |
| 394 | }; |
| 395 | |
Sam Shih | 25a1b5e | 2020-02-21 21:01:47 +0800 | [diff] [blame] | 396 | pwm: pwm@11006000 { |
| 397 | compatible = "mediatek,mt7622-pwm"; |
| 398 | reg = <0x11006000 0x1000>; |
| 399 | #clock-cells = <1>; |
| 400 | #pwm-cells = <2>; |
| 401 | interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>; |
| 402 | clocks = <&topckgen CLK_TOP_PWM_SEL>, |
| 403 | <&pericfg CLK_PERI_PWM_PD>, |
| 404 | <&pericfg CLK_PERI_PWM1_PD>, |
| 405 | <&pericfg CLK_PERI_PWM2_PD>, |
| 406 | <&pericfg CLK_PERI_PWM3_PD>, |
| 407 | <&pericfg CLK_PERI_PWM4_PD>, |
| 408 | <&pericfg CLK_PERI_PWM5_PD>, |
| 409 | <&pericfg CLK_PERI_PWM6_PD>; |
| 410 | clock-names = "top", "main", "pwm1", "pwm2", "pwm3", "pwm4", |
| 411 | "pwm5", "pwm6"; |
| 412 | status = "disabled"; |
| 413 | }; |
| 414 | |
Sam Shih | ac57e2b | 2020-01-10 16:30:26 +0800 | [diff] [blame] | 415 | }; |