89415fc605bde74b4e94b263556951a2b38dcb72
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / WSR-1166.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "buffalo,wsr-1166dhp", "mediatek,mt7621-soc";
10 model = "Buffalo WSR-1166DHP";
11
12 memory@0 {
13 device_type = "memory";
14 reg = <0x0 0x8000000>;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,57600";
19 };
20
21 gpio-leds {
22 compatible = "gpio-leds";
23
24 internet_g {
25 label = "wsr-1166:green:internet";
26 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
27 };
28
29 router_g {
30 label = "wsr-1166:green:router";
31 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
32 };
33
34 router_o {
35 label = "wsr-1166:orange:router";
36 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
37 };
38
39 internet_o {
40 label = "wsr-1166:orange:internet";
41 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
42 };
43
44 wifi_o {
45 label = "wsr-1166:orange:wifi";
46 gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
47 };
48
49 power {
50 label = "wsr-1166:green:power";
51 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
52 };
53
54 diag {
55 label = "wsr-1166:orange:diag";
56 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
57 };
58
59 wifi_g {
60 label = "wsr-1166:green:wifi";
61 gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
62 };
63 };
64
65 gpio-keys-polled {
66 compatible = "gpio-keys-polled";
67 #address-cells = <1>;
68 #size-cells = <0>;
69 poll-interval = <20>;
70
71 power {
72 label = "power";
73 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_POWER>;
75 };
76
77 reset {
78 label = "reset";
79 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
80 linux,code = <KEY_RESTART>;
81 };
82
83 aoss {
84 label = "aoss";
85 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
86 linux,code = <KEY_WPS_BUTTON>;
87 };
88
89 auto {
90 label = "mode";
91 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
92 linux,code = <BTN_0>;
93 linux,input-type = <EV_SW>;
94 };
95
96 ap {
97 label = "ap";
98 gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
99 linux,code = <BTN_0>;
100 linux,input-type = <EV_SW>;
101 };
102
103 router {
104 label = "router";
105 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
106 linux,code = <BTN_0>;
107 linux,input-type = <EV_SW>;
108 };
109 };
110
111 gpio_poweroff {
112 compatible = "gpio-poweroff";
113 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
114 };
115 };
116
117 &spi0 {
118 status = "okay";
119
120 m25p80@0 {
121 #address-cells = <1>;
122 #size-cells = <1>;
123 compatible = "jedec,spi-nor";
124 reg = <0>;
125 spi-max-frequency = <10000000>;
126 m25p,chunked-io = <32>;
127
128 partition@0 {
129 label = "u-boot";
130 reg = <0x0 0x30000>;
131 read-only;
132 };
133
134 partition@30000 {
135 label = "u-boot-env";
136 reg = <0x30000 0x10000>;
137 read-only;
138 };
139
140 factory: partition@40000 {
141 label = "factory";
142 reg = <0x40000 0x10000>;
143 read-only;
144 };
145
146 partition@50000 {
147 label = "firmware";
148 reg = <0x50000 0xf90000>;
149 };
150
151 partition@fe0000 {
152 label = "board_data";
153 reg = <0xfe0000 0x20000>;
154 };
155 };
156 };
157
158 &pinctrl {
159 state_default: pinctrl0 {
160 gpio {
161 ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
162 ralink,function = "gpio";
163 };
164 };
165 };
166
167 &pcie {
168 status = "okay";
169
170 pcie0 {
171 mt76@0,0 {
172 mediatek,mtd-eeprom = <&factory 0x8000>;
173 ieee80211-freq-limit = <5000000 6000000>;
174 };
175 };
176
177 pcie1 {
178 mt76@1,0 {
179 mediatek,mtd-eeprom = <&factory 0x0000>;
180 };
181 };
182 };
183
184 &xhci {
185 status = "disabled";
186 };