ramips: mt7621: nix mac-address-increment
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_tplink_eap235-wall-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
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 compatible = "tplink,eap235-wall-v1", "mediatek,mt7621-soc";
11 model = "TP-Link EAP235-Wall v1";
12
13 aliases {
14 label-mac-device = &gmac0;
15 led-boot = &led_status;
16 led-failsafe = &led_status;
17 led-running = &led_status;
18 led-upgrade = &led_status;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_status: status {
25 label = "white:status";
26 color = <LED_COLOR_ID_WHITE>;
27 function = LED_FUNCTION_STATUS;
28 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
29 };
30 };
31
32 keys {
33 compatible = "gpio-keys";
34
35 led {
36 label = "led";
37 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_LIGHTS_TOGGLE>;
39 };
40
41 reset {
42 label = "reset";
43 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46 };
47
48 gpio-export {
49 compatible = "gpio-export";
50
51 poe_passthrough {
52 gpio-export,name = "poe-passthrough";
53 gpio-export,output = <0>;
54 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
55 };
56 };
57 };
58
59 &spi0 {
60 status = "okay";
61
62 flash@0 {
63 compatible = "jedec,spi-nor";
64 reg = <0>;
65 spi-max-frequency = <20000000>;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "u-boot";
74 reg = <0x00000 0x80000>;
75 read-only;
76 };
77
78 partition@80000 {
79 label = "partition-table";
80 reg = <0x80000 0x10000>;
81 read-only;
82 };
83
84 info: partition@90000 {
85 label = "product-info";
86 reg = <0x90000 0x10000>;
87 read-only;
88
89 nvmem-layout {
90 compatible = "fixed-layout";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 macaddr_info_8: macaddr@8 {
95 compatible = "mac-base";
96 reg = <0x8 0x6>;
97 #nvmem-cell-cells = <1>;
98 };
99 };
100 };
101
102 partition@a0000 {
103 compatible = "tplink,firmware";
104 label = "firmware";
105 reg = <0x0a0000 0xd20000>;
106 };
107
108 partition@dc0000 {
109 label = "user-config";
110 reg = <0xdc0000 0x030000>;
111 read-only;
112 };
113
114 /* 0xdf0000 - 0xf30000 unused */
115
116 partition@f30000 {
117 label = "mutil-log";
118 reg = <0xf30000 0x080000>;
119 read-only;
120 };
121
122 partition@fb0000 {
123 label = "oops";
124 reg = <0xfb0000 0x040000>;
125 read-only;
126 };
127
128 radio: partition@ff0000 {
129 label = "radio";
130 reg = <0xff0000 0x010000>;
131 read-only;
132
133 nvmem-layout {
134 compatible = "fixed-layout";
135 #address-cells = <1>;
136 #size-cells = <1>;
137
138 eeprom_radio_0: eeprom@0 {
139 reg = <0x0 0x400>;
140 };
141
142 eeprom_radio_8000: eeprom@8000 {
143 reg = <0x8000 0x4da8>;
144 };
145 };
146 };
147 };
148 };
149 };
150
151 &state_default {
152 gpio {
153 groups = "uart2", "uart3";
154 function = "gpio";
155 };
156 };
157
158 &pcie {
159 status = "okay";
160 };
161
162 &pcie0 {
163 wifi@0,0 {
164 reg = <0x0000 0 0 0 0>;
165 nvmem-cells = <&eeprom_radio_0>, <&macaddr_info_8 0>;
166 nvmem-cell-names = "eeprom", "mac-address";
167 };
168 };
169
170 &pcie1 {
171 wifi@0,0 {
172 reg = <0x0000 0 0 0 0>;
173 ieee80211-freq-limit = <5000000 6000000>;
174 nvmem-cells = <&eeprom_radio_8000>, <&macaddr_info_8 1>;
175 nvmem-cell-names = "eeprom", "mac-address";
176 };
177 };
178
179 &gmac0 {
180 nvmem-cells = <&macaddr_info_8 0>;
181 nvmem-cell-names = "mac-address";
182 };
183
184 &gmac1 {
185 status = "okay";
186 label = "lan0";
187 phy-handle = <&ethphy0>;
188
189 nvmem-cells = <&macaddr_info_8 0>;
190 nvmem-cell-names = "mac-address";
191 };
192
193 &mdio {
194 ethphy0: ethernet-phy@0 {
195 reg = <0>;
196 };
197 };
198
199 &switch0 {
200 ports {
201 port@1 {
202 status = "okay";
203 label = "lan3";
204 };
205
206 port@2 {
207 status = "okay";
208 label = "lan2";
209 };
210
211 port@3 {
212 status = "okay";
213 label = "lan1";
214 };
215 };
216 };