ramips: fix and clean up D-Link MAC address
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_wavlink_ws-wn572hp3-4g.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "wavlink,ws-wn572hp3-4g", "mediatek,mt7621-soc";
11 model = "Wavlink WS-WN572HP3 4G";
12
13 chosen {
14 bootargs = "console=ttyS0,115200";
15 };
16
17 aliases {
18 label-mac-device = &wifi1;
19 led-boot = &led_status_blue;
20 led-failsafe = &led_status_blue;
21 led-running = &led_status_blue;
22 led-upgrade = &led_status_blue;
23 };
24
25 keys {
26 compatible = "gpio-keys";
27
28 reset {
29 label = "Reset Button";
30 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 rssihigh {
39 label = "blue:rssihigh";
40 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
41 };
42
43 rssimedium {
44 label = "blue:rssimedium";
45 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
46 };
47
48 rssilow {
49 label = "blue:rssilow";
50 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
51 };
52
53 led_status_blue: status_blue {
54 function = LED_FUNCTION_STATUS;
55 color = <LED_COLOR_ID_BLUE>;
56 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
57 };
58
59 // gpio 15 would be Quectels PWRKEY if used
60 };
61 };
62
63 &spi0 {
64 status = "okay";
65
66 flash@0 {
67 compatible = "jedec,spi-nor";
68 reg = <0>;
69 spi-max-frequency = <40000000>;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x0 0x30000>;
79 read-only;
80 };
81
82 partition@30000 {
83 label = "config";
84 reg = <0x30000 0x10000>;
85 read-only;
86 };
87
88 partition@40000 {
89 label = "factory";
90 reg = <0x40000 0x10000>;
91 read-only;
92
93 nvmem-layout {
94 compatible = "fixed-layout";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 eeprom_factory_0: eeprom@0 {
99 reg = <0x0 0x400>;
100 };
101
102 eeprom_factory_8000: eeprom@8000 {
103 reg = <0x8000 0x4da8>;
104 };
105
106 macaddr_factory_e000: macaddr@e000 {
107 reg = <0xe000 0x6>;
108 };
109
110 macaddr_factory_e006: macaddr@e006 {
111 reg = <0xe006 0x6>;
112 };
113 };
114 };
115
116 partition@50000 {
117 compatible = "denx,fit";
118 label = "firmware";
119 reg = <0x50000 0xf30000>;
120 };
121
122 partition@f00000 {
123 label = "vendor";
124 reg = <0xf80000 0x80000>;
125 read-only;
126 };
127 };
128 };
129 };
130
131 &pcie {
132 status = "okay";
133 };
134
135 &pcie0 {
136 mt76@0,0 {
137 compatible = "mediatek,mt76";
138 reg = <0x0000 0 0 0 0>;
139 ieee80211-freq-limit = <2400000 2500000>;
140 nvmem-cells = <&eeprom_factory_0>;
141 nvmem-cell-names = "eeprom";
142 };
143 };
144
145 &pcie1 {
146 wifi1: mt76@0,0 {
147 compatible = "mediatek,mt76";
148 reg = <0x0000 0 0 0 0>;
149 ieee80211-freq-limit = <5000000 6000000>;
150 nvmem-cells = <&eeprom_factory_8000>;
151 nvmem-cell-names = "eeprom";
152 };
153 };
154
155 &gmac0 {
156 nvmem-cells = <&macaddr_factory_e000>;
157 nvmem-cell-names = "mac-address";
158 };
159
160 &gmac1 {
161 status = "okay";
162 label = "wan";
163 phy-handle = <&ethphy4>;
164
165 nvmem-cells = <&macaddr_factory_e006>;
166 nvmem-cell-names = "mac-address";
167 };
168
169 &mdio {
170 ethphy4: ethernet-phy@4 {
171 reg = <4>;
172 };
173 };
174
175 &switch0 {
176 ports {
177 port@1 {
178 status = "okay";
179 label = "lan";
180 };
181 };
182 };
183
184 &state_default {
185 gpio {
186 groups = "wdt";
187 function = "gpio";
188 };
189 };