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