| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later OR MIT |
| 2 | |
| 3 | #include "ath79.dtsi" |
| 4 | |
| 5 | / { |
| 6 | compatible = "qca,qca9560"; |
| 7 | |
| 8 | #address-cells = <1>; |
| 9 | #size-cells = <1>; |
| 10 | |
| 11 | chosen { |
| 12 | bootargs = "console=ttyS0,115200n8"; |
| 13 | }; |
| 14 | |
| 15 | cpus { |
| 16 | #address-cells = <1>; |
| 17 | #size-cells = <0>; |
| 18 | |
| 19 | cpu@0 { |
| 20 | device_type = "cpu"; |
| 21 | compatible = "mips,mips74Kc"; |
| 22 | clocks = <&pll ATH79_CLK_CPU>; |
| 23 | reg = <0>; |
| 24 | }; |
| 25 | }; |
| 26 | |
| 27 | extosc: ref { |
| 28 | compatible = "fixed-clock"; |
| 29 | #clock-cells = <0>; |
| 30 | clock-output-names = "ref"; |
| 31 | clock-frequency = <25000000>; |
| 32 | }; |
| 33 | |
| 34 | ahb { |
| 35 | apb { |
| 36 | ddr_ctrl: memory-controller@18000000 { |
| 37 | compatible = "qca,qca9560-ddr-controller", |
| 38 | "qca,ar7240-ddr-controller"; |
| 39 | reg = <0x18000000 0x100>; |
| 40 | |
| 41 | #qca,ddr-wb-channel-cells = <1>; |
| 42 | }; |
| 43 | |
| 44 | uart: uart@18020000 { |
| 45 | compatible = "ns16550a"; |
| 46 | reg = <0x18020000 0x20>; |
| 47 | |
| 48 | interrupts = <3>; |
| 49 | |
| 50 | clocks = <&pll ATH79_CLK_REF>; |
| 51 | clock-names = "uart"; |
| 52 | |
| 53 | reg-io-width = <4>; |
| 54 | reg-shift = <2>; |
| 55 | no-loopback-test; |
| 56 | }; |
| 57 | |
| 58 | gpio: gpio@18040000 { |
| 59 | compatible = "qca,qca9560-gpio", |
| 60 | "qca,ar9340-gpio"; |
| 61 | reg = <0x18040000 0x28>; |
| 62 | |
| 63 | interrupts = <2>; |
| 64 | ngpios = <24>; |
| 65 | |
| 66 | gpio-controller; |
| 67 | #gpio-cells = <2>; |
| 68 | |
| 69 | interrupt-controller; |
| 70 | #interrupt-cells = <2>; |
| 71 | }; |
| 72 | |
| 73 | pinmux: pinmux@1804002c { |
| 74 | compatible = "pinctrl-single"; |
| 75 | |
| 76 | reg = <0x1804002c 0x44>; |
| 77 | |
| 78 | #size-cells = <0>; |
| 79 | |
| 80 | pinctrl-single,bit-per-mux; |
| 81 | pinctrl-single,register-width = <32>; |
| 82 | pinctrl-single,function-mask = <0x1>; |
| 83 | #pinctrl-cells = <2>; |
| 84 | |
| 85 | jtag_disable_pins: pinmux_jtag_disable_pins { |
| 86 | pinctrl-single,bits = <0x40 0x2 0x2>; |
| 87 | }; |
| 88 | }; |
| 89 | |
| 90 | pll: pll-controller@18050000 { |
| 91 | compatible = "qca,qca9560-pll", "syscon"; |
| 92 | reg = <0x18050000 0x50>; |
| 93 | |
| 94 | #clock-cells = <1>; |
| 95 | clock-output-names = "cpu", "ddr", "ahb"; |
| 96 | |
| 97 | clocks = <&extosc>; |
| 98 | }; |
| 99 | |
| 100 | wdt: wdt@18060008 { |
| 101 | compatible = "qca,ar7130-wdt"; |
| 102 | reg = <0x18060008 0x8>; |
| 103 | |
| 104 | interrupts = <4>; |
| 105 | |
| 106 | clocks = <&pll ATH79_CLK_AHB>; |
| 107 | clock-names = "wdt"; |
| 108 | }; |
| 109 | |
| 110 | rst: reset-controller@1806001c { |
| 111 | compatible = "qca,qca9560-reset", |
| 112 | "qca,ar7100-reset"; |
| 113 | reg = <0x1806001c 0x4>; |
| 114 | |
| 115 | #reset-cells = <1>; |
| 116 | interrupt-parent = <&cpuintc>; |
| 117 | |
| 118 | intc3: interrupt-controller { |
| 119 | compatible = "qca,ar9340-intc"; |
| 120 | |
| 121 | interrupt-parent = <&cpuintc>; |
| 122 | interrupts = <3>; |
| 123 | |
| 124 | interrupt-controller; |
| 125 | #interrupt-cells = <1>; |
| 126 | |
| 127 | qca,int-status-addr = <0xac>; |
| 128 | qca,pending-bits = <0x1f000>, /* pcie rc */ |
| 129 | <0x1000000>, /* usb1 */ |
| 130 | <0x10000000>; /* usb2 */ |
| 131 | }; |
| 132 | }; |
| 133 | |
| 134 | rst2: reset-controller@180600c0 { |
| 135 | compatible = "qca,qca9560-reset", |
| 136 | "qca,ar7100-reset", |
| 137 | "simple-bus"; |
| 138 | reg = <0x180600c0 0x4>; |
| 139 | |
| 140 | #reset-cells = <1>; |
| 141 | }; |
| 142 | }; |
| 143 | |
| 144 | gmac: gmac@18070000 { |
| 145 | compatible = "qca,qca9560-gmac"; |
| 146 | reg = <0x18070000 0x64>; |
| 147 | }; |
| 148 | |
| 149 | wmac: wmac@18100000 { |
| 150 | compatible = "qca,qca9560-wmac"; |
| 151 | reg = <0x18100000 0x10000>; |
| 152 | |
| 153 | interrupt-parent = <&cpuintc>; |
| 154 | interrupts = <2>; |
| 155 | |
| 156 | status = "disabled"; |
| 157 | }; |
| 158 | |
| 159 | pcie: pcie-controller@18250000 { |
| 160 | compatible = "qcom,ar7240-pci"; |
| 161 | #address-cells = <3>; |
| 162 | #size-cells = <2>; |
| 163 | bus-range = <0x0 0x0>; |
| 164 | reg = <0x18250000 0x1000>, /* CRP */ |
| 165 | <0x18280000 0x100>, /* CTRL */ |
| 166 | <0x16000000 0x1000>; /* CFG */ |
| 167 | reg-names = "crp_base", "ctrl_base", "cfg_base"; |
| 168 | ranges = <0x2000000 0 0x12000000 0x12000000 0 0x02000000 /* pci memory */ |
| 169 | 0x1000000 0 0x00000000 0x0000000 0 0x000001>; /* io space */ |
| 170 | interrupt-parent = <&intc3>; |
| 171 | interrupts = <0>; |
| 172 | |
| 173 | resets = <&rst 6>, <&rst 7>; |
| 174 | reset-names = "hc", "phy"; |
| 175 | |
| 176 | interrupt-controller; |
| 177 | #interrupt-cells = <1>; |
| 178 | |
| 179 | interrupt-map-mask = <0 0 0 1>; |
| 180 | interrupt-map = <0 0 0 0 &pcie 0>; |
| 181 | status = "disabled"; |
| 182 | }; |
| 183 | |
| 184 | usb0: usb@1b000000 { |
| 185 | compatible = "generic-ehci"; |
| 186 | reg = <0x1b000000 0x1d8>; |
| 187 | |
| 188 | interrupt-parent = <&intc3>; |
| 189 | interrupts = <1>; |
| 190 | |
| 191 | resets = <&rst 5>; |
| 192 | reset-names = "usb-host"; |
| 193 | |
| 194 | has-transaction-translator; |
| 195 | caps-offset = <0x100>; |
| 196 | |
| 197 | phy-names = "usb-phy0"; |
| 198 | phys = <&usb_phy0>; |
| 199 | |
| 200 | status = "disabled"; |
| 201 | }; |
| 202 | |
| 203 | usb1: usb@1b400000 { |
| 204 | compatible = "generic-ehci"; |
| 205 | reg = <0x1b400000 0x1d8>; |
| 206 | |
| 207 | interrupt-parent = <&intc3>; |
| 208 | interrupts = <2>; |
| 209 | |
| 210 | resets = <&rst2 5>; |
| 211 | reset-names = "usb-host"; |
| 212 | |
| 213 | has-transaction-translator; |
| 214 | caps-offset = <0x100>; |
| 215 | |
| 216 | phy-names = "usb-phy1"; |
| 217 | phys = <&usb_phy1>; |
| 218 | |
| 219 | status = "disabled"; |
| 220 | }; |
| 221 | |
| 222 | spi: spi@1f000000 { |
| 223 | compatible = "qca,ar934x-spi"; |
| 224 | reg = <0x1f000000 0x1c>; |
| 225 | |
| 226 | clocks = <&pll ATH79_CLK_AHB>; |
| 227 | |
| 228 | status = "disabled"; |
| 229 | |
| 230 | #address-cells = <1>; |
| 231 | #size-cells = <0>; |
| 232 | }; |
| 233 | }; |
| 234 | |
| 235 | usb_phy0: usb-phy { |
| 236 | compatible = "qca,qca9560-usb-phy", "qca,ar7200-usb-phy"; |
| 237 | |
| 238 | reset-names = "usb-phy", "usb-suspend-override"; |
| 239 | resets = <&rst 4>, <&rst 3>; |
| 240 | |
| 241 | #phy-cells = <0>; |
| 242 | |
| 243 | status = "disabled"; |
| 244 | }; |
| 245 | |
| 246 | usb_phy1: usb-phy { |
| 247 | compatible = "qca,qca9560-usb-phy", "qca,ar7200-usb-phy"; |
| 248 | |
| 249 | reset-names = "usb-phy", "usb-suspend-override"; |
| 250 | resets = <&rst2 4>, <&rst2 3>; |
| 251 | |
| 252 | #phy-cells = <0>; |
| 253 | |
| 254 | status = "disabled"; |
| 255 | }; |
| 256 | }; |
| 257 | |
| 258 | &mdio0 { |
| 259 | resets = <&rst 22>; |
| 260 | reset-names = "mdio"; |
| 261 | }; |
| 262 | |
| 263 | ð0 { |
| 264 | compatible = "qca,qca9560-eth", "syscon"; |
| 265 | |
| 266 | pll-data = <0x03000000 0x00000101 0x00001919>; |
| 267 | pll-reg = <0 0x48 0>; |
| 268 | pll-handle = <&pll>; |
| 269 | |
| 270 | resets = <&rst 9>; |
| 271 | reset-names = "mac"; |
| 272 | }; |
| 273 | |
| 274 | &mdio1 { |
| 275 | status = "okay"; |
| 276 | resets = <&rst 23>; |
| 277 | reset-names = "mdio"; |
| 278 | builtin-switch; |
| 279 | |
| 280 | builtin_switch: switch0@1f { |
| 281 | compatible = "qca,ar8229"; |
| 282 | reg = <0x1f>; |
| 283 | resets = <&rst 8>; |
| 284 | reset-names = "switch"; |
| 285 | phy-mode = "gmii"; |
| 286 | qca,phy4-mii-enable; |
| 287 | qca,mib-poll-interval = <500>; |
| 288 | |
| 289 | mdio-bus { |
| 290 | #address-cells = <1>; |
| 291 | #size-cells = <0>; |
| 292 | |
| 293 | swphy0: ethernet-phy@0 { |
| 294 | reg = <0>; |
| 295 | phy-mode = "mii"; |
| 296 | }; |
| 297 | |
| 298 | swphy4: ethernet-phy@4 { |
| 299 | reg = <4>; |
| 300 | phy-mode = "mii"; |
| 301 | }; |
| 302 | }; |
| 303 | }; |
| 304 | }; |
| 305 | |
| 306 | ð1 { |
| 307 | compatible = "qca,qca9560-eth", "syscon"; |
| 308 | |
| 309 | phy-mode = "gmii"; |
| 310 | |
| 311 | resets = <&rst 13>; |
| 312 | reset-names = "mac"; |
| 313 | |
| 314 | fixed-link { |
| 315 | speed = <1000>; |
| 316 | full-duplex; |
| 317 | }; |
| 318 | }; |