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