ramips: cf-ew72-v2: Add support for COMFAST CF-EW72 V2
[openwrt/openwrt.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 label = "factory";
67 reg = <0x100000 0x40000>;
68 read-only;
69 };
70
71 partition@140000 {
72 label = "firmware";
73 reg = <0x140000 0x7e40000>;
74
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "kernel";
81 reg = <0x0 0x400000>;
82 };
83
84 partition@400000 {
85 label = "ubi";
86 reg = <0x400000 0x7a40000>;
87 };
88 };
89 };
90 };
91
92 &pcie {
93 status = "okay";
94 };
95
96 &pcie0 {
97 wifi@0,0 {
98 compatible = "mediatek,mt76";
99 reg = <0x0000 0 0 0 0>;
100 mediatek,mtd-eeprom = <&factory 0x8000>;
101 ieee80211-freq-limit = <5000000 6000000>;
102
103 led {
104 led-sources = <2>;
105 led-active-low;
106 };
107 };
108 };
109
110 &pcie1 {
111 wifi@0,0 {
112 compatible = "mediatek,mt76";
113 reg = <0x0000 0 0 0 0>;
114 mediatek,mtd-eeprom = <&factory 0x0000>;
115 ieee80211-freq-limit = <2400000 2500000>;
116
117 led {
118 led-sources = <2>;
119 led-active-low;
120 };
121 };
122 };
123
124 &gmac0 {
125 nvmem-cells = <&macaddr_factory_e000>;
126 nvmem-cell-names = "mac-address";
127 };
128
129 &gmac1 {
130 status = "okay";
131 label = "wan";
132 phy-handle = <&ethphy4>;
133
134 nvmem-cells = <&macaddr_factory_e006>;
135 nvmem-cell-names = "mac-address";
136 };
137
138 &mdio {
139 ethphy4: ethernet-phy@4 {
140 reg = <4>;
141 };
142 };
143
144 &switch0 {
145 ports {
146 port@0 {
147 status = "okay";
148 label = "lan4";
149 };
150
151 port@1 {
152 status = "okay";
153 label = "lan3";
154 };
155
156 port@2 {
157 status = "okay";
158 label = "lan2";
159 };
160
161 port@3 {
162 status = "okay";
163 label = "lan1";
164 };
165 };
166 };
167
168 &state_default {
169 gpio {
170 groups = "uart3", "uart2";
171 function = "gpio";
172 };
173 };
174
175 &factory {
176 compatible = "nvmem-cells";
177 #address-cells = <1>;
178 #size-cells = <1>;
179
180 macaddr_factory_e000: macaddr@e000 {
181 reg = <0xe000 0x6>;
182 };
183
184 macaddr_factory_e006: macaddr@e006 {
185 reg = <0xe006 0x6>;
186 };
187 };