rx_location_info.h 45 KB

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