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> |
Sam Shih | ac57e2b | 2020-01-10 16:30:26 +0800 | [diff] [blame] | 13 | |
| 14 | / { |
| 15 | compatible = "mediatek,mt7622"; |
| 16 | interrupt-parent = <&sysirq>; |
| 17 | #address-cells = <1>; |
| 18 | #size-cells = <1>; |
| 19 | |
| 20 | cpus { |
| 21 | #address-cells = <1>; |
| 22 | #size-cells = <0>; |
| 23 | |
| 24 | cpu0: cpu@0 { |
| 25 | device_type = "cpu"; |
| 26 | compatible = "arm,cortex-a53"; |
| 27 | reg = <0x0>; |
| 28 | clock-frequency = <1300000000>; |
| 29 | }; |
| 30 | |
| 31 | cpu1: cpu@1 { |
| 32 | device_type = "cpu"; |
| 33 | compatible = "arm,cortex-a53"; |
| 34 | reg = <0x1>; |
| 35 | clock-frequency = <1300000000>; |
| 36 | }; |
| 37 | }; |
| 38 | |
| 39 | snfi: snfi@1100d000 { |
| 40 | compatible = "mediatek,mtk-snfi-spi"; |
| 41 | reg = <0x1100d000 0x2000>; |
| 42 | clocks = <&pericfg CLK_PERI_NFI_PD>, |
| 43 | <&pericfg CLK_PERI_SNFI_PD>; |
| 44 | clock-names = "nfi_clk", "pad_clk"; |
| 45 | assigned-clocks = <&topckgen CLK_TOP_AXI_SEL>, |
| 46 | <&topckgen CLK_TOP_NFI_INFRA_SEL>; |
| 47 | |
| 48 | assigned-clock-parents = <&topckgen CLK_TOP_SYSPLL1_D2>, |
| 49 | <&topckgen CLK_TOP_UNIVPLL2_D8>; |
| 50 | status = "disabled"; |
| 51 | #address-cells = <1>; |
| 52 | #size-cells = <0>; |
| 53 | }; |
| 54 | |
| 55 | timer { |
| 56 | compatible = "arm,armv8-timer"; |
| 57 | interrupt-parent = <&gic>; |
| 58 | interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | |
| 59 | IRQ_TYPE_LEVEL_HIGH)>, |
| 60 | <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | |
| 61 | IRQ_TYPE_LEVEL_HIGH)>, |
| 62 | <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | |
| 63 | IRQ_TYPE_LEVEL_HIGH)>, |
| 64 | <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | |
| 65 | IRQ_TYPE_LEVEL_HIGH)>; |
| 66 | arm,cpu-registers-not-fw-configured; |
| 67 | }; |
| 68 | |
| 69 | timer0: timer@10004000 { |
| 70 | compatible = "mediatek,timer"; |
| 71 | reg = <0x10004000 0x80>; |
| 72 | interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_LOW>; |
| 73 | clocks = <&system_clk>; |
| 74 | clock-names = "system-clk"; |
| 75 | }; |
| 76 | |
| 77 | system_clk: dummy13m { |
| 78 | compatible = "fixed-clock"; |
| 79 | clock-frequency = <13000000>; |
| 80 | #clock-cells = <0>; |
| 81 | }; |
| 82 | |
| 83 | infracfg: infracfg@10000000 { |
| 84 | compatible = "mediatek,mt7622-infracfg", |
| 85 | "syscon"; |
| 86 | reg = <0x10000000 0x1000>; |
| 87 | #clock-cells = <1>; |
| 88 | #reset-cells = <1>; |
| 89 | }; |
| 90 | |
| 91 | pericfg: pericfg@10002000 { |
| 92 | compatible = "mediatek,mt7622-pericfg", "syscon"; |
| 93 | reg = <0x10002000 0x1000>; |
| 94 | #clock-cells = <1>; |
| 95 | }; |
| 96 | |
| 97 | scpsys: scpsys@10006000 { |
| 98 | compatible = "mediatek,mt7622-scpsys", |
| 99 | "syscon"; |
| 100 | #power-domain-cells = <1>; |
| 101 | reg = <0x10006000 0x1000>; |
| 102 | interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_LOW>, |
| 103 | <GIC_SPI 166 IRQ_TYPE_LEVEL_LOW>, |
| 104 | <GIC_SPI 167 IRQ_TYPE_LEVEL_LOW>, |
| 105 | <GIC_SPI 168 IRQ_TYPE_LEVEL_LOW>; |
| 106 | infracfg = <&infracfg>; |
| 107 | clocks = <&topckgen CLK_TOP_HIF_SEL>; |
| 108 | clock-names = "hif_sel"; |
| 109 | }; |
| 110 | |
| 111 | sysirq: interrupt-controller@10200620 { |
| 112 | compatible = "mediatek,sysirq"; |
| 113 | reg = <0x10200620 0x20>; |
| 114 | interrupt-controller; |
| 115 | #interrupt-cells = <3>; |
| 116 | interrupt-parent = <&gic>; |
| 117 | }; |
| 118 | |
| 119 | apmixedsys: apmixedsys@10209000 { |
| 120 | compatible = "mediatek,mt7622-apmixedsys"; |
| 121 | reg = <0x10209000 0x1000>; |
| 122 | #clock-cells = <1>; |
| 123 | }; |
| 124 | |
| 125 | topckgen: topckgen@10210000 { |
| 126 | compatible = "mediatek,mt7622-topckgen"; |
| 127 | reg = <0x10210000 0x1000>; |
| 128 | #clock-cells = <1>; |
| 129 | }; |
| 130 | |
| 131 | pinctrl: pinctrl@10211000 { |
| 132 | compatible = "mediatek,mt7622-pinctrl"; |
| 133 | reg = <0x10211000 0x1000>; |
| 134 | gpio: gpio-controller { |
| 135 | gpio-controller; |
| 136 | #gpio-cells = <2>; |
| 137 | }; |
| 138 | }; |
| 139 | |
| 140 | watchdog: watchdog@10212000 { |
| 141 | compatible = "mediatek,wdt"; |
| 142 | reg = <0x10212000 0x800>; |
| 143 | }; |
| 144 | |
Frank Wunderlich | 35d0fdb | 2020-08-10 16:45:45 +0200 | [diff] [blame^] | 145 | wdt-reboot { |
| 146 | compatible = "wdt-reboot"; |
| 147 | wdt = <&watchdog>; |
| 148 | }; |
| 149 | |
Sam Shih | ac57e2b | 2020-01-10 16:30:26 +0800 | [diff] [blame] | 150 | gic: interrupt-controller@10300000 { |
| 151 | compatible = "arm,gic-400"; |
| 152 | interrupt-controller; |
| 153 | #interrupt-cells = <3>; |
| 154 | interrupt-parent = <&gic>; |
| 155 | reg = <0x10310000 0x1000>, |
| 156 | <0x10320000 0x1000>, |
| 157 | <0x10340000 0x2000>, |
| 158 | <0x10360000 0x2000>; |
| 159 | }; |
| 160 | |
| 161 | uart0: serial@11002000 { |
| 162 | compatible = "mediatek,hsuart"; |
| 163 | reg = <0x11002000 0x400>; |
| 164 | reg-shift = <2>; |
| 165 | interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>; |
| 166 | clocks = <&topckgen CLK_TOP_UART_SEL>, |
| 167 | <&pericfg CLK_PERI_UART0_PD>; |
| 168 | clock-names = "baud", "bus"; |
| 169 | status = "disabled"; |
| 170 | assigned-clocks = <&topckgen CLK_TOP_AXI_SEL>; |
| 171 | assigned-clock-parents = <&topckgen CLK_TOP_SYSPLL1_D2>; |
| 172 | }; |
| 173 | |
| 174 | mmc0: mmc@11230000 { |
| 175 | compatible = "mediatek,mt7622-mmc"; |
| 176 | reg = <0x11230000 0x1000>; |
| 177 | interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_LOW>; |
| 178 | clocks = <&pericfg CLK_PERI_MSDC30_0_PD>, |
| 179 | <&topckgen CLK_TOP_MSDC50_0_SEL>; |
| 180 | clock-names = "source", "hclk"; |
| 181 | status = "disabled"; |
| 182 | }; |
| 183 | |
| 184 | mmc1: mmc@11240000 { |
| 185 | compatible = "mediatek,mt7622-mmc"; |
| 186 | reg = <0x11240000 0x1000>; |
| 187 | interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>; |
| 188 | clocks = <&pericfg CLK_PERI_MSDC30_1_PD>, |
| 189 | <&topckgen CLK_TOP_AXI_SEL>; |
| 190 | clock-names = "source", "hclk"; |
| 191 | status = "disabled"; |
| 192 | }; |
MarkLee | 6efa450 | 2020-01-21 19:31:59 +0800 | [diff] [blame] | 193 | |
Chuanjia Liu | 0cc587d | 2020-08-10 16:17:09 +0800 | [diff] [blame] | 194 | pciesys: pciesys@1a100800 { |
| 195 | compatible = "mediatek,mt7622-pciesys", "syscon"; |
| 196 | reg = <0x1a100800 0x1000>; |
| 197 | #clock-cells = <1>; |
| 198 | #reset-cells = <1>; |
| 199 | }; |
| 200 | |
Chuanjia Liu | bb9d3ad | 2020-08-10 16:17:11 +0800 | [diff] [blame] | 201 | pcie: pcie@1a140000 { |
| 202 | compatible = "mediatek,mt7622-pcie"; |
| 203 | device_type = "pci"; |
| 204 | reg = <0x1a140000 0x1000>, |
| 205 | <0x1a143000 0x1000>, |
| 206 | <0x1a145000 0x1000>; |
| 207 | reg-names = "subsys", "port0", "port1"; |
| 208 | #address-cells = <3>; |
| 209 | #size-cells = <2>; |
| 210 | interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_LOW>, |
| 211 | <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>; |
| 212 | clocks = <&pciesys CLK_PCIE_P0_MAC_EN>, |
| 213 | <&pciesys CLK_PCIE_P1_MAC_EN>, |
| 214 | <&pciesys CLK_PCIE_P0_AHB_EN>, |
| 215 | <&pciesys CLK_PCIE_P0_AHB_EN>, |
| 216 | <&pciesys CLK_PCIE_P0_AUX_EN>, |
| 217 | <&pciesys CLK_PCIE_P1_AUX_EN>, |
| 218 | <&pciesys CLK_PCIE_P0_AXI_EN>, |
| 219 | <&pciesys CLK_PCIE_P1_AXI_EN>, |
| 220 | <&pciesys CLK_PCIE_P0_OBFF_EN>, |
| 221 | <&pciesys CLK_PCIE_P1_OBFF_EN>, |
| 222 | <&pciesys CLK_PCIE_P0_PIPE_EN>, |
| 223 | <&pciesys CLK_PCIE_P1_PIPE_EN>; |
| 224 | clock-names = "sys_ck0", "sys_ck1", "ahb_ck0", "ahb_ck1", |
| 225 | "aux_ck0", "aux_ck1", "axi_ck0", "axi_ck1", |
| 226 | "obff_ck0", "obff_ck1", "pipe_ck0", "pipe_ck1"; |
| 227 | power-domains = <&scpsys MT7629_POWER_DOMAIN_HIF0>; |
| 228 | bus-range = <0x00 0xff>; |
| 229 | ranges = <0x82000000 0 0x20000000 0x20000000 0 0x10000000>; |
| 230 | status = "disabled"; |
| 231 | |
| 232 | pcie0: pcie@0,0 { |
| 233 | reg = <0x0000 0 0 0 0>; |
| 234 | #address-cells = <3>; |
| 235 | #size-cells = <2>; |
| 236 | #interrupt-cells = <1>; |
| 237 | ranges; |
| 238 | status = "disabled"; |
| 239 | |
| 240 | interrupt-map-mask = <0 0 0 7>; |
| 241 | interrupt-map = <0 0 0 1 &pcie_intc0 0>, |
| 242 | <0 0 0 2 &pcie_intc0 1>, |
| 243 | <0 0 0 3 &pcie_intc0 2>, |
| 244 | <0 0 0 4 &pcie_intc0 3>; |
| 245 | pcie_intc0: interrupt-controller { |
| 246 | interrupt-controller; |
| 247 | #address-cells = <0>; |
| 248 | #interrupt-cells = <1>; |
| 249 | }; |
| 250 | }; |
| 251 | |
| 252 | pcie1: pcie@1,0 { |
| 253 | reg = <0x0800 0 0 0 0>; |
| 254 | #address-cells = <3>; |
| 255 | #size-cells = <2>; |
| 256 | #interrupt-cells = <1>; |
| 257 | ranges; |
| 258 | status = "disabled"; |
| 259 | |
| 260 | interrupt-map-mask = <0 0 0 7>; |
| 261 | interrupt-map = <0 0 0 1 &pcie_intc1 0>, |
| 262 | <0 0 0 2 &pcie_intc1 1>, |
| 263 | <0 0 0 3 &pcie_intc1 2>, |
| 264 | <0 0 0 4 &pcie_intc1 3>; |
| 265 | pcie_intc1: interrupt-controller { |
| 266 | interrupt-controller; |
| 267 | #address-cells = <0>; |
| 268 | #interrupt-cells = <1>; |
| 269 | }; |
| 270 | }; |
| 271 | }; |
| 272 | |
MarkLee | 6efa450 | 2020-01-21 19:31:59 +0800 | [diff] [blame] | 273 | ethsys: syscon@1b000000 { |
| 274 | compatible = "mediatek,mt7622-ethsys", "syscon"; |
| 275 | reg = <0x1b000000 0x1000>; |
| 276 | #clock-cells = <1>; |
| 277 | #reset-cells = <1>; |
| 278 | }; |
| 279 | |
| 280 | eth: ethernet@1b100000 { |
| 281 | compatible = "mediatek,mt7622-eth", "syscon"; |
| 282 | reg = <0x1b100000 0x20000>; |
| 283 | clocks = <&topckgen CLK_TOP_ETH_SEL>, |
| 284 | <ðsys CLK_ETH_ESW_EN>, |
| 285 | <ðsys CLK_ETH_GP0_EN>, |
| 286 | <ðsys CLK_ETH_GP1_EN>, |
| 287 | <ðsys CLK_ETH_GP2_EN>, |
| 288 | <&sgmiisys CLK_SGMII_TX250M_EN>, |
| 289 | <&sgmiisys CLK_SGMII_RX250M_EN>, |
| 290 | <&sgmiisys CLK_SGMII_CDR_REF>, |
| 291 | <&sgmiisys CLK_SGMII_CDR_FB>, |
| 292 | <&topckgen CLK_TOP_SGMIIPLL>, |
| 293 | <&apmixedsys CLK_APMIXED_ETH2PLL>; |
| 294 | clock-names = "ethif", "esw", "gp0", "gp1", "gp2", |
| 295 | "sgmii_tx250m", "sgmii_rx250m", |
| 296 | "sgmii_cdr_ref", "sgmii_cdr_fb", "sgmii_ck", |
| 297 | "eth2pll"; |
| 298 | power-domains = <&scpsys MT7629_POWER_DOMAIN_ETHSYS>; |
| 299 | resets = <ðsys ETHSYS_FE_RST>; |
| 300 | reset-names = "fe"; |
| 301 | mediatek,ethsys = <ðsys>; |
| 302 | mediatek,sgmiisys = <&sgmiisys>; |
| 303 | #address-cells = <1>; |
| 304 | #size-cells = <0>; |
| 305 | status = "disabled"; |
| 306 | }; |
| 307 | |
| 308 | sgmiisys: sgmiisys@1b128000 { |
| 309 | compatible = "mediatek,mt7622-sgmiisys", "syscon"; |
| 310 | reg = <0x1b128000 0x3000>; |
| 311 | #clock-cells = <1>; |
| 312 | }; |
| 313 | |
Sam Shih | 25a1b5e | 2020-02-21 21:01:47 +0800 | [diff] [blame] | 314 | pwm: pwm@11006000 { |
| 315 | compatible = "mediatek,mt7622-pwm"; |
| 316 | reg = <0x11006000 0x1000>; |
| 317 | #clock-cells = <1>; |
| 318 | #pwm-cells = <2>; |
| 319 | interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>; |
| 320 | clocks = <&topckgen CLK_TOP_PWM_SEL>, |
| 321 | <&pericfg CLK_PERI_PWM_PD>, |
| 322 | <&pericfg CLK_PERI_PWM1_PD>, |
| 323 | <&pericfg CLK_PERI_PWM2_PD>, |
| 324 | <&pericfg CLK_PERI_PWM3_PD>, |
| 325 | <&pericfg CLK_PERI_PWM4_PD>, |
| 326 | <&pericfg CLK_PERI_PWM5_PD>, |
| 327 | <&pericfg CLK_PERI_PWM6_PD>; |
| 328 | clock-names = "top", "main", "pwm1", "pwm2", "pwm3", "pwm4", |
| 329 | "pwm5", "pwm6"; |
| 330 | status = "disabled"; |
| 331 | }; |
| 332 | |
Sam Shih | ac57e2b | 2020-01-10 16:30:26 +0800 | [diff] [blame] | 333 | }; |