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