653-0036-rtl8xxxu-Add-some-8188eu-registers-and-update-CCK0_A.patch 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. From a9f5a167be625cf0cd157aa38f3635b2b1f0cc0f Mon Sep 17 00:00:00 2001
  2. From: Jes Sorensen <Jes.Sorensen@redhat.com>
  3. Date: Fri, 29 Jul 2016 15:25:34 -0400
  4. Subject: [PATCH] rtl8xxxu: Add some 8188eu registers and update
  5. CCK0_AFE_SETTING bit defines
  6. CCK0_AFE_SETTING is particular, it has the notion of primary RX antenna
  7. and optional RX antenna. When configuring RX for single antenna, setup
  8. should use the same antenna for default and optional. For AB setup,
  9. use antenna A as default and B as optional.
  10. In addition add info for 8188eu IOL magic interface used to send
  11. firmware and register init files to the firmware.
  12. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
  13. ---
  14. .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 30 ++++++++++++++++++++--
  15. 1 file changed, 28 insertions(+), 2 deletions(-)
  16. --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h
  17. +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h
  18. @@ -378,6 +378,11 @@
  19. #define PBP_PAGE_SIZE_512 0x3
  20. #define PBP_PAGE_SIZE_1024 0x4
  21. +/* 8188eu IOL magic */
  22. +#define REG_PKT_BUF_ACCESS_CTRL 0x0106
  23. +#define PKT_BUF_ACCESS_CTRL_TX 0x69
  24. +#define PKT_BUF_ACCESS_CTRL_RX 0xa5
  25. +
  26. #define REG_TRXDMA_CTRL 0x010c
  27. #define TRXDMA_CTRL_RXDMA_AGG_EN BIT(2)
  28. #define TRXDMA_CTRL_VOQ_SHIFT 4
  29. @@ -449,6 +454,7 @@
  30. #define REG_FIFOPAGE 0x0204
  31. #define REG_TDECTRL 0x0208
  32. +
  33. #define REG_TXDMA_OFFSET_CHK 0x020c
  34. #define TXDMA_OFFSET_DROP_DATA_EN BIT(9)
  35. #define REG_TXDMA_STATUS 0x0210
  36. @@ -938,6 +944,7 @@
  37. #define REG_FPGA1_RF_MODE 0x0900
  38. #define REG_FPGA1_TX_INFO 0x090c
  39. +#define REG_ANT_MAPPING1 0x0914
  40. #define REG_DPDT_CTRL 0x092c /* 8723BU */
  41. #define REG_RFE_CTRL_ANTA_SRC 0x0930 /* 8723BU */
  42. #define REG_RFE_PATH_SELECT 0x0940 /* 8723BU */
  43. @@ -949,9 +956,25 @@
  44. #define REG_CCK0_AFE_SETTING 0x0a04
  45. #define CCK0_AFE_RX_MASK 0x0f000000
  46. -#define CCK0_AFE_RX_ANT_AB BIT(24)
  47. +#define CCK0_AFE_TX_MASK 0xf0000000
  48. #define CCK0_AFE_RX_ANT_A 0
  49. -#define CCK0_AFE_RX_ANT_B (BIT(24) | BIT(26))
  50. +#define CCK0_AFE_RX_ANT_B BIT(26)
  51. +#define CCK0_AFE_RX_ANT_C BIT(27)
  52. +#define CCK0_AFE_RX_ANT_D (BIT(26) | BIT(27))
  53. +#define CCK0_AFE_RX_ANT_OPTION_A 0
  54. +#define CCK0_AFE_RX_ANT_OPTION_B BIT(24)
  55. +#define CCK0_AFE_RX_ANT_OPTION_C BIT(25)
  56. +#define CCK0_AFE_RX_ANT_OPTION_D (BIT(24) | BIT(25))
  57. +#define CCK0_AFE_TX_ANT_A BIT(31)
  58. +#define CCK0_AFE_TX_ANT_B BIT(30)
  59. +
  60. +#define REG_CCK_ANTDIV_PARA2 0x0a04
  61. +#define REG_BB_POWER_SAVE4 0x0a74
  62. +
  63. +/* 8188eu */
  64. +#define REG_LNA_SWITCH 0x0b2c
  65. +#define LNA_SWITCH_DISABLE_CSCG BIT(22)
  66. +#define LNA_SWITCH_OUTPUT_CG BIT(31)
  67. #define REG_CONFIG_ANT_A 0x0b68
  68. #define REG_CONFIG_ANT_B 0x0b6c
  69. @@ -1004,6 +1027,9 @@
  70. #define REG_OFDM0_RX_IQ_EXT_ANTA 0x0ca0
  71. +/* 8188eu */
  72. +#define REG_ANTDIV_PARA1 0x0ca4
  73. +
  74. /* 8723bu */
  75. #define REG_OFDM0_TX_PSDO_NOISE_WEIGHT 0x0ce4