600-09-rt2x00-rt2800lib-add-BBP-register-initialization-for.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. From 84833056aa7dd25f5b097e31c78f2a0914c5160c Mon Sep 17 00:00:00 2001
  2. From: Gabor Juhos <juhosg@openwrt.org>
  3. Date: Sun, 24 Mar 2013 19:26:26 +0100
  4. Subject: [PATCH] rt2x00: rt2800lib: add BBP register initialization for
  5. RT3883
  6. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  7. ---
  8. drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 44 +++++++++++++++++++++++++++++++
  9. 1 file changed, 44 insertions(+)
  10. --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  11. +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  12. @@ -6325,6 +6325,47 @@ static void rt2800_init_bbp_3593(struct
  13. rt2800_bbp_write(rt2x00dev, 103, 0xc0);
  14. }
  15. +static void rt2800_init_bbp_3883(struct rt2x00_dev *rt2x00dev)
  16. +{
  17. + rt2800_init_bbp_early(rt2x00dev);
  18. +
  19. + rt2800_bbp_write(rt2x00dev, 4, 0x50);
  20. + rt2800_bbp_write(rt2x00dev, 47, 0x48);
  21. +
  22. + rt2800_bbp_write(rt2x00dev, 86, 0x46);
  23. + rt2800_bbp_write(rt2x00dev, 88, 0x90);
  24. +
  25. + rt2800_bbp_write(rt2x00dev, 92, 0x02);
  26. +
  27. + rt2800_bbp_write(rt2x00dev, 103, 0xc0);
  28. + rt2800_bbp_write(rt2x00dev, 104, 0x92);
  29. + rt2800_bbp_write(rt2x00dev, 105, 0x34);
  30. + rt2800_bbp_write(rt2x00dev, 106, 0x12);
  31. + rt2800_bbp_write(rt2x00dev, 120, 0x50);
  32. + rt2800_bbp_write(rt2x00dev, 137, 0x0f);
  33. + rt2800_bbp_write(rt2x00dev, 163, 0x9d);
  34. +
  35. + /* Set ITxBF timeout to 0x9C40=1000msec */
  36. + rt2800_bbp_write(rt2x00dev, 179, 0x02);
  37. + rt2800_bbp_write(rt2x00dev, 180, 0x00);
  38. + rt2800_bbp_write(rt2x00dev, 182, 0x40);
  39. + rt2800_bbp_write(rt2x00dev, 180, 0x01);
  40. + rt2800_bbp_write(rt2x00dev, 182, 0x9c);
  41. +
  42. + rt2800_bbp_write(rt2x00dev, 179, 0x00);
  43. +
  44. + /* Reprogram the inband interface to put right values in RXWI */
  45. + rt2800_bbp_write(rt2x00dev, 142, 0x04);
  46. + rt2800_bbp_write(rt2x00dev, 143, 0x3b);
  47. + rt2800_bbp_write(rt2x00dev, 142, 0x06);
  48. + rt2800_bbp_write(rt2x00dev, 143, 0xa0);
  49. + rt2800_bbp_write(rt2x00dev, 142, 0x07);
  50. + rt2800_bbp_write(rt2x00dev, 143, 0xa1);
  51. + rt2800_bbp_write(rt2x00dev, 142, 0x08);
  52. + rt2800_bbp_write(rt2x00dev, 143, 0xa2);
  53. + rt2800_bbp_write(rt2x00dev, 148, 0xc8);
  54. +}
  55. +
  56. static void rt2800_init_bbp_53xx(struct rt2x00_dev *rt2x00dev)
  57. {
  58. int ant, div_mode;
  59. @@ -6769,6 +6810,9 @@ static void rt2800_init_bbp(struct rt2x0
  60. case RT3593:
  61. rt2800_init_bbp_3593(rt2x00dev);
  62. return;
  63. + case RT3883:
  64. + rt2800_init_bbp_3883(rt2x00dev);
  65. + return;
  66. case RT5390:
  67. case RT5392:
  68. rt2800_init_bbp_53xx(rt2x00dev);