ramips: mt7621: nix mac-address-increment
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_ubnt_unifi-6-lite.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621_ubnt_unifi.dtsi"
4
5 / {
6 compatible = "ubnt,unifi-6-lite", "mediatek,mt7621-soc";
7 model = "Ubiquiti UniFi 6 Lite";
8
9 chosen {
10 bootargs-override = "console=ttyS0,115200";
11 };
12 };
13
14 &spi0 {
15 status = "okay";
16
17 flash@0 {
18 compatible = "jedec,spi-nor";
19 reg = <0>;
20 spi-max-frequency = <50000000>;
21
22 partitions {
23 compatible = "fixed-partitions";
24 #address-cells = <1>;
25 #size-cells = <1>;
26
27 partition@0 {
28 label = "u-boot";
29 reg = <0x0 0x60000>;
30 read-only;
31 };
32
33 partition@60000 {
34 label = "u-boot-env";
35 reg = <0x60000 0x10000>;
36 read-only;
37 };
38
39 factory: partition@70000 {
40 label = "factory";
41 reg = <0x70000 0x40000>;
42 read-only;
43
44 nvmem-layout {
45 compatible = "fixed-layout";
46 #address-cells = <1>;
47 #size-cells = <1>;
48
49 eeprom_factory_0: eeprom@0 {
50 reg = <0x0 0x400>;
51 };
52 };
53 };
54
55 eeprom: partition@b0000 {
56 label = "eeprom";
57 reg = <0xb0000 0x10000>;
58 read-only;
59
60 nvmem-layout {
61 compatible = "fixed-layout";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 macaddr_eeprom_0: macaddr@0 {
66 reg = <0x0 0x6>;
67 };
68
69 macaddr_eeprom_6: macaddr@6 {
70 compatible = "mac-base";
71 reg = <0x6 0x6>;
72 #nvmem-cell-cells = <1>;
73 };
74 };
75 };
76
77 partition@c0000 {
78 label = "bs";
79 reg = <0xc0000 0x10000>;
80 };
81
82 partition@d0000 {
83 label = "cfg";
84 reg = <0xd0000 0x100000>;
85 read-only;
86 };
87
88 partition@1d0000 {
89 compatible = "denx,fit";
90 label = "firmware";
91 reg = <0x1d0000 0xf10000>;
92 };
93
94 partition@10e0000 {
95 label = "kernel1";
96 reg = <0x10e0000 0xf10000>;
97 };
98 };
99 };
100 };
101
102 &gmac0 {
103 nvmem-cells = <&macaddr_eeprom_0>;
104 nvmem-cell-names = "mac-address";
105 };
106
107 &wlan_2g {
108 nvmem-cells = <&eeprom_factory_0>, <&macaddr_eeprom_0>;
109 nvmem-cell-names = "eeprom", "mac-address";
110 };
111
112 &wlan_5g {
113 compatible = "mediatek,mt76";
114
115 mediatek,mtd-eeprom = <&factory 0x20000>;
116
117 /* This is a workaround.
118 *
119 * Ubiquiti uses a +2 offset in the first octet relative
120 * to the 2.4 GHz WMAC. Other octets are identical.
121 *
122 * The vendor firmware increases the last octet by 2 for each
123 * VAP.
124 *
125 * This is in conflict on how mac80211 addresses subsequent VAPs.
126 * mac80211 increases the first octet by two for each VAP, leading
127 * to conflicting MAC addresses for subsequent interfaces.
128 */
129 nvmem-cells = <&macaddr_eeprom_6 1>;
130 nvmem-cell-names = "mac-address";
131
132 ieee80211-freq-limit = <5000000 6000000>;
133
134 mediatek,disable-radar-background;
135 };