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