ramips: convert MT7610 and MT7612 EEPROM to NVMEM format for MT7621
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_wevo_w2914ns-v2.dtsi
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 aliases {
8 label-mac-device = &wan;
9 };
10
11 leds {
12 compatible = "gpio-leds";
13
14 usb {
15 label = "green:usb";
16 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
17 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
18 linux,default-trigger = "usbport";
19 };
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_RESTART>;
29 };
30
31 wps {
32 label = "wps";
33 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_WPS_BUTTON>;
35 };
36 };
37 };
38
39 &spi0 {
40 status = "okay";
41
42 flash@0 {
43 compatible = "jedec,spi-nor";
44 reg = <0>;
45 spi-max-frequency = <80000000>;
46 m25p,fast-read;
47
48 partitions {
49 compatible = "fixed-partitions";
50 #address-cells = <1>;
51 #size-cells = <1>;
52
53 partition@0 {
54 label = "u-boot";
55 reg = <0x0 0x30000>;
56 read-only;
57 };
58
59 partition@30000 {
60 label = "u-boot-env";
61 reg = <0x30000 0x10000>;
62 read-only;
63 };
64
65 factory: partition@40000 {
66 compatible = "nvmem-cells";
67 label = "factory";
68 reg = <0x40000 0x10000>;
69 #address-cells = <1>;
70 #size-cells = <1>;
71 read-only;
72
73 eeprom_factory_0: eeprom@0 {
74 reg = <0x0 0x400>;
75 };
76
77 eeprom_factory_8000: eeprom@8000 {
78 reg = <0x8000 0x200>;
79 };
80
81 macaddr_factory_2e: macaddr@2e {
82 reg = <0x2e 0x6>;
83 };
84
85 macaddr_factory_e000: macaddr@e000 {
86 reg = <0xe000 0x6>;
87 };
88 };
89
90 partition@50000 {
91 compatible = "denx,uimage";
92 label = "firmware";
93 reg = <0x50000 0xfb0000>;
94 };
95 };
96 };
97 };
98
99 &pcie {
100 status = "okay";
101 };
102
103 &pcie0 {
104 wifi@0,0 {
105 compatible = "mediatek,mt76";
106 reg = <0x0000 0 0 0 0>;
107 nvmem-cells = <&eeprom_factory_0>;
108 nvmem-cell-names = "eeprom";
109
110 led {
111 led-sources = <0>;
112 led-active-low;
113 };
114 };
115 };
116
117 &pcie1 {
118 wifi@0,0 {
119 compatible = "mediatek,mt76";
120 reg = <0x0000 0 0 0 0>;
121 nvmem-cells = <&eeprom_factory_8000>;
122 nvmem-cell-names = "eeprom";
123 ieee80211-freq-limit = <5000000 6000000>;
124
125 led {
126 led-sources = <2>;
127 led-active-low;
128 };
129 };
130 };
131
132 &ethernet {
133 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
134 };
135
136 &gmac0 {
137 nvmem-cells = <&macaddr_factory_e000>;
138 nvmem-cell-names = "mac-address";
139 };
140
141 &switch0 {
142 ports {
143 port@0 {
144 status = "okay";
145 label = "lan4";
146 };
147
148 port@1 {
149 status = "okay";
150 label = "lan3";
151 };
152
153 port@2 {
154 status = "okay";
155 label = "lan2";
156 };
157
158 port@3 {
159 status = "okay";
160 label = "lan1";
161 };
162 wan: port@4 {
163 status = "okay";
164 label = "wan";
165 nvmem-cells = <&macaddr_factory_2e>;
166 nvmem-cell-names = "mac-address";
167 };
168 };
169 };
170
171 &state_default {
172 gpio {
173 groups = "wdt", "rgmii2";
174 function = "gpio";
175 };
176 };