- patches.fixes/0001-rt2x00-Remove-incorrect-led-blink.patch:
[opensuse:kernel-source.git] / patches.fixes / 0012-rt2x00-Add-RT5372-chipset-support.patch
1 Subject: [PATCH 12/18] rt2x00:Add RT5372 chipset support
2
3 From: John Li <chen-yang.li@mediatek.com>
4 Git-commit: 2ed7188447fd48336f296ce2dfbd35785768d28c
5 Patch-mainline: v3.4-rc1
6 References: bnc#774902
7
8 Signed-off-by: John Li <chen-yang.li@mediatek.com>
9 Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
10 Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
11 Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 Acked-by: Chen, Chien-Chia <machen@suse.com>
13 ---
14  drivers/net/wireless/rt2x00/rt2800.h    |    1 +
15  drivers/net/wireless/rt2x00/rt2800lib.c |  153 ++++++++++++++++++++++++++-----
16  drivers/net/wireless/rt2x00/rt2800pci.c |    3 +-
17  drivers/net/wireless/rt2x00/rt2800usb.c |   14 +++
18  drivers/net/wireless/rt2x00/rt2x00.h    |    1 +
19  5 files changed, 147 insertions(+), 25 deletions(-)
20
21 diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
22 index 4160c71..39868fc 100644
23 --- a/drivers/net/wireless/rt2x00/rt2800.h
24 +++ b/drivers/net/wireless/rt2x00/rt2800.h
25 @@ -69,6 +69,7 @@
26  #define RF3322                         0x000c
27  #define RF3853                         0x000d
28  #define RF5370                         0x5370
29 +#define RF5372                         0x5372
30  #define RF5390                         0x5390
31  
32  /*
33 diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
34 index 6f04e1e..860dcf3 100644
35 --- a/drivers/net/wireless/rt2x00/rt2800lib.c
36 +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
37 @@ -410,7 +410,8 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev,
38         if (rt2x00_is_pci(rt2x00dev)) {
39                 if (rt2x00_rt(rt2x00dev, RT3290) ||
40                     rt2x00_rt(rt2x00dev, RT3572) ||
41 -                   rt2x00_rt(rt2x00dev, RT5390)) {
42 +                   rt2x00_rt(rt2x00dev, RT5390) ||
43 +                   rt2x00_rt(rt2x00dev, RT5392)) {
44                         rt2800_register_read(rt2x00dev, AUX_CTRL, &reg);
45                         rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
46                         rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
47 @@ -2126,7 +2127,8 @@ static void rt2800_config_channel_rf53xx(struct rt2x00_dev *rt2x00dev,
48                                                    r55_nonbt_rev[idx]);
49                                 rt2800_rfcsr_write(rt2x00dev, 59,
50                                                    r59_nonbt_rev[idx]);
51 -                       } else if (rt2x00_rt(rt2x00dev, RT5390)) {
52 +                       } else if (rt2x00_rt(rt2x00dev, RT5390) ||
53 +                                          rt2x00_rt(rt2x00dev, RT5392)) {
54                                 static const char r59_non_bt[] = {0x8f, 0x8f,
55                                         0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8d,
56                                         0x8a, 0x88, 0x88, 0x87, 0x87, 0x86};
57 @@ -2169,6 +2171,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
58                 rt2800_config_channel_rf3290(rt2x00dev, conf, rf, info);
59                 break;
60         case RF5370:
61 +       case RF5372:
62         case RF5390:
63                 rt2800_config_channel_rf53xx(rt2x00dev, conf, rf, info);
64                 break;
65 @@ -2198,7 +2201,8 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
66         rt2800_bbp_write(rt2x00dev, 86, 0);
67  
68         if (rf->channel <= 14) {
69 -               if (!rt2x00_rt(rt2x00dev, RT5390)) {
70 +               if (!rt2x00_rt(rt2x00dev, RT5390) &&
71 +                       !rt2x00_rt(rt2x00dev, RT5392)) {
72                         if (test_bit(CAPABILITY_EXTERNAL_LNA_BG,
73                                      &rt2x00dev->cap_flags)) {
74                                 rt2800_bbp_write(rt2x00dev, 82, 0x62);
75 @@ -2803,7 +2807,8 @@ static u8 rt2800_get_default_vgc(struct rt2x00_dev *rt2x00dev)
76                     rt2x00_rt(rt2x00dev, RT3090) ||
77                     rt2x00_rt(rt2x00dev, RT3290) ||
78                     rt2x00_rt(rt2x00dev, RT3390) ||
79 -                   rt2x00_rt(rt2x00dev, RT5390))
80 +                   rt2x00_rt(rt2x00dev, RT5390) ||
81 +                   rt2x00_rt(rt2x00dev, RT5392))
82                         return 0x1c + (2 * rt2x00dev->lna_gain);
83                 else
84                         return 0x2e + rt2x00dev->lna_gain;
85 @@ -2982,7 +2987,8 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
86         } else if (rt2x00_rt(rt2x00dev, RT3572)) {
87                 rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000400);
88                 rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
89 -       } else if (rt2x00_rt(rt2x00dev, RT5390)) {
90 +       } else if (rt2x00_rt(rt2x00dev, RT5390) ||
91 +                          rt2x00_rt(rt2x00dev, RT5392)) {
92                 rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
93                 rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
94                 rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
95 @@ -3362,7 +3368,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
96                 return -EACCES;
97  
98         if (rt2x00_rt(rt2x00dev, RT3290) ||
99 -           rt2x00_rt(rt2x00dev, RT5390)) {
100 +           rt2x00_rt(rt2x00dev, RT5390) ||
101 +           rt2x00_rt(rt2x00dev, RT5392)) {
102                 rt2800_bbp_read(rt2x00dev, 4, &value);
103                 rt2x00_set_field8(&value, BBP4_MAC_IF_CTRL, 1);
104                 rt2800_bbp_write(rt2x00dev, 4, value);
105 @@ -3371,21 +3378,24 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
106         if (rt2800_is_305x_soc(rt2x00dev) ||
107             rt2x00_rt(rt2x00dev, RT3290) ||
108             rt2x00_rt(rt2x00dev, RT3572) ||
109 -           rt2x00_rt(rt2x00dev, RT5390))
110 +           rt2x00_rt(rt2x00dev, RT5390) ||
111 +           rt2x00_rt(rt2x00dev, RT5392))
112                 rt2800_bbp_write(rt2x00dev, 31, 0x08);
113  
114         rt2800_bbp_write(rt2x00dev, 65, 0x2c);
115         rt2800_bbp_write(rt2x00dev, 66, 0x38);
116  
117         if (rt2x00_rt(rt2x00dev, RT3290) ||
118 -           rt2x00_rt(rt2x00dev, RT5390))
119 +           rt2x00_rt(rt2x00dev, RT5390) ||
120 +           rt2x00_rt(rt2x00dev, RT5392))
121                 rt2800_bbp_write(rt2x00dev, 68, 0x0b);
122  
123         if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) {
124                 rt2800_bbp_write(rt2x00dev, 69, 0x16);
125                 rt2800_bbp_write(rt2x00dev, 73, 0x12);
126         } else if (rt2x00_rt(rt2x00dev, RT3290) ||
127 -                  rt2x00_rt(rt2x00dev, RT5390)) {
128 +                  rt2x00_rt(rt2x00dev, RT5390) ||
129 +                  rt2x00_rt(rt2x00dev, RT5392)) {
130                 rt2800_bbp_write(rt2x00dev, 69, 0x12);
131                 rt2800_bbp_write(rt2x00dev, 73, 0x13);
132                 rt2800_bbp_write(rt2x00dev, 75, 0x46);
133 @@ -3406,7 +3416,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
134             rt2x00_rt(rt2x00dev, RT3090) ||
135             rt2x00_rt(rt2x00dev, RT3390) ||
136             rt2x00_rt(rt2x00dev, RT3572) ||
137 -           rt2x00_rt(rt2x00dev, RT5390)) {
138 +           rt2x00_rt(rt2x00dev, RT5390) ||
139 +           rt2x00_rt(rt2x00dev, RT5392)) {
140                 rt2800_bbp_write(rt2x00dev, 79, 0x13);
141                 rt2800_bbp_write(rt2x00dev, 80, 0x05);
142                 rt2800_bbp_write(rt2x00dev, 81, 0x33);
143 @@ -3426,7 +3437,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
144  
145         rt2800_bbp_write(rt2x00dev, 82, 0x62);
146         if (rt2x00_rt(rt2x00dev, RT3290) ||
147 -           rt2x00_rt(rt2x00dev, RT5390))
148 +           rt2x00_rt(rt2x00dev, RT5390) ||
149 +           rt2x00_rt(rt2x00dev, RT5392))
150                 rt2800_bbp_write(rt2x00dev, 83, 0x7a);
151         else
152                 rt2800_bbp_write(rt2x00dev, 83, 0x6a);
153 @@ -3434,25 +3446,36 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
154         if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860D))
155                 rt2800_bbp_write(rt2x00dev, 84, 0x19);
156         else if (rt2x00_rt(rt2x00dev, RT3290) ||
157 -                    rt2x00_rt(rt2x00dev, RT5390))
158 +                    rt2x00_rt(rt2x00dev, RT5390)||
159 +                    rt2x00_rt(rt2x00dev, RT5392))
160                 rt2800_bbp_write(rt2x00dev, 84, 0x9a);
161         else
162                 rt2800_bbp_write(rt2x00dev, 84, 0x99);
163  
164         if (rt2x00_rt(rt2x00dev, RT3290) ||
165 -           rt2x00_rt(rt2x00dev, RT5390))
166 +           rt2x00_rt(rt2x00dev, RT5390) ||
167 +           rt2x00_rt(rt2x00dev, RT5392))
168                 rt2800_bbp_write(rt2x00dev, 86, 0x38);
169         else
170                 rt2800_bbp_write(rt2x00dev, 86, 0x00);
171 +       
172 +       if (rt2x00_rt(rt2x00dev, RT5392))
173 +               rt2800_bbp_write(rt2x00dev, 88, 0x90);
174  
175         rt2800_bbp_write(rt2x00dev, 91, 0x04);
176  
177         if (rt2x00_rt(rt2x00dev, RT3290) ||
178 -           rt2x00_rt(rt2x00dev, RT5390))
179 +           rt2x00_rt(rt2x00dev, RT5390) ||
180 +           rt2x00_rt(rt2x00dev, RT5392))
181                 rt2800_bbp_write(rt2x00dev, 92, 0x02);
182         else
183                 rt2800_bbp_write(rt2x00dev, 92, 0x00);
184  
185 +       if (rt2x00_rt(rt2x00dev, RT5392)) {
186 +               rt2800_bbp_write(rt2x00dev, 95, 0x9a);
187 +               rt2800_bbp_write(rt2x00dev, 98, 0x12);
188 +       }
189 +
190         if (rt2x00_rt_rev_gte(rt2x00dev, RT3070, REV_RT3070F) ||
191             rt2x00_rt_rev_gte(rt2x00dev, RT3071, REV_RT3071E) ||
192             rt2x00_rt_rev_gte(rt2x00dev, RT3090, REV_RT3090E) ||
193 @@ -3460,20 +3483,23 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
194             rt2x00_rt(rt2x00dev, RT3290) ||
195             rt2x00_rt(rt2x00dev, RT3572) ||
196             rt2x00_rt(rt2x00dev, RT5390) ||
197 +           rt2x00_rt(rt2x00dev, RT5392) ||
198             rt2800_is_305x_soc(rt2x00dev))
199                 rt2800_bbp_write(rt2x00dev, 103, 0xc0);
200         else
201                 rt2800_bbp_write(rt2x00dev, 103, 0x00);
202  
203         if (rt2x00_rt(rt2x00dev, RT3290) ||
204 -           rt2x00_rt(rt2x00dev, RT5390))
205 +           rt2x00_rt(rt2x00dev, RT5390) ||
206 +           rt2x00_rt(rt2x00dev, RT5392))
207                 rt2800_bbp_write(rt2x00dev, 104, 0x92);
208  
209         if (rt2800_is_305x_soc(rt2x00dev))
210                 rt2800_bbp_write(rt2x00dev, 105, 0x01);
211         else if (rt2x00_rt(rt2x00dev, RT3290))
212                 rt2800_bbp_write(rt2x00dev, 105, 0x1c);
213 -       else if (rt2x00_rt(rt2x00dev, RT5390))
214 +       else if (rt2x00_rt(rt2x00dev, RT5390) ||
215 +                rt2x00_rt(rt2x00dev, RT5392))
216                 rt2800_bbp_write(rt2x00dev, 105, 0x3c);
217         else
218                 rt2800_bbp_write(rt2x00dev, 105, 0x05);
219 @@ -3481,18 +3507,27 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
220         if (rt2x00_rt(rt2x00dev, RT3290) ||
221             rt2x00_rt(rt2x00dev, RT5390))
222                 rt2800_bbp_write(rt2x00dev, 106, 0x03);
223 +       else if (rt2x00_rt(rt2x00dev, RT5392))
224 +               rt2800_bbp_write(rt2x00dev, 106, 0x12);
225         else
226                 rt2800_bbp_write(rt2x00dev, 106, 0x35);
227  
228         if (rt2x00_rt(rt2x00dev, RT3290) ||
229 -           rt2x00_rt(rt2x00dev, RT5390))
230 +           rt2x00_rt(rt2x00dev, RT5390) |
231 +           rt2x00_rt(rt2x00dev, RT5392))
232                 rt2800_bbp_write(rt2x00dev, 128, 0x12);
233  
234 +       if (rt2x00_rt(rt2x00dev, RT5392)) {
235 +               rt2800_bbp_write(rt2x00dev, 134, 0xd0);
236 +               rt2800_bbp_write(rt2x00dev, 135, 0xf6);
237 +       }
238 +
239         if (rt2x00_rt(rt2x00dev, RT3071) ||
240             rt2x00_rt(rt2x00dev, RT3090) ||
241             rt2x00_rt(rt2x00dev, RT3390) ||
242             rt2x00_rt(rt2x00dev, RT3572) ||
243 -           rt2x00_rt(rt2x00dev, RT5390)) {
244 +           rt2x00_rt(rt2x00dev, RT5390) ||
245 +           rt2x00_rt(rt2x00dev, RT5392)) {
246                 rt2800_bbp_read(rt2x00dev, 138, &value);
247  
248                 rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF0, &eeprom);
249 @@ -3527,7 +3562,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
250                 rt2800_bbp_write(rt2x00dev, 3, value);
251         }
252  
253 -       if (rt2x00_rt(rt2x00dev, RT5390)) {
254 +       if (rt2x00_rt(rt2x00dev, RT5390) ||
255 +               rt2x00_rt(rt2x00dev, RT5392)) {
256                 int ant, div_mode;
257  
258                 rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom);
259 @@ -3662,6 +3698,7 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
260             !rt2x00_rt(rt2x00dev, RT3390) &&
261             !rt2x00_rt(rt2x00dev, RT3572) &&
262             !rt2x00_rt(rt2x00dev, RT5390) &&
263 +           !rt2x00_rt(rt2x00dev, RT5392) &&
264             !rt2800_is_305x_soc(rt2x00dev))
265                 return 0;
266  
267 @@ -3669,7 +3706,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
268          * Init RF calibration.
269          */
270         if (rt2x00_rt(rt2x00dev, RT3290) ||
271 -           rt2x00_rt(rt2x00dev, RT5390)) {
272 +           rt2x00_rt(rt2x00dev, RT5390) ||
273 +           rt2x00_rt(rt2x00dev, RT5392)) {
274                 rt2800_rfcsr_read(rt2x00dev, 2, &rfcsr);
275                 rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_EN, 1);
276                 rt2800_rfcsr_write(rt2x00dev, 2, rfcsr);
277 @@ -3934,6 +3972,66 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
278                         rt2800_rfcsr_write(rt2x00dev, 61, 0xdd);
279                 rt2800_rfcsr_write(rt2x00dev, 62, 0x00);
280                 rt2800_rfcsr_write(rt2x00dev, 63, 0x00);
281 +       }       else if (rt2x00_rt(rt2x00dev, RT5392)) {
282 +                       rt2800_rfcsr_write(rt2x00dev, 1, 0x17);
283 +                       rt2800_rfcsr_write(rt2x00dev, 2, 0x80);
284 +                       rt2800_rfcsr_write(rt2x00dev, 3, 0x88);
285 +                       rt2800_rfcsr_write(rt2x00dev, 5, 0x10);
286 +                       rt2800_rfcsr_write(rt2x00dev, 6, 0xe0);
287 +                       rt2800_rfcsr_write(rt2x00dev, 7, 0x00);
288 +                       rt2800_rfcsr_write(rt2x00dev, 10, 0x53);
289 +                       rt2800_rfcsr_write(rt2x00dev, 11, 0x4a);
290 +                       rt2800_rfcsr_write(rt2x00dev, 12, 0x46);
291 +                       rt2800_rfcsr_write(rt2x00dev, 13, 0x9f);
292 +                       rt2800_rfcsr_write(rt2x00dev, 14, 0x00);
293 +                       rt2800_rfcsr_write(rt2x00dev, 15, 0x00);
294 +                       rt2800_rfcsr_write(rt2x00dev, 16, 0x00);
295 +                       rt2800_rfcsr_write(rt2x00dev, 18, 0x03);
296 +                       rt2800_rfcsr_write(rt2x00dev, 19, 0x4d);
297 +                       rt2800_rfcsr_write(rt2x00dev, 20, 0x00);
298 +                       rt2800_rfcsr_write(rt2x00dev, 21, 0x8d);
299 +                       rt2800_rfcsr_write(rt2x00dev, 22, 0x20);
300 +                       rt2800_rfcsr_write(rt2x00dev, 23, 0x0b);
301 +                       rt2800_rfcsr_write(rt2x00dev, 24, 0x44);
302 +                       rt2800_rfcsr_write(rt2x00dev, 25, 0x80);
303 +                       rt2800_rfcsr_write(rt2x00dev, 26, 0x82);
304 +                       rt2800_rfcsr_write(rt2x00dev, 27, 0x09);
305 +                       rt2800_rfcsr_write(rt2x00dev, 28, 0x00);
306 +                       rt2800_rfcsr_write(rt2x00dev, 29, 0x10);
307 +                       rt2800_rfcsr_write(rt2x00dev, 30, 0x10);
308 +                       rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
309 +                       rt2800_rfcsr_write(rt2x00dev, 32, 0x20);
310 +                       rt2800_rfcsr_write(rt2x00dev, 33, 0xC0);
311 +                       rt2800_rfcsr_write(rt2x00dev, 34, 0x07);
312 +                       rt2800_rfcsr_write(rt2x00dev, 35, 0x12);
313 +                       rt2800_rfcsr_write(rt2x00dev, 36, 0x00);
314 +                       rt2800_rfcsr_write(rt2x00dev, 37, 0x08);
315 +                       rt2800_rfcsr_write(rt2x00dev, 38, 0x89);
316 +                       rt2800_rfcsr_write(rt2x00dev, 39, 0x1b);
317 +                       rt2800_rfcsr_write(rt2x00dev, 40, 0x0f);
318 +                       rt2800_rfcsr_write(rt2x00dev, 41, 0xbb);
319 +                       rt2800_rfcsr_write(rt2x00dev, 42, 0xd5);
320 +                       rt2800_rfcsr_write(rt2x00dev, 43, 0x9b);
321 +                       rt2800_rfcsr_write(rt2x00dev, 44, 0x0e);
322 +                       rt2800_rfcsr_write(rt2x00dev, 45, 0xa2);
323 +                       rt2800_rfcsr_write(rt2x00dev, 46, 0x73);
324 +                       rt2800_rfcsr_write(rt2x00dev, 47, 0x0c);
325 +                       rt2800_rfcsr_write(rt2x00dev, 48, 0x10);
326 +                       rt2800_rfcsr_write(rt2x00dev, 49, 0x94);
327 +                       rt2800_rfcsr_write(rt2x00dev, 50, 0x94);
328 +                       rt2800_rfcsr_write(rt2x00dev, 51, 0x3a);
329 +                       rt2800_rfcsr_write(rt2x00dev, 52, 0x48);
330 +                       rt2800_rfcsr_write(rt2x00dev, 53, 0x44);
331 +                       rt2800_rfcsr_write(rt2x00dev, 54, 0x38);
332 +                       rt2800_rfcsr_write(rt2x00dev, 55, 0x43);
333 +                       rt2800_rfcsr_write(rt2x00dev, 56, 0xa1);
334 +                       rt2800_rfcsr_write(rt2x00dev, 57, 0x00);
335 +                       rt2800_rfcsr_write(rt2x00dev, 58, 0x39);
336 +                       rt2800_rfcsr_write(rt2x00dev, 59, 0x07);
337 +                       rt2800_rfcsr_write(rt2x00dev, 60, 0x45);
338 +                       rt2800_rfcsr_write(rt2x00dev, 61, 0x91);
339 +                       rt2800_rfcsr_write(rt2x00dev, 62, 0x39);
340 +                       rt2800_rfcsr_write(rt2x00dev, 63, 0x07);
341         }
342  
343         if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) {
344 @@ -4001,7 +4099,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
345                         rt2800_init_rx_filter(rt2x00dev, true, 0x27, 0x15);
346         }
347  
348 -       if (!rt2x00_rt(rt2x00dev, RT5390)) {
349 +       if (!rt2x00_rt(rt2x00dev, RT5390) ||
350 +               !rt2x00_rt(rt2x00dev, RT5392)) {
351                 /*
352                  * Set back to initial state
353                  */
354 @@ -4029,7 +4128,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
355         rt2x00_set_field32(&reg, OPT_14_CSR_BIT0, 1);
356         rt2800_register_write(rt2x00dev, OPT_14_CSR, reg);
357  
358 -       if (!rt2x00_rt(rt2x00dev, RT5390)) {
359 +       if (!rt2x00_rt(rt2x00dev, RT5390) &&
360 +               !rt2x00_rt(rt2x00dev, RT5392)) {
361                 rt2800_rfcsr_read(rt2x00dev, 17, &rfcsr);
362                 rt2x00_set_field8(&rfcsr, RFCSR17_TX_LO1_EN, 0);
363                 if (rt2x00_rt(rt2x00dev, RT3070) ||
364 @@ -4103,7 +4203,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
365                 rt2800_rfcsr_write(rt2x00dev, 29, rfcsr);
366         }
367  
368 -       if (rt2x00_rt(rt2x00dev, RT5390)) {
369 +       if (rt2x00_rt(rt2x00dev, RT5390) ||
370 +               rt2x00_rt(rt2x00dev, RT5392)) {
371                 rt2800_rfcsr_read(rt2x00dev, 38, &rfcsr);
372                 rt2x00_set_field8(&rfcsr, RFCSR38_RX_LO1_EN, 0);
373                 rt2800_rfcsr_write(rt2x00dev, 38, rfcsr);
374 @@ -4413,7 +4514,8 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
375         else
376                 rt2800_register_read(rt2x00dev, MAC_CSR0, &reg);
377         if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT3290 ||
378 -           rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390)
379 +           rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390 ||
380 +           rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5392)
381                 rt2x00_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &value);
382         else
383                 value = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
384 @@ -4432,6 +4534,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
385         case RT3390:
386         case RT3572:
387         case RT5390:
388 +       case RT5392:
389                 break;
390         default:
391                 ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
392 @@ -4451,6 +4554,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
393         case RF3290:
394         case RF3320:
395         case RF5370:
396 +       case RF5372:
397         case RF5390:
398                 break;
399         default:
400 @@ -4763,6 +4867,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
401                    rt2x00_rf(rt2x00dev, RF3290) ||
402                    rt2x00_rf(rt2x00dev, RF3320) ||
403                    rt2x00_rf(rt2x00dev, RF5370) ||
404 +                  rt2x00_rf(rt2x00dev, RF5372) ||
405                    rt2x00_rf(rt2x00dev, RF5390)) {
406                 spec->num_channels = 14;
407                 spec->channels = rf_vals_3x;
408 diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
409 index 2cb6e88..946e898 100644
410 --- a/drivers/net/wireless/rt2x00/rt2800pci.c
411 +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
412 @@ -486,7 +486,8 @@ static int rt2800pci_init_registers(struct rt2x00_dev *rt2x00dev)
413  
414         if (rt2x00_is_pcie(rt2x00dev) &&
415             (rt2x00_rt(rt2x00dev, RT3572) ||
416 -            rt2x00_rt(rt2x00dev, RT5390))) {
417 +            rt2x00_rt(rt2x00dev, RT5390) ||
418 +            rt2x00_rt(rt2x00dev, RT5392))) {
419                 rt2x00pci_register_read(rt2x00dev, AUX_CTRL, &reg);
420                 rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
421                 rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
422 diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
423 index e1bd2e0..05ee5d7 100644
424 --- a/drivers/net/wireless/rt2x00/rt2800usb.c
425 +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
426 @@ -1029,12 +1029,26 @@ static struct usb_device_id rt2800usb_device_table[] = {
427         { USB_DEVICE(0x5a57, 0x0284) },
428  #endif
429  #ifdef CONFIG_RT2800USB_RT53XX
430 +       /* Alpha */
431 +       { USB_DEVICE(0x2001, 0x3c15) },
432 +       { USB_DEVICE(0x2001, 0x3c19) },
433 +       /* Arcadyan */
434 +       { USB_DEVICE(0x043e, 0x7a12) },
435         /* Azurewave */
436         { USB_DEVICE(0x13d3, 0x3329) },
437         { USB_DEVICE(0x13d3, 0x3365) },
438 +       /* LG innotek */
439 +       { USB_DEVICE(0x043e, 0x7a22) },
440 +       /* Panasonic */
441 +       { USB_DEVICE(0x04da, 0x1801) },
442 +       { USB_DEVICE(0x04da, 0x1800) },
443 +       /* Philips */
444 +       { USB_DEVICE(0x0471, 0x2104) },
445         /* Ralink */
446         { USB_DEVICE(0x148f, 0x5370) },
447         { USB_DEVICE(0x148f, 0x5372) },
448 +       /* Unknown */
449 +       { USB_DEVICE(0x04da, 0x23f6) },
450  #endif
451  #ifdef CONFIG_RT2800USB_UNKNOWN
452         /*
453 diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
454 index 71ef2e8..c6496ec 100644
455 --- a/drivers/net/wireless/rt2x00/rt2x00.h
456 +++ b/drivers/net/wireless/rt2x00/rt2x00.h
457 @@ -193,6 +193,7 @@ struct rt2x00_chip {
458  #define RT3593         0x3593  /* PCIe */
459  #define RT3883         0x3883  /* WSOC */
460  #define RT5390         0x5390  /* 2.4GHz */
461 +#define RT5392         0x5392  /* 2.4GHz */
462  
463         u16 rf;
464         u16 rev;
465 -- 
466 1.6.0.2
467