Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
developer | f7ea9e0 | 2019-09-25 17:45:22 +0800 | [diff] [blame] | 2 | #include <dt-bindings/clock/mt7628-clk.h> |
developer | 5485f62 | 2019-09-25 17:45:30 +0800 | [diff] [blame] | 3 | #include <dt-bindings/reset/mt7628-reset.h> |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 4 | |
| 5 | / { |
| 6 | #address-cells = <1>; |
| 7 | #size-cells = <1>; |
| 8 | compatible = "ralink,mt7628a-soc"; |
| 9 | |
| 10 | cpus { |
| 11 | #address-cells = <1>; |
| 12 | #size-cells = <0>; |
| 13 | |
| 14 | cpu@0 { |
| 15 | compatible = "mti,mips24KEc"; |
| 16 | device_type = "cpu"; |
| 17 | reg = <0>; |
| 18 | }; |
| 19 | }; |
| 20 | |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 21 | cpuintc: interrupt-controller { |
| 22 | #address-cells = <0>; |
| 23 | #interrupt-cells = <1>; |
| 24 | interrupt-controller; |
| 25 | compatible = "mti,cpu-interrupt-controller"; |
| 26 | }; |
| 27 | |
developer | a6b8735 | 2019-09-25 17:45:39 +0800 | [diff] [blame] | 28 | clk48m: clk48m@0 { |
| 29 | compatible = "fixed-clock"; |
| 30 | |
| 31 | clock-frequency = <48000000>; |
| 32 | |
| 33 | #clock-cells = <0>; |
| 34 | }; |
| 35 | |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 36 | palmbus@10000000 { |
| 37 | compatible = "palmbus", "simple-bus"; |
| 38 | reg = <0x10000000 0x200000>; |
| 39 | ranges = <0x0 0x10000000 0x1FFFFF>; |
| 40 | |
| 41 | #address-cells = <1>; |
| 42 | #size-cells = <1>; |
| 43 | |
| 44 | sysc: system-controller@0 { |
| 45 | compatible = "ralink,mt7620a-sysc", "syscon"; |
| 46 | reg = <0x0 0x100>; |
| 47 | }; |
| 48 | |
Stefan Roese | 845e0fd | 2018-08-16 15:27:32 +0200 | [diff] [blame] | 49 | syscon-reboot { |
| 50 | compatible = "syscon-reboot"; |
| 51 | regmap = <&sysc>; |
| 52 | offset = <0x34>; |
| 53 | mask = <0x1>; |
| 54 | }; |
| 55 | |
developer | f7ea9e0 | 2019-09-25 17:45:22 +0800 | [diff] [blame] | 56 | clkctrl: clkctrl@0x2c { |
| 57 | reg = <0x2c 0x8>, <0x10 0x4>; |
| 58 | reg-names = "syscfg0", "clkcfg"; |
| 59 | compatible = "mediatek,mt7628-clk"; |
| 60 | #clock-cells = <1>; |
| 61 | u-boot,dm-pre-reloc; |
| 62 | }; |
| 63 | |
developer | 5485f62 | 2019-09-25 17:45:30 +0800 | [diff] [blame] | 64 | rstctrl: rstctrl@0x34 { |
| 65 | reg = <0x34 0x4>; |
| 66 | compatible = "mediatek,mtmips-reset"; |
| 67 | #reset-cells = <1>; |
| 68 | }; |
| 69 | |
developer | bea7fa3 | 2019-09-25 17:45:27 +0800 | [diff] [blame] | 70 | pinctrl: pinctrl@60 { |
| 71 | compatible = "mediatek,mt7628-pinctrl"; |
| 72 | reg = <0x3c 0x2c>, <0x1300 0x100>; |
| 73 | reg-names = "gpiomode", "padconf"; |
| 74 | |
| 75 | pinctrl-names = "default"; |
| 76 | pinctrl-0 = <&state_default>; |
| 77 | |
| 78 | state_default: pin_state { |
| 79 | }; |
| 80 | |
| 81 | spi_single_pins: spi_single_pins { |
| 82 | groups = "spi"; |
| 83 | function = "spi"; |
| 84 | }; |
| 85 | |
| 86 | spi_dual_pins: spi_dual_pins { |
| 87 | spi_master_pins { |
| 88 | groups = "spi"; |
| 89 | function = "spi"; |
| 90 | }; |
| 91 | |
| 92 | spi_cs1_pin { |
| 93 | groups = "spi cs1"; |
| 94 | function = "spi cs1"; |
| 95 | }; |
| 96 | }; |
| 97 | |
| 98 | uart0_pins: uart0_pins { |
| 99 | groups = "uart0"; |
| 100 | function = "uart0"; |
| 101 | }; |
| 102 | |
| 103 | uart1_pins: uart1_pins { |
| 104 | groups = "uart1"; |
| 105 | function = "uart1"; |
| 106 | }; |
| 107 | |
| 108 | uart2_pins: uart2_pins { |
| 109 | groups = "uart2"; |
| 110 | function = "uart2"; |
| 111 | }; |
| 112 | |
| 113 | i2c_pins: i2c_pins { |
| 114 | groups = "i2c"; |
| 115 | function = "i2c"; |
| 116 | }; |
| 117 | |
| 118 | ephy_iot_mode: ephy_iot_mode { |
| 119 | ephy4_1_dis { |
| 120 | groups = "ephy4_1_pad"; |
| 121 | function = "digital"; |
| 122 | }; |
| 123 | |
| 124 | ephy0_en { |
| 125 | groups = "ephy0"; |
| 126 | function = "enable"; |
| 127 | }; |
| 128 | }; |
| 129 | |
| 130 | ephy_router_mode: ephy_router_mode { |
| 131 | ephy4_1_en { |
| 132 | groups = "ephy4_1_pad"; |
| 133 | function = "analog"; |
| 134 | }; |
| 135 | |
| 136 | ephy0_en { |
| 137 | groups = "ephy0"; |
| 138 | function = "enable"; |
| 139 | }; |
| 140 | }; |
| 141 | |
| 142 | sd_iot_mode: sd_iot_mode { |
| 143 | ephy4_1_dis { |
| 144 | groups = "ephy4_1_pad"; |
| 145 | function = "digital"; |
| 146 | }; |
| 147 | |
| 148 | sdxc_en { |
| 149 | groups = "sdmode"; |
| 150 | function = "sdxc"; |
| 151 | }; |
| 152 | |
| 153 | sdxc_iot_mode { |
| 154 | groups = "sd router"; |
| 155 | function = "iot"; |
| 156 | }; |
| 157 | |
| 158 | sd_clk_pad { |
| 159 | pins = "sd_clk"; |
| 160 | drive-strength-4g = <8>; |
| 161 | }; |
| 162 | }; |
| 163 | |
| 164 | sd_router_mode: sd_router_mode { |
| 165 | sdxc_router_mode { |
| 166 | groups = "sd router"; |
| 167 | function = "router"; |
| 168 | }; |
| 169 | |
| 170 | sdxc_map_pins { |
| 171 | groups = "gpio0", "i2s", "sdmode", \ |
| 172 | "i2c", "uart1"; |
| 173 | function = "gpio"; |
| 174 | }; |
| 175 | |
| 176 | sd_clk_pad { |
| 177 | pins = "gpio0"; |
| 178 | drive-strength-28 = <8>; |
| 179 | }; |
| 180 | }; |
| 181 | |
| 182 | emmc_iot_8bit_mode: emmc_iot_8bit_mode { |
| 183 | ephy4_1_dis { |
| 184 | groups = "ephy4_1_pad"; |
| 185 | function = "digital"; |
| 186 | }; |
| 187 | |
| 188 | emmc_en { |
| 189 | groups = "sdmode"; |
| 190 | function = "sdxc"; |
| 191 | }; |
| 192 | |
| 193 | emmc_iot_mode { |
| 194 | groups = "sd router"; |
| 195 | function = "iot"; |
| 196 | }; |
| 197 | |
| 198 | emmc_d4_d5 { |
| 199 | groups = "uart2"; |
| 200 | function = "sdxc d5 d4"; |
| 201 | }; |
| 202 | |
| 203 | emmc_d6 { |
| 204 | groups = "pwm1"; |
| 205 | function = "sdxc d6"; |
| 206 | }; |
| 207 | |
| 208 | emmc_d7 { |
| 209 | groups = "pwm0"; |
| 210 | function = "sdxc d7"; |
| 211 | }; |
| 212 | |
| 213 | sd_clk_pad { |
| 214 | pins = "sd_clk"; |
| 215 | drive-strength-4g = <8>; |
| 216 | }; |
| 217 | }; |
| 218 | }; |
| 219 | |
Stefan Roese | 787d22b | 2018-10-09 08:59:08 +0200 | [diff] [blame] | 220 | watchdog: watchdog@100 { |
| 221 | compatible = "ralink,mt7628a-wdt", "mediatek,mt7621-wdt"; |
| 222 | reg = <0x100 0x30>; |
| 223 | |
developer | 5485f62 | 2019-09-25 17:45:30 +0800 | [diff] [blame] | 224 | resets = <&rstctrl MT7628_TIMER_RST>; |
Stefan Roese | 787d22b | 2018-10-09 08:59:08 +0200 | [diff] [blame] | 225 | reset-names = "wdt"; |
| 226 | |
| 227 | interrupt-parent = <&intc>; |
| 228 | interrupts = <24>; |
| 229 | }; |
| 230 | |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 231 | intc: interrupt-controller@200 { |
| 232 | compatible = "ralink,rt2880-intc"; |
| 233 | reg = <0x200 0x100>; |
| 234 | |
| 235 | interrupt-controller; |
| 236 | #interrupt-cells = <1>; |
| 237 | |
developer | 5485f62 | 2019-09-25 17:45:30 +0800 | [diff] [blame] | 238 | resets = <&rstctrl MT7628_INT_RST>; |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 239 | reset-names = "intc"; |
| 240 | |
| 241 | interrupt-parent = <&cpuintc>; |
| 242 | interrupts = <2>; |
| 243 | |
| 244 | ralink,intc-registers = <0x9c 0xa0 |
| 245 | 0x6c 0xa4 |
| 246 | 0x80 0x78>; |
| 247 | }; |
| 248 | |
| 249 | memory-controller@300 { |
| 250 | compatible = "ralink,mt7620a-memc"; |
| 251 | reg = <0x300 0x100>; |
| 252 | }; |
| 253 | |
Stefan Roese | 4e453bd | 2018-10-09 08:59:07 +0200 | [diff] [blame] | 254 | gpio@600 { |
| 255 | #address-cells = <1>; |
| 256 | #size-cells = <0>; |
| 257 | |
| 258 | compatible = "mtk,mt7628-gpio", "mtk,mt7621-gpio"; |
| 259 | reg = <0x600 0x100>; |
| 260 | |
developer | 5485f62 | 2019-09-25 17:45:30 +0800 | [diff] [blame] | 261 | resets = <&rstctrl MT7628_PIO_RST>; |
| 262 | reset-names = "pio"; |
| 263 | |
Stefan Roese | 4e453bd | 2018-10-09 08:59:07 +0200 | [diff] [blame] | 264 | interrupt-parent = <&intc>; |
| 265 | interrupts = <6>; |
| 266 | |
| 267 | gpio0: bank@0 { |
| 268 | reg = <0>; |
| 269 | compatible = "mtk,mt7621-gpio-bank"; |
| 270 | gpio-controller; |
| 271 | #gpio-cells = <2>; |
| 272 | }; |
| 273 | |
| 274 | gpio1: bank@1 { |
| 275 | reg = <1>; |
| 276 | compatible = "mtk,mt7621-gpio-bank"; |
| 277 | gpio-controller; |
| 278 | #gpio-cells = <2>; |
| 279 | }; |
| 280 | |
| 281 | gpio2: bank@2 { |
| 282 | reg = <2>; |
| 283 | compatible = "mtk,mt7621-gpio-bank"; |
| 284 | gpio-controller; |
| 285 | #gpio-cells = <2>; |
| 286 | }; |
| 287 | }; |
| 288 | |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 289 | spi0: spi@b00 { |
| 290 | compatible = "ralink,mt7621-spi"; |
| 291 | reg = <0xb00 0x40>; |
developer | 5485f62 | 2019-09-25 17:45:30 +0800 | [diff] [blame] | 292 | |
| 293 | resets = <&rstctrl MT7628_SPI_RST>; |
| 294 | reset-names = "spi"; |
| 295 | |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 296 | #address-cells = <1>; |
| 297 | #size-cells = <0>; |
Stefan Roese | 9a4e155 | 2018-08-16 15:27:33 +0200 | [diff] [blame] | 298 | |
developer | f7ea9e0 | 2019-09-25 17:45:22 +0800 | [diff] [blame] | 299 | clocks = <&clkctrl CLK_SPI>; |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 300 | }; |
| 301 | |
| 302 | uart0: uartlite@c00 { |
developer | 0844157 | 2019-09-25 17:45:20 +0800 | [diff] [blame] | 303 | compatible = "mediatek,hsuart", "ns16550a"; |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 304 | reg = <0xc00 0x100>; |
| 305 | |
developer | 295ac53 | 2019-09-25 17:45:28 +0800 | [diff] [blame] | 306 | pinctrl-names = "default"; |
| 307 | pinctrl-0 = <&uart0_pins>; |
| 308 | |
developer | f7ea9e0 | 2019-09-25 17:45:22 +0800 | [diff] [blame] | 309 | clocks = <&clkctrl CLK_UART0>; |
developer | a799f39 | 2019-09-25 17:45:19 +0800 | [diff] [blame] | 310 | |
developer | 5485f62 | 2019-09-25 17:45:30 +0800 | [diff] [blame] | 311 | resets = <&rstctrl MT7628_UART0_RST>; |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 312 | reset-names = "uart0"; |
| 313 | |
| 314 | interrupt-parent = <&intc>; |
| 315 | interrupts = <20>; |
| 316 | |
| 317 | reg-shift = <2>; |
| 318 | }; |
| 319 | |
| 320 | uart1: uart1@d00 { |
developer | 0844157 | 2019-09-25 17:45:20 +0800 | [diff] [blame] | 321 | compatible = "mediatek,hsuart", "ns16550a"; |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 322 | reg = <0xd00 0x100>; |
| 323 | |
developer | 295ac53 | 2019-09-25 17:45:28 +0800 | [diff] [blame] | 324 | pinctrl-names = "default"; |
| 325 | pinctrl-0 = <&uart1_pins>; |
| 326 | |
developer | f7ea9e0 | 2019-09-25 17:45:22 +0800 | [diff] [blame] | 327 | clocks = <&clkctrl CLK_UART1>; |
developer | a799f39 | 2019-09-25 17:45:19 +0800 | [diff] [blame] | 328 | |
developer | 5485f62 | 2019-09-25 17:45:30 +0800 | [diff] [blame] | 329 | resets = <&rstctrl MT7628_UART1_RST>; |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 330 | reset-names = "uart1"; |
| 331 | |
| 332 | interrupt-parent = <&intc>; |
| 333 | interrupts = <21>; |
| 334 | |
| 335 | reg-shift = <2>; |
| 336 | }; |
| 337 | |
| 338 | uart2: uart2@e00 { |
developer | 0844157 | 2019-09-25 17:45:20 +0800 | [diff] [blame] | 339 | compatible = "mediatek,hsuart", "ns16550a"; |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 340 | reg = <0xe00 0x100>; |
| 341 | |
developer | 295ac53 | 2019-09-25 17:45:28 +0800 | [diff] [blame] | 342 | pinctrl-names = "default"; |
| 343 | pinctrl-0 = <&uart2_pins>; |
| 344 | |
developer | f7ea9e0 | 2019-09-25 17:45:22 +0800 | [diff] [blame] | 345 | clocks = <&clkctrl CLK_UART2>; |
developer | a799f39 | 2019-09-25 17:45:19 +0800 | [diff] [blame] | 346 | |
developer | 5485f62 | 2019-09-25 17:45:30 +0800 | [diff] [blame] | 347 | resets = <&rstctrl MT7628_UART2_RST>; |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 348 | reset-names = "uart2"; |
| 349 | |
| 350 | interrupt-parent = <&intc>; |
| 351 | interrupts = <22>; |
| 352 | |
| 353 | reg-shift = <2>; |
| 354 | }; |
| 355 | }; |
| 356 | |
developer | e3c4a92 | 2019-09-25 17:45:36 +0800 | [diff] [blame] | 357 | eth: eth@10110000 { |
Stefan Roese | fbf4980 | 2018-11-28 08:40:48 +0100 | [diff] [blame] | 358 | compatible = "mediatek,mt7628-eth"; |
Stefan Roese | c35b97f | 2018-10-09 08:59:06 +0200 | [diff] [blame] | 359 | reg = <0x10100000 0x10000 |
| 360 | 0x10110000 0x8000>; |
| 361 | |
developer | 5485f62 | 2019-09-25 17:45:30 +0800 | [diff] [blame] | 362 | resets = <&rstctrl MT7628_EPHY_RST>; |
| 363 | reset-names = "ephy"; |
| 364 | |
Stefan Roese | c35b97f | 2018-10-09 08:59:06 +0200 | [diff] [blame] | 365 | syscon = <&sysc>; |
| 366 | }; |
| 367 | |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 368 | usb_phy: usb-phy@10120000 { |
| 369 | compatible = "mediatek,mt7628-usbphy"; |
| 370 | reg = <0x10120000 0x1000>; |
| 371 | |
| 372 | #phy-cells = <0>; |
| 373 | |
| 374 | ralink,sysctl = <&sysc>; |
developer | f7ea9e0 | 2019-09-25 17:45:22 +0800 | [diff] [blame] | 375 | |
developer | 5485f62 | 2019-09-25 17:45:30 +0800 | [diff] [blame] | 376 | resets = <&rstctrl MT7628_UPHY_RST>; |
| 377 | reset-names = "phy"; |
developer | f7ea9e0 | 2019-09-25 17:45:22 +0800 | [diff] [blame] | 378 | |
| 379 | clocks = <&clkctrl CLK_UPHY>; |
| 380 | clock-names = "cg"; |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 381 | }; |
| 382 | |
| 383 | ehci@101c0000 { |
| 384 | compatible = "generic-ehci"; |
| 385 | reg = <0x101c0000 0x1000>; |
| 386 | |
| 387 | phys = <&usb_phy>; |
| 388 | phy-names = "usb"; |
| 389 | |
| 390 | interrupt-parent = <&intc>; |
| 391 | interrupts = <18>; |
| 392 | }; |
developer | a6b8735 | 2019-09-25 17:45:39 +0800 | [diff] [blame] | 393 | |
| 394 | mmc: mmc@10130000 { |
| 395 | compatible = "mediatek,mt7620-mmc"; |
| 396 | reg = <0x10130000 0x4000>; |
| 397 | builtin-cd = <1>; |
| 398 | r_smpl = <1>; |
| 399 | |
| 400 | clocks = <&clk48m>, <&clkctrl CLK_SDXC>; |
| 401 | clock-names = "source", "hclk"; |
| 402 | |
| 403 | resets = <&rstctrl MT7628_SDXC_RST>; |
| 404 | |
| 405 | status = "disabled"; |
| 406 | }; |
Stefan Roese | 65da15e | 2018-09-05 15:12:35 +0200 | [diff] [blame] | 407 | }; |