ramips: w2914ns-v2: consolidate leds nodes into dtsi
[openwrt/staging/981213.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 &gmac0 {
112 nvmem-cells = <&macaddr_factory_e000>;
113 nvmem-cell-names = "mac-address";
114 };
115
116 &switch0 {
117 ports {
118 port@0 {
119 status = "okay";
120 label = "lan4";
121 };
122
123 port@1 {
124 status = "okay";
125 label = "lan3";
126 };
127
128 port@2 {
129 status = "okay";
130 label = "lan2";
131 };
132
133 port@3 {
134 status = "okay";
135 label = "lan1";
136 };
137 wan: port@4 {
138 status = "okay";
139 label = "wan";
140 nvmem-cells = <&macaddr_factory_2e>;
141 nvmem-cell-names = "mac-address";
142 };
143 };
144 };
145
146 &state_default {
147 gpio {
148 groups = "wdt", "rgmii2";
149 function = "gpio";
150 };
151 };
152
153 &factory {
154 compatible = "nvmem-cells";
155 #address-cells = <1>;
156 #size-cells = <1>;
157
158 macaddr_factory_2e: macaddr@2e {
159 reg = <0x2e 0x6>;
160 };
161
162 macaddr_factory_e000: macaddr@e000 {
163 reg = <0xe000 0x6>;
164 };
165 };