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