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