ramips: replace "mac-address-ascii" with "mac-base"
[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 label = "factory";
67 reg = <0x40000 0x10000>;
68 read-only;
69 };
70
71 partition@50000 {
72 compatible = "denx,uimage";
73 label = "firmware";
74 reg = <0x50000 0xfb0000>;
75 };
76 };
77 };
78 };
79
80 &pcie {
81 status = "okay";
82 };
83
84 &pcie0 {
85 wifi@0,0 {
86 compatible = "mediatek,mt76";
87 reg = <0x0000 0 0 0 0>;
88 mediatek,mtd-eeprom = <&factory 0x0>;
89
90 led {
91 led-sources = <0>;
92 led-active-low;
93 };
94 };
95 };
96
97 &pcie1 {
98 wifi@0,0 {
99 compatible = "mediatek,mt76";
100 reg = <0x0000 0 0 0 0>;
101 mediatek,mtd-eeprom = <&factory 0x8000>;
102 ieee80211-freq-limit = <5000000 6000000>;
103
104 led {
105 led-sources = <2>;
106 led-active-low;
107 };
108 };
109 };
110
111 &ethernet {
112 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
113 };
114
115 &gmac0 {
116 nvmem-cells = <&macaddr_factory_e000>;
117 nvmem-cell-names = "mac-address";
118 };
119
120 &switch0 {
121 ports {
122 port@0 {
123 status = "okay";
124 label = "lan4";
125 };
126
127 port@1 {
128 status = "okay";
129 label = "lan3";
130 };
131
132 port@2 {
133 status = "okay";
134 label = "lan2";
135 };
136
137 port@3 {
138 status = "okay";
139 label = "lan1";
140 };
141 wan: port@4 {
142 status = "okay";
143 label = "wan";
144 nvmem-cells = <&macaddr_factory_2e>;
145 nvmem-cell-names = "mac-address";
146 };
147 };
148 };
149
150 &state_default {
151 gpio {
152 groups = "wdt", "rgmii2";
153 function = "gpio";
154 };
155 };
156
157 &factory {
158 compatible = "nvmem-cells";
159 #address-cells = <1>;
160 #size-cells = <1>;
161
162 macaddr_factory_2e: macaddr@2e {
163 reg = <0x2e 0x6>;
164 };
165
166 macaddr_factory_e000: macaddr@e000 {
167 reg = <0xe000 0x6>;
168 };
169 };