mediatek: add support for Ubiquiti UniFi 6 LR
[openwrt/openwrt.git] / target / linux / mediatek / files-5.4 / arch / arm64 / boot / dts / mediatek / mt7622-ubnt-unifi-6-lr.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/leds/common.h>
7
8 #include "mt7622.dtsi"
9 #include "mt6380.dtsi"
10
11 / {
12 model = "Ubiquiti UniFi 6 LR";
13 compatible = "ubnt,unifi-6-lr", "mediatek,mt7622";
14
15 aliases {
16 led-boot = &led_blue;
17 led-failsafe = &led_blue;
18 led-running = &led_blue;
19 led-upgrade = &led_blue;
20 label-mac-device = &gmac0;
21 serial0 = &uart0;
22 };
23
24 chosen {
25 stdout-path = "serial0:115200n8";
26 bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512 console=ttyS0,115200n8";
27 };
28
29 cpus {
30 cpu@0 {
31 proc-supply = <&mt6380_vcpu_reg>;
32 sram-supply = <&mt6380_vm_reg>;
33 };
34
35 cpu@1 {
36 proc-supply = <&mt6380_vcpu_reg>;
37 sram-supply = <&mt6380_vm_reg>;
38 };
39 };
40
41 gpio-keys {
42 compatible = "gpio-keys";
43
44 reset {
45 label = "reset";
46 linux,code = <KEY_RESTART>;
47 gpios = <&pio 62 GPIO_ACTIVE_LOW>;
48 };
49 };
50
51 memory {
52 reg = <0 0x40000000 0 0x3f000000>;
53 };
54
55 reg_1p8v: regulator-1p8v {
56 compatible = "regulator-fixed";
57 regulator-name = "fixed-1.8V";
58 regulator-min-microvolt = <1800000>;
59 regulator-max-microvolt = <1800000>;
60 regulator-always-on;
61 };
62
63 reg_3p3v: regulator-3p3v {
64 compatible = "regulator-fixed";
65 regulator-name = "fixed-3.3V";
66 regulator-min-microvolt = <3300000>;
67 regulator-max-microvolt = <3300000>;
68 regulator-boot-on;
69 regulator-always-on;
70 };
71 };
72
73 &pcie0 {
74 pinctrl-names = "default";
75 pinctrl-0 = <&pcie0_pins>;
76 status = "okay";
77 };
78
79 &slot0 {
80 wifi@0,0 {
81 reg = <0x0 0 0 0 0>;
82 mediatek,mtd-eeprom = <&factory 0x20000>;
83 mtd-mac-address = <&eeprom 0x6>;
84 ieee80211-freq-limit = <5000000 6000000>;
85 };
86 };
87
88 &pio {
89 eth_pins: eth-pins {
90 mux {
91 function = "eth";
92 groups = "mdc_mdio", "rgmii_via_gmac2";
93 };
94 };
95
96 pcie0_pins: pcie0-pins {
97 mux {
98 function = "pcie";
99 groups = "pcie0_pad_perst",
100 "pcie0_1_waken",
101 "pcie0_1_clkreq";
102 };
103 };
104
105 pcie1_pins: pcie1-pins {
106 mux {
107 function = "pcie";
108 groups = "pcie1_pad_perst",
109 "pcie1_0_waken",
110 "pcie1_0_clkreq";
111 };
112 };
113
114 pmic_bus_pins: pmic-bus-pins {
115 mux {
116 function = "pmic";
117 groups = "pmic_bus";
118 };
119 };
120
121 spi_nor_pins: spi-nor-pins {
122 mux {
123 function = "flash";
124 groups = "spi_nor";
125 };
126 };
127
128 uart0_pins: uart0-pins {
129 mux {
130 function = "uart";
131 groups = "uart0_0_tx_rx" ;
132 };
133 };
134
135 uart3_pins: uart3-pins {
136 mux {
137 function = "uart";
138 groups = "uart3_1_tx_rx" ;
139 };
140 };
141
142 i2c0_pins: i2c0-pins {
143 mux {
144 function = "i2c";
145 groups = "i2c0";
146 };
147 };
148
149 watchdog_pins: watchdog-pins {
150 mux {
151 function = "watchdog";
152 groups = "watchdog";
153 };
154 };
155 };
156
157 &bch {
158 status = "okay";
159 };
160
161 &btif {
162 status = "disabled";
163 };
164
165 &eth {
166 status = "okay";
167 pinctrl-names = "default";
168 pinctrl-0 = <&eth_pins>;
169
170 gmac0: mac@0 {
171 compatible = "mediatek,eth-mac";
172 reg = <0>;
173
174 phy-mode = "2500base-x";
175 mtd-mac-address = <&eeprom 0x0>;
176
177 fixed-link {
178 speed = <2500>;
179 full-duplex;
180 };
181 };
182
183 mdio: mdio-bus {
184 #address-cells = <1>;
185 #size-cells = <0>;
186
187 ethernet-phy@8 {
188 /* Marvell AQRate AQR112W - no driver */
189 compatible = "ethernet-phy-ieee802.3-c45";
190 reg = <0x8>;
191 };
192 };
193 };
194
195 &pwrap {
196 pinctrl-names = "default";
197 pinctrl-0 = <&pmic_bus_pins>;
198
199 status = "okay";
200 };
201
202 &nor_flash {
203 pinctrl-names = "default";
204 pinctrl-0 = <&spi_nor_pins>;
205
206 status = "okay";
207
208 flash@0 {
209 compatible = "jedec,spi-nor";
210 reg = <0>;
211 spi-max-frequency = <50000000>;
212
213 partitions {
214 compatible = "fixed-partitions";
215 #address-cells = <1>;
216 #size-cells = <1>;
217
218 partition@0 {
219 label = "preloader";
220 reg = <0x0 0x40000>;
221 read-only;
222 };
223
224 partition@40000 {
225 label = "atf";
226 reg = <0x40000 0x20000>;
227 read-only;
228 };
229
230 partition@60000 {
231 label = "u-boot";
232 reg = <0x60000 0x60000>;
233 read-only;
234 };
235
236 partition@c0000 {
237 label = "u-boot-env";
238 reg = <0xc0000 0x10000>;
239 };
240
241 factory: partition@d0000 {
242 label = "factory";
243 reg = <0xd0000 0x40000>;
244 read-only;
245 };
246
247 eeprom: partition@110000 {
248 label = "eeprom";
249 reg = <0x110000 0x10000>;
250 read-only;
251 };
252
253 partition@120000 {
254 label = "bs";
255 reg = <0x120000 0x10000>;
256 };
257
258 partition@130000 {
259 label = "cfg";
260 reg = <0x130000 0x100000>;
261 read-only;
262 };
263
264 partition@230000 {
265 compatible = "denx,fit";
266 label = "firmware";
267 reg = <0x230000 0x1ee0000>;
268 };
269
270 partition@2110000 {
271 label = "kernel1";
272 reg = <0x2110000 0x1ee0000>;
273 };
274 };
275 };
276 };
277
278 &uart0 {
279 pinctrl-names = "default";
280 pinctrl-0 = <&uart0_pins>;
281 status = "okay";
282 };
283
284 &uart3 {
285 pinctrl-names = "default";
286 pinctrl-0 = <&uart3_pins>;
287 status = "okay";
288
289 /* MT7915 Bluetooth */
290 };
291
292 &i2c0 {
293 pinctrl-names = "default";
294 pinctrl-0 = <&i2c0_pins>;
295 status = "okay";
296
297 led-controller@30 {
298 compatible = "ubnt,ledbar";
299 reg = <0x30>;
300
301 enable-gpio = <&pio 59 0>;
302
303 red {
304 label = "red";
305 };
306
307 green {
308 label = "green";
309 };
310
311 led_blue: blue {
312 label = "blue";
313 };
314 };
315 };
316
317 &watchdog {
318 pinctrl-names = "default";
319 pinctrl-0 = <&watchdog_pins>;
320 status = "okay";
321 };
322
323 &wmac {
324 mediatek,mtd-eeprom = <&factory 0x0>;
325 mtd-mac-address = <&eeprom 0x0>;
326 status = "okay";
327 };