Lines Matching +full:0 +full:xfff7

51 	return 0;  in b43_lpphy_op_allocate()
59 memset(lpphy, 0, sizeof(*lpphy)); in b43_lpphy_op_prepare_structs()
89 lpphy->txpa[0] = sprom->pa0b0; in lpphy_read_band_sprom()
97 for (i = 0; i < 4; i++) { in lpphy_read_band_sprom()
99 maxpwr - (ofdmpo & 0xF) * 2; in lpphy_read_band_sprom()
105 maxpwr - (ofdmpo & 0xF) * 2; in lpphy_read_band_sprom()
110 for (i = 0; i < 4; i++) in lpphy_read_band_sprom()
124 lpphy->txpa[0] = sprom->pa1b0; in lpphy_read_band_sprom()
127 lpphy->txpal[0] = sprom->pa1lob0; in lpphy_read_band_sprom()
130 lpphy->txpah[0] = sprom->pa1hib0; in lpphy_read_band_sprom()
137 lpphy->tx_max_ratel[i] = maxpwr - (ofdmpo & 0xF) * 2; in lpphy_read_band_sprom()
144 lpphy->tx_max_rate[i] = maxpwr - (ofdmpo & 0xF) * 2; in lpphy_read_band_sprom()
151 lpphy->tx_max_rateh[i] = maxpwr - (ofdmpo & 0xF) * 2; in lpphy_read_band_sprom()
174 temp[0] = ((isolation - 26) / 12) << 12; in lpphy_adjust_gain_table()
175 temp[1] = temp[0] + 0x1000; in lpphy_adjust_gain_table()
176 temp[2] = temp[0] + 0x2000; in lpphy_adjust_gain_table()
178 b43_lptab_write_bulk(dev, B43_LPTAB16(13, 0), 3, temp); in lpphy_adjust_gain_table()
179 b43_lptab_write_bulk(dev, B43_LPTAB16(12, 0), 3, temp); in lpphy_adjust_gain_table()
204 b43_phy_mask(dev, B43_LPPHY_AFE_DAC_CTL, 0xF7FF); in lpphy_baseband_rev0_1_init()
205 b43_phy_write(dev, B43_LPPHY_AFE_CTL, 0); in lpphy_baseband_rev0_1_init()
206 b43_phy_write(dev, B43_LPPHY_AFE_CTL_OVR, 0); in lpphy_baseband_rev0_1_init()
207 b43_phy_write(dev, B43_LPPHY_RF_OVERRIDE_0, 0); in lpphy_baseband_rev0_1_init()
208 b43_phy_write(dev, B43_LPPHY_RF_OVERRIDE_2, 0); in lpphy_baseband_rev0_1_init()
209 b43_phy_set(dev, B43_LPPHY_AFE_DAC_CTL, 0x0004); in lpphy_baseband_rev0_1_init()
210 b43_phy_maskset(dev, B43_LPPHY_OFDMSYNCTHRESH0, 0xFF00, 0x0078); in lpphy_baseband_rev0_1_init()
211 b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0x83FF, 0x5800); in lpphy_baseband_rev0_1_init()
212 b43_phy_write(dev, B43_LPPHY_ADC_COMPENSATION_CTL, 0x0016); in lpphy_baseband_rev0_1_init()
213 b43_phy_maskset(dev, B43_LPPHY_AFE_ADC_CTL_0, 0xFFF8, 0x0004); in lpphy_baseband_rev0_1_init()
214 b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0x00FF, 0x5400); in lpphy_baseband_rev0_1_init()
215 b43_phy_maskset(dev, B43_LPPHY_HIGAINDB, 0x00FF, 0x2400); in lpphy_baseband_rev0_1_init()
216 b43_phy_maskset(dev, B43_LPPHY_LOWGAINDB, 0x00FF, 0x2100); in lpphy_baseband_rev0_1_init()
217 b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0xFF00, 0x0006); in lpphy_baseband_rev0_1_init()
218 b43_phy_mask(dev, B43_LPPHY_RX_RADIO_CTL, 0xFFFE); in lpphy_baseband_rev0_1_init()
219 b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFFE0, 0x0005); in lpphy_baseband_rev0_1_init()
220 b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFC1F, 0x0180); in lpphy_baseband_rev0_1_init()
221 b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0x83FF, 0x3C00); in lpphy_baseband_rev0_1_init()
222 b43_phy_maskset(dev, B43_LPPHY_GAINDIRECTMISMATCH, 0xFFF0, 0x0005); in lpphy_baseband_rev0_1_init()
223 b43_phy_maskset(dev, B43_LPPHY_GAIN_MISMATCH_LIMIT, 0xFFC0, 0x001A); in lpphy_baseband_rev0_1_init()
224 b43_phy_maskset(dev, B43_LPPHY_CRS_ED_THRESH, 0xFF00, 0x00B3); in lpphy_baseband_rev0_1_init()
225 b43_phy_maskset(dev, B43_LPPHY_CRS_ED_THRESH, 0x00FF, 0xAD00); in lpphy_baseband_rev0_1_init()
227 0xFF00, lpphy->rx_pwr_offset); in lpphy_baseband_rev0_1_init()
231 ssb_pmu_set_ldo_voltage(&bus->chipco, LDO_PAREF, 0x28); in lpphy_baseband_rev0_1_init()
233 if (dev->phy.rev == 0) { in lpphy_baseband_rev0_1_init()
235 0xFFCF, 0x0010); in lpphy_baseband_rev0_1_init()
241 0xFFCF, 0x0020); in lpphy_baseband_rev0_1_init()
244 tmp = lpphy->rssi_vf | lpphy->rssi_vc << 4 | 0xA000; in lpphy_baseband_rev0_1_init()
247 b43_phy_maskset(dev, B43_LPPHY_AFE_RSSI_CTL_1, 0xF000, 0x0AAA); in lpphy_baseband_rev0_1_init()
249 b43_phy_maskset(dev, B43_LPPHY_AFE_RSSI_CTL_1, 0xF000, 0x02AA); in lpphy_baseband_rev0_1_init()
252 0xFFF9, (lpphy->bx_arch << 1)); in lpphy_baseband_rev0_1_init()
255 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0xFFC0, 0x000A); in lpphy_baseband_rev0_1_init()
256 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0x3F00, 0x0900); in lpphy_baseband_rev0_1_init()
257 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_2, 0xFFC0, 0x000A); in lpphy_baseband_rev0_1_init()
258 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_2, 0xC0FF, 0x0B00); in lpphy_baseband_rev0_1_init()
259 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_3, 0xFFC0, 0x000A); in lpphy_baseband_rev0_1_init()
260 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_3, 0xC0FF, 0x0400); in lpphy_baseband_rev0_1_init()
261 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xFFC0, 0x000A); in lpphy_baseband_rev0_1_init()
262 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xC0FF, 0x0B00); in lpphy_baseband_rev0_1_init()
263 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_5, 0xFFC0, 0x000A); in lpphy_baseband_rev0_1_init()
264 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_5, 0xC0FF, 0x0900); in lpphy_baseband_rev0_1_init()
265 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_6, 0xFFC0, 0x000A); in lpphy_baseband_rev0_1_init()
266 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_6, 0xC0FF, 0x0B00); in lpphy_baseband_rev0_1_init()
267 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_7, 0xFFC0, 0x000A); in lpphy_baseband_rev0_1_init()
268 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_7, 0xC0FF, 0x0900); in lpphy_baseband_rev0_1_init()
269 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_8, 0xFFC0, 0x000A); in lpphy_baseband_rev0_1_init()
270 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_8, 0xC0FF, 0x0B00); in lpphy_baseband_rev0_1_init()
273 (dev->phy.rev == 0 && (sprom->boardflags_lo & B43_BFL_FEM))) { in lpphy_baseband_rev0_1_init()
274 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0xFFC0, 0x0001); in lpphy_baseband_rev0_1_init()
275 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0xC0FF, 0x0400); in lpphy_baseband_rev0_1_init()
276 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_2, 0xFFC0, 0x0001); in lpphy_baseband_rev0_1_init()
277 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_2, 0xC0FF, 0x0500); in lpphy_baseband_rev0_1_init()
278 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_3, 0xFFC0, 0x0002); in lpphy_baseband_rev0_1_init()
279 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_3, 0xC0FF, 0x0800); in lpphy_baseband_rev0_1_init()
280 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xFFC0, 0x0002); in lpphy_baseband_rev0_1_init()
281 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xC0FF, 0x0A00); in lpphy_baseband_rev0_1_init()
284 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0xFFC0, 0x0004); in lpphy_baseband_rev0_1_init()
285 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0xC0FF, 0x0800); in lpphy_baseband_rev0_1_init()
286 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_2, 0xFFC0, 0x0004); in lpphy_baseband_rev0_1_init()
287 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_2, 0xC0FF, 0x0C00); in lpphy_baseband_rev0_1_init()
288 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_3, 0xFFC0, 0x0002); in lpphy_baseband_rev0_1_init()
289 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_3, 0xC0FF, 0x0100); in lpphy_baseband_rev0_1_init()
290 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xFFC0, 0x0002); in lpphy_baseband_rev0_1_init()
291 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xC0FF, 0x0300); in lpphy_baseband_rev0_1_init()
293 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0xFFC0, 0x000A); in lpphy_baseband_rev0_1_init()
294 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0xC0FF, 0x0900); in lpphy_baseband_rev0_1_init()
295 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_2, 0xFFC0, 0x000A); in lpphy_baseband_rev0_1_init()
296 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_2, 0xC0FF, 0x0B00); in lpphy_baseband_rev0_1_init()
297 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_3, 0xFFC0, 0x0006); in lpphy_baseband_rev0_1_init()
298 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_3, 0xC0FF, 0x0500); in lpphy_baseband_rev0_1_init()
299 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xFFC0, 0x0006); in lpphy_baseband_rev0_1_init()
300 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xC0FF, 0x0700); in lpphy_baseband_rev0_1_init()
309 (dev->dev->chip_id == 0x5354) && in lpphy_baseband_rev0_1_init()
311 b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x0006); in lpphy_baseband_rev0_1_init()
312 b43_phy_write(dev, B43_LPPHY_GPIO_SELECT, 0x0005); in lpphy_baseband_rev0_1_init()
313 b43_phy_write(dev, B43_LPPHY_GPIO_OUTEN, 0xFFFF); in lpphy_baseband_rev0_1_init()
318 b43_phy_set(dev, B43_LPPHY_LP_PHY_CTL, 0x8000); in lpphy_baseband_rev0_1_init()
319 b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x0040); in lpphy_baseband_rev0_1_init()
320 b43_phy_maskset(dev, B43_LPPHY_MINPWR_LEVEL, 0x00FF, 0xA400); in lpphy_baseband_rev0_1_init()
321 b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xF0FF, 0x0B00); in lpphy_baseband_rev0_1_init()
322 b43_phy_maskset(dev, B43_LPPHY_SYNCPEAKCNT, 0xFFF8, 0x0007); in lpphy_baseband_rev0_1_init()
323 b43_phy_maskset(dev, B43_LPPHY_DSSS_CONFIRM_CNT, 0xFFF8, 0x0003); in lpphy_baseband_rev0_1_init()
324 b43_phy_maskset(dev, B43_LPPHY_DSSS_CONFIRM_CNT, 0xFFC7, 0x0020); in lpphy_baseband_rev0_1_init()
325 b43_phy_mask(dev, B43_LPPHY_IDLEAFTERPKTRXTO, 0x00FF); in lpphy_baseband_rev0_1_init()
327 b43_phy_mask(dev, B43_LPPHY_LP_PHY_CTL, 0x7FFF); in lpphy_baseband_rev0_1_init()
328 b43_phy_mask(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFBF); in lpphy_baseband_rev0_1_init()
332 tmp2 = (tmp & 0x03E0) >> 5; in lpphy_baseband_rev0_1_init()
336 tmp2 = (tmp & 0x1F00) >> 8; in lpphy_baseband_rev0_1_init()
340 tmp2 = tmp & 0x00FF; in lpphy_baseband_rev0_1_init()
349 B43_PHY_OFDM(0xC1), in lpphy_save_dig_flt_state()
350 B43_PHY_OFDM(0xC2), in lpphy_save_dig_flt_state()
351 B43_PHY_OFDM(0xC3), in lpphy_save_dig_flt_state()
352 B43_PHY_OFDM(0xC4), in lpphy_save_dig_flt_state()
353 B43_PHY_OFDM(0xC5), in lpphy_save_dig_flt_state()
354 B43_PHY_OFDM(0xC6), in lpphy_save_dig_flt_state()
355 B43_PHY_OFDM(0xC7), in lpphy_save_dig_flt_state()
356 B43_PHY_OFDM(0xC8), in lpphy_save_dig_flt_state()
357 B43_PHY_OFDM(0xCF), in lpphy_save_dig_flt_state()
361 0xDE5E, 0xE832, 0xE331, 0x4D26, in lpphy_save_dig_flt_state()
362 0x0026, 0x1420, 0x0020, 0xFE08, in lpphy_save_dig_flt_state()
363 0x0008, in lpphy_save_dig_flt_state()
369 for (i = 0; i < ARRAY_SIZE(addr); i++) { in lpphy_save_dig_flt_state()
378 B43_PHY_OFDM(0xC1), in lpphy_restore_dig_flt_state()
379 B43_PHY_OFDM(0xC2), in lpphy_restore_dig_flt_state()
380 B43_PHY_OFDM(0xC3), in lpphy_restore_dig_flt_state()
381 B43_PHY_OFDM(0xC4), in lpphy_restore_dig_flt_state()
382 B43_PHY_OFDM(0xC5), in lpphy_restore_dig_flt_state()
383 B43_PHY_OFDM(0xC6), in lpphy_restore_dig_flt_state()
384 B43_PHY_OFDM(0xC7), in lpphy_restore_dig_flt_state()
385 B43_PHY_OFDM(0xC8), in lpphy_restore_dig_flt_state()
386 B43_PHY_OFDM(0xCF), in lpphy_restore_dig_flt_state()
392 for (i = 0; i < ARRAY_SIZE(addr); i++) in lpphy_restore_dig_flt_state()
400 b43_phy_write(dev, B43_LPPHY_AFE_DAC_CTL, 0x50); in lpphy_baseband_rev2plus_init()
401 b43_phy_write(dev, B43_LPPHY_AFE_CTL, 0x8800); in lpphy_baseband_rev2plus_init()
402 b43_phy_write(dev, B43_LPPHY_AFE_CTL_OVR, 0); in lpphy_baseband_rev2plus_init()
403 b43_phy_write(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0); in lpphy_baseband_rev2plus_init()
404 b43_phy_write(dev, B43_LPPHY_RF_OVERRIDE_0, 0); in lpphy_baseband_rev2plus_init()
405 b43_phy_write(dev, B43_LPPHY_RF_OVERRIDE_2, 0); in lpphy_baseband_rev2plus_init()
406 b43_phy_write(dev, B43_PHY_OFDM(0xF9), 0); in lpphy_baseband_rev2plus_init()
407 b43_phy_write(dev, B43_LPPHY_TR_LOOKUP_1, 0); in lpphy_baseband_rev2plus_init()
408 b43_phy_set(dev, B43_LPPHY_ADC_COMPENSATION_CTL, 0x10); in lpphy_baseband_rev2plus_init()
409 b43_phy_maskset(dev, B43_LPPHY_OFDMSYNCTHRESH0, 0xFF00, 0xB4); in lpphy_baseband_rev2plus_init()
410 b43_phy_maskset(dev, B43_LPPHY_DCOFFSETTRANSIENT, 0xF8FF, 0x200); in lpphy_baseband_rev2plus_init()
411 b43_phy_maskset(dev, B43_LPPHY_DCOFFSETTRANSIENT, 0xFF00, 0x7F); in lpphy_baseband_rev2plus_init()
412 b43_phy_maskset(dev, B43_LPPHY_GAINDIRECTMISMATCH, 0xFF0F, 0x40); in lpphy_baseband_rev2plus_init()
413 b43_phy_maskset(dev, B43_LPPHY_PREAMBLECONFIRMTO, 0xFF00, 0x2); in lpphy_baseband_rev2plus_init()
414 b43_phy_mask(dev, B43_LPPHY_CRSGAIN_CTL, ~0x4000); in lpphy_baseband_rev2plus_init()
415 b43_phy_mask(dev, B43_LPPHY_CRSGAIN_CTL, ~0x2000); in lpphy_baseband_rev2plus_init()
416 b43_phy_set(dev, B43_PHY_OFDM(0x10A), 0x1); in lpphy_baseband_rev2plus_init()
417 if (dev->dev->board_rev >= 0x18) { in lpphy_baseband_rev2plus_init()
418 b43_lptab_write(dev, B43_LPTAB32(17, 65), 0xEC); in lpphy_baseband_rev2plus_init()
419 b43_phy_maskset(dev, B43_PHY_OFDM(0x10A), 0xFF01, 0x14); in lpphy_baseband_rev2plus_init()
421 b43_phy_maskset(dev, B43_PHY_OFDM(0x10A), 0xFF01, 0x10); in lpphy_baseband_rev2plus_init()
423 b43_phy_maskset(dev, B43_PHY_OFDM(0xDF), 0xFF00, 0xF4); in lpphy_baseband_rev2plus_init()
424 b43_phy_maskset(dev, B43_PHY_OFDM(0xDF), 0x00FF, 0xF100); in lpphy_baseband_rev2plus_init()
425 b43_phy_write(dev, B43_LPPHY_CLIPTHRESH, 0x48); in lpphy_baseband_rev2plus_init()
426 b43_phy_maskset(dev, B43_LPPHY_HIGAINDB, 0xFF00, 0x46); in lpphy_baseband_rev2plus_init()
427 b43_phy_maskset(dev, B43_PHY_OFDM(0xE4), 0xFF00, 0x10); in lpphy_baseband_rev2plus_init()
428 b43_phy_maskset(dev, B43_LPPHY_PWR_THRESH1, 0xFFF0, 0x9); in lpphy_baseband_rev2plus_init()
429 b43_phy_mask(dev, B43_LPPHY_GAINDIRECTMISMATCH, ~0xF); in lpphy_baseband_rev2plus_init()
430 b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0x00FF, 0x5500); in lpphy_baseband_rev2plus_init()
431 b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFC1F, 0xA0); in lpphy_baseband_rev2plus_init()
432 b43_phy_maskset(dev, B43_LPPHY_GAINDIRECTMISMATCH, 0xE0FF, 0x300); in lpphy_baseband_rev2plus_init()
433 b43_phy_maskset(dev, B43_LPPHY_HIGAINDB, 0x00FF, 0x2A00); in lpphy_baseband_rev2plus_init()
434 if ((dev->dev->chip_id == 0x4325) && (dev->dev->chip_rev == 0)) { in lpphy_baseband_rev2plus_init()
435 b43_phy_maskset(dev, B43_LPPHY_LOWGAINDB, 0x00FF, 0x2100); in lpphy_baseband_rev2plus_init()
436 b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0xFF00, 0xA); in lpphy_baseband_rev2plus_init()
438 b43_phy_maskset(dev, B43_LPPHY_LOWGAINDB, 0x00FF, 0x1E00); in lpphy_baseband_rev2plus_init()
439 b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0xFF00, 0xD); in lpphy_baseband_rev2plus_init()
441 b43_phy_maskset(dev, B43_PHY_OFDM(0xFE), 0xFFE0, 0x1F); in lpphy_baseband_rev2plus_init()
442 b43_phy_maskset(dev, B43_PHY_OFDM(0xFF), 0xFFE0, 0xC); in lpphy_baseband_rev2plus_init()
443 b43_phy_maskset(dev, B43_PHY_OFDM(0x100), 0xFF00, 0x19); in lpphy_baseband_rev2plus_init()
444 b43_phy_maskset(dev, B43_PHY_OFDM(0xFF), 0x03FF, 0x3C00); in lpphy_baseband_rev2plus_init()
445 b43_phy_maskset(dev, B43_PHY_OFDM(0xFE), 0xFC1F, 0x3E0); in lpphy_baseband_rev2plus_init()
446 b43_phy_maskset(dev, B43_PHY_OFDM(0xFF), 0xFFE0, 0xC); in lpphy_baseband_rev2plus_init()
447 b43_phy_maskset(dev, B43_PHY_OFDM(0x100), 0x00FF, 0x1900); in lpphy_baseband_rev2plus_init()
448 b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0x83FF, 0x5800); in lpphy_baseband_rev2plus_init()
449 b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFFE0, 0x12); in lpphy_baseband_rev2plus_init()
450 b43_phy_maskset(dev, B43_LPPHY_GAINMISMATCH, 0x0FFF, 0x9000); in lpphy_baseband_rev2plus_init()
452 if ((dev->dev->chip_id == 0x4325) && (dev->dev->chip_rev == 0)) { in lpphy_baseband_rev2plus_init()
453 b43_lptab_write(dev, B43_LPTAB16(0x08, 0x14), 0); in lpphy_baseband_rev2plus_init()
454 b43_lptab_write(dev, B43_LPTAB16(0x08, 0x12), 0x40); in lpphy_baseband_rev2plus_init()
458 b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x40); in lpphy_baseband_rev2plus_init()
459 b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xF0FF, 0xB00); in lpphy_baseband_rev2plus_init()
460 b43_phy_maskset(dev, B43_LPPHY_SYNCPEAKCNT, 0xFFF8, 0x6); in lpphy_baseband_rev2plus_init()
461 b43_phy_maskset(dev, B43_LPPHY_MINPWR_LEVEL, 0x00FF, 0x9D00); in lpphy_baseband_rev2plus_init()
462 b43_phy_maskset(dev, B43_LPPHY_MINPWR_LEVEL, 0xFF00, 0xA1); in lpphy_baseband_rev2plus_init()
463 b43_phy_mask(dev, B43_LPPHY_IDLEAFTERPKTRXTO, 0x00FF); in lpphy_baseband_rev2plus_init()
465 b43_phy_mask(dev, B43_LPPHY_CRSGAIN_CTL, ~0x40); in lpphy_baseband_rev2plus_init()
467 b43_phy_maskset(dev, B43_LPPHY_CRS_ED_THRESH, 0xFF00, 0xB3); in lpphy_baseband_rev2plus_init()
468 b43_phy_maskset(dev, B43_LPPHY_CRS_ED_THRESH, 0x00FF, 0xAD00); in lpphy_baseband_rev2plus_init()
469 b43_phy_maskset(dev, B43_LPPHY_INPUT_PWRDB, 0xFF00, lpphy->rx_pwr_offset); in lpphy_baseband_rev2plus_init()
470 b43_phy_set(dev, B43_LPPHY_RESET_CTL, 0x44); in lpphy_baseband_rev2plus_init()
471 b43_phy_write(dev, B43_LPPHY_RESET_CTL, 0x80); in lpphy_baseband_rev2plus_init()
472 b43_phy_write(dev, B43_LPPHY_AFE_RSSI_CTL_0, 0xA954); in lpphy_baseband_rev2plus_init()
474 0x2000 | ((u16)lpphy->rssi_gs << 10) | in lpphy_baseband_rev2plus_init()
477 if ((dev->dev->chip_id == 0x4325) && (dev->dev->chip_rev == 0)) { in lpphy_baseband_rev2plus_init()
478 b43_phy_set(dev, B43_LPPHY_AFE_ADC_CTL_0, 0x1C); in lpphy_baseband_rev2plus_init()
479 b43_phy_maskset(dev, B43_LPPHY_AFE_CTL, 0x00FF, 0x8800); in lpphy_baseband_rev2plus_init()
480 b43_phy_maskset(dev, B43_LPPHY_AFE_ADC_CTL_1, 0xFC3C, 0x0400); in lpphy_baseband_rev2plus_init()
510 { .freq = 12000, .data[0] = 6, .data[1] = 6, .data[2] = 6, in lpphy_2062_init()
512 { .freq = 13000, .data[0] = 4, .data[1] = 4, .data[2] = 4, in lpphy_2062_init()
514 { .freq = 14400, .data[0] = 3, .data[1] = 3, .data[2] = 3, in lpphy_2062_init()
516 { .freq = 16200, .data[0] = 3, .data[1] = 3, .data[2] = 3, in lpphy_2062_init()
518 { .freq = 18000, .data[0] = 2, .data[1] = 2, .data[2] = 2, in lpphy_2062_init()
520 { .freq = 19200, .data[0] = 1, .data[1] = 1, .data[2] = 1, in lpphy_2062_init()
526 b43_radio_write(dev, B2062_N_TX_CTL3, 0); in lpphy_2062_init()
527 b43_radio_write(dev, B2062_N_TX_CTL4, 0); in lpphy_2062_init()
528 b43_radio_write(dev, B2062_N_TX_CTL5, 0); in lpphy_2062_init()
529 b43_radio_write(dev, B2062_N_TX_CTL6, 0); in lpphy_2062_init()
530 b43_radio_write(dev, B2062_N_PDN_CTL0, 0x40); in lpphy_2062_init()
531 b43_radio_write(dev, B2062_N_PDN_CTL0, 0); in lpphy_2062_init()
532 b43_radio_write(dev, B2062_N_CALIB_TS, 0x10); in lpphy_2062_init()
533 b43_radio_write(dev, B2062_N_CALIB_TS, 0); in lpphy_2062_init()
534 if (dev->phy.rev > 0) { in lpphy_2062_init()
536 (b43_radio_read(dev, B2062_N_COMM2) >> 1) | 0x80); in lpphy_2062_init()
539 b43_radio_set(dev, B2062_N_TSSI_CTL0, 0x1); in lpphy_2062_init()
541 b43_radio_mask(dev, B2062_N_TSSI_CTL0, ~0x1); in lpphy_2062_init()
547 B43_WARN_ON(crystalfreq == 0); in lpphy_2062_init()
551 b43_radio_mask(dev, B2062_S_RFPLL_CTL1, 0xFFFB); in lpphy_2062_init()
554 b43_radio_set(dev, B2062_S_RFPLL_CTL1, 0x4); in lpphy_2062_init()
558 (2 * crystalfreq)) - 8) & 0xFF; in lpphy_2062_init()
562 (32000000 * lpphy->pdiv)) - 1) & 0xFF; in lpphy_2062_init()
566 (2000000 * lpphy->pdiv)) - 1) & 0xFF; in lpphy_2062_init()
570 ref &= 0xFFFF; in lpphy_2062_init()
571 for (i = 0; i < ARRAY_SIZE(freqdata_tab); i++) { in lpphy_2062_init()
583 ((u16)(fd->data[1]) << 4) | fd->data[0]); in lpphy_2062_init()
594 b43_radio_write(dev, B2063_LOGEN_SP5, 0); in lpphy_2063_init()
595 b43_radio_set(dev, B2063_COMM8, 0x38); in lpphy_2063_init()
596 b43_radio_write(dev, B2063_REG_SP1, 0x56); in lpphy_2063_init()
597 b43_radio_mask(dev, B2063_RX_BB_CTL2, ~0x2); in lpphy_2063_init()
598 b43_radio_write(dev, B2063_PA_SP7, 0); in lpphy_2063_init()
599 b43_radio_write(dev, B2063_TX_RF_SP6, 0x20); in lpphy_2063_init()
600 b43_radio_write(dev, B2063_TX_RF_SP9, 0x40); in lpphy_2063_init()
602 b43_radio_write(dev, B2063_PA_SP3, 0xa0); in lpphy_2063_init()
603 b43_radio_write(dev, B2063_PA_SP4, 0xa0); in lpphy_2063_init()
604 b43_radio_write(dev, B2063_PA_SP2, 0x18); in lpphy_2063_init()
606 b43_radio_write(dev, B2063_PA_SP3, 0x20); in lpphy_2063_init()
607 b43_radio_write(dev, B2063_PA_SP2, 0x20); in lpphy_2063_init()
620 { .phy_offset = 2, .phy_shift = 6, .rf_addr = 0x3d, .rf_shift = 3, .mask = 0x01, },
621 { .phy_offset = 1, .phy_shift = 12, .rf_addr = 0x4c, .rf_shift = 1, .mask = 0x01, },
622 { .phy_offset = 1, .phy_shift = 8, .rf_addr = 0x50, .rf_shift = 0, .mask = 0x7f, },
623 { .phy_offset = 0, .phy_shift = 8, .rf_addr = 0x44, .rf_shift = 0, .mask = 0xff, },
624 { .phy_offset = 1, .phy_shift = 0, .rf_addr = 0x4a, .rf_shift = 0, .mask = 0xff, },
625 { .phy_offset = 0, .phy_shift = 4, .rf_addr = 0x4d, .rf_shift = 0, .mask = 0xff, },
626 { .phy_offset = 1, .phy_shift = 4, .rf_addr = 0x4e, .rf_shift = 0, .mask = 0xff, },
627 { .phy_offset = 0, .phy_shift = 12, .rf_addr = 0x4f, .rf_shift = 0, .mask = 0x0f, },
628 { .phy_offset = 1, .phy_shift = 0, .rf_addr = 0x4f, .rf_shift = 4, .mask = 0x0f, },
629 { .phy_offset = 3, .phy_shift = 0, .rf_addr = 0x49, .rf_shift = 0, .mask = 0x0f, },
630 { .phy_offset = 4, .phy_shift = 3, .rf_addr = 0x46, .rf_shift = 4, .mask = 0x07, },
631 { .phy_offset = 3, .phy_shift = 15, .rf_addr = 0x46, .rf_shift = 0, .mask = 0x01, },
632 { .phy_offset = 4, .phy_shift = 0, .rf_addr = 0x46, .rf_shift = 1, .mask = 0x07, },
633 { .phy_offset = 3, .phy_shift = 8, .rf_addr = 0x48, .rf_shift = 4, .mask = 0x07, },
634 { .phy_offset = 3, .phy_shift = 11, .rf_addr = 0x48, .rf_shift = 0, .mask = 0x0f, },
635 { .phy_offset = 3, .phy_shift = 4, .rf_addr = 0x49, .rf_shift = 4, .mask = 0x0f, },
636 { .phy_offset = 2, .phy_shift = 15, .rf_addr = 0x45, .rf_shift = 0, .mask = 0x01, },
637 { .phy_offset = 5, .phy_shift = 13, .rf_addr = 0x52, .rf_shift = 4, .mask = 0x07, },
638 { .phy_offset = 6, .phy_shift = 0, .rf_addr = 0x52, .rf_shift = 7, .mask = 0x01, },
639 { .phy_offset = 5, .phy_shift = 3, .rf_addr = 0x41, .rf_shift = 5, .mask = 0x07, },
640 { .phy_offset = 5, .phy_shift = 6, .rf_addr = 0x41, .rf_shift = 0, .mask = 0x0f, },
641 { .phy_offset = 5, .phy_shift = 10, .rf_addr = 0x42, .rf_shift = 5, .mask = 0x07, },
642 { .phy_offset = 4, .phy_shift = 15, .rf_addr = 0x42, .rf_shift = 0, .mask = 0x01, },
643 { .phy_offset = 5, .phy_shift = 0, .rf_addr = 0x42, .rf_shift = 1, .mask = 0x07, },
644 { .phy_offset = 4, .phy_shift = 11, .rf_addr = 0x43, .rf_shift = 4, .mask = 0x0f, },
645 { .phy_offset = 4, .phy_shift = 7, .rf_addr = 0x43, .rf_shift = 0, .mask = 0x0f, },
646 { .phy_offset = 4, .phy_shift = 6, .rf_addr = 0x45, .rf_shift = 1, .mask = 0x01, },
647 { .phy_offset = 2, .phy_shift = 7, .rf_addr = 0x40, .rf_shift = 4, .mask = 0x0f, },
648 { .phy_offset = 2, .phy_shift = 11, .rf_addr = 0x40, .rf_shift = 0, .mask = 0x0f, },
657 for (i = 0; i < ARRAY_SIZE(lpphy_stx_table); i++) { in lpphy_sync_stx()
662 b43_phy_maskset(dev, B43_PHY_OFDM(0xF2 + e->phy_offset), in lpphy_sync_stx()
670 b43_phy_set(dev, B43_LPPHY_FOURWIRE_CTL, 0x2); in lpphy_radio_init()
672 b43_phy_mask(dev, B43_LPPHY_FOURWIRE_CTL, 0xFFFD); in lpphy_radio_init()
675 if (dev->phy.radio_ver == 0x2062) { in lpphy_radio_init()
680 b43_phy_write(dev, B43_PHY_OFDM(0xF0), 0x5F80); in lpphy_radio_init()
681 b43_phy_write(dev, B43_PHY_OFDM(0xF1), 0); in lpphy_radio_init()
682 if (dev->dev->chip_id == 0x4325) { in lpphy_radio_init()
694 u8 rc_cap = (lpphy->rc_cap & 0x1F) >> 1; in lpphy_set_rc_cap()
700 max_t(u8, lpphy->rc_cap - 4, 0x80)); in lpphy_set_rc_cap()
701 b43_radio_write(dev, B2062_N_TX_CTL_A, rc_cap | 0x80); in lpphy_set_rc_cap()
703 ((lpphy->rc_cap & 0x1F) >> 2) | 0x80); in lpphy_set_rc_cap()
708 return (b43_lptab_read(dev, B43_LPTAB16(0, 87)) & 0xFF00) >> 8; in lpphy_get_bb_mult()
713 b43_lptab_write(dev, B43_LPTAB16(0, 87), (u16)bb_mult << 8); in lpphy_set_bb_mult()
724 b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFF1F, 0x80); in lpphy_set_deaf()
739 0xFF1F, 0x60); in lpphy_clear_deaf()
742 0xFF1F, 0x20); in lpphy_clear_deaf()
749 b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFFC, trsw); in lpphy_set_trsw_over()
750 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x3); in lpphy_set_trsw_over()
757 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFFB); in lpphy_disable_crs()
758 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x4); in lpphy_disable_crs()
759 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFF7); in lpphy_disable_crs()
760 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x8); in lpphy_disable_crs()
761 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0x10); in lpphy_disable_crs()
762 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x10); in lpphy_disable_crs()
763 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFDF); in lpphy_disable_crs()
764 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x20); in lpphy_disable_crs()
765 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFBF); in lpphy_disable_crs()
766 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x40); in lpphy_disable_crs()
767 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0x7); in lpphy_disable_crs()
768 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0x38); in lpphy_disable_crs()
769 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xFF3F); in lpphy_disable_crs()
770 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0x100); in lpphy_disable_crs()
771 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xFDFF); in lpphy_disable_crs()
772 b43_phy_write(dev, B43_LPPHY_PS_CTL_OVERRIDE_VAL0, 0); in lpphy_disable_crs()
774 b43_phy_write(dev, B43_LPPHY_PS_CTL_OVERRIDE_VAL2, 0x20); in lpphy_disable_crs()
775 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xFBFF); in lpphy_disable_crs()
776 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xF7FF); in lpphy_disable_crs()
777 b43_phy_write(dev, B43_LPPHY_TX_GAIN_CTL_OVERRIDE_VAL, 0); in lpphy_disable_crs()
778 b43_phy_write(dev, B43_LPPHY_RX_GAIN_CTL_OVERRIDE_VAL, 0x45AF); in lpphy_disable_crs()
779 b43_phy_write(dev, B43_LPPHY_RF_OVERRIDE_2, 0x3FF); in lpphy_disable_crs()
785 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFF80); in lpphy_restore_crs()
786 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFC00); in lpphy_restore_crs()
793 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFFE); in lpphy_disable_rx_gain_override()
794 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFEF); in lpphy_disable_rx_gain_override()
795 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFBF); in lpphy_disable_rx_gain_override()
797 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFEFF); in lpphy_disable_rx_gain_override()
799 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFBFF); in lpphy_disable_rx_gain_override()
800 b43_phy_mask(dev, B43_PHY_OFDM(0xE5), 0xFFF7); in lpphy_disable_rx_gain_override()
803 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFDFF); in lpphy_disable_rx_gain_override()
809 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x1); in lpphy_enable_rx_gain_override()
810 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x10); in lpphy_enable_rx_gain_override()
811 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x40); in lpphy_enable_rx_gain_override()
813 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x100); in lpphy_enable_rx_gain_override()
815 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x400); in lpphy_enable_rx_gain_override()
816 b43_phy_set(dev, B43_PHY_OFDM(0xE5), 0x8); in lpphy_enable_rx_gain_override()
819 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x200); in lpphy_enable_rx_gain_override()
826 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFEFF); in lpphy_disable_tx_gain_override()
828 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFF7F); in lpphy_disable_tx_gain_override()
829 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xBFFF); in lpphy_disable_tx_gain_override()
831 b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFBF); in lpphy_disable_tx_gain_override()
837 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x100); in lpphy_enable_tx_gain_override()
839 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x80); in lpphy_enable_tx_gain_override()
840 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x4000); in lpphy_enable_tx_gain_override()
842 b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVR, 0x40); in lpphy_enable_tx_gain_override()
850 gains.dac = (b43_phy_read(dev, B43_LPPHY_AFE_DAC_CTL) & 0x380) >> 7; in lpphy_get_tx_gains()
853 B43_LPPHY_TX_GAIN_CTL_OVERRIDE_VAL) & 0x7FF; in lpphy_get_tx_gains()
854 gains.gm = tmp & 0x0007; in lpphy_get_tx_gains()
855 gains.pga = (tmp & 0x0078) >> 3; in lpphy_get_tx_gains()
856 gains.pad = (tmp & 0x780) >> 7; in lpphy_get_tx_gains()
859 gains.pad = b43_phy_read(dev, B43_PHY_OFDM(0xFB)) & 0xFF; in lpphy_get_tx_gains()
860 gains.gm = tmp & 0xFF; in lpphy_get_tx_gains()
861 gains.pga = (tmp >> 8) & 0xFF; in lpphy_get_tx_gains()
869 u16 ctl = b43_phy_read(dev, B43_LPPHY_AFE_DAC_CTL) & 0xC7F; in lpphy_set_dac_gain()
871 b43_phy_maskset(dev, B43_LPPHY_AFE_DAC_CTL, 0xF000, ctl); in lpphy_set_dac_gain()
876 return b43_phy_read(dev, B43_PHY_OFDM(0xFB)) & 0x7F; in lpphy_get_pa_gain()
881 b43_phy_maskset(dev, B43_PHY_OFDM(0xFB), 0xE03F, gain << 6); in lpphy_set_pa_gain()
882 b43_phy_maskset(dev, B43_PHY_OFDM(0xFD), 0x80FF, gain << 8); in lpphy_set_pa_gain()
893 0xF800, rf_gain); in lpphy_set_tx_gains()
902 b43_phy_maskset(dev, B43_PHY_OFDM(0xFB), in lpphy_set_tx_gains()
903 0x8000, gains.pad | (pa_gain << 6)); in lpphy_set_tx_gains()
904 b43_phy_write(dev, B43_PHY_OFDM(0xFC), in lpphy_set_tx_gains()
906 b43_phy_maskset(dev, B43_PHY_OFDM(0xFD), in lpphy_set_tx_gains()
907 0x8000, gains.pad | (pa_gain << 8)); in lpphy_set_tx_gains()
915 u16 trsw = gain & 0x1; in lpphy_rev0_1_set_rx_gain()
916 u16 lna = (gain & 0xFFFC) | ((gain & 0xC) >> 2); in lpphy_rev0_1_set_rx_gain()
919 b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFFE, trsw); in lpphy_rev0_1_set_rx_gain()
921 0xFBFF, ext_lna << 10); in lpphy_rev0_1_set_rx_gain()
923 0xF7FF, ext_lna << 11); in lpphy_rev0_1_set_rx_gain()
929 u16 low_gain = gain & 0xFFFF; in lpphy_rev2plus_set_rx_gain()
930 u16 high_gain = (gain >> 16) & 0xF; in lpphy_rev2plus_set_rx_gain()
931 u16 ext_lna = (gain >> 21) & 0x1; in lpphy_rev2plus_set_rx_gain()
932 u16 trsw = ~(gain >> 20) & 0x1; in lpphy_rev2plus_set_rx_gain()
935 b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFFE, trsw); in lpphy_rev2plus_set_rx_gain()
937 0xFDFF, ext_lna << 9); in lpphy_rev2plus_set_rx_gain()
939 0xFBFF, ext_lna << 10); in lpphy_rev2plus_set_rx_gain()
941 b43_phy_maskset(dev, B43_LPPHY_AFE_DDFS, 0xFFF0, high_gain); in lpphy_rev2plus_set_rx_gain()
943 tmp = (gain >> 2) & 0x3; in lpphy_rev2plus_set_rx_gain()
945 0xE7FF, tmp<<11); in lpphy_rev2plus_set_rx_gain()
946 b43_phy_maskset(dev, B43_PHY_OFDM(0xE6), 0xFFE7, tmp << 3); in lpphy_rev2plus_set_rx_gain()
967 b43_phy_mask(dev, B43_LPPHY_AFE_DDFS, 0xFFFD); in lpphy_stop_ddfs()
968 b43_phy_mask(dev, B43_LPPHY_LP_PHY_CTL, 0xFFDF); in lpphy_stop_ddfs()
975 b43_phy_mask(dev, B43_LPPHY_AFE_DDFS_POINTER_INIT, 0xFF80); in lpphy_run_ddfs()
976 b43_phy_mask(dev, B43_LPPHY_AFE_DDFS_POINTER_INIT, 0x80FF); in lpphy_run_ddfs()
977 b43_phy_maskset(dev, B43_LPPHY_AFE_DDFS_INCR_INIT, 0xFF80, incr1); in lpphy_run_ddfs()
978 b43_phy_maskset(dev, B43_LPPHY_AFE_DDFS_INCR_INIT, 0x80FF, incr2 << 8); in lpphy_run_ddfs()
979 b43_phy_maskset(dev, B43_LPPHY_AFE_DDFS, 0xFFF7, i_on << 3); in lpphy_run_ddfs()
980 b43_phy_maskset(dev, B43_LPPHY_AFE_DDFS, 0xFFEF, q_on << 4); in lpphy_run_ddfs()
981 b43_phy_maskset(dev, B43_LPPHY_AFE_DDFS, 0xFF9F, scale_idx << 5); in lpphy_run_ddfs()
982 b43_phy_mask(dev, B43_LPPHY_AFE_DDFS, 0xFFFB); in lpphy_run_ddfs()
983 b43_phy_set(dev, B43_LPPHY_AFE_DDFS, 0x2); in lpphy_run_ddfs()
984 b43_phy_set(dev, B43_LPPHY_LP_PHY_CTL, 0x20); in lpphy_run_ddfs()
992 b43_phy_mask(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFF7); in lpphy_rx_iq_est()
994 b43_phy_maskset(dev, B43_LPPHY_IQ_ENABLE_WAIT_TIME_ADDR, 0xFF00, time); in lpphy_rx_iq_est()
995 b43_phy_mask(dev, B43_LPPHY_IQ_ENABLE_WAIT_TIME_ADDR, 0xFEFF); in lpphy_rx_iq_est()
996 b43_phy_set(dev, B43_LPPHY_IQ_ENABLE_WAIT_TIME_ADDR, 0x200); in lpphy_rx_iq_est()
998 for (i = 0; i < 500; i++) { in lpphy_rx_iq_est()
1000 B43_LPPHY_IQ_ENABLE_WAIT_TIME_ADDR) & 0x200)) in lpphy_rx_iq_est()
1005 if ((b43_phy_read(dev, B43_LPPHY_IQ_ENABLE_WAIT_TIME_ADDR) & 0x200)) { in lpphy_rx_iq_est()
1006 b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x8); in lpphy_rx_iq_est()
1022 b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x8); in lpphy_rx_iq_est()
1032 memset(&iq_est, 0, sizeof(iq_est)); in lpphy_loopback()
1036 b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0xFFFE); in lpphy_loopback()
1037 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x800); in lpphy_loopback()
1038 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0x800); in lpphy_loopback()
1039 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x8); in lpphy_loopback()
1040 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0x8); in lpphy_loopback()
1041 b43_radio_write(dev, B2062_N_TX_CTL_A, 0x80); in lpphy_loopback()
1042 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x80); in lpphy_loopback()
1043 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0x80); in lpphy_loopback()
1044 for (i = 0; i < 32; i++) { in lpphy_loopback()
1046 lpphy_run_ddfs(dev, 1, 1, 5, 5, 0); in lpphy_loopback()
1064 if (divisor == 0) in lpphy_qdiv_roundup()
1065 return 0; in lpphy_qdiv_roundup()
1070 while (precision > 0) { in lpphy_qdiv_roundup()
1126 ctl = 0; in lpphy_write_tx_pctl_mode_to_hardware()
1130 ~B43_LPPHY_TX_PWR_CTL_CMD_MODE & 0xFFFF, ctl); in lpphy_write_tx_pctl_mode_to_hardware()
1152 0xFF80, lpphy->tssi_idx); in lpphy_set_tx_power_control()
1154 0x8FFF, ((u16)lpphy->tssi_npt << 16)); in lpphy_set_tx_power_control()
1162 b43_phy_set(dev, B43_PHY_OFDM(0xD0), 0x2); in lpphy_set_tx_power_control()
1164 b43_phy_mask(dev, B43_PHY_OFDM(0xD0), 0xFFFD); in lpphy_set_tx_power_control()
1178 0x10000, 0x10557, 0x10e2d, 0x113e0, 0x10f22, 0x0ff64, in lpphy_rev0_1_rc_calib()
1179 0x0eda2, 0x0e5d4, 0x0efd1, 0x0fbe8, 0x0b7b8, 0x04b35, in lpphy_rev0_1_rc_calib()
1180 0x01a5e, 0x00a0b, 0x00444, 0x001fd, 0x000ff, 0x00088, in lpphy_rev0_1_rc_calib()
1181 0x0004c, 0x0002c, 0x0001a, in lpphy_rev0_1_rc_calib()
1188 u32 normal_pwr, ideal_pwr, mean_sq_pwr, tmp = 0, mean_sq_pwr_min = 0; in lpphy_rev0_1_rc_calib()
1191 memset(&iq_est, 0, sizeof(iq_est)); in lpphy_rev0_1_rc_calib()
1199 old_txg_ovr = !!(b43_phy_read(dev, B43_LPPHY_AFE_CTL_OVR) & 0x40); in lpphy_rev0_1_rc_calib()
1219 b43_phy_maskset(dev, B43_LPPHY_LP_PHY_CTL, 0xFFBF, 0x40); in lpphy_rev0_1_rc_calib()
1220 b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xFFF8, 0x1); in lpphy_rev0_1_rc_calib()
1221 b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xFFC7, 0x8); in lpphy_rev0_1_rc_calib()
1222 b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xFF3F, 0xC0); in lpphy_rev0_1_rc_calib()
1225 inner_sum = 0; in lpphy_rev0_1_rc_calib()
1227 lpphy_run_ddfs(dev, 1, 1, j, j, 0); in lpphy_rev0_1_rc_calib()
1276 u8 tmp = b43_radio_read(dev, B2063_RX_BB_SP8) & 0xFF; in lpphy_rev2plus_rc_calib()
1279 b43_radio_write(dev, B2063_RX_BB_SP8, 0x0); in lpphy_rev2plus_rc_calib()
1280 b43_radio_write(dev, B2063_RC_CALIB_CTL1, 0x7E); in lpphy_rev2plus_rc_calib()
1281 b43_radio_mask(dev, B2063_PLL_SP1, 0xF7); in lpphy_rev2plus_rc_calib()
1282 b43_radio_write(dev, B2063_RC_CALIB_CTL1, 0x7C); in lpphy_rev2plus_rc_calib()
1283 b43_radio_write(dev, B2063_RC_CALIB_CTL2, 0x15); in lpphy_rev2plus_rc_calib()
1284 b43_radio_write(dev, B2063_RC_CALIB_CTL3, 0x70); in lpphy_rev2plus_rc_calib()
1285 b43_radio_write(dev, B2063_RC_CALIB_CTL4, 0x52); in lpphy_rev2plus_rc_calib()
1286 b43_radio_write(dev, B2063_RC_CALIB_CTL5, 0x1); in lpphy_rev2plus_rc_calib()
1287 b43_radio_write(dev, B2063_RC_CALIB_CTL1, 0x7D); in lpphy_rev2plus_rc_calib()
1289 for (i = 0; i < 10000; i++) { in lpphy_rev2plus_rc_calib()
1290 if (b43_radio_read(dev, B2063_RC_CALIB_CTL6) & 0x2) in lpphy_rev2plus_rc_calib()
1295 if (!(b43_radio_read(dev, B2063_RC_CALIB_CTL6) & 0x2)) in lpphy_rev2plus_rc_calib()
1298 tmp = b43_radio_read(dev, B2063_TX_BB_SP3) & 0xFF; in lpphy_rev2plus_rc_calib()
1300 b43_radio_write(dev, B2063_TX_BB_SP3, 0x0); in lpphy_rev2plus_rc_calib()
1301 b43_radio_write(dev, B2063_RC_CALIB_CTL1, 0x7E); in lpphy_rev2plus_rc_calib()
1302 b43_radio_write(dev, B2063_RC_CALIB_CTL1, 0x7C); in lpphy_rev2plus_rc_calib()
1303 b43_radio_write(dev, B2063_RC_CALIB_CTL2, 0x55); in lpphy_rev2plus_rc_calib()
1304 b43_radio_write(dev, B2063_RC_CALIB_CTL3, 0x76); in lpphy_rev2plus_rc_calib()
1307 b43_radio_write(dev, B2063_RC_CALIB_CTL4, 0xFC); in lpphy_rev2plus_rc_calib()
1308 b43_radio_write(dev, B2063_RC_CALIB_CTL5, 0x0); in lpphy_rev2plus_rc_calib()
1310 b43_radio_write(dev, B2063_RC_CALIB_CTL4, 0x13); in lpphy_rev2plus_rc_calib()
1311 b43_radio_write(dev, B2063_RC_CALIB_CTL5, 0x1); in lpphy_rev2plus_rc_calib()
1314 b43_radio_write(dev, B2063_PA_SP7, 0x7D); in lpphy_rev2plus_rc_calib()
1316 for (i = 0; i < 10000; i++) { in lpphy_rev2plus_rc_calib()
1317 if (b43_radio_read(dev, B2063_RC_CALIB_CTL6) & 0x2) in lpphy_rev2plus_rc_calib()
1322 if (!(b43_radio_read(dev, B2063_RC_CALIB_CTL6) & 0x2)) in lpphy_rev2plus_rc_calib()
1325 b43_radio_write(dev, B2063_RC_CALIB_CTL1, 0x7E); in lpphy_rev2plus_rc_calib()
1352 b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFD, antenna & 0x2); in b43_lpphy_op_set_rx_antenna()
1353 b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFE, antenna & 0x1); in b43_lpphy_op_set_rx_antenna()
1364 tmp[0] = a; in lpphy_set_tx_iqcc()
1366 b43_lptab_write_bulk(dev, B43_LPTAB16(0, 80), 2, tmp); in lpphy_set_tx_iqcc()
1382 gains.pad = (tx_gain >> 16) & 0xFF; in lpphy_set_tx_power_by_index()
1383 gains.gm = tx_gain & 0xFF; in lpphy_set_tx_power_by_index()
1384 gains.pga = (tx_gain >> 8) & 0xFF; in lpphy_set_tx_power_by_index()
1385 gains.dac = (iq_comp >> 28) & 0xFF; in lpphy_set_tx_power_by_index()
1391 0xF800, (tx_gain >> 4) & 0x7FFF); in lpphy_set_tx_power_by_index()
1392 lpphy_set_dac_gain(dev, tx_gain & 0x7); in lpphy_set_tx_power_by_index()
1393 lpphy_set_pa_gain(dev, (tx_gain >> 24) & 0x7F); in lpphy_set_tx_power_by_index()
1395 lpphy_set_bb_mult(dev, (iq_comp >> 20) & 0xFF); in lpphy_set_tx_power_by_index()
1396 lpphy_set_tx_iqcc(dev, (iq_comp >> 10) & 0x3FF, iq_comp & 0x3FF); in lpphy_set_tx_power_by_index()
1402 b43_lptab_write(dev, B43_LPTAB16(0, 85), coeff & 0xFFFF); in lpphy_set_tx_power_by_index()
1405 b43_phy_maskset(dev, B43_LPPHY_RF_PWR_OVERRIDE, 0xFF00, in lpphy_set_tx_power_by_index()
1406 rf_power & 0xFFFF);//SPEC FIXME mask & set != 0 in lpphy_set_tx_power_by_index()
1413 b43_write16(dev, B43_MMIO_BTCOEX_CTL, 0x3); in lpphy_btcoex_override()
1414 b43_write16(dev, B43_MMIO_BTCOEX_TXCTL, 0xFF); in lpphy_btcoex_override()
1423 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0x83FF); in b43_lpphy_op_software_rfkill()
1424 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x1F00); in b43_lpphy_op_software_rfkill()
1425 b43_phy_mask(dev, B43_LPPHY_AFE_DDFS, 0x80FF); in b43_lpphy_op_software_rfkill()
1426 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xDFFF); in b43_lpphy_op_software_rfkill()
1427 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x0808); in b43_lpphy_op_software_rfkill()
1429 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xE0FF); in b43_lpphy_op_software_rfkill()
1430 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x1F00); in b43_lpphy_op_software_rfkill()
1431 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xFCFF); in b43_lpphy_op_software_rfkill()
1432 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x0018); in b43_lpphy_op_software_rfkill()
1435 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xE0FF); in b43_lpphy_op_software_rfkill()
1437 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xF7F7); in b43_lpphy_op_software_rfkill()
1439 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFFE7); in b43_lpphy_op_software_rfkill()
1450 b43_phy_maskset(dev, B43_LPPHY_LP_PHY_CTL, 0xFCFF, tmp << 9); in lpphy_set_analog_filter()
1454 b43_radio_write(dev, B2063_TX_BB_SP3, 0x3F); in lpphy_set_analog_filter()
1461 b43_radio_set(dev, B2063_PA_SP1, 0x2); in lpphy_set_tssi_mux()
1462 b43_phy_set(dev, B43_PHY_OFDM(0xF3), 0x1000); in lpphy_set_tssi_mux()
1463 b43_radio_write(dev, B2063_PA_CTL10, 0x51); in lpphy_set_tssi_mux()
1465 b43_radio_mask(dev, B2063_PA_SP1, 0xFFFE); in lpphy_set_tssi_mux()
1466 b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0xFFC7); in lpphy_set_tssi_mux()
1468 b43_radio_maskset(dev, B2063_PA_SP1, 0xFFFE, 0x1); in lpphy_set_tssi_mux()
1470 0xFFC7, 0x20); in lpphy_set_tssi_mux()
1483 for (i = 0; i < 64; i++) { in lpphy_tx_pctl_init_hw()
1490 b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_NNUM, 0xFF00, 0xFF); in lpphy_tx_pctl_init_hw()
1491 b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_NNUM, 0x8FFF, 0x5000); in lpphy_tx_pctl_init_hw()
1492 b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_IDLETSSI, 0xFFC0, 0x1F); in lpphy_tx_pctl_init_hw()
1494 b43_phy_mask(dev, B43_LPPHY_LP_PHY_CTL, 0xEFFF); in lpphy_tx_pctl_init_hw()
1495 b43_phy_maskset(dev, B43_LPPHY_LP_PHY_CTL, 0xDFFF, 0x2000); in lpphy_tx_pctl_init_hw()
1497 b43_phy_mask(dev, B43_PHY_OFDM(0x103), 0xFFFE); in lpphy_tx_pctl_init_hw()
1498 b43_phy_maskset(dev, B43_PHY_OFDM(0x103), 0xFFFB, 0x4); in lpphy_tx_pctl_init_hw()
1499 b43_phy_maskset(dev, B43_PHY_OFDM(0x103), 0xFFEF, 0x10); in lpphy_tx_pctl_init_hw()
1500 b43_radio_maskset(dev, B2063_IQ_CALIB_CTL2, 0xF3, 0x1); in lpphy_tx_pctl_init_hw()
1503 b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_IDLETSSI, 0x7FFF, 0x8000); in lpphy_tx_pctl_init_hw()
1504 b43_phy_mask(dev, B43_LPPHY_TX_PWR_CTL_DELTAPWR_LIMIT, 0xFF); in lpphy_tx_pctl_init_hw()
1505 b43_phy_write(dev, B43_LPPHY_TX_PWR_CTL_DELTAPWR_LIMIT, 0xA); in lpphy_tx_pctl_init_hw()
1507 ~B43_LPPHY_TX_PWR_CTL_CMD_MODE & 0xFFFF, in lpphy_tx_pctl_init_hw()
1509 b43_phy_mask(dev, B43_LPPHY_TX_PWR_CTL_NNUM, 0xF8FF); in lpphy_tx_pctl_init_hw()
1511 ~B43_LPPHY_TX_PWR_CTL_CMD_MODE & 0xFFFF, in lpphy_tx_pctl_init_hw()
1515 b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_0, 0xEFFF, 0x1000); in lpphy_tx_pctl_init_hw()
1516 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xEFFF); in lpphy_tx_pctl_init_hw()
1518 lpphy_set_tx_power_by_index(dev, 0x7F); in lpphy_tx_pctl_init_hw()
1524 if (tmp & 0x8000) { in lpphy_tx_pctl_init_hw()
1526 0xFFC0, (tmp & 0xFF) - 32); in lpphy_tx_pctl_init_hw()
1529 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xEFFF); in lpphy_tx_pctl_init_hw()
1531 // (SPEC?) TODO Set "Target TX frequency" variable to 0 in lpphy_tx_pctl_init_hw()
1532 // SPEC FIXME "Set BB Multiplier to 0xE000" impossible - bb_mult is u8! in lpphy_tx_pctl_init_hw()
1543 gains.dac = 0; in lpphy_tx_pctl_init_sw()
1548 gains.dac = 0; in lpphy_tx_pctl_init_sw()
1557 if (0/*FIXME HWPCTL capable */) { in lpphy_tx_pctl_init()
1573 saved_tab = kcalloc(saved_tab_size, sizeof(saved_tab[0]), GFP_KERNEL); in lpphy_pr41573_workaround()
1586 b43_lptab_read_bulk(dev, B43_LPTAB32(10, 0x140), in lpphy_pr41573_workaround()
1589 b43_lptab_read_bulk(dev, B43_LPTAB32(7, 0x140), in lpphy_pr41573_workaround()
1599 b43_lptab_write_bulk(dev, B43_LPTAB32(10, 0x140), in lpphy_pr41573_workaround()
1602 b43_lptab_write_bulk(dev, B43_LPTAB32(7, 0x140), in lpphy_pr41573_workaround()
1692 .chan = 0,
1694 .c0 = 0,
1705 c1 |= 0xFF; in lpphy_calc_rx_iq_comp()
1707 b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S, 0xFF00, 0x00C0); in lpphy_calc_rx_iq_comp()
1708 b43_phy_mask(dev, B43_LPPHY_RX_COMP_COEFF_S, 0x00FF); in lpphy_calc_rx_iq_comp()
1719 ret = 0; in lpphy_calc_rx_iq_comp()
1727 if (tmp1 >= 0) { in lpphy_calc_rx_iq_comp()
1737 if (tmp2 >= 0) in lpphy_calc_rx_iq_comp()
1749 b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S, 0xFF00, c1); in lpphy_calc_rx_iq_comp()
1750 b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S, 0x00FF, c0 << 8); in lpphy_calc_rx_iq_comp()
1758 0xFFC0, samples - 1); in lpphy_run_samples()
1759 if (loops != 0xFFFF) in lpphy_run_samples()
1761 b43_phy_maskset(dev, B43_LPPHY_SMPL_PLAY_COUNT, 0xF000, loops); in lpphy_run_samples()
1762 b43_phy_maskset(dev, B43_LPPHY_SMPL_PLAY_BUFFER_CTL, 0x3F, wait << 6); in lpphy_run_samples()
1763 b43_phy_set(dev, B43_LPPHY_A_PHY_CTL_ADDR, 0x1); in lpphy_run_samples()
1771 int i, samples = 0, theta = 0; in lpphy_start_tx_tone()
1788 for (i = 0; i < samples; i++) { in lpphy_start_tx_tone()
1791 buf[i] = CORDIC_FLOAT((sample.i * max) & 0xFF) << 8; in lpphy_start_tx_tone()
1792 buf[i] |= CORDIC_FLOAT((sample.q * max) & 0xFF); in lpphy_start_tx_tone()
1795 b43_lptab_write_bulk(dev, B43_LPTAB16(5, 0), samples, buf); in lpphy_start_tx_tone()
1797 lpphy_run_samples(dev, samples, 0xFFFF, 0); in lpphy_start_tx_tone()
1805 lpphy->tx_tone_freq = 0; in lpphy_stop_tx_tone()
1807 b43_phy_mask(dev, B43_LPPHY_SMPL_PLAY_COUNT, 0xF000); in lpphy_stop_tx_tone()
1808 for (i = 0; i < 31; i++) { in lpphy_stop_tx_tone()
1809 if (!(b43_phy_read(dev, B43_LPPHY_A_PHY_CTL_ADDR) & 0x1)) in lpphy_stop_tx_tone()
1824 old_afe_ovr = b43_phy_read(dev, B43_LPPHY_AFE_CTL_OVR) & 0x40; in lpphy_papd_cal_txpwr()
1827 old_rf = b43_phy_read(dev, B43_LPPHY_RF_PWR_OVERRIDE) & 0xFF; in lpphy_papd_cal_txpwr()
1836 b43_phy_maskset(dev, B43_LPPHY_RF_PWR_OVERRIDE, 0xFF00, old_rf); in lpphy_papd_cal_txpwr()
1848 memset(&nogains, 0, sizeof(nogains)); in lpphy_rx_iq_cal()
1849 memset(&oldgains, 0, sizeof(oldgains)); in lpphy_rx_iq_cal()
1851 if (dev->dev->chip_id == 0x5354) { in lpphy_rx_iq_cal()
1852 for (i = 0; i < ARRAY_SIZE(lpphy_5354_iq_table); i++) { in lpphy_rx_iq_cal()
1860 for (i = 0; i < ARRAY_SIZE(lpphy_rev0_1_iq_table); i++) { in lpphy_rx_iq_cal()
1868 return 0; in lpphy_rx_iq_cal()
1870 b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S, 0xFF00, iqcomp->c1); in lpphy_rx_iq_cal()
1872 0x00FF, iqcomp->c0 << 8); in lpphy_rx_iq_cal()
1883 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x8); in lpphy_rx_iq_cal()
1885 0xFFF7, pa << 3); in lpphy_rx_iq_cal()
1887 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x20); in lpphy_rx_iq_cal()
1889 0xFFDF, pa << 5); in lpphy_rx_iq_cal()
1892 tmp = b43_phy_read(dev, B43_LPPHY_AFE_CTL_OVR) & 0x40; in lpphy_rx_iq_cal()
1895 lpphy_set_rx_gain(dev, 0x2D5D); in lpphy_rx_iq_cal()
1904 b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFFE); in lpphy_rx_iq_cal()
1905 b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0xFFFE); in lpphy_rx_iq_cal()
1906 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x800); in lpphy_rx_iq_cal()
1907 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0x800); in lpphy_rx_iq_cal()
1910 ret = lpphy_calc_rx_iq_comp(dev, 0xFFF0); in lpphy_rx_iq_cal()
1913 ret = lpphy_calc_rx_iq_comp(dev, 0x4000); in lpphy_rx_iq_cal()
1917 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFFC); in lpphy_rx_iq_cal()
1918 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFF7); in lpphy_rx_iq_cal()
1919 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFDF); in lpphy_rx_iq_cal()
1927 b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFFE); in lpphy_rx_iq_cal()
1928 b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0xF7FF); in lpphy_rx_iq_cal()
1952 if ((dev->phy.rev == 0) && (saved_pctl_mode != B43_LPPHY_TXPCTL_OFF)) in lpphy_calibration()
1979 if (reg != 0x4001) in b43_lpphy_op_radio_read()
1980 reg |= 0x100; in b43_lpphy_op_radio_read()
1982 reg |= 0x200; in b43_lpphy_op_radio_read()
2004 { .channel = 1, .freq = 2412, .data[0] = 0xFF, .data[1] = 0xFF,
2005 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2006 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2007 { .channel = 2, .freq = 2417, .data[0] = 0xFF, .data[1] = 0xFF,
2008 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2009 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2010 { .channel = 3, .freq = 2422, .data[0] = 0xFF, .data[1] = 0xFF,
2011 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2012 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2013 { .channel = 4, .freq = 2427, .data[0] = 0xFF, .data[1] = 0xFF,
2014 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2015 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2016 { .channel = 5, .freq = 2432, .data[0] = 0xFF, .data[1] = 0xFF,
2017 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2018 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2019 { .channel = 6, .freq = 2437, .data[0] = 0xFF, .data[1] = 0xFF,
2020 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2021 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2022 { .channel = 7, .freq = 2442, .data[0] = 0xFF, .data[1] = 0xFF,
2023 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2024 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2025 { .channel = 8, .freq = 2447, .data[0] = 0xFF, .data[1] = 0xFF,
2026 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2027 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2028 { .channel = 9, .freq = 2452, .data[0] = 0xFF, .data[1] = 0xFF,
2029 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2030 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2031 { .channel = 10, .freq = 2457, .data[0] = 0xFF, .data[1] = 0xFF,
2032 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2033 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2034 { .channel = 11, .freq = 2462, .data[0] = 0xFF, .data[1] = 0xFF,
2035 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2036 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2037 { .channel = 12, .freq = 2467, .data[0] = 0xFF, .data[1] = 0xFF,
2038 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2039 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2040 { .channel = 13, .freq = 2472, .data[0] = 0xFF, .data[1] = 0xFF,
2041 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2042 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2043 { .channel = 14, .freq = 2484, .data[0] = 0xFF, .data[1] = 0xFF,
2044 .data[2] = 0xB5, .data[3] = 0x1B, .data[4] = 0x24, .data[5] = 0x32,
2045 .data[6] = 0x32, .data[7] = 0x88, .data[8] = 0x88, },
2046 { .channel = 34, .freq = 5170, .data[0] = 0x00, .data[1] = 0x22,
2047 .data[2] = 0x20, .data[3] = 0x84, .data[4] = 0x3C, .data[5] = 0x77,
2048 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2049 { .channel = 38, .freq = 5190, .data[0] = 0x00, .data[1] = 0x11,
2050 .data[2] = 0x10, .data[3] = 0x83, .data[4] = 0x3C, .data[5] = 0x77,
2051 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2052 { .channel = 42, .freq = 5210, .data[0] = 0x00, .data[1] = 0x11,
2053 .data[2] = 0x10, .data[3] = 0x83, .data[4] = 0x3C, .data[5] = 0x77,
2054 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2055 { .channel = 46, .freq = 5230, .data[0] = 0x00, .data[1] = 0x00,
2056 .data[2] = 0x00, .data[3] = 0x83, .data[4] = 0x3C, .data[5] = 0x77,
2057 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2058 { .channel = 36, .freq = 5180, .data[0] = 0x00, .data[1] = 0x11,
2059 .data[2] = 0x20, .data[3] = 0x83, .data[4] = 0x3C, .data[5] = 0x77,
2060 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2061 { .channel = 40, .freq = 5200, .data[0] = 0x00, .data[1] = 0x11,
2062 .data[2] = 0x10, .data[3] = 0x84, .data[4] = 0x3C, .data[5] = 0x77,
2063 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2064 { .channel = 44, .freq = 5220, .data[0] = 0x00, .data[1] = 0x11,
2065 .data[2] = 0x00, .data[3] = 0x83, .data[4] = 0x3C, .data[5] = 0x77,
2066 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2067 { .channel = 48, .freq = 5240, .data[0] = 0x00, .data[1] = 0x00,
2068 .data[2] = 0x00, .data[3] = 0x83, .data[4] = 0x3C, .data[5] = 0x77,
2069 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2070 { .channel = 52, .freq = 5260, .data[0] = 0x00, .data[1] = 0x00,
2071 .data[2] = 0x00, .data[3] = 0x83, .data[4] = 0x3C, .data[5] = 0x77,
2072 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2073 { .channel = 56, .freq = 5280, .data[0] = 0x00, .data[1] = 0x00,
2074 .data[2] = 0x00, .data[3] = 0x83, .data[4] = 0x3C, .data[5] = 0x77,
2075 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2076 { .channel = 60, .freq = 5300, .data[0] = 0x00, .data[1] = 0x00,
2077 .data[2] = 0x00, .data[3] = 0x63, .data[4] = 0x3C, .data[5] = 0x77,
2078 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2079 { .channel = 64, .freq = 5320, .data[0] = 0x00, .data[1] = 0x00,
2080 .data[2] = 0x00, .data[3] = 0x62, .data[4] = 0x3C, .data[5] = 0x77,
2081 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2082 { .channel = 100, .freq = 5500, .data[0] = 0x00, .data[1] = 0x00,
2083 .data[2] = 0x00, .data[3] = 0x30, .data[4] = 0x3C, .data[5] = 0x77,
2084 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2085 { .channel = 104, .freq = 5520, .data[0] = 0x00, .data[1] = 0x00,
2086 .data[2] = 0x00, .data[3] = 0x20, .data[4] = 0x3C, .data[5] = 0x77,
2087 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2088 { .channel = 108, .freq = 5540, .data[0] = 0x00, .data[1] = 0x00,
2089 .data[2] = 0x00, .data[3] = 0x20, .data[4] = 0x3C, .data[5] = 0x77,
2090 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2091 { .channel = 112, .freq = 5560, .data[0] = 0x00, .data[1] = 0x00,
2092 .data[2] = 0x00, .data[3] = 0x20, .data[4] = 0x3C, .data[5] = 0x77,
2093 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2094 { .channel = 116, .freq = 5580, .data[0] = 0x00, .data[1] = 0x00,
2095 .data[2] = 0x00, .data[3] = 0x10, .data[4] = 0x3C, .data[5] = 0x77,
2096 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2097 { .channel = 120, .freq = 5600, .data[0] = 0x00, .data[1] = 0x00,
2098 .data[2] = 0x00, .data[3] = 0x00, .data[4] = 0x3C, .data[5] = 0x77,
2099 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2100 { .channel = 124, .freq = 5620, .data[0] = 0x00, .data[1] = 0x00,
2101 .data[2] = 0x00, .data[3] = 0x00, .data[4] = 0x3C, .data[5] = 0x77,
2102 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2103 { .channel = 128, .freq = 5640, .data[0] = 0x00, .data[1] = 0x00,
2104 .data[2] = 0x00, .data[3] = 0x00, .data[4] = 0x3C, .data[5] = 0x77,
2105 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2106 { .channel = 132, .freq = 5660, .data[0] = 0x00, .data[1] = 0x00,
2107 .data[2] = 0x00, .data[3] = 0x00, .data[4] = 0x3C, .data[5] = 0x77,
2108 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2109 { .channel = 136, .freq = 5680, .data[0] = 0x00, .data[1] = 0x00,
2110 .data[2] = 0x00, .data[3] = 0x00, .data[4] = 0x3C, .data[5] = 0x77,
2111 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2112 { .channel = 140, .freq = 5700, .data[0] = 0x00, .data[1] = 0x00,
2113 .data[2] = 0x00, .data[3] = 0x00, .data[4] = 0x3C, .data[5] = 0x77,
2114 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2115 { .channel = 149, .freq = 5745, .data[0] = 0x00, .data[1] = 0x00,
2116 .data[2] = 0x00, .data[3] = 0x00, .data[4] = 0x3C, .data[5] = 0x77,
2117 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2118 { .channel = 153, .freq = 5765, .data[0] = 0x00, .data[1] = 0x00,
2119 .data[2] = 0x00, .data[3] = 0x00, .data[4] = 0x3C, .data[5] = 0x77,
2120 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2121 { .channel = 157, .freq = 5785, .data[0] = 0x00, .data[1] = 0x00,
2122 .data[2] = 0x00, .data[3] = 0x00, .data[4] = 0x3C, .data[5] = 0x77,
2123 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2124 { .channel = 161, .freq = 5805, .data[0] = 0x00, .data[1] = 0x00,
2125 .data[2] = 0x00, .data[3] = 0x00, .data[4] = 0x3C, .data[5] = 0x77,
2126 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2127 { .channel = 165, .freq = 5825, .data[0] = 0x00, .data[1] = 0x00,
2128 .data[2] = 0x00, .data[3] = 0x00, .data[4] = 0x3C, .data[5] = 0x77,
2129 .data[6] = 0x37, .data[7] = 0xFF, .data[8] = 0x88, },
2130 { .channel = 184, .freq = 4920, .data[0] = 0x55, .data[1] = 0x77,
2131 .data[2] = 0x90, .data[3] = 0xF7, .data[4] = 0x3C, .data[5] = 0x77,
2132 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0xFF, },
2133 { .channel = 188, .freq = 4940, .data[0] = 0x44, .data[1] = 0x77,
2134 .data[2] = 0x80, .data[3] = 0xE7, .data[4] = 0x3C, .data[5] = 0x77,
2135 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0xFF, },
2136 { .channel = 192, .freq = 4960, .data[0] = 0x44, .data[1] = 0x66,
2137 .data[2] = 0x80, .data[3] = 0xE7, .data[4] = 0x3C, .data[5] = 0x77,
2138 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0xFF, },
2139 { .channel = 196, .freq = 4980, .data[0] = 0x33, .data[1] = 0x66,
2140 .data[2] = 0x70, .data[3] = 0xC7, .data[4] = 0x3C, .data[5] = 0x77,
2141 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0xFF, },
2142 { .channel = 200, .freq = 5000, .data[0] = 0x22, .data[1] = 0x55,
2143 .data[2] = 0x60, .data[3] = 0xD7, .data[4] = 0x3C, .data[5] = 0x77,
2144 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0xFF, },
2145 { .channel = 204, .freq = 5020, .data[0] = 0x22, .data[1] = 0x55,
2146 .data[2] = 0x60, .data[3] = 0xC7, .data[4] = 0x3C, .data[5] = 0x77,
2147 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0xFF, },
2148 { .channel = 208, .freq = 5040, .data[0] = 0x22, .data[1] = 0x44,
2149 .data[2] = 0x50, .data[3] = 0xC7, .data[4] = 0x3C, .data[5] = 0x77,
2150 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0xFF, },
2151 { .channel = 212, .freq = 5060, .data[0] = 0x11, .data[1] = 0x44,
2152 .data[2] = 0x50, .data[3] = 0xA5, .data[4] = 0x3C, .data[5] = 0x77,
2153 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2154 { .channel = 216, .freq = 5080, .data[0] = 0x00, .data[1] = 0x44,
2155 .data[2] = 0x40, .data[3] = 0xB6, .data[4] = 0x3C, .data[5] = 0x77,
2156 .data[6] = 0x35, .data[7] = 0xFF, .data[8] = 0x88, },
2160 { .channel = 1, .freq = 2412, .data[0] = 0x6F, .data[1] = 0x3C,
2161 .data[2] = 0x3C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2162 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2163 .data[10] = 0x80, .data[11] = 0x70, },
2164 { .channel = 2, .freq = 2417, .data[0] = 0x6F, .data[1] = 0x3C,
2165 .data[2] = 0x3C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2166 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2167 .data[10] = 0x80, .data[11] = 0x70, },
2168 { .channel = 3, .freq = 2422, .data[0] = 0x6F, .data[1] = 0x3C,
2169 .data[2] = 0x3C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2170 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2171 .data[10] = 0x80, .data[11] = 0x70, },
2172 { .channel = 4, .freq = 2427, .data[0] = 0x6F, .data[1] = 0x2C,
2173 .data[2] = 0x2C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2174 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2175 .data[10] = 0x80, .data[11] = 0x70, },
2176 { .channel = 5, .freq = 2432, .data[0] = 0x6F, .data[1] = 0x2C,
2177 .data[2] = 0x2C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2178 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2179 .data[10] = 0x80, .data[11] = 0x70, },
2180 { .channel = 6, .freq = 2437, .data[0] = 0x6F, .data[1] = 0x2C,
2181 .data[2] = 0x2C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2182 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2183 .data[10] = 0x80, .data[11] = 0x70, },
2184 { .channel = 7, .freq = 2442, .data[0] = 0x6F, .data[1] = 0x2C,
2185 .data[2] = 0x2C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2186 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2187 .data[10] = 0x80, .data[11] = 0x70, },
2188 { .channel = 8, .freq = 2447, .data[0] = 0x6F, .data[1] = 0x2C,
2189 .data[2] = 0x2C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2190 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2191 .data[10] = 0x80, .data[11] = 0x70, },
2192 { .channel = 9, .freq = 2452, .data[0] = 0x6F, .data[1] = 0x1C,
2193 .data[2] = 0x1C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2194 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2195 .data[10] = 0x80, .data[11] = 0x70, },
2196 { .channel = 10, .freq = 2457, .data[0] = 0x6F, .data[1] = 0x1C,
2197 .data[2] = 0x1C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2198 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2199 .data[10] = 0x80, .data[11] = 0x70, },
2200 { .channel = 11, .freq = 2462, .data[0] = 0x6E, .data[1] = 0x1C,
2201 .data[2] = 0x1C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2202 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2203 .data[10] = 0x80, .data[11] = 0x70, },
2204 { .channel = 12, .freq = 2467, .data[0] = 0x6E, .data[1] = 0x1C,
2205 .data[2] = 0x1C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2206 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2207 .data[10] = 0x80, .data[11] = 0x70, },
2208 { .channel = 13, .freq = 2472, .data[0] = 0x6E, .data[1] = 0x1C,
2209 .data[2] = 0x1C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2210 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2211 .data[10] = 0x80, .data[11] = 0x70, },
2212 { .channel = 14, .freq = 2484, .data[0] = 0x6E, .data[1] = 0x0C,
2213 .data[2] = 0x0C, .data[3] = 0x04, .data[4] = 0x05, .data[5] = 0x05,
2214 .data[6] = 0x05, .data[7] = 0x05, .data[8] = 0x77, .data[9] = 0x80,
2215 .data[10] = 0x80, .data[11] = 0x70, },
2216 { .channel = 34, .freq = 5170, .data[0] = 0x6A, .data[1] = 0x0C,
2217 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x02, .data[5] = 0x05,
2218 .data[6] = 0x0D, .data[7] = 0x0D, .data[8] = 0x77, .data[9] = 0x80,
2219 .data[10] = 0x20, .data[11] = 0x00, },
2220 { .channel = 36, .freq = 5180, .data[0] = 0x6A, .data[1] = 0x0C,
2221 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x01, .data[5] = 0x05,
2222 .data[6] = 0x0D, .data[7] = 0x0C, .data[8] = 0x77, .data[9] = 0x80,
2223 .data[10] = 0x20, .data[11] = 0x00, },
2224 { .channel = 38, .freq = 5190, .data[0] = 0x6A, .data[1] = 0x0C,
2225 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x01, .data[5] = 0x04,
2226 .data[6] = 0x0C, .data[7] = 0x0C, .data[8] = 0x77, .data[9] = 0x80,
2227 .data[10] = 0x20, .data[11] = 0x00, },
2228 { .channel = 40, .freq = 5200, .data[0] = 0x69, .data[1] = 0x0C,
2229 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x01, .data[5] = 0x04,
2230 .data[6] = 0x0C, .data[7] = 0x0C, .data[8] = 0x77, .data[9] = 0x70,
2231 .data[10] = 0x20, .data[11] = 0x00, },
2232 { .channel = 42, .freq = 5210, .data[0] = 0x69, .data[1] = 0x0C,
2233 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x01, .data[5] = 0x04,
2234 .data[6] = 0x0B, .data[7] = 0x0C, .data[8] = 0x77, .data[9] = 0x70,
2235 .data[10] = 0x20, .data[11] = 0x00, },
2236 { .channel = 44, .freq = 5220, .data[0] = 0x69, .data[1] = 0x0C,
2237 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x04,
2238 .data[6] = 0x0B, .data[7] = 0x0B, .data[8] = 0x77, .data[9] = 0x60,
2239 .data[10] = 0x20, .data[11] = 0x00, },
2240 { .channel = 46, .freq = 5230, .data[0] = 0x69, .data[1] = 0x0C,
2241 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x03,
2242 .data[6] = 0x0A, .data[7] = 0x0B, .data[8] = 0x77, .data[9] = 0x60,
2243 .data[10] = 0x20, .data[11] = 0x00, },
2244 { .channel = 48, .freq = 5240, .data[0] = 0x69, .data[1] = 0x0C,
2245 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x03,
2246 .data[6] = 0x0A, .data[7] = 0x0A, .data[8] = 0x77, .data[9] = 0x60,
2247 .data[10] = 0x20, .data[11] = 0x00, },
2248 { .channel = 52, .freq = 5260, .data[0] = 0x68, .data[1] = 0x0C,
2249 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x02,
2250 .data[6] = 0x09, .data[7] = 0x09, .data[8] = 0x77, .data[9] = 0x60,
2251 .data[10] = 0x20, .data[11] = 0x00, },
2252 { .channel = 56, .freq = 5280, .data[0] = 0x68, .data[1] = 0x0C,
2253 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x01,
2254 .data[6] = 0x08, .data[7] = 0x08, .data[8] = 0x77, .data[9] = 0x50,
2255 .data[10] = 0x10, .data[11] = 0x00, },
2256 { .channel = 60, .freq = 5300, .data[0] = 0x68, .data[1] = 0x0C,
2257 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x01,
2258 .data[6] = 0x08, .data[7] = 0x08, .data[8] = 0x77, .data[9] = 0x50,
2259 .data[10] = 0x10, .data[11] = 0x00, },
2260 { .channel = 64, .freq = 5320, .data[0] = 0x67, .data[1] = 0x0C,
2261 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2262 .data[6] = 0x08, .data[7] = 0x08, .data[8] = 0x77, .data[9] = 0x50,
2263 .data[10] = 0x10, .data[11] = 0x00, },
2264 { .channel = 100, .freq = 5500, .data[0] = 0x64, .data[1] = 0x0C,
2265 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2266 .data[6] = 0x02, .data[7] = 0x01, .data[8] = 0x77, .data[9] = 0x20,
2267 .data[10] = 0x00, .data[11] = 0x00, },
2268 { .channel = 104, .freq = 5520, .data[0] = 0x64, .data[1] = 0x0C,
2269 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2270 .data[6] = 0x01, .data[7] = 0x01, .data[8] = 0x77, .data[9] = 0x20,
2271 .data[10] = 0x00, .data[11] = 0x00, },
2272 { .channel = 108, .freq = 5540, .data[0] = 0x63, .data[1] = 0x0C,
2273 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2274 .data[6] = 0x01, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x10,
2275 .data[10] = 0x00, .data[11] = 0x00, },
2276 { .channel = 112, .freq = 5560, .data[0] = 0x63, .data[1] = 0x0C,
2277 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2278 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x10,
2279 .data[10] = 0x00, .data[11] = 0x00, },
2280 { .channel = 116, .freq = 5580, .data[0] = 0x62, .data[1] = 0x0C,
2281 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2282 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x10,
2283 .data[10] = 0x00, .data[11] = 0x00, },
2284 { .channel = 120, .freq = 5600, .data[0] = 0x62, .data[1] = 0x0C,
2285 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2286 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x00,
2287 .data[10] = 0x00, .data[11] = 0x00, },
2288 { .channel = 124, .freq = 5620, .data[0] = 0x62, .data[1] = 0x0C,
2289 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2290 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x00,
2291 .data[10] = 0x00, .data[11] = 0x00, },
2292 { .channel = 128, .freq = 5640, .data[0] = 0x61, .data[1] = 0x0C,
2293 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2294 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x00,
2295 .data[10] = 0x00, .data[11] = 0x00, },
2296 { .channel = 132, .freq = 5660, .data[0] = 0x61, .data[1] = 0x0C,
2297 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2298 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x00,
2299 .data[10] = 0x00, .data[11] = 0x00, },
2300 { .channel = 136, .freq = 5680, .data[0] = 0x61, .data[1] = 0x0C,
2301 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2302 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x00,
2303 .data[10] = 0x00, .data[11] = 0x00, },
2304 { .channel = 140, .freq = 5700, .data[0] = 0x60, .data[1] = 0x0C,
2305 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2306 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x00,
2307 .data[10] = 0x00, .data[11] = 0x00, },
2308 { .channel = 149, .freq = 5745, .data[0] = 0x60, .data[1] = 0x0C,
2309 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2310 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x00,
2311 .data[10] = 0x00, .data[11] = 0x00, },
2312 { .channel = 153, .freq = 5765, .data[0] = 0x60, .data[1] = 0x0C,
2313 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2314 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x00,
2315 .data[10] = 0x00, .data[11] = 0x00, },
2316 { .channel = 157, .freq = 5785, .data[0] = 0x60, .data[1] = 0x0C,
2317 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2318 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x00,
2319 .data[10] = 0x00, .data[11] = 0x00, },
2320 { .channel = 161, .freq = 5805, .data[0] = 0x60, .data[1] = 0x0C,
2321 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2322 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x00,
2323 .data[10] = 0x00, .data[11] = 0x00, },
2324 { .channel = 165, .freq = 5825, .data[0] = 0x60, .data[1] = 0x0C,
2325 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x00, .data[5] = 0x00,
2326 .data[6] = 0x00, .data[7] = 0x00, .data[8] = 0x77, .data[9] = 0x00,
2327 .data[10] = 0x00, .data[11] = 0x00, },
2328 { .channel = 184, .freq = 4920, .data[0] = 0x6E, .data[1] = 0x0C,
2329 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x09, .data[5] = 0x0E,
2330 .data[6] = 0x0F, .data[7] = 0x0F, .data[8] = 0x77, .data[9] = 0xC0,
2331 .data[10] = 0x50, .data[11] = 0x00, },
2332 { .channel = 188, .freq = 4940, .data[0] = 0x6E, .data[1] = 0x0C,
2333 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x09, .data[5] = 0x0D,
2334 .data[6] = 0x0F, .data[7] = 0x0F, .data[8] = 0x77, .data[9] = 0xB0,
2335 .data[10] = 0x50, .data[11] = 0x00, },
2336 { .channel = 192, .freq = 4960, .data[0] = 0x6E, .data[1] = 0x0C,
2337 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x08, .data[5] = 0x0C,
2338 .data[6] = 0x0F, .data[7] = 0x0F, .data[8] = 0x77, .data[9] = 0xB0,
2339 .data[10] = 0x50, .data[11] = 0x00, },
2340 { .channel = 196, .freq = 4980, .data[0] = 0x6D, .data[1] = 0x0C,
2341 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x08, .data[5] = 0x0C,
2342 .data[6] = 0x0F, .data[7] = 0x0F, .data[8] = 0x77, .data[9] = 0xA0,
2343 .data[10] = 0x40, .data[11] = 0x00, },
2344 { .channel = 200, .freq = 5000, .data[0] = 0x6D, .data[1] = 0x0C,
2345 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x08, .data[5] = 0x0B,
2346 .data[6] = 0x0F, .data[7] = 0x0F, .data[8] = 0x77, .data[9] = 0xA0,
2347 .data[10] = 0x40, .data[11] = 0x00, },
2348 { .channel = 204, .freq = 5020, .data[0] = 0x6D, .data[1] = 0x0C,
2349 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x08, .data[5] = 0x0A,
2350 .data[6] = 0x0F, .data[7] = 0x0F, .data[8] = 0x77, .data[9] = 0xA0,
2351 .data[10] = 0x40, .data[11] = 0x00, },
2352 { .channel = 208, .freq = 5040, .data[0] = 0x6C, .data[1] = 0x0C,
2353 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x07, .data[5] = 0x09,
2354 .data[6] = 0x0F, .data[7] = 0x0F, .data[8] = 0x77, .data[9] = 0x90,
2355 .data[10] = 0x40, .data[11] = 0x00, },
2356 { .channel = 212, .freq = 5060, .data[0] = 0x6C, .data[1] = 0x0C,
2357 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x06, .data[5] = 0x08,
2358 .data[6] = 0x0F, .data[7] = 0x0F, .data[8] = 0x77, .data[9] = 0x90,
2359 .data[10] = 0x40, .data[11] = 0x00, },
2360 { .channel = 216, .freq = 5080, .data[0] = 0x6C, .data[1] = 0x0C,
2361 .data[2] = 0x0C, .data[3] = 0x00, .data[4] = 0x05, .data[5] = 0x08,
2362 .data[6] = 0x0F, .data[7] = 0x0F, .data[8] = 0x77, .data[9] = 0x90,
2363 .data[10] = 0x40, .data[11] = 0x00, },
2368 b43_radio_write(dev, B2062_S_RFPLL_CTL2, 0xFF); in lpphy_b2062_reset_pll_bias()
2370 if (dev->dev->chip_id == 0x5354) { in lpphy_b2062_reset_pll_bias()
2374 b43_radio_write(dev, B2062_S_RFPLL_CTL2, 0); in lpphy_b2062_reset_pll_bias()
2381 b43_radio_write(dev, B2062_S_RFPLL_CTL21, 0x42); in lpphy_b2062_vco_calib()
2382 b43_radio_write(dev, B2062_S_RFPLL_CTL21, 0x62); in lpphy_b2062_vco_calib()
2394 int i, err = 0; in lpphy_b2062_tune()
2396 for (i = 0; i < ARRAY_SIZE(b2062_chantbl); i++) { in lpphy_b2062_tune()
2406 b43_radio_set(dev, B2062_S_RFPLL_CTL14, 0x04); in lpphy_b2062_tune()
2407 b43_radio_write(dev, B2062_N_LGENA_TUNE0, chandata->data[0]); in lpphy_b2062_tune()
2419 b43_radio_write(dev, B2062_S_RFPLL_CTL33, 0xCC); in lpphy_b2062_tune()
2420 b43_radio_write(dev, B2062_S_RFPLL_CTL34, 0x07); in lpphy_b2062_tune()
2429 tmp5 = tmp7 * 0x100; in lpphy_b2062_tune()
2433 tmp5 = tmp7 * 0x100; in lpphy_b2062_tune()
2437 tmp5 = tmp7 * 0x100; in lpphy_b2062_tune()
2444 b43_radio_write(dev, B2062_S_RFPLL_CTL24, tmp9 & 0xFF); in lpphy_b2062_tune()
2447 if (b43_radio_read(dev, B2062_S_RFPLL_CTL3) & 0x10) { in lpphy_b2062_tune()
2448 b43_radio_write(dev, B2062_S_RFPLL_CTL33, 0xFC); in lpphy_b2062_tune()
2449 b43_radio_write(dev, B2062_S_RFPLL_CTL34, 0); in lpphy_b2062_tune()
2452 if (b43_radio_read(dev, B2062_S_RFPLL_CTL3) & 0x10) in lpphy_b2062_tune()
2456 b43_radio_mask(dev, B2062_S_RFPLL_CTL14, ~0x04); in lpphy_b2062_tune()
2464 b43_radio_mask(dev, B2063_PLL_SP1, ~0x40); in lpphy_b2063_vco_calib()
2465 tmp = b43_radio_read(dev, B2063_PLL_JTAG_CALNRST) & 0xF8; in lpphy_b2063_vco_calib()
2468 b43_radio_write(dev, B2063_PLL_JTAG_CALNRST, tmp | 0x4); in lpphy_b2063_vco_calib()
2470 b43_radio_write(dev, B2063_PLL_JTAG_CALNRST, tmp | 0x6); in lpphy_b2063_vco_calib()
2472 b43_radio_write(dev, B2063_PLL_JTAG_CALNRST, tmp | 0x7); in lpphy_b2063_vco_calib()
2474 b43_radio_set(dev, B2063_PLL_SP1, 0x40); in lpphy_b2063_vco_calib()
2489 for (i = 0; i < ARRAY_SIZE(b2063_chantbl); i++) { in lpphy_b2063_tune()
2499 b43_radio_write(dev, B2063_LOGEN_VCOBUF1, chandata->data[0]); in lpphy_b2063_tune()
2513 b43_radio_set(dev, B2063_COMM15, 0x1E); in lpphy_b2063_tune()
2525 b43_radio_write(dev, B2063_PLL_JTAG_PLL_VCO_CALIB3, 0x2); in lpphy_b2063_tune()
2527 0xFFF8, timeout >> 2); in lpphy_b2063_tune()
2529 0xFF9F,timeout << 5); in lpphy_b2063_tune()
2539 0xF0, count >> 8); in lpphy_b2063_tune()
2540 b43_radio_write(dev, B2063_PLL_JTAG_PLL_VCO_CALIB8, count & 0xFF); in lpphy_b2063_tune()
2548 b43_radio_maskset(dev, B2063_PLL_JTAG_PLL_SG1, 0xFFE0, tmp1 >> 4); in lpphy_b2063_tune()
2549 b43_radio_maskset(dev, B2063_PLL_JTAG_PLL_SG2, 0xFE0F, tmp1 << 4); in lpphy_b2063_tune()
2550 b43_radio_maskset(dev, B2063_PLL_JTAG_PLL_SG2, 0xFFF0, tmp1 >> 16); in lpphy_b2063_tune()
2551 b43_radio_write(dev, B2063_PLL_JTAG_PLL_SG3, (tmp2 >> 8) & 0xFF); in lpphy_b2063_tune()
2552 b43_radio_write(dev, B2063_PLL_JTAG_PLL_SG4, tmp2 & 0xFF); in lpphy_b2063_tune()
2554 b43_radio_write(dev, B2063_PLL_JTAG_PLL_LF1, 0xB9); in lpphy_b2063_tune()
2555 b43_radio_write(dev, B2063_PLL_JTAG_PLL_LF2, 0x88); in lpphy_b2063_tune()
2556 b43_radio_write(dev, B2063_PLL_JTAG_PLL_LF3, 0x28); in lpphy_b2063_tune()
2557 b43_radio_write(dev, B2063_PLL_JTAG_PLL_LF4, 0x63); in lpphy_b2063_tune()
2566 scale = 0; in lpphy_b2063_tune()
2569 b43_radio_maskset(dev, B2063_PLL_JTAG_PLL_CP2, 0xFFC0, tmp5); in lpphy_b2063_tune()
2570 b43_radio_maskset(dev, B2063_PLL_JTAG_PLL_CP2, 0xFFBF, scale << 6); in lpphy_b2063_tune()
2575 tmp6 = 0; in lpphy_b2063_tune()
2577 b43_radio_maskset(dev, B2063_PLL_JTAG_PLL_CP3, 0xFFE0, tmp6); in lpphy_b2063_tune()
2578 b43_radio_maskset(dev, B2063_PLL_JTAG_PLL_CP3, 0xFFDF, scale << 5); in lpphy_b2063_tune()
2580 b43_radio_maskset(dev, B2063_PLL_JTAG_PLL_XTAL_12, 0xFFFB, 0x4); in lpphy_b2063_tune()
2582 b43_radio_set(dev, B2063_PLL_JTAG_PLL_XTAL_12, 0x2); in lpphy_b2063_tune()
2584 b43_radio_mask(dev, B2063_PLL_JTAG_PLL_XTAL_12, 0xFD); in lpphy_b2063_tune()
2587 b43_radio_set(dev, B2063_PLL_JTAG_PLL_VCO1, 0x2); in lpphy_b2063_tune()
2589 b43_radio_mask(dev, B2063_PLL_JTAG_PLL_VCO1, 0xFD); in lpphy_b2063_tune()
2591 b43_radio_set(dev, B2063_PLL_SP2, 0x3); in lpphy_b2063_tune()
2593 b43_radio_mask(dev, B2063_PLL_SP2, 0xFFFC); in lpphy_b2063_tune()
2597 return 0; in lpphy_b2063_tune()
2606 if (dev->phy.radio_ver == 0x2063) { in b43_lpphy_op_switch_channel()
2621 return 0; in b43_lpphy_op_switch_channel()
2646 return 0; in b43_lpphy_op_init()
2664 b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xfff8); in b43_lpphy_op_switch_analog()
2666 b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0x0007); in b43_lpphy_op_switch_analog()
2667 b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVR, 0x0007); in b43_lpphy_op_switch_analog()