795fe256b3c3c8ec49c89a23cf655814cca30496
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_buffalo_wsr-1166dhp.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "buffalo,wsr-1166dhp", "mediatek,mt7621-soc";
8 model = "Buffalo WSR-1166DHP";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 internet_g {
21 label = "green:internet";
22 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
23 };
24
25 router_g {
26 label = "green:router";
27 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
28 };
29
30 router_o {
31 label = "orange:router";
32 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
33 };
34
35 internet_o {
36 label = "orange:internet";
37 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
38 };
39
40 wifi_o {
41 label = "orange:wifi";
42 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
43 };
44
45 led_power: power {
46 label = "green:power";
47 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
48 };
49
50 diag {
51 label = "orange:diag";
52 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
53 };
54
55 wifi_g {
56 label = "green:wifi";
57 gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 keys {
62 compatible = "gpio-keys";
63
64 power {
65 label = "power";
66 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
67 linux,code = <KEY_POWER>;
68 };
69
70 reset {
71 label = "reset";
72 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
73 linux,code = <KEY_RESTART>;
74 };
75
76 aoss {
77 label = "aoss";
78 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
79 linux,code = <KEY_WPS_BUTTON>;
80 };
81
82 auto {
83 label = "mode";
84 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
85 linux,code = <BTN_0>;
86 linux,input-type = <EV_SW>;
87 };
88
89 ap {
90 label = "ap";
91 gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
92 linux,code = <BTN_0>;
93 linux,input-type = <EV_SW>;
94 };
95
96 router {
97 label = "router";
98 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
99 linux,code = <BTN_0>;
100 linux,input-type = <EV_SW>;
101 };
102 };
103
104 gpio_poweroff {
105 compatible = "gpio-poweroff";
106 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
107 };
108 };
109
110 &spi0 {
111 status = "okay";
112
113 flash@0 {
114 compatible = "jedec,spi-nor";
115 reg = <0>;
116 spi-max-frequency = <10000000>;
117
118 partitions {
119 compatible = "fixed-partitions";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 partition@0 {
124 label = "u-boot";
125 reg = <0x0 0x30000>;
126 read-only;
127 };
128
129 partition@30000 {
130 label = "u-boot-env";
131 reg = <0x30000 0x10000>;
132 read-only;
133 };
134
135 factory: partition@40000 {
136 compatible = "nvmem-cells";
137 label = "factory";
138 reg = <0x40000 0x10000>;
139 #address-cells = <1>;
140 #size-cells = <1>;
141 read-only;
142
143 eeprom_factory_0: eeprom@0 {
144 reg = <0x0 0x400>;
145 };
146
147 eeprom_factory_8000: eeprom@8000 {
148 reg = <0x8000 0x200>;
149 };
150 };
151
152 partition@50000 {
153 compatible = "openwrt,trx";
154 label = "firmware";
155 reg = <0x50000 0xf90000>;
156 };
157
158 partition@fe0000 {
159 label = "board_data";
160 reg = <0xfe0000 0x20000>;
161 };
162 };
163 };
164 };
165
166 &gmac1 {
167 status = "okay";
168 label = "wan";
169 phy-handle = <&ethphy4>;
170 };
171
172 &mdio {
173 ethphy4: ethernet-phy@4 {
174 reg = <4>;
175 };
176 };
177
178 &switch0 {
179 ports {
180 port@0 {
181 status = "okay";
182 label = "lan1";
183 };
184
185 port@1 {
186 status = "okay";
187 label = "lan2";
188 };
189
190 port@2 {
191 status = "okay";
192 label = "lan3";
193 };
194
195 port@3 {
196 status = "okay";
197 label = "lan4";
198 };
199 };
200 };
201
202 &state_default {
203 gpio {
204 groups = "i2c", "uart2", "uart3", "sdhci";
205 function = "gpio";
206 };
207 };
208
209 &pcie {
210 status = "okay";
211 };
212
213 &pcie0 {
214 mt76@0,0 {
215 reg = <0x0000 0 0 0 0>;
216 nvmem-cells = <&eeprom_factory_8000>;
217 nvmem-cell-names = "eeprom";
218 ieee80211-freq-limit = <5000000 6000000>;
219 };
220 };
221
222 &pcie1 {
223 mt76@0,0 {
224 reg = <0x0000 0 0 0 0>;
225 nvmem-cells = <&eeprom_factory_0>;
226 nvmem-cell-names = "eeprom";
227 };
228 };
229
230 &xhci {
231 status = "disabled";
232 };