developer | ff9f2d4 | 2022-09-09 19:59:11 +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/mt7981-clk.h> |
| 10 | #include <dt-bindings/reset/mt7629-reset.h> |
| 11 | #include <dt-bindings/pinctrl/mt65xx.h> |
| 12 | |
| 13 | / { |
| 14 | compatible = "mediatek,mt7981"; |
| 15 | interrupt-parent = <&gic>; |
| 16 | #address-cells = <1>; |
| 17 | #size-cells = <1>; |
| 18 | cpus { |
| 19 | #address-cells = <1>; |
| 20 | #size-cells = <0>; |
| 21 | cpu0: cpu@0 { |
| 22 | device_type = "cpu"; |
| 23 | compatible = "arm,cortex-a53"; |
| 24 | reg = <0x0>; |
| 25 | mediatek,hwver = <&hwver>; |
| 26 | }; |
| 27 | cpu1: cpu@1 { |
| 28 | device_type = "cpu"; |
| 29 | compatible = "arm,cortex-a53"; |
| 30 | reg = <0x1>; |
| 31 | mediatek,hwver = <&hwver>; |
| 32 | }; |
| 33 | }; |
| 34 | |
| 35 | gpt_clk: gpt_dummy20m { |
| 36 | compatible = "fixed-clock"; |
| 37 | clock-frequency = <13000000>; |
| 38 | #clock-cells = <0>; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 39 | bootph-all; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 40 | }; |
| 41 | |
| 42 | hwver: hwver { |
| 43 | compatible = "mediatek,hwver", "syscon"; |
| 44 | reg = <0x8000000 0x1000>; |
| 45 | }; |
| 46 | |
| 47 | timer { |
| 48 | compatible = "arm,armv8-timer"; |
| 49 | interrupt-parent = <&gic>; |
| 50 | clock-frequency = <13000000>; |
| 51 | interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, |
| 52 | <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, |
| 53 | <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, |
| 54 | <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; |
| 55 | arm,cpu-registers-not-fw-configured; |
| 56 | }; |
| 57 | |
| 58 | timer0: timer@10008000 { |
| 59 | compatible = "mediatek,mt7986-timer"; |
| 60 | reg = <0x10008000 0x1000>; |
| 61 | interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>; |
| 62 | clocks = <&gpt_clk>; |
| 63 | clock-names = "gpt-clk"; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 64 | bootph-all; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 65 | }; |
| 66 | |
| 67 | watchdog: watchdog@1001c000 { |
| 68 | compatible = "mediatek,mt7986-wdt"; |
| 69 | reg = <0x1001c000 0x1000>; |
| 70 | interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; |
| 71 | #reset-cells = <1>; |
| 72 | status = "disabled"; |
| 73 | }; |
| 74 | |
| 75 | gic: interrupt-controller@c000000 { |
| 76 | compatible = "arm,gic-v3"; |
| 77 | #interrupt-cells = <3>; |
| 78 | interrupt-parent = <&gic>; |
| 79 | interrupt-controller; |
| 80 | reg = <0x0c000000 0x40000>, /* GICD */ |
| 81 | <0x0c080000 0x200000>; /* GICR */ |
| 82 | |
| 83 | interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; |
| 84 | }; |
| 85 | |
| 86 | fixed_plls: apmixedsys@1001e000 { |
| 87 | compatible = "mediatek,mt7981-fixed-plls"; |
| 88 | reg = <0x1001e000 0x1000>; |
| 89 | #clock-cells = <1>; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 90 | bootph-all; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 91 | }; |
| 92 | |
| 93 | topckgen: topckgen@1001b000 { |
| 94 | compatible = "mediatek,mt7981-topckgen"; |
| 95 | reg = <0x1001b000 0x1000>; |
| 96 | clock-parent = <&fixed_plls>; |
| 97 | #clock-cells = <1>; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 98 | bootph-all; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 99 | }; |
| 100 | |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 101 | infracfg: infracfg@10001000 { |
| 102 | compatible = "mediatek,mt7981-infracfg"; |
| 103 | reg = <0x10001000 0x30>; |
| 104 | clock-parent = <&topckgen>; |
| 105 | #clock-cells = <1>; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 106 | bootph-all; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 107 | }; |
| 108 | |
| 109 | pinctrl: pinctrl@11d00000 { |
| 110 | compatible = "mediatek,mt7981-pinctrl"; |
| 111 | reg = <0x11d00000 0x1000>, |
| 112 | <0x11c00000 0x1000>, |
| 113 | <0x11c10000 0x1000>, |
| 114 | <0x11d20000 0x1000>, |
| 115 | <0x11e00000 0x1000>, |
| 116 | <0x11e20000 0x1000>, |
| 117 | <0x11f00000 0x1000>, |
| 118 | <0x11f10000 0x1000>, |
| 119 | <0x1000b000 0x1000>; |
Christian Marangi | d205efa | 2025-01-27 14:40:38 +0100 | [diff] [blame^] | 120 | reg-names = "gpio", "iocfg_rt", "iocfg_rm", |
| 121 | "iocfg_rb", "iocfg_lb", "iocfg_bl", |
| 122 | "iocfg_tm", "iocfg_tl", "eint"; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 123 | gpio: gpio-controller { |
| 124 | gpio-controller; |
| 125 | #gpio-cells = <2>; |
| 126 | }; |
| 127 | }; |
| 128 | |
| 129 | pwm: pwm@10048000 { |
| 130 | compatible = "mediatek,mt7981-pwm"; |
| 131 | reg = <0x10048000 0x1000>; |
| 132 | #clock-cells = <1>; |
| 133 | #pwm-cells = <2>; |
| 134 | interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>; |
Christian Marangi | f245164 | 2024-08-02 15:53:15 +0200 | [diff] [blame] | 135 | clocks = <&topckgen CLK_TOP_PWM_SEL>, |
| 136 | <&infracfg CLK_INFRA_PWM_BSEL>, |
| 137 | <&infracfg CLK_INFRA_PWM1_CK>, |
| 138 | <&infracfg CLK_INFRA_PWM2_CK>, |
| 139 | <&infracfg CLK_INFRA_PWM3_CK>; |
developer | d24fd7e | 2025-01-17 17:18:06 +0800 | [diff] [blame] | 140 | assigned-clocks = <&topckgen CLK_TOP_PWM_SEL>, |
| 141 | <&infracfg CLK_INFRA_PWM1_SEL>, |
| 142 | <&infracfg CLK_INFRA_PWM2_SEL>, |
| 143 | <&infracfg CLK_INFRA_PWM3_SEL>; |
| 144 | assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>, |
| 145 | <&topckgen CLK_TOP_PWM_SEL>, |
| 146 | <&topckgen CLK_TOP_PWM_SEL>, |
| 147 | <&topckgen CLK_TOP_PWM_SEL>; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 148 | clock-names = "top", "main", "pwm1", "pwm2", "pwm3"; |
| 149 | status = "disabled"; |
| 150 | }; |
| 151 | |
developer | a98189e | 2023-07-19 17:16:19 +0800 | [diff] [blame] | 152 | i2c0: i2c@11007000 { |
| 153 | compatible = "mediatek,mt7981-i2c"; |
| 154 | reg = <0x11007000 0x1000>, |
| 155 | <0x10217080 0x80>; |
| 156 | interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>; |
| 157 | clock-div = <1>; |
Christian Marangi | f245164 | 2024-08-02 15:53:15 +0200 | [diff] [blame] | 158 | clocks = <&infracfg CLK_INFRA_I2C0_CK>, |
| 159 | <&infracfg CLK_INFRA_AP_DMA_CK>; |
developer | a98189e | 2023-07-19 17:16:19 +0800 | [diff] [blame] | 160 | clock-names = "main", "dma"; |
| 161 | #address-cells = <1>; |
| 162 | #size-cells = <0>; |
| 163 | status = "disabled"; |
| 164 | }; |
| 165 | |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 166 | uart0: serial@11002000 { |
| 167 | compatible = "mediatek,hsuart"; |
| 168 | reg = <0x11002000 0x400>; |
| 169 | interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; |
Christian Marangi | f245164 | 2024-08-02 15:53:15 +0200 | [diff] [blame] | 170 | clocks = <&infracfg CLK_INFRA_UART0_CK>; |
| 171 | assigned-clocks = <&topckgen CLK_TOP_UART_SEL>, |
| 172 | <&infracfg CLK_INFRA_UART0_SEL>; |
| 173 | assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>, |
| 174 | <&topckgen CLK_TOP_UART_SEL>; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 175 | mediatek,force-highspeed; |
| 176 | status = "disabled"; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 177 | bootph-all; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 178 | }; |
| 179 | |
| 180 | uart1: serial@11003000 { |
| 181 | compatible = "mediatek,hsuart"; |
| 182 | reg = <0x11003000 0x400>; |
| 183 | interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>; |
Christian Marangi | f245164 | 2024-08-02 15:53:15 +0200 | [diff] [blame] | 184 | clocks = <&infracfg CLK_INFRA_UART1_CK>; |
| 185 | assigned-clocks = <&topckgen CLK_TOP_UART_SEL>, |
| 186 | <&infracfg CLK_INFRA_UART1_SEL>; |
| 187 | assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>, |
| 188 | <&topckgen CLK_TOP_UART_SEL>; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 189 | mediatek,force-highspeed; |
| 190 | status = "disabled"; |
| 191 | }; |
| 192 | |
| 193 | uart2: serial@11004000 { |
| 194 | compatible = "mediatek,hsuart"; |
| 195 | reg = <0x11004000 0x400>; |
| 196 | interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>; |
Christian Marangi | f245164 | 2024-08-02 15:53:15 +0200 | [diff] [blame] | 197 | clocks = <&infracfg CLK_INFRA_UART2_CK>; |
| 198 | assigned-clocks = <&topckgen CLK_TOP_UART_SEL>, |
| 199 | <&infracfg CLK_INFRA_UART2_SEL>; |
| 200 | assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>, |
| 201 | <&topckgen CLK_TOP_UART_SEL>; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 202 | mediatek,force-highspeed; |
| 203 | status = "disabled"; |
| 204 | }; |
| 205 | |
| 206 | snand: snand@11005000 { |
| 207 | compatible = "mediatek,mt7986-snand"; |
| 208 | reg = <0x11005000 0x1000>, |
| 209 | <0x11006000 0x1000>; |
| 210 | reg-names = "nfi", "ecc"; |
Christian Marangi | f245164 | 2024-08-02 15:53:15 +0200 | [diff] [blame] | 211 | clocks = <&infracfg CLK_INFRA_SPINFI1_CK>, |
| 212 | <&infracfg CLK_INFRA_NFI1_CK>, |
| 213 | <&infracfg CLK_INFRA_NFI_HCK_CK>; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 214 | clock-names = "pad_clk", "nfi_clk", "nfi_hclk"; |
Christian Marangi | f245164 | 2024-08-02 15:53:15 +0200 | [diff] [blame] | 215 | assigned-clocks = <&topckgen CLK_TOP_SPINFI_SEL>, |
| 216 | <&topckgen CLK_TOP_NFI1X_SEL>; |
| 217 | assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D8>, |
| 218 | <&topckgen CLK_TOP_CB_M_D8>; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 219 | status = "disabled"; |
| 220 | }; |
| 221 | |
| 222 | ethsys: syscon@15000000 { |
| 223 | compatible = "mediatek,mt7981-ethsys", "syscon"; |
| 224 | reg = <0x15000000 0x1000>; |
| 225 | clock-parent = <&topckgen>; |
| 226 | #clock-cells = <1>; |
| 227 | #reset-cells = <1>; |
| 228 | }; |
| 229 | |
| 230 | eth: ethernet@15100000 { |
| 231 | compatible = "mediatek,mt7981-eth", "syscon"; |
| 232 | reg = <0x15100000 0x20000>; |
| 233 | resets = <ðsys ETHSYS_FE_RST>; |
| 234 | reset-names = "fe"; |
| 235 | mediatek,ethsys = <ðsys>; |
| 236 | mediatek,sgmiisys = <&sgmiisys0>; |
developer | cdb1f310 | 2023-07-19 17:17:27 +0800 | [diff] [blame] | 237 | mediatek,infracfg = <&topmisc>; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 238 | #address-cells = <1>; |
| 239 | #size-cells = <0>; |
| 240 | status = "disabled"; |
| 241 | }; |
| 242 | |
| 243 | sgmiisys0: syscon@10060000 { |
Christian Marangi | be9dbee | 2024-08-02 15:53:10 +0200 | [diff] [blame] | 244 | compatible = "mediatek,mt7981-sgmiisys_0", "syscon"; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 245 | reg = <0x10060000 0x1000>; |
| 246 | pn_swap; |
| 247 | #clock-cells = <1>; |
| 248 | }; |
| 249 | |
| 250 | sgmiisys1: syscon@10070000 { |
Christian Marangi | be9dbee | 2024-08-02 15:53:10 +0200 | [diff] [blame] | 251 | compatible = "mediatek,mt7981-sgmiisys_1", "syscon"; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 252 | reg = <0x10070000 0x1000>; |
| 253 | #clock-cells = <1>; |
| 254 | }; |
| 255 | |
developer | cdb1f310 | 2023-07-19 17:17:27 +0800 | [diff] [blame] | 256 | topmisc: topmisc@11d10000 { |
| 257 | compatible = "mediatek,mt7981-topmisc", "syscon"; |
| 258 | reg = <0x11d10000 0x10000>; |
| 259 | #clock-cells = <1>; |
| 260 | }; |
| 261 | |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 262 | spi0: spi@1100a000 { |
| 263 | compatible = "mediatek,ipm-spi"; |
| 264 | reg = <0x1100a000 0x100>; |
Christian Marangi | f245164 | 2024-08-02 15:53:15 +0200 | [diff] [blame] | 265 | clocks = <&infracfg CLK_INFRA_SPI0_CK>, |
| 266 | <&topckgen CLK_TOP_SPI_SEL>; |
| 267 | assigned-clocks = <&topckgen CLK_TOP_SPI_SEL>, |
| 268 | <&infracfg CLK_INFRA_SPI0_SEL>; |
| 269 | assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>, |
| 270 | <&topckgen CLK_TOP_SPI_SEL>; |
Christian Marangi | 821358e | 2024-08-02 15:53:07 +0200 | [diff] [blame] | 271 | clock-names = "spi-clk", "sel-clk"; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 272 | interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>; |
| 273 | status = "disabled"; |
| 274 | }; |
| 275 | |
| 276 | spi1: spi@1100b000 { |
| 277 | compatible = "mediatek,ipm-spi"; |
| 278 | reg = <0x1100b000 0x100>; |
| 279 | interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>; |
Christian Marangi | f245164 | 2024-08-02 15:53:15 +0200 | [diff] [blame] | 280 | clocks = <&infracfg CLK_INFRA_SPI1_CK>, |
| 281 | <&topckgen CLK_TOP_SPIM_MST_SEL>; |
| 282 | assigned-clocks = <&topckgen CLK_TOP_SPIM_MST_SEL>, |
| 283 | <&infracfg CLK_INFRA_SPI1_SEL>; |
| 284 | assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>, |
| 285 | <&topckgen CLK_TOP_SPIM_MST_SEL>; |
Christian Marangi | 821358e | 2024-08-02 15:53:07 +0200 | [diff] [blame] | 286 | clock-names = "spi-clk", "sel-clk"; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 287 | status = "disabled"; |
| 288 | }; |
| 289 | |
| 290 | spi2: spi@11009000 { |
| 291 | compatible = "mediatek,ipm-spi"; |
| 292 | reg = <0x11009000 0x100>; |
Christian Marangi | f245164 | 2024-08-02 15:53:15 +0200 | [diff] [blame] | 293 | clocks = <&infracfg CLK_INFRA_SPI2_CK>, |
| 294 | <&topckgen CLK_TOP_SPI_SEL>; |
| 295 | assigned-clocks = <&topckgen CLK_TOP_SPI_SEL>, |
| 296 | <&infracfg CLK_INFRA_SPI2_SEL>; |
| 297 | assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>, |
| 298 | <&topckgen CLK_TOP_SPI_SEL>; |
Christian Marangi | 821358e | 2024-08-02 15:53:07 +0200 | [diff] [blame] | 299 | clock-names = "spi-clk", "sel-clk"; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 300 | interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>; |
| 301 | status = "disabled"; |
| 302 | }; |
| 303 | |
| 304 | mmc0: mmc@11230000 { |
| 305 | compatible = "mediatek,mt7981-mmc"; |
| 306 | reg = <0x11230000 0x1000>, |
| 307 | <0x11C20000 0x1000>; |
| 308 | interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; |
developer | a6f4936 | 2025-01-17 17:18:55 +0800 | [diff] [blame] | 309 | clocks = <&topckgen CLK_TOP_EMMC_208M>, |
| 310 | <&topckgen CLK_TOP_EMMC_400M>, |
Christian Marangi | f245164 | 2024-08-02 15:53:15 +0200 | [diff] [blame] | 311 | <&infracfg CLK_INFRA_MSDC_CK>; |
developer | a6f4936 | 2025-01-17 17:18:55 +0800 | [diff] [blame] | 312 | assigned-clocks = <&topckgen CLK_TOP_EMMC_208M_SEL>, |
| 313 | <&topckgen CLK_TOP_EMMC_400M_SEL>; |
| 314 | assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>, |
| 315 | <&topckgen CLK_TOP_CB_NET2_D2>; |
developer | ff9f2d4 | 2022-09-09 19:59:11 +0800 | [diff] [blame] | 316 | clock-names = "source", "hclk", "source_cg"; |
| 317 | status = "disabled"; |
| 318 | }; |
| 319 | |
| 320 | }; |