rtw8852b_rfk_table.c 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  1. // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
  2. /* Copyright(c) 2019-2020 Realtek Corporation
  3. */
  4. #include "rtw8852b_rfk_table.h"
  5. static const struct rtw89_reg5_def rtw8852b_afe_init_defs[] = {
  6. RTW89_DECL_RFK_WM(0xC0D4, 0xffffffff, 0x4486888c),
  7. RTW89_DECL_RFK_WM(0xC0D8, 0xffffffff, 0xc6ba10e0),
  8. RTW89_DECL_RFK_WM(0xc0dc, 0xffffffff, 0x30c52868),
  9. RTW89_DECL_RFK_WM(0xc0e0, 0xffffffff, 0x05008128),
  10. RTW89_DECL_RFK_WM(0xc0e4, 0xffffffff, 0x0000272b),
  11. RTW89_DECL_RFK_WM(0xC1D4, 0xffffffff, 0x4486888c),
  12. RTW89_DECL_RFK_WM(0xC1D8, 0xffffffff, 0xc6ba10e0),
  13. RTW89_DECL_RFK_WM(0xc1dc, 0xffffffff, 0x30c52868),
  14. RTW89_DECL_RFK_WM(0xc1e0, 0xffffffff, 0x05008128),
  15. RTW89_DECL_RFK_WM(0xc1e4, 0xffffffff, 0x0000272b),
  16. };
  17. RTW89_DECLARE_RFK_TBL(rtw8852b_afe_init_defs);
  18. static const struct rtw89_reg5_def rtw8852b_check_addc_defs_a[] = {
  19. RTW89_DECL_RFK_WM(0x20f4, BIT(24), 0x0),
  20. RTW89_DECL_RFK_WM(0x20f8, 0x80000000, 0x1),
  21. RTW89_DECL_RFK_WM(0x20f0, 0xff0000, 0x1),
  22. RTW89_DECL_RFK_WM(0x20f0, 0xf00, 0x2),
  23. RTW89_DECL_RFK_WM(0x20f0, 0xf, 0x0),
  24. RTW89_DECL_RFK_WM(0x20f0, 0xc0, 0x2),
  25. };
  26. RTW89_DECLARE_RFK_TBL(rtw8852b_check_addc_defs_a);
  27. static const struct rtw89_reg5_def rtw8852b_check_addc_defs_b[] = {
  28. RTW89_DECL_RFK_WM(0x20f4, BIT(24), 0x0),
  29. RTW89_DECL_RFK_WM(0x20f8, 0x80000000, 0x1),
  30. RTW89_DECL_RFK_WM(0x20f0, 0xff0000, 0x1),
  31. RTW89_DECL_RFK_WM(0x20f0, 0xf00, 0x2),
  32. RTW89_DECL_RFK_WM(0x20f0, 0xf, 0x0),
  33. RTW89_DECL_RFK_WM(0x20f0, 0xc0, 0x3),
  34. };
  35. RTW89_DECLARE_RFK_TBL(rtw8852b_check_addc_defs_b);
  36. static const struct rtw89_reg5_def rtw8852b_check_dadc_en_defs_a[] = {
  37. RTW89_DECL_RFK_WM(0x032C, BIT(30), 0x0),
  38. RTW89_DECL_RFK_WM(0x030C, 0x0f000000, 0xf),
  39. RTW89_DECL_RFK_WM(0x030C, 0x0f000000, 0x3),
  40. RTW89_DECL_RFK_WM(0x032C, BIT(16), 0x0),
  41. RTW89_DECL_RFK_WM(0x12dc, BIT(0), 0x1),
  42. RTW89_DECL_RFK_WM(0x12e8, BIT(2), 0x1),
  43. RTW89_DECL_RFK_WRF(RF_PATH_A, 0x8f, BIT(13), 0x1),
  44. };
  45. RTW89_DECLARE_RFK_TBL(rtw8852b_check_dadc_en_defs_a);
  46. static const struct rtw89_reg5_def rtw8852b_check_dadc_en_defs_b[] = {
  47. RTW89_DECL_RFK_WM(0x032C, BIT(30), 0x0),
  48. RTW89_DECL_RFK_WM(0x030C, 0x0f000000, 0xf),
  49. RTW89_DECL_RFK_WM(0x030C, 0x0f000000, 0x3),
  50. RTW89_DECL_RFK_WM(0x032C, BIT(16), 0x0),
  51. RTW89_DECL_RFK_WM(0x32dc, BIT(0), 0x1),
  52. RTW89_DECL_RFK_WM(0x32e8, BIT(2), 0x1),
  53. RTW89_DECL_RFK_WRF(RF_PATH_B, 0x8f, BIT(13), 0x1),
  54. };
  55. RTW89_DECLARE_RFK_TBL(rtw8852b_check_dadc_en_defs_b);
  56. static const struct rtw89_reg5_def rtw8852b_check_dadc_dis_defs_a[] = {
  57. RTW89_DECL_RFK_WM(0x12dc, BIT(0), 0x0),
  58. RTW89_DECL_RFK_WM(0x12e8, BIT(2), 0x0),
  59. RTW89_DECL_RFK_WRF(RF_PATH_A, 0x8f, BIT(13), 0x0),
  60. RTW89_DECL_RFK_WM(0x032C, BIT(16), 0x1),
  61. };
  62. RTW89_DECLARE_RFK_TBL(rtw8852b_check_dadc_dis_defs_a);
  63. static const struct rtw89_reg5_def rtw8852b_check_dadc_dis_defs_b[] = {
  64. RTW89_DECL_RFK_WM(0x32dc, BIT(0), 0x0),
  65. RTW89_DECL_RFK_WM(0x32e8, BIT(2), 0x0),
  66. RTW89_DECL_RFK_WRF(RF_PATH_B, 0x8f, BIT(13), 0x0),
  67. RTW89_DECL_RFK_WM(0x032C, BIT(16), 0x1),
  68. };
  69. RTW89_DECLARE_RFK_TBL(rtw8852b_check_dadc_dis_defs_b);
  70. static const struct rtw89_reg5_def rtw8852b_dack_s0_1_defs[] = {
  71. RTW89_DECL_RFK_WM(0x12A0, BIT(15), 0x1),
  72. RTW89_DECL_RFK_WM(0x12A0, 0x00007000, 0x3),
  73. RTW89_DECL_RFK_WM(0x12B8, BIT(30), 0x1),
  74. RTW89_DECL_RFK_WM(0x030C, BIT(28), 0x1),
  75. RTW89_DECL_RFK_WM(0x032C, 0x80000000, 0x0),
  76. RTW89_DECL_RFK_WM(0xC0D8, BIT(16), 0x1),
  77. RTW89_DECL_RFK_WM(0xc0dc, 0x0c000000, 0x3),
  78. RTW89_DECL_RFK_WM(0xC004, BIT(30), 0x0),
  79. RTW89_DECL_RFK_WM(0xc024, BIT(30), 0x0),
  80. RTW89_DECL_RFK_WM(0xC004, 0x3ff00000, 0x30),
  81. RTW89_DECL_RFK_WM(0xC004, 0xc0000000, 0x0),
  82. RTW89_DECL_RFK_WM(0xC004, BIT(17), 0x1),
  83. RTW89_DECL_RFK_WM(0xc024, BIT(17), 0x1),
  84. RTW89_DECL_RFK_WM(0xc00c, BIT(2), 0x0),
  85. RTW89_DECL_RFK_WM(0xc02c, BIT(2), 0x0),
  86. RTW89_DECL_RFK_WM(0xC004, BIT(0), 0x1),
  87. RTW89_DECL_RFK_WM(0xc024, BIT(0), 0x1),
  88. RTW89_DECL_RFK_DELAY(1),
  89. };
  90. RTW89_DECLARE_RFK_TBL(rtw8852b_dack_s0_1_defs);
  91. static const struct rtw89_reg5_def rtw8852b_dack_s0_2_defs[] = {
  92. RTW89_DECL_RFK_WM(0xc0dc, 0x0c000000, 0x0),
  93. RTW89_DECL_RFK_WM(0xc00c, BIT(2), 0x1),
  94. RTW89_DECL_RFK_WM(0xc02c, BIT(2), 0x1),
  95. };
  96. RTW89_DECLARE_RFK_TBL(rtw8852b_dack_s0_2_defs);
  97. static const struct rtw89_reg5_def rtw8852b_dack_s0_3_defs[] = {
  98. RTW89_DECL_RFK_WM(0xC004, BIT(0), 0x0),
  99. RTW89_DECL_RFK_WM(0xc024, BIT(0), 0x0),
  100. RTW89_DECL_RFK_WM(0xC0D8, BIT(16), 0x0),
  101. RTW89_DECL_RFK_WM(0x12A0, BIT(15), 0x0),
  102. RTW89_DECL_RFK_WM(0x12A0, 0x00007000, 0x7),
  103. };
  104. RTW89_DECLARE_RFK_TBL(rtw8852b_dack_s0_3_defs);
  105. static const struct rtw89_reg5_def rtw8852b_dack_s1_1_defs[] = {
  106. RTW89_DECL_RFK_WM(0x32a0, BIT(15), 0x1),
  107. RTW89_DECL_RFK_WM(0x32a0, 0x7000, 0x3),
  108. RTW89_DECL_RFK_WM(0x32B8, BIT(30), 0x1),
  109. RTW89_DECL_RFK_WM(0x030C, BIT(28), 0x1),
  110. RTW89_DECL_RFK_WM(0x032C, 0x80000000, 0x0),
  111. RTW89_DECL_RFK_WM(0xC1D8, BIT(16), 0x1),
  112. RTW89_DECL_RFK_WM(0xc1dc, 0x0c000000, 0x3),
  113. RTW89_DECL_RFK_WM(0xc104, BIT(30), 0x0),
  114. RTW89_DECL_RFK_WM(0xc124, BIT(30), 0x0),
  115. RTW89_DECL_RFK_WM(0xc104, 0x3ff00000, 0x30),
  116. RTW89_DECL_RFK_WM(0xc104, 0xc0000000, 0x0),
  117. RTW89_DECL_RFK_WM(0xc104, BIT(17), 0x1),
  118. RTW89_DECL_RFK_WM(0xc124, BIT(17), 0x1),
  119. RTW89_DECL_RFK_WM(0xc10c, BIT(2), 0x0),
  120. RTW89_DECL_RFK_WM(0xc12c, BIT(2), 0x0),
  121. RTW89_DECL_RFK_WM(0xc104, BIT(0), 0x1),
  122. RTW89_DECL_RFK_WM(0xc124, BIT(0), 0x1),
  123. RTW89_DECL_RFK_DELAY(1),
  124. };
  125. RTW89_DECLARE_RFK_TBL(rtw8852b_dack_s1_1_defs);
  126. static const struct rtw89_reg5_def rtw8852b_dack_s1_2_defs[] = {
  127. RTW89_DECL_RFK_WM(0xc1dc, 0x0c000000, 0x0),
  128. RTW89_DECL_RFK_WM(0xc10c, BIT(2), 0x1),
  129. RTW89_DECL_RFK_WM(0xc12c, BIT(2), 0x1),
  130. RTW89_DECL_RFK_DELAY(1),
  131. };
  132. RTW89_DECLARE_RFK_TBL(rtw8852b_dack_s1_2_defs);
  133. static const struct rtw89_reg5_def rtw8852b_dack_s1_3_defs[] = {
  134. RTW89_DECL_RFK_WM(0xc104, BIT(0), 0x0),
  135. RTW89_DECL_RFK_WM(0xc124, BIT(0), 0x0),
  136. RTW89_DECL_RFK_WM(0xC1D8, BIT(16), 0x0),
  137. RTW89_DECL_RFK_WM(0x32a0, BIT(15), 0x0),
  138. RTW89_DECL_RFK_WM(0x32a0, 0x7000, 0x7),
  139. };
  140. RTW89_DECLARE_RFK_TBL(rtw8852b_dack_s1_3_defs);
  141. static const struct rtw89_reg5_def rtw8852b_dpk_afe_defs[] = {
  142. RTW89_DECL_RFK_WM(0x20fc, 0xffff0000, 0x0303),
  143. RTW89_DECL_RFK_WM(0x12b8, BIT(30), 0x1),
  144. RTW89_DECL_RFK_WM(0x32b8, BIT(30), 0x1),
  145. RTW89_DECL_RFK_WM(0x030c, 0xff000000, 0x13),
  146. RTW89_DECL_RFK_WM(0x032c, 0xffff0000, 0x0041),
  147. RTW89_DECL_RFK_WM(0x12b8, BIT(28), 0x1),
  148. RTW89_DECL_RFK_WM(0x58c8, BIT(24), 0x1),
  149. RTW89_DECL_RFK_WM(0x78c8, BIT(24), 0x1),
  150. RTW89_DECL_RFK_WM(0x5864, 0xc0000000, 0x3),
  151. RTW89_DECL_RFK_WM(0x7864, 0xc0000000, 0x3),
  152. RTW89_DECL_RFK_WM(0x2008, 0x01FFFFFF, 0x1ffffff),
  153. RTW89_DECL_RFK_WM(0x0c1c, BIT(2), 0x1),
  154. RTW89_DECL_RFK_WM(0x0700, BIT(27), 0x1),
  155. RTW89_DECL_RFK_WM(0x0c70, 0x000003FF, 0x3ff),
  156. RTW89_DECL_RFK_WM(0x0c60, 0x00000003, 0x3),
  157. RTW89_DECL_RFK_WM(0x0c6c, BIT(0), 0x1),
  158. RTW89_DECL_RFK_WM(0x58ac, BIT(27), 0x1),
  159. RTW89_DECL_RFK_WM(0x78ac, BIT(27), 0x1),
  160. RTW89_DECL_RFK_WM(0x0c3c, BIT(9), 0x1),
  161. RTW89_DECL_RFK_WM(0x2344, BIT(31), 0x1),
  162. RTW89_DECL_RFK_WM(0x4490, BIT(31), 0x1),
  163. RTW89_DECL_RFK_WM(0x12a0, 0x000ff000, 0xbf),
  164. RTW89_DECL_RFK_WM(0x32a0, 0x000f0000, 0xb),
  165. RTW89_DECL_RFK_WM(0x0700, 0x07000000, 0x5),
  166. RTW89_DECL_RFK_WM(0x20fc, 0xffff0000, 0x3333),
  167. RTW89_DECL_RFK_WM(0x580c, BIT(15), 0x1),
  168. RTW89_DECL_RFK_WM(0x5800, 0x0000ffff, 0x0000),
  169. RTW89_DECL_RFK_WM(0x780c, BIT(15), 0x1),
  170. RTW89_DECL_RFK_WM(0x7800, 0x0000ffff, 0x0000),
  171. };
  172. RTW89_DECLARE_RFK_TBL(rtw8852b_dpk_afe_defs);
  173. static const struct rtw89_reg5_def rtw8852b_dpk_afe_restore_defs[] = {
  174. RTW89_DECL_RFK_WM(0x20fc, 0xffff0000, 0x0303),
  175. RTW89_DECL_RFK_WM(0x12b8, BIT(30), 0x0),
  176. RTW89_DECL_RFK_WM(0x32b8, BIT(30), 0x0),
  177. RTW89_DECL_RFK_WM(0x5864, 0xc0000000, 0x0),
  178. RTW89_DECL_RFK_WM(0x7864, 0xc0000000, 0x0),
  179. RTW89_DECL_RFK_WM(0x2008, 0x01FFFFFF, 0x0),
  180. RTW89_DECL_RFK_WM(0x0c1c, BIT(2), 0x0),
  181. RTW89_DECL_RFK_WM(0x0700, BIT(27), 0x0),
  182. RTW89_DECL_RFK_WM(0x0c70, 0x000003FF, 0x63),
  183. RTW89_DECL_RFK_WM(0x12a0, 0x000FF000, 0x00),
  184. RTW89_DECL_RFK_WM(0x32a0, 0x000FF000, 0x00),
  185. RTW89_DECL_RFK_WM(0x0700, 0x07000000, 0x0),
  186. RTW89_DECL_RFK_WM(0x5864, BIT(29), 0x0),
  187. RTW89_DECL_RFK_WM(0x7864, BIT(29), 0x0),
  188. RTW89_DECL_RFK_WM(0x20fc, 0xffff0000, 0x0000),
  189. RTW89_DECL_RFK_WM(0x58c8, BIT(24), 0x0),
  190. RTW89_DECL_RFK_WM(0x78c8, BIT(24), 0x0),
  191. RTW89_DECL_RFK_WM(0x0c3c, BIT(9), 0x0),
  192. RTW89_DECL_RFK_WM(0x580c, BIT(15), 0x0),
  193. RTW89_DECL_RFK_WM(0x58e4, 0x18000000, 0x1),
  194. RTW89_DECL_RFK_WM(0x58e4, 0x18000000, 0x2),
  195. RTW89_DECL_RFK_WM(0x780c, BIT(15), 0x0),
  196. RTW89_DECL_RFK_WM(0x78e4, 0x18000000, 0x1),
  197. RTW89_DECL_RFK_WM(0x78e4, 0x18000000, 0x2),
  198. };
  199. RTW89_DECLARE_RFK_TBL(rtw8852b_dpk_afe_restore_defs);
  200. static const struct rtw89_reg5_def rtw8852b_dpk_kip_defs[] = {
  201. RTW89_DECL_RFK_WM(0x8008, 0xffffffff, 0x00000000),
  202. RTW89_DECL_RFK_WM(0x8088, 0xffffffff, 0x80000000),
  203. };
  204. RTW89_DECLARE_RFK_TBL(rtw8852b_dpk_kip_defs);
  205. static const struct rtw89_reg5_def rtw8852b_tssi_sys_defs[] = {
  206. RTW89_DECL_RFK_WM(0x12a8, 0x0000000f, 0x5),
  207. RTW89_DECL_RFK_WM(0x32a8, 0x0000000f, 0x5),
  208. RTW89_DECL_RFK_WM(0x12bc, 0x000ffff0, 0x5555),
  209. RTW89_DECL_RFK_WM(0x32bc, 0x000ffff0, 0x5555),
  210. RTW89_DECL_RFK_WM(0x0300, 0xff000000, 0x16),
  211. RTW89_DECL_RFK_WM(0x0304, 0x000000ff, 0x19),
  212. RTW89_DECL_RFK_WM(0x0314, 0xffff0000, 0x2041),
  213. RTW89_DECL_RFK_WM(0x0318, 0xffffffff, 0x2041),
  214. RTW89_DECL_RFK_WM(0x0318, 0xffffffff, 0x20012041),
  215. RTW89_DECL_RFK_WM(0x0020, 0x00006000, 0x3),
  216. RTW89_DECL_RFK_WM(0x0024, 0x00006000, 0x3),
  217. RTW89_DECL_RFK_WM(0x0704, 0xffff0000, 0x601e),
  218. RTW89_DECL_RFK_WM(0x2704, 0xffff0000, 0x601e),
  219. RTW89_DECL_RFK_WM(0x0700, 0xf0000000, 0x4),
  220. RTW89_DECL_RFK_WM(0x2700, 0xf0000000, 0x4),
  221. RTW89_DECL_RFK_WM(0x0650, 0x3c000000, 0x0),
  222. RTW89_DECL_RFK_WM(0x2650, 0x3c000000, 0x0),
  223. };
  224. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_sys_defs);
  225. static const struct rtw89_reg5_def rtw8852b_tssi_sys_a_defs_2g[] = {
  226. RTW89_DECL_RFK_WM(0x120c, 0x000000ff, 0x33),
  227. RTW89_DECL_RFK_WM(0x12c0, 0x0ff00000, 0x33),
  228. RTW89_DECL_RFK_WM(0x58f8, 0x40000000, 0x1),
  229. RTW89_DECL_RFK_WM(0x0304, 0x0000ff00, 0x1e),
  230. };
  231. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_sys_a_defs_2g);
  232. static const struct rtw89_reg5_def rtw8852b_tssi_sys_a_defs_5g[] = {
  233. RTW89_DECL_RFK_WM(0x120c, 0x000000ff, 0x44),
  234. RTW89_DECL_RFK_WM(0x12c0, 0x0ff00000, 0x44),
  235. RTW89_DECL_RFK_WM(0x58f8, 0x40000000, 0x0),
  236. RTW89_DECL_RFK_WM(0x0304, 0x0000ff00, 0x1d),
  237. };
  238. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_sys_a_defs_5g);
  239. static const struct rtw89_reg5_def rtw8852b_tssi_sys_b_defs_2g[] = {
  240. RTW89_DECL_RFK_WM(0x32c0, 0x0ff00000, 0x33),
  241. RTW89_DECL_RFK_WM(0x320c, 0x000000ff, 0x33),
  242. RTW89_DECL_RFK_WM(0x78f8, 0x40000000, 0x1),
  243. RTW89_DECL_RFK_WM(0x0304, 0x0000ff00, 0x1e),
  244. };
  245. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_sys_b_defs_2g);
  246. static const struct rtw89_reg5_def rtw8852b_tssi_sys_b_defs_5g[] = {
  247. RTW89_DECL_RFK_WM(0x32c0, 0x0ff00000, 0x44),
  248. RTW89_DECL_RFK_WM(0x320c, 0x000000ff, 0x44),
  249. RTW89_DECL_RFK_WM(0x78f8, 0x40000000, 0x0),
  250. RTW89_DECL_RFK_WM(0x0304, 0x0000ff00, 0x1d),
  251. };
  252. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_sys_b_defs_5g);
  253. static const struct rtw89_reg5_def rtw8852b_tssi_init_txpwr_defs_a[] = {
  254. RTW89_DECL_RFK_WM(0x566c, 0x00001000, 0x0),
  255. RTW89_DECL_RFK_WM(0x5800, 0xffffffff, 0x003f807f),
  256. RTW89_DECL_RFK_WM(0x580c, 0x0000007f, 0x40),
  257. RTW89_DECL_RFK_WM(0x580c, 0x0fffff00, 0x00040),
  258. RTW89_DECL_RFK_WM(0x5810, 0xffffffff, 0x59010000),
  259. RTW89_DECL_RFK_WM(0x5814, 0x01ffffff, 0x002d000),
  260. RTW89_DECL_RFK_WM(0x5814, 0xf8000000, 0x00),
  261. RTW89_DECL_RFK_WM(0x5818, 0xffffffff, 0x002c1800),
  262. RTW89_DECL_RFK_WM(0x581c, 0x3fffffff, 0x1dc80280),
  263. RTW89_DECL_RFK_WM(0x5820, 0xffffffff, 0x00002080),
  264. RTW89_DECL_RFK_WM(0x580c, 0x10000000, 0x1),
  265. RTW89_DECL_RFK_WM(0x580c, 0x40000000, 0x1),
  266. RTW89_DECL_RFK_WM(0x5834, 0x3fffffff, 0x000115f2),
  267. RTW89_DECL_RFK_WM(0x5838, 0x7fffffff, 0x0000121),
  268. RTW89_DECL_RFK_WM(0x5854, 0x3fffffff, 0x000115f2),
  269. RTW89_DECL_RFK_WM(0x5858, 0x7fffffff, 0x0000121),
  270. RTW89_DECL_RFK_WM(0x5860, 0x80000000, 0x0),
  271. RTW89_DECL_RFK_WM(0x5864, 0x07ffffff, 0x00801ff),
  272. RTW89_DECL_RFK_WM(0x5898, 0xffffffff, 0x00000000),
  273. RTW89_DECL_RFK_WM(0x589c, 0xffffffff, 0x00000000),
  274. RTW89_DECL_RFK_WM(0x58a4, 0x000000ff, 0x16),
  275. RTW89_DECL_RFK_WM(0x58b0, 0xffffffff, 0x00000000),
  276. RTW89_DECL_RFK_WM(0x58b4, 0x7fffffff, 0x0a002000),
  277. RTW89_DECL_RFK_WM(0x58b8, 0x7fffffff, 0x00007628),
  278. RTW89_DECL_RFK_WM(0x58bc, 0x07ffffff, 0x7a7807f),
  279. RTW89_DECL_RFK_WM(0x58c0, 0xfffe0000, 0x003f),
  280. RTW89_DECL_RFK_WM(0x58c4, 0xffffffff, 0x0003ffff),
  281. RTW89_DECL_RFK_WM(0x58c8, 0x00ffffff, 0x000000),
  282. RTW89_DECL_RFK_WM(0x58c8, 0xf0000000, 0x0),
  283. RTW89_DECL_RFK_WM(0x58cc, 0xffffffff, 0x00000000),
  284. RTW89_DECL_RFK_WM(0x58d0, 0x07ffffff, 0x2008101),
  285. RTW89_DECL_RFK_WM(0x58d4, 0x000000ff, 0x00),
  286. RTW89_DECL_RFK_WM(0x58d4, 0x0003fe00, 0x0ff),
  287. RTW89_DECL_RFK_WM(0x58d4, 0x07fc0000, 0x100),
  288. RTW89_DECL_RFK_WM(0x58d8, 0xffffffff, 0x8008016c),
  289. RTW89_DECL_RFK_WM(0x58dc, 0x0001ffff, 0x0807f),
  290. RTW89_DECL_RFK_WM(0x58dc, 0xfff00000, 0x800),
  291. RTW89_DECL_RFK_WM(0x58f0, 0x0003ffff, 0x001ff),
  292. RTW89_DECL_RFK_WM(0x58f4, 0x000fffff, 0x000),
  293. };
  294. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_init_txpwr_defs_a);
  295. static const struct rtw89_reg5_def rtw8852b_tssi_init_txpwr_defs_b[] = {
  296. RTW89_DECL_RFK_WM(0x566c, 0x00001000, 0x0),
  297. RTW89_DECL_RFK_WM(0x7800, 0xffffffff, 0x003f807f),
  298. RTW89_DECL_RFK_WM(0x780c, 0x0000007f, 0x40),
  299. RTW89_DECL_RFK_WM(0x780c, 0x0fffff00, 0x00040),
  300. RTW89_DECL_RFK_WM(0x7810, 0xffffffff, 0x59010000),
  301. RTW89_DECL_RFK_WM(0x7814, 0x01ffffff, 0x002d000),
  302. RTW89_DECL_RFK_WM(0x7814, 0xf8000000, 0x00),
  303. RTW89_DECL_RFK_WM(0x7818, 0xffffffff, 0x002c1800),
  304. RTW89_DECL_RFK_WM(0x781c, 0x3fffffff, 0x1dc80280),
  305. RTW89_DECL_RFK_WM(0x7820, 0xffffffff, 0x00002080),
  306. RTW89_DECL_RFK_WM(0x780c, 0x10000000, 0x1),
  307. RTW89_DECL_RFK_WM(0x780c, 0x40000000, 0x1),
  308. RTW89_DECL_RFK_WM(0x7834, 0x3fffffff, 0x000115f2),
  309. RTW89_DECL_RFK_WM(0x7838, 0x7fffffff, 0x0000121),
  310. RTW89_DECL_RFK_WM(0x7854, 0x3fffffff, 0x000115f2),
  311. RTW89_DECL_RFK_WM(0x7858, 0x7fffffff, 0x0000121),
  312. RTW89_DECL_RFK_WM(0x7860, 0x80000000, 0x0),
  313. RTW89_DECL_RFK_WM(0x7864, 0x07ffffff, 0x00801ff),
  314. RTW89_DECL_RFK_WM(0x7898, 0xffffffff, 0x00000000),
  315. RTW89_DECL_RFK_WM(0x789c, 0xffffffff, 0x00000000),
  316. RTW89_DECL_RFK_WM(0x78a4, 0x000000ff, 0x16),
  317. RTW89_DECL_RFK_WM(0x78b0, 0xffffffff, 0x00000000),
  318. RTW89_DECL_RFK_WM(0x78b4, 0x7fffffff, 0x0a002000),
  319. RTW89_DECL_RFK_WM(0x78b8, 0x7fffffff, 0x00007628),
  320. RTW89_DECL_RFK_WM(0x78bc, 0x07ffffff, 0x7a7807f),
  321. RTW89_DECL_RFK_WM(0x78c0, 0xfffe0000, 0x003f),
  322. RTW89_DECL_RFK_WM(0x78c4, 0xffffffff, 0x0003ffff),
  323. RTW89_DECL_RFK_WM(0x78c8, 0x00ffffff, 0x000000),
  324. RTW89_DECL_RFK_WM(0x78c8, 0xf0000000, 0x0),
  325. RTW89_DECL_RFK_WM(0x78cc, 0xffffffff, 0x00000000),
  326. RTW89_DECL_RFK_WM(0x78d0, 0x07ffffff, 0x2008101),
  327. RTW89_DECL_RFK_WM(0x78d4, 0x000000ff, 0x00),
  328. RTW89_DECL_RFK_WM(0x78d4, 0x0003fe00, 0x0ff),
  329. RTW89_DECL_RFK_WM(0x78d4, 0x07fc0000, 0x100),
  330. RTW89_DECL_RFK_WM(0x78d8, 0xffffffff, 0x8008016c),
  331. RTW89_DECL_RFK_WM(0x78dc, 0x0001ffff, 0x0807f),
  332. RTW89_DECL_RFK_WM(0x78dc, 0xfff00000, 0x800),
  333. RTW89_DECL_RFK_WM(0x78f0, 0x0003ffff, 0x001ff),
  334. RTW89_DECL_RFK_WM(0x78f4, 0x000fffff, 0x000),
  335. };
  336. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_init_txpwr_defs_b);
  337. static const struct rtw89_reg5_def rtw8852b_tssi_init_txpwr_he_tb_defs_a[] = {
  338. RTW89_DECL_RFK_WM(0x58a0, 0xffffffff, 0x000000fe),
  339. RTW89_DECL_RFK_WM(0x58e4, 0x0000007f, 0x1f),
  340. };
  341. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_init_txpwr_he_tb_defs_a);
  342. static const struct rtw89_reg5_def rtw8852b_tssi_init_txpwr_he_tb_defs_b[] = {
  343. RTW89_DECL_RFK_WM(0x78a0, 0xffffffff, 0x000000fe),
  344. RTW89_DECL_RFK_WM(0x78e4, 0x0000007f, 0x1f),
  345. };
  346. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_init_txpwr_he_tb_defs_b);
  347. static const struct rtw89_reg5_def rtw8852b_tssi_dck_defs_a[] = {
  348. RTW89_DECL_RFK_WM(0x580c, 0x0fff0000, 0x000),
  349. RTW89_DECL_RFK_WM(0x5814, 0x003ff000, 0x0ef),
  350. RTW89_DECL_RFK_WM(0x5814, 0x18000000, 0x0),
  351. };
  352. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_dck_defs_a);
  353. static const struct rtw89_reg5_def rtw8852b_tssi_dck_defs_b[] = {
  354. RTW89_DECL_RFK_WM(0x780c, 0x0fff0000, 0x000),
  355. RTW89_DECL_RFK_WM(0x7814, 0x003ff000, 0x0ef),
  356. RTW89_DECL_RFK_WM(0x7814, 0x18000000, 0x0),
  357. };
  358. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_dck_defs_b);
  359. static const struct rtw89_reg5_def rtw8852b_tssi_dac_gain_defs_a[] = {
  360. RTW89_DECL_RFK_WM(0x58b0, 0x00000400, 0x1),
  361. RTW89_DECL_RFK_WM(0x58b0, 0x00000fff, 0x000),
  362. RTW89_DECL_RFK_WM(0x58b0, 0x00000800, 0x1),
  363. RTW89_DECL_RFK_WM(0x5a00, 0xffffffff, 0x00000000),
  364. RTW89_DECL_RFK_WM(0x5a04, 0xffffffff, 0x00000000),
  365. RTW89_DECL_RFK_WM(0x5a08, 0xffffffff, 0x00000000),
  366. RTW89_DECL_RFK_WM(0x5a0c, 0xffffffff, 0x00000000),
  367. RTW89_DECL_RFK_WM(0x5a10, 0xffffffff, 0x00000000),
  368. RTW89_DECL_RFK_WM(0x5a14, 0xffffffff, 0x00000000),
  369. RTW89_DECL_RFK_WM(0x5a18, 0xffffffff, 0x00000000),
  370. RTW89_DECL_RFK_WM(0x5a1c, 0xffffffff, 0x00000000),
  371. RTW89_DECL_RFK_WM(0x5a20, 0xffffffff, 0x00000000),
  372. RTW89_DECL_RFK_WM(0x5a24, 0xffffffff, 0x00000000),
  373. RTW89_DECL_RFK_WM(0x5a28, 0xffffffff, 0x00000000),
  374. RTW89_DECL_RFK_WM(0x5a2c, 0xffffffff, 0x00000000),
  375. RTW89_DECL_RFK_WM(0x5a30, 0xffffffff, 0x00000000),
  376. RTW89_DECL_RFK_WM(0x5a34, 0xffffffff, 0x00000000),
  377. RTW89_DECL_RFK_WM(0x5a38, 0xffffffff, 0x00000000),
  378. RTW89_DECL_RFK_WM(0x5a3c, 0xffffffff, 0x00000000),
  379. RTW89_DECL_RFK_WM(0x5a40, 0xffffffff, 0x00000000),
  380. RTW89_DECL_RFK_WM(0x5a44, 0xffffffff, 0x00000000),
  381. RTW89_DECL_RFK_WM(0x5a48, 0xffffffff, 0x00000000),
  382. RTW89_DECL_RFK_WM(0x5a4c, 0xffffffff, 0x00000000),
  383. RTW89_DECL_RFK_WM(0x5a50, 0xffffffff, 0x00000000),
  384. RTW89_DECL_RFK_WM(0x5a54, 0xffffffff, 0x00000000),
  385. RTW89_DECL_RFK_WM(0x5a58, 0xffffffff, 0x00000000),
  386. RTW89_DECL_RFK_WM(0x5a5c, 0xffffffff, 0x00000000),
  387. RTW89_DECL_RFK_WM(0x5a60, 0xffffffff, 0x00000000),
  388. RTW89_DECL_RFK_WM(0x5a64, 0xffffffff, 0x00000000),
  389. RTW89_DECL_RFK_WM(0x5a68, 0xffffffff, 0x00000000),
  390. RTW89_DECL_RFK_WM(0x5a6c, 0xffffffff, 0x00000000),
  391. RTW89_DECL_RFK_WM(0x5a70, 0xffffffff, 0x00000000),
  392. RTW89_DECL_RFK_WM(0x5a74, 0xffffffff, 0x00000000),
  393. RTW89_DECL_RFK_WM(0x5a78, 0xffffffff, 0x00000000),
  394. RTW89_DECL_RFK_WM(0x5a7c, 0xffffffff, 0x00000000),
  395. RTW89_DECL_RFK_WM(0x5a80, 0xffffffff, 0x00000000),
  396. RTW89_DECL_RFK_WM(0x5a84, 0xffffffff, 0x00000000),
  397. RTW89_DECL_RFK_WM(0x5a88, 0xffffffff, 0x00000000),
  398. RTW89_DECL_RFK_WM(0x5a8c, 0xffffffff, 0x00000000),
  399. RTW89_DECL_RFK_WM(0x5a90, 0xffffffff, 0x00000000),
  400. RTW89_DECL_RFK_WM(0x5a94, 0xffffffff, 0x00000000),
  401. RTW89_DECL_RFK_WM(0x5a98, 0xffffffff, 0x00000000),
  402. RTW89_DECL_RFK_WM(0x5a9c, 0xffffffff, 0x00000000),
  403. RTW89_DECL_RFK_WM(0x5aa0, 0xffffffff, 0x00000000),
  404. RTW89_DECL_RFK_WM(0x5aa4, 0xffffffff, 0x00000000),
  405. RTW89_DECL_RFK_WM(0x5aa8, 0xffffffff, 0x00000000),
  406. RTW89_DECL_RFK_WM(0x5aac, 0xffffffff, 0x00000000),
  407. RTW89_DECL_RFK_WM(0x5ab0, 0xffffffff, 0x00000000),
  408. RTW89_DECL_RFK_WM(0x5ab4, 0xffffffff, 0x00000000),
  409. RTW89_DECL_RFK_WM(0x5ab8, 0xffffffff, 0x00000000),
  410. RTW89_DECL_RFK_WM(0x5abc, 0xffffffff, 0x00000000),
  411. RTW89_DECL_RFK_WM(0x5ac0, 0xffffffff, 0x00000000),
  412. };
  413. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_dac_gain_defs_a);
  414. static const struct rtw89_reg5_def rtw8852b_tssi_dac_gain_defs_b[] = {
  415. RTW89_DECL_RFK_WM(0x78b0, 0x00000fff, 0x000),
  416. RTW89_DECL_RFK_WM(0x78b0, 0x00000800, 0x1),
  417. RTW89_DECL_RFK_WM(0x7a00, 0xffffffff, 0x00000000),
  418. RTW89_DECL_RFK_WM(0x7a04, 0xffffffff, 0x00000000),
  419. RTW89_DECL_RFK_WM(0x7a08, 0xffffffff, 0x00000000),
  420. RTW89_DECL_RFK_WM(0x7a0c, 0xffffffff, 0x00000000),
  421. RTW89_DECL_RFK_WM(0x7a10, 0xffffffff, 0x00000000),
  422. RTW89_DECL_RFK_WM(0x7a14, 0xffffffff, 0x00000000),
  423. RTW89_DECL_RFK_WM(0x7a18, 0xffffffff, 0x00000000),
  424. RTW89_DECL_RFK_WM(0x7a1c, 0xffffffff, 0x00000000),
  425. RTW89_DECL_RFK_WM(0x7a20, 0xffffffff, 0x00000000),
  426. RTW89_DECL_RFK_WM(0x7a24, 0xffffffff, 0x00000000),
  427. RTW89_DECL_RFK_WM(0x7a28, 0xffffffff, 0x00000000),
  428. RTW89_DECL_RFK_WM(0x7a2c, 0xffffffff, 0x00000000),
  429. RTW89_DECL_RFK_WM(0x7a30, 0xffffffff, 0x00000000),
  430. RTW89_DECL_RFK_WM(0x7a34, 0xffffffff, 0x00000000),
  431. RTW89_DECL_RFK_WM(0x7a38, 0xffffffff, 0x00000000),
  432. RTW89_DECL_RFK_WM(0x7a3c, 0xffffffff, 0x00000000),
  433. RTW89_DECL_RFK_WM(0x7a40, 0xffffffff, 0x00000000),
  434. RTW89_DECL_RFK_WM(0x7a44, 0xffffffff, 0x00000000),
  435. RTW89_DECL_RFK_WM(0x7a48, 0xffffffff, 0x00000000),
  436. RTW89_DECL_RFK_WM(0x7a4c, 0xffffffff, 0x00000000),
  437. RTW89_DECL_RFK_WM(0x7a50, 0xffffffff, 0x00000000),
  438. RTW89_DECL_RFK_WM(0x7a54, 0xffffffff, 0x00000000),
  439. RTW89_DECL_RFK_WM(0x7a58, 0xffffffff, 0x00000000),
  440. RTW89_DECL_RFK_WM(0x7a5c, 0xffffffff, 0x00000000),
  441. RTW89_DECL_RFK_WM(0x7a60, 0xffffffff, 0x00000000),
  442. RTW89_DECL_RFK_WM(0x7a64, 0xffffffff, 0x00000000),
  443. RTW89_DECL_RFK_WM(0x7a68, 0xffffffff, 0x00000000),
  444. RTW89_DECL_RFK_WM(0x7a6c, 0xffffffff, 0x00000000),
  445. RTW89_DECL_RFK_WM(0x7a70, 0xffffffff, 0x00000000),
  446. RTW89_DECL_RFK_WM(0x7a74, 0xffffffff, 0x00000000),
  447. RTW89_DECL_RFK_WM(0x7a78, 0xffffffff, 0x00000000),
  448. RTW89_DECL_RFK_WM(0x7a7c, 0xffffffff, 0x00000000),
  449. RTW89_DECL_RFK_WM(0x7a80, 0xffffffff, 0x00000000),
  450. RTW89_DECL_RFK_WM(0x7a84, 0xffffffff, 0x00000000),
  451. RTW89_DECL_RFK_WM(0x7a88, 0xffffffff, 0x00000000),
  452. RTW89_DECL_RFK_WM(0x7a8c, 0xffffffff, 0x00000000),
  453. RTW89_DECL_RFK_WM(0x7a90, 0xffffffff, 0x00000000),
  454. RTW89_DECL_RFK_WM(0x7a94, 0xffffffff, 0x00000000),
  455. RTW89_DECL_RFK_WM(0x7a98, 0xffffffff, 0x00000000),
  456. RTW89_DECL_RFK_WM(0x7a9c, 0xffffffff, 0x00000000),
  457. RTW89_DECL_RFK_WM(0x7aa0, 0xffffffff, 0x00000000),
  458. RTW89_DECL_RFK_WM(0x7aa4, 0xffffffff, 0x00000000),
  459. RTW89_DECL_RFK_WM(0x7aa8, 0xffffffff, 0x00000000),
  460. RTW89_DECL_RFK_WM(0x7aac, 0xffffffff, 0x00000000),
  461. RTW89_DECL_RFK_WM(0x7ab0, 0xffffffff, 0x00000000),
  462. RTW89_DECL_RFK_WM(0x7ab4, 0xffffffff, 0x00000000),
  463. RTW89_DECL_RFK_WM(0x7ab8, 0xffffffff, 0x00000000),
  464. RTW89_DECL_RFK_WM(0x7abc, 0xffffffff, 0x00000000),
  465. RTW89_DECL_RFK_WM(0x7ac0, 0xffffffff, 0x00000000),
  466. };
  467. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_dac_gain_defs_b);
  468. static const struct rtw89_reg5_def rtw8852b_tssi_slope_a_defs_2g[] = {
  469. RTW89_DECL_RFK_WM(0x5608, 0x07ffffff, 0x0801008),
  470. RTW89_DECL_RFK_WM(0x560c, 0x07ffffff, 0x0201020),
  471. RTW89_DECL_RFK_WM(0x5610, 0x07ffffff, 0x0201008),
  472. RTW89_DECL_RFK_WM(0x5614, 0x07ffffff, 0x0804008),
  473. RTW89_DECL_RFK_WM(0x5618, 0x07ffffff, 0x0201008),
  474. RTW89_DECL_RFK_WM(0x561c, 0x000001ff, 0x008),
  475. RTW89_DECL_RFK_WM(0x561c, 0xffff0000, 0x0808),
  476. RTW89_DECL_RFK_WM(0x5620, 0xffffffff, 0x08081e28),
  477. RTW89_DECL_RFK_WM(0x5624, 0xffffffff, 0x08080808),
  478. RTW89_DECL_RFK_WM(0x5628, 0xffffffff, 0x08081e28),
  479. RTW89_DECL_RFK_WM(0x562c, 0x0000ffff, 0x0808),
  480. RTW89_DECL_RFK_WM(0x581c, 0x00100000, 0x1),
  481. };
  482. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_slope_a_defs_2g);
  483. static const struct rtw89_reg5_def rtw8852b_tssi_slope_a_defs_5g[] = {
  484. RTW89_DECL_RFK_WM(0x5608, 0x07ffffff, 0x0201008),
  485. RTW89_DECL_RFK_WM(0x560c, 0x07ffffff, 0x0201020),
  486. RTW89_DECL_RFK_WM(0x5610, 0x07ffffff, 0x0201008),
  487. RTW89_DECL_RFK_WM(0x5614, 0x07ffffff, 0x0201008),
  488. RTW89_DECL_RFK_WM(0x5618, 0x07ffffff, 0x0201008),
  489. RTW89_DECL_RFK_WM(0x561c, 0x000001ff, 0x008),
  490. RTW89_DECL_RFK_WM(0x561c, 0xffff0000, 0x0808),
  491. RTW89_DECL_RFK_WM(0x5620, 0xffffffff, 0x08081e08),
  492. RTW89_DECL_RFK_WM(0x5624, 0xffffffff, 0x08080808),
  493. RTW89_DECL_RFK_WM(0x5628, 0xffffffff, 0x08080808),
  494. RTW89_DECL_RFK_WM(0x562c, 0x0000ffff, 0x0808),
  495. RTW89_DECL_RFK_WM(0x581c, 0x00100000, 0x1),
  496. };
  497. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_slope_a_defs_5g);
  498. static const struct rtw89_reg5_def rtw8852b_tssi_slope_b_defs_2g[] = {
  499. RTW89_DECL_RFK_WM(0x7608, 0x07ffffff, 0x0801008),
  500. RTW89_DECL_RFK_WM(0x760c, 0x07ffffff, 0x0201020),
  501. RTW89_DECL_RFK_WM(0x7610, 0x07ffffff, 0x0201008),
  502. RTW89_DECL_RFK_WM(0x7614, 0x07ffffff, 0x0804008),
  503. RTW89_DECL_RFK_WM(0x7618, 0x07ffffff, 0x0201008),
  504. RTW89_DECL_RFK_WM(0x761c, 0x000001ff, 0x008),
  505. RTW89_DECL_RFK_WM(0x761c, 0xffff0000, 0x0808),
  506. RTW89_DECL_RFK_WM(0x7620, 0xffffffff, 0x08081e28),
  507. RTW89_DECL_RFK_WM(0x7624, 0xffffffff, 0x08080808),
  508. RTW89_DECL_RFK_WM(0x7628, 0xffffffff, 0x08081e28),
  509. RTW89_DECL_RFK_WM(0x762c, 0x0000ffff, 0x0808),
  510. RTW89_DECL_RFK_WM(0x781c, 0x00100000, 0x1),
  511. };
  512. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_slope_b_defs_2g);
  513. static const struct rtw89_reg5_def rtw8852b_tssi_slope_b_defs_5g[] = {
  514. RTW89_DECL_RFK_WM(0x7608, 0x07ffffff, 0x0201008),
  515. RTW89_DECL_RFK_WM(0x760c, 0x07ffffff, 0x0201020),
  516. RTW89_DECL_RFK_WM(0x7610, 0x07ffffff, 0x0201008),
  517. RTW89_DECL_RFK_WM(0x7614, 0x07ffffff, 0x0201008),
  518. RTW89_DECL_RFK_WM(0x7618, 0x07ffffff, 0x0201008),
  519. RTW89_DECL_RFK_WM(0x761c, 0x000001ff, 0x008),
  520. RTW89_DECL_RFK_WM(0x761c, 0xffff0000, 0x0808),
  521. RTW89_DECL_RFK_WM(0x7620, 0xffffffff, 0x08081e08),
  522. RTW89_DECL_RFK_WM(0x7624, 0xffffffff, 0x08080808),
  523. RTW89_DECL_RFK_WM(0x7628, 0xffffffff, 0x08080808),
  524. RTW89_DECL_RFK_WM(0x762c, 0x0000ffff, 0x0808),
  525. RTW89_DECL_RFK_WM(0x781c, 0x00100000, 0x1),
  526. };
  527. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_slope_b_defs_5g);
  528. static const struct rtw89_reg5_def rtw8852b_tssi_align_a_2g_all_defs[] = {
  529. RTW89_DECL_RFK_WM(0x5604, 0x80000000, 0x1),
  530. RTW89_DECL_RFK_WM(0x5600, 0x3fffffff, 0x3f2d2721),
  531. RTW89_DECL_RFK_WM(0x5604, 0x003fffff, 0x010101),
  532. RTW89_DECL_RFK_WM(0x5630, 0x3fffffff, 0x01ef27af),
  533. RTW89_DECL_RFK_WM(0x5634, 0x3fffffff, 0x00000075),
  534. RTW89_DECL_RFK_WM(0x5638, 0x000fffff, 0x00000),
  535. RTW89_DECL_RFK_WM(0x563c, 0x3fffffff, 0x017f13ae),
  536. RTW89_DECL_RFK_WM(0x5640, 0x3fffffff, 0x0000006e),
  537. RTW89_DECL_RFK_WM(0x5644, 0x000fffff, 0x00000),
  538. };
  539. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_a_2g_all_defs);
  540. static const struct rtw89_reg5_def rtw8852b_tssi_align_a_2g_part_defs[] = {
  541. RTW89_DECL_RFK_WM(0x5630, 0x3fffffff, 0x01ef27af),
  542. RTW89_DECL_RFK_WM(0x5634, 0x3fffffff, 0x00000075),
  543. RTW89_DECL_RFK_WM(0x563c, 0x3fffffff, 0x017f13ae),
  544. RTW89_DECL_RFK_WM(0x5640, 0x3fffffff, 0x0000006e),
  545. };
  546. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_a_2g_part_defs);
  547. static const struct rtw89_reg5_def rtw8852b_tssi_align_a_5g1_all_defs[] = {
  548. RTW89_DECL_RFK_WM(0x5604, 0x80000000, 0x1),
  549. RTW89_DECL_RFK_WM(0x5600, 0x3fffffff, 0x3f2d2721),
  550. RTW89_DECL_RFK_WM(0x5604, 0x003fffff, 0x010101),
  551. RTW89_DECL_RFK_WM(0x5630, 0x3fffffff, 0x016037e7),
  552. RTW89_DECL_RFK_WM(0x5634, 0x3fffffff, 0x0000006f),
  553. RTW89_DECL_RFK_WM(0x5638, 0x000fffff, 0x00000),
  554. RTW89_DECL_RFK_WM(0x563c, 0x3fffffff, 0x00000000),
  555. RTW89_DECL_RFK_WM(0x5640, 0x3fffffff, 0x00000000),
  556. RTW89_DECL_RFK_WM(0x5644, 0x000fffff, 0x00000),
  557. };
  558. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_a_5g1_all_defs);
  559. static const struct rtw89_reg5_def rtw8852b_tssi_align_a_5g1_part_defs[] = {
  560. RTW89_DECL_RFK_WM(0x5630, 0x3fffffff, 0x016037e7),
  561. RTW89_DECL_RFK_WM(0x5634, 0x3fffffff, 0x0000006f),
  562. RTW89_DECL_RFK_WM(0x563c, 0x3fffffff, 0x00000000),
  563. RTW89_DECL_RFK_WM(0x5640, 0x3fffffff, 0x00000000),
  564. };
  565. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_a_5g1_part_defs);
  566. static const struct rtw89_reg5_def rtw8852b_tssi_align_a_5g2_all_defs[] = {
  567. RTW89_DECL_RFK_WM(0x5604, 0x80000000, 0x1),
  568. RTW89_DECL_RFK_WM(0x5600, 0x3fffffff, 0x3f2d2721),
  569. RTW89_DECL_RFK_WM(0x5604, 0x003fffff, 0x010101),
  570. RTW89_DECL_RFK_WM(0x5630, 0x3fffffff, 0x01f053f1),
  571. RTW89_DECL_RFK_WM(0x5634, 0x3fffffff, 0x00000070),
  572. RTW89_DECL_RFK_WM(0x5638, 0x000fffff, 0x00000),
  573. RTW89_DECL_RFK_WM(0x563c, 0x3fffffff, 0x00000000),
  574. RTW89_DECL_RFK_WM(0x5640, 0x3fffffff, 0x00000000),
  575. RTW89_DECL_RFK_WM(0x5644, 0x000fffff, 0x00000),
  576. };
  577. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_a_5g2_all_defs);
  578. static const struct rtw89_reg5_def rtw8852b_tssi_align_a_5g2_part_defs[] = {
  579. RTW89_DECL_RFK_WM(0x5630, 0x3fffffff, 0x01f053f1),
  580. RTW89_DECL_RFK_WM(0x5634, 0x3fffffff, 0x00000070),
  581. RTW89_DECL_RFK_WM(0x563c, 0x3fffffff, 0x00000000),
  582. RTW89_DECL_RFK_WM(0x5640, 0x3fffffff, 0x00000000),
  583. };
  584. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_a_5g2_part_defs);
  585. static const struct rtw89_reg5_def rtw8852b_tssi_align_a_5g3_all_defs[] = {
  586. RTW89_DECL_RFK_WM(0x5604, 0x80000000, 0x1),
  587. RTW89_DECL_RFK_WM(0x5600, 0x3fffffff, 0x3f2d2721),
  588. RTW89_DECL_RFK_WM(0x5604, 0x003fffff, 0x010101),
  589. RTW89_DECL_RFK_WM(0x5630, 0x3fffffff, 0x01c047ee),
  590. RTW89_DECL_RFK_WM(0x5634, 0x3fffffff, 0x00000070),
  591. RTW89_DECL_RFK_WM(0x5638, 0x000fffff, 0x00000),
  592. RTW89_DECL_RFK_WM(0x563c, 0x3fffffff, 0x00000000),
  593. RTW89_DECL_RFK_WM(0x5640, 0x3fffffff, 0x00000000),
  594. RTW89_DECL_RFK_WM(0x5644, 0x000fffff, 0x00000),
  595. };
  596. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_a_5g3_all_defs);
  597. static const struct rtw89_reg5_def rtw8852b_tssi_align_a_5g3_part_defs[] = {
  598. RTW89_DECL_RFK_WM(0x5630, 0x3fffffff, 0x01c047ee),
  599. RTW89_DECL_RFK_WM(0x5634, 0x3fffffff, 0x00000070),
  600. RTW89_DECL_RFK_WM(0x563c, 0x3fffffff, 0x00000000),
  601. RTW89_DECL_RFK_WM(0x5640, 0x3fffffff, 0x00000000),
  602. };
  603. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_a_5g3_part_defs);
  604. static const struct rtw89_reg5_def rtw8852b_tssi_align_b_2g_all_defs[] = {
  605. RTW89_DECL_RFK_WM(0x7604, 0x80000000, 0x1),
  606. RTW89_DECL_RFK_WM(0x7600, 0x3fffffff, 0x3f2d2721),
  607. RTW89_DECL_RFK_WM(0x7604, 0x003fffff, 0x010101),
  608. RTW89_DECL_RFK_WM(0x7630, 0x3fffffff, 0x01ff2bb5),
  609. RTW89_DECL_RFK_WM(0x7634, 0x3fffffff, 0x00000078),
  610. RTW89_DECL_RFK_WM(0x7638, 0x000fffff, 0x00000),
  611. RTW89_DECL_RFK_WM(0x763c, 0x3fffffff, 0x018f2bb0),
  612. RTW89_DECL_RFK_WM(0x7640, 0x3fffffff, 0x00000072),
  613. RTW89_DECL_RFK_WM(0x7644, 0x000fffff, 0x00000),
  614. };
  615. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_b_2g_all_defs);
  616. static const struct rtw89_reg5_def rtw8852b_tssi_align_b_2g_part_defs[] = {
  617. RTW89_DECL_RFK_WM(0x7630, 0x3fffffff, 0x01ff2bb5),
  618. RTW89_DECL_RFK_WM(0x7634, 0x3fffffff, 0x00000078),
  619. RTW89_DECL_RFK_WM(0x763c, 0x3fffffff, 0x018f2bb0),
  620. RTW89_DECL_RFK_WM(0x7640, 0x3fffffff, 0x00000072),
  621. };
  622. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_b_2g_part_defs);
  623. static const struct rtw89_reg5_def rtw8852b_tssi_align_b_5g1_all_defs[] = {
  624. RTW89_DECL_RFK_WM(0x7604, 0x80000000, 0x1),
  625. RTW89_DECL_RFK_WM(0x7600, 0x3fffffff, 0x3f2d2721),
  626. RTW89_DECL_RFK_WM(0x7604, 0x003fffff, 0x010101),
  627. RTW89_DECL_RFK_WM(0x7630, 0x3fffffff, 0x009003da),
  628. RTW89_DECL_RFK_WM(0x7634, 0x3fffffff, 0x00000069),
  629. RTW89_DECL_RFK_WM(0x7638, 0x000fffff, 0x00000),
  630. RTW89_DECL_RFK_WM(0x763c, 0x3fffffff, 0x00000000),
  631. RTW89_DECL_RFK_WM(0x7640, 0x3fffffff, 0x00000000),
  632. RTW89_DECL_RFK_WM(0x7644, 0x000fffff, 0x00000),
  633. };
  634. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_b_5g1_all_defs);
  635. static const struct rtw89_reg5_def rtw8852b_tssi_align_b_5g1_part_defs[] = {
  636. RTW89_DECL_RFK_WM(0x7630, 0x3fffffff, 0x009003da),
  637. RTW89_DECL_RFK_WM(0x7634, 0x3fffffff, 0x00000069),
  638. RTW89_DECL_RFK_WM(0x763c, 0x3fffffff, 0x00000000),
  639. RTW89_DECL_RFK_WM(0x7640, 0x3fffffff, 0x00000000),
  640. };
  641. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_b_5g1_part_defs);
  642. static const struct rtw89_reg5_def rtw8852b_tssi_align_b_5g2_all_defs[] = {
  643. RTW89_DECL_RFK_WM(0x7604, 0x80000000, 0x1),
  644. RTW89_DECL_RFK_WM(0x7600, 0x3fffffff, 0x3f2d2721),
  645. RTW89_DECL_RFK_WM(0x7604, 0x003fffff, 0x010101),
  646. RTW89_DECL_RFK_WM(0x7630, 0x3fffffff, 0x013027e6),
  647. RTW89_DECL_RFK_WM(0x7634, 0x3fffffff, 0x00000069),
  648. RTW89_DECL_RFK_WM(0x7638, 0x000fffff, 0x00000),
  649. RTW89_DECL_RFK_WM(0x763c, 0x3fffffff, 0x00000000),
  650. RTW89_DECL_RFK_WM(0x7640, 0x3fffffff, 0x00000000),
  651. RTW89_DECL_RFK_WM(0x7644, 0x000fffff, 0x00000),
  652. };
  653. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_b_5g2_all_defs);
  654. static const struct rtw89_reg5_def rtw8852b_tssi_align_b_5g2_part_defs[] = {
  655. RTW89_DECL_RFK_WM(0x7630, 0x3fffffff, 0x013027e6),
  656. RTW89_DECL_RFK_WM(0x7634, 0x3fffffff, 0x00000069),
  657. RTW89_DECL_RFK_WM(0x763c, 0x3fffffff, 0x00000000),
  658. RTW89_DECL_RFK_WM(0x7640, 0x3fffffff, 0x00000000),
  659. };
  660. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_b_5g2_part_defs);
  661. static const struct rtw89_reg5_def rtw8852b_tssi_align_b_5g3_all_defs[] = {
  662. RTW89_DECL_RFK_WM(0x7604, 0x80000000, 0x1),
  663. RTW89_DECL_RFK_WM(0x7600, 0x3fffffff, 0x3f2d2721),
  664. RTW89_DECL_RFK_WM(0x7604, 0x003fffff, 0x010101),
  665. RTW89_DECL_RFK_WM(0x7630, 0x3fffffff, 0x009003da),
  666. RTW89_DECL_RFK_WM(0x7634, 0x3fffffff, 0x00000069),
  667. RTW89_DECL_RFK_WM(0x7638, 0x000fffff, 0x00000),
  668. RTW89_DECL_RFK_WM(0x763c, 0x3fffffff, 0x00000000),
  669. RTW89_DECL_RFK_WM(0x7640, 0x3fffffff, 0x00000000),
  670. RTW89_DECL_RFK_WM(0x7644, 0x000fffff, 0x00000),
  671. };
  672. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_b_5g3_all_defs);
  673. static const struct rtw89_reg5_def rtw8852b_tssi_align_b_5g3_part_defs[] = {
  674. RTW89_DECL_RFK_WM(0x7630, 0x3fffffff, 0x009003da),
  675. RTW89_DECL_RFK_WM(0x7634, 0x3fffffff, 0x00000069),
  676. RTW89_DECL_RFK_WM(0x763c, 0x3fffffff, 0x00000000),
  677. RTW89_DECL_RFK_WM(0x7640, 0x3fffffff, 0x00000000),
  678. };
  679. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_align_b_5g3_part_defs);
  680. static const struct rtw89_reg5_def rtw8852b_tssi_slope_defs_a[] = {
  681. RTW89_DECL_RFK_WM(0x5814, 0x00000800, 0x1),
  682. RTW89_DECL_RFK_WM(0x581c, 0x20000000, 0x1),
  683. RTW89_DECL_RFK_WM(0x5814, 0x20000000, 0x1),
  684. };
  685. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_slope_defs_a);
  686. static const struct rtw89_reg5_def rtw8852b_tssi_slope_defs_b[] = {
  687. RTW89_DECL_RFK_WM(0x7814, 0x00000800, 0x1),
  688. RTW89_DECL_RFK_WM(0x781c, 0x20000000, 0x1),
  689. RTW89_DECL_RFK_WM(0x7814, 0x20000000, 0x1),
  690. };
  691. RTW89_DECLARE_RFK_TBL(rtw8852b_tssi_slope_defs_b);