29f111b572d9a6e3f364975e15ba7c623bfd8ba8
[openwrt/staging/nbd.git] / target / linux / ramips / dts / mt7621_netis_wf2881.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "netis,wf2881", "mediatek,mt7621-soc";
8 model = "NETIS WF2881";
9
10 aliases {
11 led-boot = &led_wps;
12 led-failsafe = &led_wps;
13 led-running = &led_wps;
14 led-upgrade = &led_wps;
15 label-mac-device = &gmac0;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 usb {
22 label = "green:usb";
23 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
24 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
25 linux,default-trigger = "usbport";
26 };
27
28 led_wps: wps {
29 label = "green:wps";
30 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys";
36
37 reset {
38 label = "reset";
39 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42 };
43 };
44
45 &nand {
46 status = "okay";
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 0x80000>;
56 read-only;
57 };
58
59 partition@80000 {
60 label = "config";
61 reg = <0x80000 0x80000>;
62 read-only;
63 };
64
65 factory: partition@100000 {
66 compatible = "nvmem-cells";
67 label = "factory";
68 reg = <0x100000 0x40000>;
69 #address-cells = <1>;
70 #size-cells = <1>;
71 read-only;
72
73 eeprom_factory_0: eeprom@0 {
74 reg = <0x0 0x200>;
75 };
76
77 eeprom_factory_8000: eeprom@8000 {
78 reg = <0x8000 0x200>;
79 };
80
81 macaddr_factory_e000: macaddr@e000 {
82 reg = <0xe000 0x6>;
83 };
84
85 macaddr_factory_e006: macaddr@e006 {
86 reg = <0xe006 0x6>;
87 };
88 };
89
90 partition@140000 {
91 label = "firmware";
92 reg = <0x140000 0x7e40000>;
93
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "kernel";
100 reg = <0x0 0x400000>;
101 };
102
103 partition@400000 {
104 label = "ubi";
105 reg = <0x400000 0x7a40000>;
106 };
107 };
108 };
109 };
110
111 &pcie {
112 status = "okay";
113 };
114
115 &pcie0 {
116 wifi@0,0 {
117 compatible = "mediatek,mt76";
118 reg = <0x0000 0 0 0 0>;
119 nvmem-cells = <&eeprom_factory_8000>;
120 nvmem-cell-names = "eeprom";
121 ieee80211-freq-limit = <5000000 6000000>;
122
123 led {
124 led-sources = <2>;
125 led-active-low;
126 };
127 };
128 };
129
130 &pcie1 {
131 wifi@0,0 {
132 compatible = "mediatek,mt76";
133 reg = <0x0000 0 0 0 0>;
134 nvmem-cells = <&eeprom_factory_0>;
135 nvmem-cell-names = "eeprom";
136 ieee80211-freq-limit = <2400000 2500000>;
137
138 led {
139 led-sources = <2>;
140 led-active-low;
141 };
142 };
143 };
144
145 &gmac0 {
146 nvmem-cells = <&macaddr_factory_e000>;
147 nvmem-cell-names = "mac-address";
148 };
149
150 &gmac1 {
151 status = "okay";
152 label = "wan";
153 phy-handle = <&ethphy4>;
154
155 nvmem-cells = <&macaddr_factory_e006>;
156 nvmem-cell-names = "mac-address";
157 };
158
159 &mdio {
160 ethphy4: ethernet-phy@4 {
161 reg = <4>;
162 };
163 };
164
165 &switch0 {
166 ports {
167 port@0 {
168 status = "okay";
169 label = "lan4";
170 };
171
172 port@1 {
173 status = "okay";
174 label = "lan3";
175 };
176
177 port@2 {
178 status = "okay";
179 label = "lan2";
180 };
181
182 port@3 {
183 status = "okay";
184 label = "lan1";
185 };
186 };
187 };
188
189 &state_default {
190 gpio {
191 groups = "uart3", "uart2";
192 function = "gpio";
193 };
194 };