|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT |
| 2 | + |
| 3 | +/dts-v1/; |
| 4 | +#include <dt-bindings/gpio/gpio.h> |
| 5 | +#include <dt-bindings/input/input.h> |
| 6 | + |
| 7 | +#include "mt7981.dtsi" |
| 8 | + |
| 9 | +/ { |
| 10 | + model = "ABT ASR3000"; |
| 11 | + compatible = "abt,asr3000", "mediatek,mt7981"; |
| 12 | + |
| 13 | + aliases { |
| 14 | + serial0 = &uart0; |
| 15 | + led-boot = &led_wps; |
| 16 | + led-upgrade = &led_wps; |
| 17 | + label-mac-device = &gmac0; |
| 18 | + }; |
| 19 | + |
| 20 | + chosen { |
| 21 | + stdout-path = "serial0:115200n8"; |
| 22 | + }; |
| 23 | + |
| 24 | + memory { |
| 25 | + reg = <0 0x40000000 0 0x10000000>; |
| 26 | + }; |
| 27 | + |
| 28 | + gpio-keys { |
| 29 | + compatible = "gpio-keys"; |
| 30 | + |
| 31 | + reset { |
| 32 | + label = "reset"; |
| 33 | + linux,code = <KEY_RESTART>; |
| 34 | + gpios = <&pio 1 GPIO_ACTIVE_LOW>; |
| 35 | + }; |
| 36 | + |
| 37 | + mesh { |
| 38 | + label = "mesh"; |
| 39 | + linux,code = <KEY_WPS_BUTTON>; |
| 40 | + gpios = <&pio 0 GPIO_ACTIVE_HIGH>; |
| 41 | + }; |
| 42 | + }; |
| 43 | + |
| 44 | + leds { |
| 45 | + compatible = "gpio-leds"; |
| 46 | + |
| 47 | + wan { |
| 48 | + label = "green:wan"; |
| 49 | + gpios = <&pio 8 GPIO_ACTIVE_LOW>; |
| 50 | + }; |
| 51 | + |
| 52 | + led_wps: wps { |
| 53 | + label = "green:wps"; |
| 54 | + gpios = <&pio 15 GPIO_ACTIVE_HIGH>; |
| 55 | + }; |
| 56 | + }; |
| 57 | +}; |
| 58 | + |
| 59 | +ð { |
| 60 | + status = "okay"; |
| 61 | + |
| 62 | + gmac0: mac@0 { |
| 63 | + compatible = "mediatek,eth-mac"; |
| 64 | + reg = <0>; |
| 65 | + phy-mode = "2500base-x"; |
| 66 | + |
| 67 | + nvmem-cells = <&macaddr_art_0>; |
| 68 | + nvmem-cell-names = "mac-address"; |
| 69 | + |
| 70 | + fixed-link { |
| 71 | + speed = <2500>; |
| 72 | + full-duplex; |
| 73 | + pause; |
| 74 | + }; |
| 75 | + }; |
| 76 | + |
| 77 | + gmac1: mac@1 { |
| 78 | + compatible = "mediatek,eth-mac"; |
| 79 | + reg = <1>; |
| 80 | + phy-mode = "gmii"; |
| 81 | + phy-handle = <&int_gbe_phy>; |
| 82 | + |
| 83 | + nvmem-cells = <&macaddr_art_0>; |
| 84 | + nvmem-cell-names = "mac-address"; |
| 85 | + mac-address-increment = <0x500000>; |
| 86 | + }; |
| 87 | +}; |
| 88 | + |
| 89 | +&mdio_bus { |
| 90 | + switch: switch@0 { |
| 91 | + compatible = "mediatek,mt7531"; |
| 92 | + reg = <31>; |
| 93 | + reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; |
| 94 | + interrupt-controller; |
| 95 | + #interrupt-cells = <1>; |
| 96 | + interrupt-parent = <&pio>; |
| 97 | + interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; |
| 98 | + }; |
| 99 | +}; |
| 100 | + |
| 101 | +&spi0 { |
| 102 | + pinctrl-names = "default"; |
| 103 | + pinctrl-0 = <&spi0_flash_pins>; |
| 104 | + status = "okay"; |
| 105 | + |
| 106 | + spi_nand@0 { |
| 107 | + compatible = "spi-nand"; |
| 108 | + #address-cells = <1>; |
| 109 | + #size-cells = <1>; |
| 110 | + reg = <0>; |
| 111 | + |
| 112 | + spi-max-frequency = <52000000>; |
| 113 | + spi-tx-bus-width = <4>; |
| 114 | + spi-rx-bus-width = <4>; |
| 115 | + |
| 116 | + mediatek,nmbm; |
| 117 | + mediatek,bmt-max-ratio = <1>; |
| 118 | + mediatek,bmt-max-reserved-blocks = <64>; |
| 119 | + |
| 120 | + partitions { |
| 121 | + compatible = "fixed-partitions"; |
| 122 | + #address-cells = <1>; |
| 123 | + #size-cells = <1>; |
| 124 | + |
| 125 | + partition@0 { |
| 126 | + label = "BL2"; |
| 127 | + reg = <0x0000000 0x0100000>; |
| 128 | + read-only; |
| 129 | + }; |
| 130 | + |
| 131 | + partition@100000 { |
| 132 | + label = "u-boot-env"; |
| 133 | + reg = <0x0100000 0x0080000>; |
| 134 | + }; |
| 135 | + |
| 136 | + partition@180000 { |
| 137 | + label = "art"; |
| 138 | + reg = <0x0180000 0x0100000>; |
| 139 | + read-only; |
| 140 | + |
| 141 | + compatible = "nvmem-cells"; |
| 142 | + #address-cells = <1>; |
| 143 | + #size-cells = <1>; |
| 144 | + |
| 145 | + macaddr_art_0: macaddr@0 { |
| 146 | + reg = <0x0 0x6>; |
| 147 | + }; |
| 148 | + |
| 149 | + macaddr_art_6: macaddr@6 { |
| 150 | + reg = <0x6 0x6>; |
| 151 | + }; |
| 152 | + }; |
| 153 | + |
| 154 | + factory: partition@280000 { |
| 155 | + label = "Factory"; |
| 156 | + reg = <0x0280000 0x0100000>; |
| 157 | + read-only; |
| 158 | + }; |
| 159 | + |
| 160 | + partition@380000 { |
| 161 | + label = "FIP"; |
| 162 | + reg = <0x0380000 0x0200000>; |
| 163 | + read-only; |
| 164 | + }; |
| 165 | + |
| 166 | + partition@580000 { |
| 167 | + label = "ubi"; |
| 168 | + reg = <0x0580000 0x7000000>; |
| 169 | + }; |
| 170 | + }; |
| 171 | + }; |
| 172 | +}; |
| 173 | + |
| 174 | +&switch { |
| 175 | + ports { |
| 176 | + #address-cells = <1>; |
| 177 | + #size-cells = <0>; |
| 178 | + |
| 179 | + port@0 { |
| 180 | + reg = <0>; |
| 181 | + label = "lan3"; |
| 182 | + }; |
| 183 | + |
| 184 | + port@1 { |
| 185 | + reg = <1>; |
| 186 | + label = "lan2"; |
| 187 | + }; |
| 188 | + |
| 189 | + port@2 { |
| 190 | + reg = <2>; |
| 191 | + label = "lan1"; |
| 192 | + }; |
| 193 | + |
| 194 | + port@6 { |
| 195 | + reg = <6>; |
| 196 | + label = "cpu"; |
| 197 | + ethernet = <&gmac0>; |
| 198 | + phy-mode = "2500base-x"; |
| 199 | + |
| 200 | + fixed-link { |
| 201 | + speed = <2500>; |
| 202 | + full-duplex; |
| 203 | + pause; |
| 204 | + }; |
| 205 | + }; |
| 206 | + }; |
| 207 | +}; |
| 208 | + |
| 209 | +&pio { |
| 210 | + spi0_flash_pins: spi0-pins { |
| 211 | + mux { |
| 212 | + function = "spi"; |
| 213 | + groups = "spi0", "spi0_wp_hold"; |
| 214 | + }; |
| 215 | + |
| 216 | + conf-pu { |
| 217 | + pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; |
| 218 | + drive-strength = <8>; |
| 219 | + mediatek,pull-up-adv = <0>; /* bias-disable */ |
| 220 | + }; |
| 221 | + |
| 222 | + conf-pd { |
| 223 | + pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; |
| 224 | + drive-strength = <8>; |
| 225 | + mediatek,pull-up-adv = <0>; /* bias-disable */ |
| 226 | + }; |
| 227 | + }; |
| 228 | + |
| 229 | + wf_led_pins: wf-led-pins { |
| 230 | + mux { |
| 231 | + function = "led"; |
| 232 | + groups = "wf2g_led1", "wf5g_led1"; |
| 233 | + }; |
| 234 | + }; |
| 235 | +}; |
| 236 | + |
| 237 | +&uart0 { |
| 238 | + status = "okay"; |
| 239 | +}; |
| 240 | + |
| 241 | +&watchdog { |
| 242 | + status = "okay"; |
| 243 | +}; |
| 244 | + |
| 245 | +&wifi { |
| 246 | + status = "okay"; |
| 247 | + pinctrl-0 = <&wifi_dbdc_pins>, <&wf_led_pins>; |
| 248 | + nvmem-cells = <&macaddr_art_6>; |
| 249 | + nvmem-cell-names = "mac-address"; |
| 250 | + mediatek,mtd-eeprom = <&factory 0x0>; |
| 251 | + |
| 252 | + led { |
| 253 | + led-active-low; |
| 254 | + }; |
| 255 | +}; |
0 commit comments