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