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