developer | e021c15 | 2022-09-09 19:59:09 +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/phy/phy.h> |
| 10 | #include <dt-bindings/clock/mt7986-clk.h> |
| 11 | #include <dt-bindings/reset/mt7629-reset.h> |
| 12 | #include <dt-bindings/pinctrl/mt65xx.h> |
| 13 | |
| 14 | / { |
| 15 | compatible = "mediatek,mt7986"; |
| 16 | interrupt-parent = <&gic>; |
| 17 | #address-cells = <1>; |
| 18 | #size-cells = <1>; |
| 19 | |
| 20 | config { |
| 21 | u-boot,mmc-env-partition = "u-boot-env"; |
| 22 | }; |
| 23 | |
| 24 | cpus { |
| 25 | #address-cells = <1>; |
| 26 | #size-cells = <0>; |
| 27 | cpu0: cpu@0 { |
| 28 | device_type = "cpu"; |
| 29 | compatible = "arm,cortex-a53"; |
| 30 | reg = <0x0>; |
| 31 | mediatek,hwver = <&hwver>; |
| 32 | }; |
| 33 | cpu1: cpu@1 { |
| 34 | device_type = "cpu"; |
| 35 | compatible = "arm,cortex-a53"; |
| 36 | reg = <0x1>; |
| 37 | mediatek,hwver = <&hwver>; |
| 38 | }; |
| 39 | cpu2: cpu@2 { |
| 40 | device_type = "cpu"; |
| 41 | compatible = "arm,cortex-a53"; |
| 42 | reg = <0x2>; |
| 43 | mediatek,hwver = <&hwver>; |
| 44 | }; |
| 45 | cpu3: cpu@3 { |
| 46 | device_type = "cpu"; |
| 47 | compatible = "arm,cortex-a53"; |
| 48 | reg = <0x3>; |
| 49 | mediatek,hwver = <&hwver>; |
| 50 | }; |
| 51 | }; |
| 52 | |
| 53 | dummy_clk: dummy12m { |
| 54 | compatible = "fixed-clock"; |
| 55 | clock-frequency = <12000000>; |
| 56 | #clock-cells = <0>; |
| 57 | /* must need this line, or uart uanable to get dummy_clk */ |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 58 | bootph-all; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 59 | }; |
| 60 | |
| 61 | hwver: hwver { |
| 62 | compatible = "mediatek,hwver", "syscon"; |
| 63 | reg = <0x8000000 0x1000>; |
| 64 | }; |
| 65 | |
| 66 | timer { |
| 67 | compatible = "arm,armv8-timer"; |
| 68 | interrupt-parent = <&gic>; |
| 69 | clock-frequency = <13000000>; |
| 70 | interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, |
| 71 | <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, |
| 72 | <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, |
| 73 | <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; |
| 74 | arm,cpu-registers-not-fw-configured; |
| 75 | }; |
| 76 | |
| 77 | timer0: timer@10008000 { |
| 78 | compatible = "mediatek,mt7986-timer"; |
| 79 | reg = <0x10008000 0x1000>; |
| 80 | interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>; |
Christian Marangi | 07603e4 | 2024-08-03 10:40:48 +0200 | [diff] [blame] | 81 | clocks = <&topckgen CLK_TOP_F26M_SEL>; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 82 | clock-names = "gpt-clk"; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 83 | bootph-all; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 84 | }; |
| 85 | |
| 86 | watchdog: watchdog@1001c000 { |
| 87 | compatible = "mediatek,mt7986-wdt"; |
| 88 | reg = <0x1001c000 0x1000>; |
| 89 | interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; |
| 90 | #reset-cells = <1>; |
| 91 | status = "disabled"; |
| 92 | }; |
| 93 | |
| 94 | gic: interrupt-controller@c000000 { |
| 95 | compatible = "arm,gic-v3"; |
| 96 | #interrupt-cells = <3>; |
| 97 | interrupt-parent = <&gic>; |
| 98 | interrupt-controller; |
| 99 | reg = <0x0c000000 0x40000>, /* GICD */ |
| 100 | <0x0c080000 0x200000>; /* GICR */ |
| 101 | |
| 102 | interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; |
| 103 | }; |
| 104 | |
| 105 | fixed_plls: apmixedsys@1001E000 { |
| 106 | compatible = "mediatek,mt7986-fixed-plls"; |
| 107 | reg = <0x1001E000 0x1000>; |
| 108 | #clock-cells = <1>; |
| 109 | }; |
| 110 | |
| 111 | topckgen: topckgen@1001B000 { |
| 112 | compatible = "mediatek,mt7986-topckgen"; |
| 113 | reg = <0x1001B000 0x1000>; |
| 114 | clock-parent = <&fixed_plls>; |
| 115 | #clock-cells = <1>; |
| 116 | }; |
| 117 | |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 118 | infracfg: infracfg@10001040 { |
| 119 | compatible = "mediatek,mt7986-infracfg"; |
| 120 | reg = <0x10001000 0x1000>; |
| 121 | clock-parent = <&topckgen>; |
| 122 | #clock-cells = <1>; |
| 123 | }; |
| 124 | |
Christian Marangi | 5cec817 | 2025-01-27 14:40:40 +0100 | [diff] [blame] | 125 | pio: pinctrl@1001f000 { |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 126 | compatible = "mediatek,mt7986-pinctrl"; |
| 127 | reg = <0x1001f000 0x1000>, |
| 128 | <0x11c30000 0x1000>, |
| 129 | <0x11c40000 0x1000>, |
| 130 | <0x11e20000 0x1000>, |
| 131 | <0x11e30000 0x1000>, |
| 132 | <0x11f00000 0x1000>, |
| 133 | <0x11f10000 0x1000>, |
| 134 | <0x1000b000 0x1000>; |
Christian Marangi | 359efa7 | 2025-01-27 14:40:39 +0100 | [diff] [blame] | 135 | reg-names = "gpio", "iocfg_rt", "iocfg_rb", |
| 136 | "iocfg_lt", "iocfg_lb", "iocfg_tr", |
| 137 | "iocfg_tl", "eint"; |
Christian Marangi | 5cec817 | 2025-01-27 14:40:40 +0100 | [diff] [blame] | 138 | gpio-controller; |
| 139 | #gpio-cells = <2>; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 140 | }; |
| 141 | |
| 142 | pwm: pwm@10048000 { |
| 143 | compatible = "mediatek,mt7986-pwm"; |
| 144 | reg = <0x10048000 0x1000>; |
| 145 | #clock-cells = <1>; |
| 146 | #pwm-cells = <2>; |
| 147 | interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>; |
Christian Marangi | 07603e4 | 2024-08-03 10:40:48 +0200 | [diff] [blame] | 148 | clocks = <&topckgen CLK_TOP_PWM_SEL>, |
| 149 | <&infracfg CLK_INFRA_PWM_BSEL>, |
| 150 | <&infracfg CLK_INFRA_PWM1_CK>, |
| 151 | <&infracfg CLK_INFRA_PWM2_CK>; |
| 152 | assigned-clocks = <&topckgen CLK_TOP_PWM_SEL>, |
| 153 | <&infracfg CLK_INFRA_PWM_BSEL>, |
| 154 | <&infracfg CLK_INFRA_PWM1_SEL>, |
| 155 | <&infracfg CLK_INFRA_PWM2_SEL>; |
| 156 | assigned-clock-parents = <&topckgen CLK_TOP_MPLL_D4>, |
| 157 | <&topckgen CLK_TOP_PWM_SEL>, |
| 158 | <&topckgen CLK_TOP_PWM_SEL>, |
| 159 | <&topckgen CLK_TOP_PWM_SEL>; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 160 | clock-names = "top", "main", "pwm1", "pwm2"; |
| 161 | status = "disabled"; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 162 | bootph-all; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 163 | }; |
| 164 | |
| 165 | uart0: serial@11002000 { |
| 166 | compatible = "mediatek,hsuart"; |
| 167 | reg = <0x11002000 0x400>; |
| 168 | interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; |
Christian Marangi | 07603e4 | 2024-08-03 10:40:48 +0200 | [diff] [blame] | 169 | clocks = <&infracfg CLK_INFRA_UART0_CK>; |
| 170 | assigned-clocks = <&topckgen CLK_TOP_UART_SEL>, |
| 171 | <&infracfg CLK_INFRA_UART0_SEL>; |
| 172 | assigned-clock-parents = <&topckgen CLK_TOP_XTAL>, |
| 173 | <&topckgen CLK_TOP_UART_SEL>; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 174 | mediatek,force-highspeed; |
| 175 | status = "disabled"; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 176 | bootph-all; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 177 | }; |
| 178 | |
| 179 | uart1: serial@11003000 { |
| 180 | compatible = "mediatek,hsuart"; |
| 181 | reg = <0x11003000 0x400>; |
| 182 | interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>; |
Christian Marangi | 07603e4 | 2024-08-03 10:40:48 +0200 | [diff] [blame] | 183 | clocks = <&infracfg CLK_INFRA_UART1_CK>; |
| 184 | assigned-clocks = <&infracfg CLK_INFRA_UART1_SEL>; |
| 185 | assigned-clock-parents = <&topckgen CLK_TOP_F26M_SEL>; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 186 | mediatek,force-highspeed; |
| 187 | status = "disabled"; |
| 188 | }; |
| 189 | |
| 190 | uart2: serial@11004000 { |
| 191 | compatible = "mediatek,hsuart"; |
| 192 | reg = <0x11004000 0x400>; |
| 193 | interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>; |
Christian Marangi | 07603e4 | 2024-08-03 10:40:48 +0200 | [diff] [blame] | 194 | clocks = <&infracfg CLK_INFRA_UART2_CK>; |
| 195 | assigned-clocks = <&infracfg CLK_INFRA_UART2_SEL>; |
| 196 | assigned-clock-parents = <&topckgen CLK_TOP_F26M_SEL>; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 197 | mediatek,force-highspeed; |
| 198 | status = "disabled"; |
| 199 | }; |
| 200 | |
| 201 | snand: snand@11005000 { |
| 202 | compatible = "mediatek,mt7986-snand"; |
| 203 | reg = <0x11005000 0x1000>, |
| 204 | <0x11006000 0x1000>; |
| 205 | reg-names = "nfi", "ecc"; |
Christian Marangi | 07603e4 | 2024-08-03 10:40:48 +0200 | [diff] [blame] | 206 | clocks = <&infracfg CLK_INFRA_SPINFI1_CK>, |
| 207 | <&infracfg CLK_INFRA_NFI1_CK>, |
| 208 | <&infracfg CLK_INFRA_NFI_HCK_CK>; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 209 | clock-names = "pad_clk", "nfi_clk", "nfi_hclk"; |
Christian Marangi | 07603e4 | 2024-08-03 10:40:48 +0200 | [diff] [blame] | 210 | assigned-clocks = <&topckgen CLK_TOP_SPINFI_SEL>, |
| 211 | <&topckgen CLK_TOP_NFI1X_SEL>; |
| 212 | assigned-clock-parents = <&topckgen CLK_TOP_MPLL_D8>, |
| 213 | <&topckgen CLK_TOP_MPLL_D8>; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 214 | status = "disabled"; |
| 215 | }; |
| 216 | |
| 217 | ethsys: syscon@15000000 { |
| 218 | compatible = "mediatek,mt7986-ethsys", "syscon"; |
| 219 | reg = <0x15000000 0x1000>; |
| 220 | clock-parent = <&topckgen>; |
| 221 | #clock-cells = <1>; |
| 222 | #reset-cells = <1>; |
| 223 | }; |
| 224 | |
| 225 | eth: ethernet@15100000 { |
| 226 | compatible = "mediatek,mt7986-eth", "syscon"; |
| 227 | reg = <0x15100000 0x20000>; |
| 228 | resets = <ðsys ETHSYS_FE_RST>; |
| 229 | reset-names = "fe"; |
| 230 | mediatek,ethsys = <ðsys>; |
| 231 | mediatek,sgmiisys = <&sgmiisys0>; |
| 232 | #address-cells = <1>; |
| 233 | #size-cells = <0>; |
| 234 | status = "disabled"; |
| 235 | }; |
| 236 | |
| 237 | sgmiisys0: syscon@10060000 { |
| 238 | compatible = "mediatek,mt7986-sgmiisys", "syscon"; |
| 239 | reg = <0x10060000 0x1000>; |
| 240 | #clock-cells = <1>; |
| 241 | }; |
| 242 | |
| 243 | sgmiisys1: syscon@10070000 { |
| 244 | compatible = "mediatek,mt7986-sgmiisys", "syscon"; |
| 245 | reg = <0x10070000 0x1000>; |
| 246 | #clock-cells = <1>; |
| 247 | }; |
| 248 | |
| 249 | spi0: spi@1100a000 { |
| 250 | compatible = "mediatek,ipm-spi"; |
| 251 | reg = <0x1100a000 0x100>; |
Christian Marangi | 07603e4 | 2024-08-03 10:40:48 +0200 | [diff] [blame] | 252 | clocks = <&infracfg CLK_INFRA_SPI0_CK>, |
| 253 | <&topckgen CLK_TOP_SPI_SEL>; |
| 254 | assigned-clocks = <&topckgen CLK_TOP_SPI_SEL>, |
| 255 | <&infracfg CLK_INFRA_SPI0_SEL>; |
| 256 | assigned-clock-parents = <&topckgen CLK_TOP_MPLL_D2>, |
| 257 | <&topckgen CLK_TOP_SPI_SEL>; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 258 | clock-names = "sel-clk", "spi-clk"; |
| 259 | interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>; |
| 260 | status = "disabled"; |
| 261 | }; |
| 262 | |
| 263 | spi1: spi@1100b000 { |
| 264 | compatible = "mediatek,ipm-spi"; |
| 265 | reg = <0x1100b000 0x100>; |
| 266 | interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>; |
| 267 | status = "disabled"; |
| 268 | }; |
| 269 | |
| 270 | mmc0: mmc@11230000 { |
| 271 | compatible = "mediatek,mt7986-mmc"; |
| 272 | reg = <0x11230000 0x1000>, |
| 273 | <0x11C20000 0x1000>; |
| 274 | interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; |
Christian Marangi | 07603e4 | 2024-08-03 10:40:48 +0200 | [diff] [blame] | 275 | clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>, |
| 276 | <&topckgen CLK_TOP_EMMC_250M_SEL>, |
| 277 | <&infracfg CLK_INFRA_MSDC_CK>; |
| 278 | assigned-clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>, |
| 279 | <&topckgen CLK_TOP_EMMC_250M_SEL>; |
| 280 | assigned-clock-parents = <&fixed_plls CLK_APMIXED_MPLL>, |
| 281 | <&topckgen CLK_TOP_NET1PLL_D5_D2>; |
developer | e021c15 | 2022-09-09 19:59:09 +0800 | [diff] [blame] | 282 | clock-names = "source", "hclk", "source_cg"; |
| 283 | status = "disabled"; |
| 284 | }; |
| 285 | |
| 286 | xhci: xhci@11200000 { |
| 287 | compatible = "mediatek,mt7986-xhci", |
| 288 | "mediatek,mtk-xhci"; |
| 289 | reg = <0x11200000 0x2e00>, |
| 290 | <0x11203e00 0x0100>; |
| 291 | reg-names = "mac", "ippc"; |
| 292 | interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>; |
| 293 | phys = <&u2port0 PHY_TYPE_USB2>, |
| 294 | <&u3port0 PHY_TYPE_USB3>, |
| 295 | <&u2port1 PHY_TYPE_USB2>; |
| 296 | clocks = <&dummy_clk>, |
| 297 | <&dummy_clk>, |
| 298 | <&dummy_clk>, |
| 299 | <&dummy_clk>, |
| 300 | <&dummy_clk>; |
| 301 | clock-names = "sys_ck", |
| 302 | "xhci_ck", |
| 303 | "ref_ck", |
| 304 | "mcu_ck", |
| 305 | "dma_ck"; |
| 306 | tpl-support; |
| 307 | status = "okay"; |
| 308 | }; |
| 309 | |
| 310 | usbtphy: usb-phy@11e10000 { |
| 311 | compatible = "mediatek,mt7986", |
| 312 | "mediatek,generic-tphy-v2"; |
| 313 | #address-cells = <1>; |
| 314 | #size-cells = <1>; |
| 315 | status = "okay"; |
| 316 | |
| 317 | u2port0: usb-phy@11e10000 { |
| 318 | reg = <0x11e10000 0x700>; |
| 319 | clocks = <&dummy_clk>; |
| 320 | clock-names = "ref"; |
| 321 | #phy-cells = <1>; |
| 322 | status = "okay"; |
| 323 | }; |
| 324 | |
| 325 | u3port0: usb-phy@11e10700 { |
| 326 | reg = <0x11e10700 0x900>; |
| 327 | clocks = <&dummy_clk>; |
| 328 | clock-names = "ref"; |
| 329 | #phy-cells = <1>; |
| 330 | status = "okay"; |
| 331 | }; |
| 332 | |
| 333 | u2port1: usb-phy@11e11000 { |
| 334 | reg = <0x11e11000 0x700>; |
| 335 | clocks = <&dummy_clk>; |
| 336 | clock-names = "ref"; |
| 337 | #phy-cells = <1>; |
| 338 | status = "okay"; |
| 339 | }; |
| 340 | }; |
| 341 | }; |