ramips: mt7621: nix mac-address-increment
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_tplink_archer-x6-v3.dtsi
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 aliases {
11 label-mac-device = &gmac0;
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200n8";
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 button-wps {
26 label = "wps";
27 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
28 debounce-interval = <60>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31
32 button-reset {
33 label = "reset";
34 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
35 debounce-interval = <60>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_power: led-power {
44 label = "green:power";
45 color = <LED_COLOR_ID_GREEN>;
46 function = LED_FUNCTION_POWER;
47 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
48 };
49
50 led-wan-amber {
51 color = <LED_COLOR_ID_AMBER>;
52 function = LED_FUNCTION_WAN;
53 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
54 };
55
56 led-lan {
57 color = <LED_COLOR_ID_GREEN>;
58 function = LED_FUNCTION_LAN;
59 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
60 };
61
62 led-wifi5g {
63 color = <LED_COLOR_ID_GREEN>;
64 function = LED_FUNCTION_WLAN;
65 function-enumerator = <5>;
66 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
67 linux,default-trigger = "phy1tpt";
68 };
69
70 led-wifi2g {
71 color = <LED_COLOR_ID_GREEN>;
72 function = LED_FUNCTION_WLAN;
73 function-enumerator = <2>;
74 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
75 linux,default-trigger = "phy0tpt";
76 };
77
78 led-wan-green {
79 color = <LED_COLOR_ID_GREEN>;
80 function = LED_FUNCTION_WAN;
81 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
82 };
83 };
84 };
85
86 &spi0 {
87 status = "okay";
88
89 flash@0 {
90 compatible = "jedec,spi-nor";
91 reg = <0>;
92 spi-max-frequency = <40000000>;
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "u-boot";
101 reg = <0x0 0x40000>;
102 read-only;
103 };
104
105 partition@40000 {
106 label = "firmware";
107 compatible = "denx,uimage";
108 reg = <0x40000 0xf60000>;
109 };
110
111 config: partition@fa0000 {
112 label = "config";
113 reg = <0xfa0000 0x50000>;
114 read-only;
115
116 nvmem-layout {
117 compatible = "fixed-layout";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 macaddr_config_8: macaddr@8 {
122 compatible = "mac-base";
123 reg = <0x8 0x6>;
124 #nvmem-cell-cells = <1>;
125 };
126 };
127 };
128
129 radio: partition@ff0000 {
130 label = "radio";
131 reg = <0xff0000 0x10000>;
132 read-only;
133
134 nvmem-layout {
135 compatible = "fixed-layout";
136 #address-cells = <1>;
137 #size-cells = <1>;
138
139 eeprom_radio_0: eeprom@0 {
140 reg = <0x0 0x400>;
141 };
142
143 eeprom_radio_8000: eeprom@8000 {
144 reg = <0x8000 0x4da8>;
145 };
146 };
147 };
148 };
149 };
150 };
151
152 &state_default {
153 gpio {
154 groups = "i2c", "rgmii2", "uart2", "uart3", "jtag", "wdt";
155 function = "gpio";
156 };
157 };
158
159 &pcie {
160 status = "okay";
161 };
162
163 &pcie0 {
164 wifi@0,0 {
165 compatible = "mediatek,mt76";
166 reg = <0x0000 0 0 0 0>;
167 nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8 1>;
168 nvmem-cell-names = "eeprom", "mac-address";
169 ieee80211-freq-limit = <2400000 2500000>;
170 };
171 };
172
173 &pcie1 {
174 wifi@0,0 {
175 compatible = "mediatek,mt76";
176 reg = <0x0000 0 0 0 0>;
177 nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_8 2>;
178 nvmem-cell-names = "eeprom", "mac-address";
179 ieee80211-freq-limit = <5000000 6000000>;
180 };
181 };
182
183 &ethernet {
184 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
185 };
186
187 &gmac0 {
188 nvmem-cells = <&macaddr_config_8 0>;
189 nvmem-cell-names = "mac-address";
190 };
191
192 &switch0 {
193 ports {
194 port@0 {
195 status = "okay";
196 label = "wan";
197 };
198
199 port@1 {
200 status = "okay";
201 label = "lan1";
202 };
203
204 port@2 {
205 status = "okay";
206 label = "lan2";
207 };
208
209 port@3 {
210 status = "okay";
211 label = "lan3";
212 };
213
214 port@4 {
215 status = "okay";
216 label = "lan4";
217 };
218 };
219 };