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