rx_location_info.h 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035
  1. /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
  2. *
  3. * Permission to use, copy, modify, and/or distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies.
  6. *
  7. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. #ifndef _RX_LOCATION_INFO_H_
  16. #define _RX_LOCATION_INFO_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #define NUM_OF_DWORDS_RX_LOCATION_INFO 28
  20. struct rx_location_info {
  21. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  22. uint32_t rx_location_info_valid : 1, // [0:0]
  23. rtt_hw_ifft_mode : 1, // [1:1]
  24. rtt_11az_mode : 2, // [3:2]
  25. reserved_0 : 4, // [7:4]
  26. rtt_num_fac : 8, // [15:8]
  27. rtt_rx_chain_mask : 8, // [23:16]
  28. rtt_num_streams : 8; // [31:24]
  29. uint32_t rtt_first_selected_chain : 8, // [7:0]
  30. rtt_second_selected_chain : 8, // [15:8]
  31. rtt_cfr_status : 8, // [23:16]
  32. rtt_cir_status : 8; // [31:24]
  33. uint32_t rtt_che_buffer_pointer_low32 : 32; // [31:0]
  34. uint32_t rtt_che_buffer_pointer_high8 : 8, // [7:0]
  35. reserved_3 : 8, // [15:8]
  36. rtt_pkt_bw_vht : 4, // [19:16]
  37. rtt_pkt_bw_leg : 4, // [23:20]
  38. rtt_mcs_rate : 8; // [31:24]
  39. uint32_t rtt_cfo_measurement : 16, // [15:0]
  40. rtt_preamble_type : 8, // [23:16]
  41. rtt_gi_type : 8; // [31:24]
  42. uint32_t rx_start_ts : 32; // [31:0]
  43. uint32_t rx_start_ts_upper : 32; // [31:0]
  44. uint32_t rx_end_ts : 32; // [31:0]
  45. uint32_t gain_chain0 : 16, // [15:0]
  46. gain_chain1 : 16; // [31:16]
  47. uint32_t gain_chain2 : 16, // [15:0]
  48. gain_chain3 : 16; // [31:16]
  49. uint32_t gain_report_status : 8, // [7:0]
  50. rtt_timing_backoff_sel : 8, // [15:8]
  51. rtt_fac_combined : 16; // [31:16]
  52. uint32_t rtt_fac_0 : 16, // [15:0]
  53. rtt_fac_1 : 16; // [31:16]
  54. uint32_t rtt_fac_2 : 16, // [15:0]
  55. rtt_fac_3 : 16; // [31:16]
  56. uint32_t rtt_fac_4 : 16, // [15:0]
  57. rtt_fac_5 : 16; // [31:16]
  58. uint32_t rtt_fac_6 : 16, // [15:0]
  59. rtt_fac_7 : 16; // [31:16]
  60. uint32_t rtt_fac_8 : 16, // [15:0]
  61. rtt_fac_9 : 16; // [31:16]
  62. uint32_t rtt_fac_10 : 16, // [15:0]
  63. rtt_fac_11 : 16; // [31:16]
  64. uint32_t rtt_fac_12 : 16, // [15:0]
  65. rtt_fac_13 : 16; // [31:16]
  66. uint32_t rtt_fac_14 : 16, // [15:0]
  67. rtt_fac_15 : 16; // [31:16]
  68. uint32_t rtt_fac_16 : 16, // [15:0]
  69. rtt_fac_17 : 16; // [31:16]
  70. uint32_t rtt_fac_18 : 16, // [15:0]
  71. rtt_fac_19 : 16; // [31:16]
  72. uint32_t rtt_fac_20 : 16, // [15:0]
  73. rtt_fac_21 : 16; // [31:16]
  74. uint32_t rtt_fac_22 : 16, // [15:0]
  75. rtt_fac_23 : 16; // [31:16]
  76. uint32_t rtt_fac_24 : 16, // [15:0]
  77. rtt_fac_25 : 16; // [31:16]
  78. uint32_t rtt_fac_26 : 16, // [15:0]
  79. rtt_fac_27 : 16; // [31:16]
  80. uint32_t rtt_fac_28 : 16, // [15:0]
  81. rtt_fac_29 : 16; // [31:16]
  82. uint32_t rtt_fac_30 : 16, // [15:0]
  83. rtt_fac_31 : 16; // [31:16]
  84. uint32_t reserved_27a : 32; // [31:0]
  85. #else
  86. uint32_t rtt_num_streams : 8, // [31:24]
  87. rtt_rx_chain_mask : 8, // [23:16]
  88. rtt_num_fac : 8, // [15:8]
  89. reserved_0 : 4, // [7:4]
  90. rtt_11az_mode : 2, // [3:2]
  91. rtt_hw_ifft_mode : 1, // [1:1]
  92. rx_location_info_valid : 1; // [0:0]
  93. uint32_t rtt_cir_status : 8, // [31:24]
  94. rtt_cfr_status : 8, // [23:16]
  95. rtt_second_selected_chain : 8, // [15:8]
  96. rtt_first_selected_chain : 8; // [7:0]
  97. uint32_t rtt_che_buffer_pointer_low32 : 32; // [31:0]
  98. uint32_t rtt_mcs_rate : 8, // [31:24]
  99. rtt_pkt_bw_leg : 4, // [23:20]
  100. rtt_pkt_bw_vht : 4, // [19:16]
  101. reserved_3 : 8, // [15:8]
  102. rtt_che_buffer_pointer_high8 : 8; // [7:0]
  103. uint32_t rtt_gi_type : 8, // [31:24]
  104. rtt_preamble_type : 8, // [23:16]
  105. rtt_cfo_measurement : 16; // [15:0]
  106. uint32_t rx_start_ts : 32; // [31:0]
  107. uint32_t rx_start_ts_upper : 32; // [31:0]
  108. uint32_t rx_end_ts : 32; // [31:0]
  109. uint32_t gain_chain1 : 16, // [31:16]
  110. gain_chain0 : 16; // [15:0]
  111. uint32_t gain_chain3 : 16, // [31:16]
  112. gain_chain2 : 16; // [15:0]
  113. uint32_t rtt_fac_combined : 16, // [31:16]
  114. rtt_timing_backoff_sel : 8, // [15:8]
  115. gain_report_status : 8; // [7:0]
  116. uint32_t rtt_fac_1 : 16, // [31:16]
  117. rtt_fac_0 : 16; // [15:0]
  118. uint32_t rtt_fac_3 : 16, // [31:16]
  119. rtt_fac_2 : 16; // [15:0]
  120. uint32_t rtt_fac_5 : 16, // [31:16]
  121. rtt_fac_4 : 16; // [15:0]
  122. uint32_t rtt_fac_7 : 16, // [31:16]
  123. rtt_fac_6 : 16; // [15:0]
  124. uint32_t rtt_fac_9 : 16, // [31:16]
  125. rtt_fac_8 : 16; // [15:0]
  126. uint32_t rtt_fac_11 : 16, // [31:16]
  127. rtt_fac_10 : 16; // [15:0]
  128. uint32_t rtt_fac_13 : 16, // [31:16]
  129. rtt_fac_12 : 16; // [15:0]
  130. uint32_t rtt_fac_15 : 16, // [31:16]
  131. rtt_fac_14 : 16; // [15:0]
  132. uint32_t rtt_fac_17 : 16, // [31:16]
  133. rtt_fac_16 : 16; // [15:0]
  134. uint32_t rtt_fac_19 : 16, // [31:16]
  135. rtt_fac_18 : 16; // [15:0]
  136. uint32_t rtt_fac_21 : 16, // [31:16]
  137. rtt_fac_20 : 16; // [15:0]
  138. uint32_t rtt_fac_23 : 16, // [31:16]
  139. rtt_fac_22 : 16; // [15:0]
  140. uint32_t rtt_fac_25 : 16, // [31:16]
  141. rtt_fac_24 : 16; // [15:0]
  142. uint32_t rtt_fac_27 : 16, // [31:16]
  143. rtt_fac_26 : 16; // [15:0]
  144. uint32_t rtt_fac_29 : 16, // [31:16]
  145. rtt_fac_28 : 16; // [15:0]
  146. uint32_t rtt_fac_31 : 16, // [31:16]
  147. rtt_fac_30 : 16; // [15:0]
  148. uint32_t reserved_27a : 32; // [31:0]
  149. #endif
  150. };
  151. /* Description RX_LOCATION_INFO_VALID
  152. <enum 0 rx_location_info_is_not_valid>
  153. <enum 1 rx_location_info_is_valid>
  154. <legal all>
  155. */
  156. #define RX_LOCATION_INFO_RX_LOCATION_INFO_VALID_OFFSET 0x00000000
  157. #define RX_LOCATION_INFO_RX_LOCATION_INFO_VALID_LSB 0
  158. #define RX_LOCATION_INFO_RX_LOCATION_INFO_VALID_MSB 0
  159. #define RX_LOCATION_INFO_RX_LOCATION_INFO_VALID_MASK 0x00000001
  160. /* Description RTT_HW_IFFT_MODE
  161. Indicator showing if HW IFFT mode or SW IFFT mode
  162. <enum 0 location_sw_ifft_mode>
  163. <enum 1 location_hw_ifft_mode>
  164. <legal all>
  165. */
  166. #define RX_LOCATION_INFO_RTT_HW_IFFT_MODE_OFFSET 0x00000000
  167. #define RX_LOCATION_INFO_RTT_HW_IFFT_MODE_LSB 1
  168. #define RX_LOCATION_INFO_RTT_HW_IFFT_MODE_MSB 1
  169. #define RX_LOCATION_INFO_RTT_HW_IFFT_MODE_MASK 0x00000002
  170. /* Description RTT_11AZ_MODE
  171. Indicator showing RTT5/.11mc or .11az mode for debug
  172. <enum 0 location_rtt5_mode> legacy RTT5/.11mc mode
  173. <enum 1 location_11az_ISTA> .11az ISTA location info. sent
  174. on Rx path after receiving R2I LMR
  175. <enum 2 location_RSVD>
  176. <enum 3 location_11az_RSTA> .11az RSTA location info. sent
  177. on Tx path after transmitting R2I LMR
  178. <legal all>
  179. */
  180. #define RX_LOCATION_INFO_RTT_11AZ_MODE_OFFSET 0x00000000
  181. #define RX_LOCATION_INFO_RTT_11AZ_MODE_LSB 2
  182. #define RX_LOCATION_INFO_RTT_11AZ_MODE_MSB 3
  183. #define RX_LOCATION_INFO_RTT_11AZ_MODE_MASK 0x0000000c
  184. /* Description RESERVED_0
  185. <legal 0>
  186. */
  187. #define RX_LOCATION_INFO_RESERVED_0_OFFSET 0x00000000
  188. #define RX_LOCATION_INFO_RESERVED_0_LSB 4
  189. #define RX_LOCATION_INFO_RESERVED_0_MSB 7
  190. #define RX_LOCATION_INFO_RESERVED_0_MASK 0x000000f0
  191. /* Description RTT_NUM_FAC
  192. Number of valid first arrival correction (FAC) values (in
  193. fields rtt_fac_0 - rtt_fac_31)
  194. <legal 0-32>
  195. */
  196. #define RX_LOCATION_INFO_RTT_NUM_FAC_OFFSET 0x00000000
  197. #define RX_LOCATION_INFO_RTT_NUM_FAC_LSB 8
  198. #define RX_LOCATION_INFO_RTT_NUM_FAC_MSB 15
  199. #define RX_LOCATION_INFO_RTT_NUM_FAC_MASK 0x0000ff00
  200. /* Description RTT_RX_CHAIN_MASK
  201. Rx chain mask, each bit is a Rx chain
  202. 0: the Rx chain is not used
  203. 1: the Rx chain is used
  204. Up to 4 Rx chains are supported.
  205. <legal all>
  206. */
  207. #define RX_LOCATION_INFO_RTT_RX_CHAIN_MASK_OFFSET 0x00000000
  208. #define RX_LOCATION_INFO_RTT_RX_CHAIN_MASK_LSB 16
  209. #define RX_LOCATION_INFO_RTT_RX_CHAIN_MASK_MSB 23
  210. #define RX_LOCATION_INFO_RTT_RX_CHAIN_MASK_MASK 0x00ff0000
  211. /* Description RTT_NUM_STREAMS
  212. Number of streams used
  213. Up to 8 streams are supported.
  214. <legal 0-8>
  215. */
  216. #define RX_LOCATION_INFO_RTT_NUM_STREAMS_OFFSET 0x00000000
  217. #define RX_LOCATION_INFO_RTT_NUM_STREAMS_LSB 24
  218. #define RX_LOCATION_INFO_RTT_NUM_STREAMS_MSB 31
  219. #define RX_LOCATION_INFO_RTT_NUM_STREAMS_MASK 0xff000000
  220. /* Description RTT_FIRST_SELECTED_CHAIN
  221. For legacy RTT5/.11mc mode, this field shows the first selected
  222. Rx chain that is used for FAC calculations, when forced
  223. by a virtual register.
  224. <enum 0 location_selected_chain_is_0>
  225. <enum 1 location_selected_chain_is_1>
  226. <enum 2 location_selected_chain_is_2>
  227. <enum 3 location_selected_chain_is_3>
  228. <legal 0-3>
  229. */
  230. #define RX_LOCATION_INFO_RTT_FIRST_SELECTED_CHAIN_OFFSET 0x00000004
  231. #define RX_LOCATION_INFO_RTT_FIRST_SELECTED_CHAIN_LSB 0
  232. #define RX_LOCATION_INFO_RTT_FIRST_SELECTED_CHAIN_MSB 7
  233. #define RX_LOCATION_INFO_RTT_FIRST_SELECTED_CHAIN_MASK 0x000000ff
  234. /* Description RTT_SECOND_SELECTED_CHAIN
  235. For legacy RTT5/.11mc mode, this field shows the second
  236. selected Rx chain that is used for FAC calculations, when
  237. forced by a virtual register.
  238. <enum 0 location_selected_chain_is_0>
  239. <enum 1 location_selected_chain_is_1>
  240. <enum 2 location_selected_chain_is_2>
  241. <enum 3 location_selected_chain_is_3>
  242. <legal 0-3>
  243. */
  244. #define RX_LOCATION_INFO_RTT_SECOND_SELECTED_CHAIN_OFFSET 0x00000004
  245. #define RX_LOCATION_INFO_RTT_SECOND_SELECTED_CHAIN_LSB 8
  246. #define RX_LOCATION_INFO_RTT_SECOND_SELECTED_CHAIN_MSB 15
  247. #define RX_LOCATION_INFO_RTT_SECOND_SELECTED_CHAIN_MASK 0x0000ff00
  248. /* Description RTT_CFR_STATUS
  249. Status of channel frequency response dump
  250. <enum 0 location_CFR_dump_not_valid>
  251. <enum 1 location_CFR_dump_valid>
  252. <legal 0-1>
  253. */
  254. #define RX_LOCATION_INFO_RTT_CFR_STATUS_OFFSET 0x00000004
  255. #define RX_LOCATION_INFO_RTT_CFR_STATUS_LSB 16
  256. #define RX_LOCATION_INFO_RTT_CFR_STATUS_MSB 23
  257. #define RX_LOCATION_INFO_RTT_CFR_STATUS_MASK 0x00ff0000
  258. /* Description RTT_CIR_STATUS
  259. Status of channel impulse response dump
  260. <enum 0 location_CIR_dump_not_valid>
  261. <enum 1 location_CIR_dump_valid>
  262. <legal 0-1>
  263. */
  264. #define RX_LOCATION_INFO_RTT_CIR_STATUS_OFFSET 0x00000004
  265. #define RX_LOCATION_INFO_RTT_CIR_STATUS_LSB 24
  266. #define RX_LOCATION_INFO_RTT_CIR_STATUS_MSB 31
  267. #define RX_LOCATION_INFO_RTT_CIR_STATUS_MASK 0xff000000
  268. /* Description RTT_CHE_BUFFER_POINTER_LOW32
  269. The low 32 bits of the 40 bits pointer pointed to the external
  270. RTT channel information buffer
  271. <legal all>
  272. */
  273. #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_LOW32_OFFSET 0x00000008
  274. #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_LOW32_LSB 0
  275. #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_LOW32_MSB 31
  276. #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_LOW32_MASK 0xffffffff
  277. /* Description RTT_CHE_BUFFER_POINTER_HIGH8
  278. The high 8 bits of the 40 bits pointer pointed to the external
  279. RTT channel information buffer
  280. <legal all>
  281. */
  282. #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_HIGH8_OFFSET 0x0000000c
  283. #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_HIGH8_LSB 0
  284. #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_HIGH8_MSB 7
  285. #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_HIGH8_MASK 0x000000ff
  286. /* Description RESERVED_3
  287. <legal 0>
  288. */
  289. #define RX_LOCATION_INFO_RESERVED_3_OFFSET 0x0000000c
  290. #define RX_LOCATION_INFO_RESERVED_3_LSB 8
  291. #define RX_LOCATION_INFO_RESERVED_3_MSB 15
  292. #define RX_LOCATION_INFO_RESERVED_3_MASK 0x0000ff00
  293. /* Description RTT_PKT_BW_VHT
  294. Indicate the bandwidth of (V)HT/HE-LTF
  295. <enum 0 location_pkt_bw_20MHz>
  296. <enum 1 location_pkt_bw_40MHz>
  297. <enum 2 location_pkt_bw_80MHz>
  298. <enum 3 location_pkt_bw_160MHz>
  299. <enum 4 location_pkt_bw_240MHz> Only valid for CFR, FAC
  300. calculations are not PoR for 240 MHz.
  301. <enum 5 location_pkt_bw_320MHz> Only valid for CFR, FAC
  302. calculations are not PoR for 320 MHz.
  303. <legal 0-5>
  304. */
  305. #define RX_LOCATION_INFO_RTT_PKT_BW_VHT_OFFSET 0x0000000c
  306. #define RX_LOCATION_INFO_RTT_PKT_BW_VHT_LSB 16
  307. #define RX_LOCATION_INFO_RTT_PKT_BW_VHT_MSB 19
  308. #define RX_LOCATION_INFO_RTT_PKT_BW_VHT_MASK 0x000f0000
  309. /* Description RTT_PKT_BW_LEG
  310. Indicate the bandwidth of L-LTF
  311. <enum 0 location_pkt_bw_20MHz>
  312. <enum 1 location_pkt_bw_40MHz>
  313. <enum 2 location_pkt_bw_80MHz>
  314. <enum 3 location_pkt_bw_160MHz>
  315. <enum 4 location_pkt_bw_240MHz> Only valid for CFR, FAC
  316. calculations are not PoR for 240 MHz.
  317. <enum 5 location_pkt_bw_320MHz> Only valid for CFR, FAC
  318. calculations are not PoR for 320 MHz.
  319. <legal 0-5>
  320. */
  321. #define RX_LOCATION_INFO_RTT_PKT_BW_LEG_OFFSET 0x0000000c
  322. #define RX_LOCATION_INFO_RTT_PKT_BW_LEG_LSB 20
  323. #define RX_LOCATION_INFO_RTT_PKT_BW_LEG_MSB 23
  324. #define RX_LOCATION_INFO_RTT_PKT_BW_LEG_MASK 0x00f00000
  325. /* Description RTT_MCS_RATE
  326. Bits 0~4 indicate MCS rate, if Legacy,
  327. 0: 48 Mbps,
  328. 1: 24 Mbps,
  329. 2: 12 Mbps,
  330. 3: 6 Mbps,
  331. 4: 54 Mbps,
  332. 5: 36 Mbps,
  333. 6: 18 Mbps,
  334. 7: 9 Mbps,
  335. 8-15: reserved
  336. if HT, 0-7: MCS0-MCS7, 8-15: reserved,
  337. if VHT, 0-9: MCS0-MCS9, 10-15: reserved,
  338. if HE or EHT, 0-11: MCS0-MCS11, 12-13: 4096QAM, 14-15: reserved
  339. <legal all>
  340. */
  341. #define RX_LOCATION_INFO_RTT_MCS_RATE_OFFSET 0x0000000c
  342. #define RX_LOCATION_INFO_RTT_MCS_RATE_LSB 24
  343. #define RX_LOCATION_INFO_RTT_MCS_RATE_MSB 31
  344. #define RX_LOCATION_INFO_RTT_MCS_RATE_MASK 0xff000000
  345. /* Description RTT_CFO_MEASUREMENT
  346. CFO measurement. Needed for passive locationing
  347. 14 bits, signed 1.13. 13 bits fraction to provide a resolution
  348. of 153 Hz
  349. In units of cycles/800 ns
  350. <legal 0-16383>
  351. */
  352. #define RX_LOCATION_INFO_RTT_CFO_MEASUREMENT_OFFSET 0x00000010
  353. #define RX_LOCATION_INFO_RTT_CFO_MEASUREMENT_LSB 0
  354. #define RX_LOCATION_INFO_RTT_CFO_MEASUREMENT_MSB 15
  355. #define RX_LOCATION_INFO_RTT_CFO_MEASUREMENT_MASK 0x0000ffff
  356. /* Description RTT_PREAMBLE_TYPE
  357. Indicate preamble type
  358. <enum 0 location_preamble_type_legacy>
  359. <enum 1 location_preamble_type_ht>
  360. <enum 2 location_preamble_type_vht>
  361. <enum 3 location_preamble_type_he_su_4xltf>
  362. <enum 4 location_preamble_type_he_su_2xltf>
  363. <enum 5 location_preamble_type_he_su_1xltf>
  364. <enum 6 location_preamble_type_he_trigger_based_ul_4xltf>
  365. <enum 7 location_preamble_type_he_trigger_based_ul_2xltf>
  366. <enum 8 location_preamble_type_he_trigger_based_ul_1xltf>
  367. <enum 9 location_preamble_type_he_mu_4xltf>
  368. <enum 10 location_preamble_type_he_mu_2xltf>
  369. <enum 11 location_preamble_type_he_mu_1xltf>
  370. <enum 12 location_preamble_type_he_extended_range_su_4xltf>
  371. <enum 13 location_preamble_type_he_extended_range_su_2xltf>
  372. <enum 14 location_preamble_type_he_extended_range_su_1xltf>
  373. <legal 0-14>
  374. */
  375. #define RX_LOCATION_INFO_RTT_PREAMBLE_TYPE_OFFSET 0x00000010
  376. #define RX_LOCATION_INFO_RTT_PREAMBLE_TYPE_LSB 16
  377. #define RX_LOCATION_INFO_RTT_PREAMBLE_TYPE_MSB 23
  378. #define RX_LOCATION_INFO_RTT_PREAMBLE_TYPE_MASK 0x00ff0000
  379. /* Description RTT_GI_TYPE
  380. Indicate GI (guard interval) type
  381. <enum 0 location_gi_0_8_us > HE related GI. Can also be
  382. used for HE
  383. <enum 1 location_gi_0_4_us > HE related GI. Can also be
  384. used for HE
  385. <enum 2 location_gi_1_6_us > HE related GI
  386. <enum 3 location_gi_3_2_us > HE related GI
  387. <legal 0 - 3>
  388. */
  389. #define RX_LOCATION_INFO_RTT_GI_TYPE_OFFSET 0x00000010
  390. #define RX_LOCATION_INFO_RTT_GI_TYPE_LSB 24
  391. #define RX_LOCATION_INFO_RTT_GI_TYPE_MSB 31
  392. #define RX_LOCATION_INFO_RTT_GI_TYPE_MASK 0xff000000
  393. /* Description RX_START_TS
  394. RX packet start timestamp lower 32 bits
  395. It reports the time the first L-STF ADC sample arrived at
  396. RX antenna.
  397. The clock unit is 960MHz.
  398. <legal all>
  399. */
  400. #define RX_LOCATION_INFO_RX_START_TS_OFFSET 0x00000014
  401. #define RX_LOCATION_INFO_RX_START_TS_LSB 0
  402. #define RX_LOCATION_INFO_RX_START_TS_MSB 31
  403. #define RX_LOCATION_INFO_RX_START_TS_MASK 0xffffffff
  404. /* Description RX_START_TS_UPPER
  405. RX packet start timestamp upper 32 bits
  406. It reports the time the first L-STF ADC sample arrived at
  407. RX antenna.
  408. The clock unit is 960MHz.
  409. <legal all>
  410. */
  411. #define RX_LOCATION_INFO_RX_START_TS_UPPER_OFFSET 0x00000018
  412. #define RX_LOCATION_INFO_RX_START_TS_UPPER_LSB 0
  413. #define RX_LOCATION_INFO_RX_START_TS_UPPER_MSB 31
  414. #define RX_LOCATION_INFO_RX_START_TS_UPPER_MASK 0xffffffff
  415. /* Description RX_END_TS
  416. RX packet end timestamp lower 32 bits
  417. It reports the time the last symbol's last ADC sample arrived
  418. at RX antenna.
  419. The clock unit is 960MHz. Only 32 bits are reported.
  420. <legal all>
  421. */
  422. #define RX_LOCATION_INFO_RX_END_TS_OFFSET 0x0000001c
  423. #define RX_LOCATION_INFO_RX_END_TS_LSB 0
  424. #define RX_LOCATION_INFO_RX_END_TS_MSB 31
  425. #define RX_LOCATION_INFO_RX_END_TS_MASK 0xffffffff
  426. /* Description GAIN_CHAIN0
  427. Reports the total gain in dB and the gain table index to
  428. support angle of arrival for chain0
  429. */
  430. #define RX_LOCATION_INFO_GAIN_CHAIN0_OFFSET 0x00000020
  431. #define RX_LOCATION_INFO_GAIN_CHAIN0_LSB 0
  432. #define RX_LOCATION_INFO_GAIN_CHAIN0_MSB 15
  433. #define RX_LOCATION_INFO_GAIN_CHAIN0_MASK 0x0000ffff
  434. /* Description GAIN_CHAIN1
  435. Reports the total gain in dB and the gain table index to
  436. support angle of arrival for chain1
  437. */
  438. #define RX_LOCATION_INFO_GAIN_CHAIN1_OFFSET 0x00000020
  439. #define RX_LOCATION_INFO_GAIN_CHAIN1_LSB 16
  440. #define RX_LOCATION_INFO_GAIN_CHAIN1_MSB 31
  441. #define RX_LOCATION_INFO_GAIN_CHAIN1_MASK 0xffff0000
  442. /* Description GAIN_CHAIN2
  443. Reports the total gain in dB and the gain table index to
  444. support angle of arrival for chain2
  445. */
  446. #define RX_LOCATION_INFO_GAIN_CHAIN2_OFFSET 0x00000024
  447. #define RX_LOCATION_INFO_GAIN_CHAIN2_LSB 0
  448. #define RX_LOCATION_INFO_GAIN_CHAIN2_MSB 15
  449. #define RX_LOCATION_INFO_GAIN_CHAIN2_MASK 0x0000ffff
  450. /* Description GAIN_CHAIN3
  451. Reports the total gain in dB and the gain table index to
  452. support angle of arrival for chain3
  453. */
  454. #define RX_LOCATION_INFO_GAIN_CHAIN3_OFFSET 0x00000024
  455. #define RX_LOCATION_INFO_GAIN_CHAIN3_LSB 16
  456. #define RX_LOCATION_INFO_GAIN_CHAIN3_MSB 31
  457. #define RX_LOCATION_INFO_GAIN_CHAIN3_MASK 0xffff0000
  458. /* Description GAIN_REPORT_STATUS
  459. Number of valid gain reports (in fields gain_chain0 - gain_chain_3)
  460. <legal 0-4>
  461. */
  462. #define RX_LOCATION_INFO_GAIN_REPORT_STATUS_OFFSET 0x00000028
  463. #define RX_LOCATION_INFO_GAIN_REPORT_STATUS_LSB 0
  464. #define RX_LOCATION_INFO_GAIN_REPORT_STATUS_MSB 7
  465. #define RX_LOCATION_INFO_GAIN_REPORT_STATUS_MASK 0x000000ff
  466. /* Description RTT_TIMING_BACKOFF_SEL
  467. Indicate which timing backoff value is used
  468. <enum 0 timing_backoff_low_rssi>
  469. <enum 1 timing_backoff_mid_rssi>
  470. <enum 2 timing_backoff_high_rssi>
  471. <enum 3 reserved>
  472. <legal 0-3>
  473. */
  474. #define RX_LOCATION_INFO_RTT_TIMING_BACKOFF_SEL_OFFSET 0x00000028
  475. #define RX_LOCATION_INFO_RTT_TIMING_BACKOFF_SEL_LSB 8
  476. #define RX_LOCATION_INFO_RTT_TIMING_BACKOFF_SEL_MSB 15
  477. #define RX_LOCATION_INFO_RTT_TIMING_BACKOFF_SEL_MASK 0x0000ff00
  478. /* Description RTT_FAC_COMBINED
  479. Final adjusted and combined first arrival correction value
  480. <legal all>
  481. */
  482. #define RX_LOCATION_INFO_RTT_FAC_COMBINED_OFFSET 0x00000028
  483. #define RX_LOCATION_INFO_RTT_FAC_COMBINED_LSB 16
  484. #define RX_LOCATION_INFO_RTT_FAC_COMBINED_MSB 31
  485. #define RX_LOCATION_INFO_RTT_FAC_COMBINED_MASK 0xffff0000
  486. /* Description RTT_FAC_0
  487. The fields 'rtt_fac_0' - 'rtt_fac_31' show the RTT first
  488. arrival correction (FAC) value computed from the LTFs on
  489. the selected Rx chains.
  490. 16 bits, signed 11.5. 11 integer bits to cover -3.2us to
  491. 3.2us, and 5 fraction bits to cover 160 MHz with 32x FAC
  492. interpolation.
  493. The clock unit is 320MHz.
  494. For .11az/MIMO, the FACs will be stored in spatial stream
  495. order with multiple chains reported together for each stream. [ss0-ch0,
  496. ss0-ch1, ..., ss1-ch0, ss1-ch1, ...]
  497. For legacy RTT5/.11mc, the FACs will be stored in preamble
  498. order with multiple chains reported together for each LTF. [legacy-ch0,
  499. legacy-ch1, ..., (v)ht/he-ch0, (v)ht/he-ch1, ...]
  500. */
  501. #define RX_LOCATION_INFO_RTT_FAC_0_OFFSET 0x0000002c
  502. #define RX_LOCATION_INFO_RTT_FAC_0_LSB 0
  503. #define RX_LOCATION_INFO_RTT_FAC_0_MSB 15
  504. #define RX_LOCATION_INFO_RTT_FAC_0_MASK 0x0000ffff
  505. /* Description RTT_FAC_1
  506. See 'rtt_fac_0' description
  507. */
  508. #define RX_LOCATION_INFO_RTT_FAC_1_OFFSET 0x0000002c
  509. #define RX_LOCATION_INFO_RTT_FAC_1_LSB 16
  510. #define RX_LOCATION_INFO_RTT_FAC_1_MSB 31
  511. #define RX_LOCATION_INFO_RTT_FAC_1_MASK 0xffff0000
  512. /* Description RTT_FAC_2
  513. See 'rtt_fac_0' description
  514. */
  515. #define RX_LOCATION_INFO_RTT_FAC_2_OFFSET 0x00000030
  516. #define RX_LOCATION_INFO_RTT_FAC_2_LSB 0
  517. #define RX_LOCATION_INFO_RTT_FAC_2_MSB 15
  518. #define RX_LOCATION_INFO_RTT_FAC_2_MASK 0x0000ffff
  519. /* Description RTT_FAC_3
  520. See 'rtt_fac_0' description
  521. */
  522. #define RX_LOCATION_INFO_RTT_FAC_3_OFFSET 0x00000030
  523. #define RX_LOCATION_INFO_RTT_FAC_3_LSB 16
  524. #define RX_LOCATION_INFO_RTT_FAC_3_MSB 31
  525. #define RX_LOCATION_INFO_RTT_FAC_3_MASK 0xffff0000
  526. /* Description RTT_FAC_4
  527. See 'rtt_fac_0' description
  528. */
  529. #define RX_LOCATION_INFO_RTT_FAC_4_OFFSET 0x00000034
  530. #define RX_LOCATION_INFO_RTT_FAC_4_LSB 0
  531. #define RX_LOCATION_INFO_RTT_FAC_4_MSB 15
  532. #define RX_LOCATION_INFO_RTT_FAC_4_MASK 0x0000ffff
  533. /* Description RTT_FAC_5
  534. See 'rtt_fac_0' description
  535. */
  536. #define RX_LOCATION_INFO_RTT_FAC_5_OFFSET 0x00000034
  537. #define RX_LOCATION_INFO_RTT_FAC_5_LSB 16
  538. #define RX_LOCATION_INFO_RTT_FAC_5_MSB 31
  539. #define RX_LOCATION_INFO_RTT_FAC_5_MASK 0xffff0000
  540. /* Description RTT_FAC_6
  541. See 'rtt_fac_0' description
  542. */
  543. #define RX_LOCATION_INFO_RTT_FAC_6_OFFSET 0x00000038
  544. #define RX_LOCATION_INFO_RTT_FAC_6_LSB 0
  545. #define RX_LOCATION_INFO_RTT_FAC_6_MSB 15
  546. #define RX_LOCATION_INFO_RTT_FAC_6_MASK 0x0000ffff
  547. /* Description RTT_FAC_7
  548. See 'rtt_fac_0' description
  549. */
  550. #define RX_LOCATION_INFO_RTT_FAC_7_OFFSET 0x00000038
  551. #define RX_LOCATION_INFO_RTT_FAC_7_LSB 16
  552. #define RX_LOCATION_INFO_RTT_FAC_7_MSB 31
  553. #define RX_LOCATION_INFO_RTT_FAC_7_MASK 0xffff0000
  554. /* Description RTT_FAC_8
  555. See 'rtt_fac_0' description
  556. */
  557. #define RX_LOCATION_INFO_RTT_FAC_8_OFFSET 0x0000003c
  558. #define RX_LOCATION_INFO_RTT_FAC_8_LSB 0
  559. #define RX_LOCATION_INFO_RTT_FAC_8_MSB 15
  560. #define RX_LOCATION_INFO_RTT_FAC_8_MASK 0x0000ffff
  561. /* Description RTT_FAC_9
  562. See 'rtt_fac_0' description
  563. */
  564. #define RX_LOCATION_INFO_RTT_FAC_9_OFFSET 0x0000003c
  565. #define RX_LOCATION_INFO_RTT_FAC_9_LSB 16
  566. #define RX_LOCATION_INFO_RTT_FAC_9_MSB 31
  567. #define RX_LOCATION_INFO_RTT_FAC_9_MASK 0xffff0000
  568. /* Description RTT_FAC_10
  569. See 'rtt_fac_0' description
  570. */
  571. #define RX_LOCATION_INFO_RTT_FAC_10_OFFSET 0x00000040
  572. #define RX_LOCATION_INFO_RTT_FAC_10_LSB 0
  573. #define RX_LOCATION_INFO_RTT_FAC_10_MSB 15
  574. #define RX_LOCATION_INFO_RTT_FAC_10_MASK 0x0000ffff
  575. /* Description RTT_FAC_11
  576. See 'rtt_fac_0' description
  577. */
  578. #define RX_LOCATION_INFO_RTT_FAC_11_OFFSET 0x00000040
  579. #define RX_LOCATION_INFO_RTT_FAC_11_LSB 16
  580. #define RX_LOCATION_INFO_RTT_FAC_11_MSB 31
  581. #define RX_LOCATION_INFO_RTT_FAC_11_MASK 0xffff0000
  582. /* Description RTT_FAC_12
  583. See 'rtt_fac_0' description
  584. */
  585. #define RX_LOCATION_INFO_RTT_FAC_12_OFFSET 0x00000044
  586. #define RX_LOCATION_INFO_RTT_FAC_12_LSB 0
  587. #define RX_LOCATION_INFO_RTT_FAC_12_MSB 15
  588. #define RX_LOCATION_INFO_RTT_FAC_12_MASK 0x0000ffff
  589. /* Description RTT_FAC_13
  590. See 'rtt_fac_0' description
  591. */
  592. #define RX_LOCATION_INFO_RTT_FAC_13_OFFSET 0x00000044
  593. #define RX_LOCATION_INFO_RTT_FAC_13_LSB 16
  594. #define RX_LOCATION_INFO_RTT_FAC_13_MSB 31
  595. #define RX_LOCATION_INFO_RTT_FAC_13_MASK 0xffff0000
  596. /* Description RTT_FAC_14
  597. See 'rtt_fac_0' description
  598. */
  599. #define RX_LOCATION_INFO_RTT_FAC_14_OFFSET 0x00000048
  600. #define RX_LOCATION_INFO_RTT_FAC_14_LSB 0
  601. #define RX_LOCATION_INFO_RTT_FAC_14_MSB 15
  602. #define RX_LOCATION_INFO_RTT_FAC_14_MASK 0x0000ffff
  603. /* Description RTT_FAC_15
  604. See 'rtt_fac_0' description
  605. */
  606. #define RX_LOCATION_INFO_RTT_FAC_15_OFFSET 0x00000048
  607. #define RX_LOCATION_INFO_RTT_FAC_15_LSB 16
  608. #define RX_LOCATION_INFO_RTT_FAC_15_MSB 31
  609. #define RX_LOCATION_INFO_RTT_FAC_15_MASK 0xffff0000
  610. /* Description RTT_FAC_16
  611. See 'rtt_fac_0' description
  612. */
  613. #define RX_LOCATION_INFO_RTT_FAC_16_OFFSET 0x0000004c
  614. #define RX_LOCATION_INFO_RTT_FAC_16_LSB 0
  615. #define RX_LOCATION_INFO_RTT_FAC_16_MSB 15
  616. #define RX_LOCATION_INFO_RTT_FAC_16_MASK 0x0000ffff
  617. /* Description RTT_FAC_17
  618. See 'rtt_fac_0' description
  619. */
  620. #define RX_LOCATION_INFO_RTT_FAC_17_OFFSET 0x0000004c
  621. #define RX_LOCATION_INFO_RTT_FAC_17_LSB 16
  622. #define RX_LOCATION_INFO_RTT_FAC_17_MSB 31
  623. #define RX_LOCATION_INFO_RTT_FAC_17_MASK 0xffff0000
  624. /* Description RTT_FAC_18
  625. See 'rtt_fac_0' description
  626. */
  627. #define RX_LOCATION_INFO_RTT_FAC_18_OFFSET 0x00000050
  628. #define RX_LOCATION_INFO_RTT_FAC_18_LSB 0
  629. #define RX_LOCATION_INFO_RTT_FAC_18_MSB 15
  630. #define RX_LOCATION_INFO_RTT_FAC_18_MASK 0x0000ffff
  631. /* Description RTT_FAC_19
  632. See 'rtt_fac_0' description
  633. */
  634. #define RX_LOCATION_INFO_RTT_FAC_19_OFFSET 0x00000050
  635. #define RX_LOCATION_INFO_RTT_FAC_19_LSB 16
  636. #define RX_LOCATION_INFO_RTT_FAC_19_MSB 31
  637. #define RX_LOCATION_INFO_RTT_FAC_19_MASK 0xffff0000
  638. /* Description RTT_FAC_20
  639. See 'rtt_fac_0' description
  640. */
  641. #define RX_LOCATION_INFO_RTT_FAC_20_OFFSET 0x00000054
  642. #define RX_LOCATION_INFO_RTT_FAC_20_LSB 0
  643. #define RX_LOCATION_INFO_RTT_FAC_20_MSB 15
  644. #define RX_LOCATION_INFO_RTT_FAC_20_MASK 0x0000ffff
  645. /* Description RTT_FAC_21
  646. See 'rtt_fac_0' description
  647. */
  648. #define RX_LOCATION_INFO_RTT_FAC_21_OFFSET 0x00000054
  649. #define RX_LOCATION_INFO_RTT_FAC_21_LSB 16
  650. #define RX_LOCATION_INFO_RTT_FAC_21_MSB 31
  651. #define RX_LOCATION_INFO_RTT_FAC_21_MASK 0xffff0000
  652. /* Description RTT_FAC_22
  653. See 'rtt_fac_0' description
  654. */
  655. #define RX_LOCATION_INFO_RTT_FAC_22_OFFSET 0x00000058
  656. #define RX_LOCATION_INFO_RTT_FAC_22_LSB 0
  657. #define RX_LOCATION_INFO_RTT_FAC_22_MSB 15
  658. #define RX_LOCATION_INFO_RTT_FAC_22_MASK 0x0000ffff
  659. /* Description RTT_FAC_23
  660. See 'rtt_fac_0' description
  661. */
  662. #define RX_LOCATION_INFO_RTT_FAC_23_OFFSET 0x00000058
  663. #define RX_LOCATION_INFO_RTT_FAC_23_LSB 16
  664. #define RX_LOCATION_INFO_RTT_FAC_23_MSB 31
  665. #define RX_LOCATION_INFO_RTT_FAC_23_MASK 0xffff0000
  666. /* Description RTT_FAC_24
  667. See 'rtt_fac_0' description
  668. */
  669. #define RX_LOCATION_INFO_RTT_FAC_24_OFFSET 0x0000005c
  670. #define RX_LOCATION_INFO_RTT_FAC_24_LSB 0
  671. #define RX_LOCATION_INFO_RTT_FAC_24_MSB 15
  672. #define RX_LOCATION_INFO_RTT_FAC_24_MASK 0x0000ffff
  673. /* Description RTT_FAC_25
  674. See 'rtt_fac_0' description
  675. */
  676. #define RX_LOCATION_INFO_RTT_FAC_25_OFFSET 0x0000005c
  677. #define RX_LOCATION_INFO_RTT_FAC_25_LSB 16
  678. #define RX_LOCATION_INFO_RTT_FAC_25_MSB 31
  679. #define RX_LOCATION_INFO_RTT_FAC_25_MASK 0xffff0000
  680. /* Description RTT_FAC_26
  681. See 'rtt_fac_0' description
  682. */
  683. #define RX_LOCATION_INFO_RTT_FAC_26_OFFSET 0x00000060
  684. #define RX_LOCATION_INFO_RTT_FAC_26_LSB 0
  685. #define RX_LOCATION_INFO_RTT_FAC_26_MSB 15
  686. #define RX_LOCATION_INFO_RTT_FAC_26_MASK 0x0000ffff
  687. /* Description RTT_FAC_27
  688. See 'rtt_fac_0' description
  689. */
  690. #define RX_LOCATION_INFO_RTT_FAC_27_OFFSET 0x00000060
  691. #define RX_LOCATION_INFO_RTT_FAC_27_LSB 16
  692. #define RX_LOCATION_INFO_RTT_FAC_27_MSB 31
  693. #define RX_LOCATION_INFO_RTT_FAC_27_MASK 0xffff0000
  694. /* Description RTT_FAC_28
  695. See 'rtt_fac_0' description
  696. */
  697. #define RX_LOCATION_INFO_RTT_FAC_28_OFFSET 0x00000064
  698. #define RX_LOCATION_INFO_RTT_FAC_28_LSB 0
  699. #define RX_LOCATION_INFO_RTT_FAC_28_MSB 15
  700. #define RX_LOCATION_INFO_RTT_FAC_28_MASK 0x0000ffff
  701. /* Description RTT_FAC_29
  702. See 'rtt_fac_0' description
  703. */
  704. #define RX_LOCATION_INFO_RTT_FAC_29_OFFSET 0x00000064
  705. #define RX_LOCATION_INFO_RTT_FAC_29_LSB 16
  706. #define RX_LOCATION_INFO_RTT_FAC_29_MSB 31
  707. #define RX_LOCATION_INFO_RTT_FAC_29_MASK 0xffff0000
  708. /* Description RTT_FAC_30
  709. See 'rtt_fac_0' description
  710. */
  711. #define RX_LOCATION_INFO_RTT_FAC_30_OFFSET 0x00000068
  712. #define RX_LOCATION_INFO_RTT_FAC_30_LSB 0
  713. #define RX_LOCATION_INFO_RTT_FAC_30_MSB 15
  714. #define RX_LOCATION_INFO_RTT_FAC_30_MASK 0x0000ffff
  715. /* Description RTT_FAC_31
  716. See 'rtt_fac_0' description
  717. */
  718. #define RX_LOCATION_INFO_RTT_FAC_31_OFFSET 0x00000068
  719. #define RX_LOCATION_INFO_RTT_FAC_31_LSB 16
  720. #define RX_LOCATION_INFO_RTT_FAC_31_MSB 31
  721. #define RX_LOCATION_INFO_RTT_FAC_31_MASK 0xffff0000
  722. /* Description RESERVED_27A
  723. <legal 0>
  724. */
  725. #define RX_LOCATION_INFO_RESERVED_27A_OFFSET 0x0000006c
  726. #define RX_LOCATION_INFO_RESERVED_27A_LSB 0
  727. #define RX_LOCATION_INFO_RESERVED_27A_MSB 31
  728. #define RX_LOCATION_INFO_RESERVED_27A_MASK 0xffffffff
  729. #endif // RX_LOCATION_INFO