rx_location_info.h 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371
  1. /*
  2. * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #ifndef _RX_LOCATION_INFO_H_
  19. #define _RX_LOCATION_INFO_H_
  20. #if !defined(__ASSEMBLER__)
  21. #endif
  22. // ################ START SUMMARY #################
  23. //
  24. // Dword Fields
  25. // 0 rtt_fac_legacy[15:0], rtt_fac_legacy_ext80[31:16]
  26. // 1 rtt_fac_vht[15:0], rtt_fac_vht_ext80[31:16]
  27. // 2 rtt_fac_legacy_status[0], rtt_fac_legacy_ext80_status[1], rtt_fac_vht_status[2], rtt_fac_vht_ext80_status[3], rtt_fac_sifs[15:4], rtt_fac_sifs_status[17:16], rtt_cfr_status[18], rtt_cir_status[19], rtt_channel_dump_size[30:20], rtt_hw_ifft_mode[31]
  28. // 3 rtt_btcf_status[0], rtt_preamble_type[5:1], rtt_pkt_bw_leg[7:6], rtt_pkt_bw_vht[9:8], rtt_gi_type[11:10], rtt_mcs_rate[16:12], rtt_strongest_chain[19:17], rtt_strongest_chain_ext80[22:20], rtt_rx_chain_mask[30:23], reserved_3[31]
  29. // 4 rx_start_ts[31:0]
  30. // 5 rx_end_ts[31:0]
  31. // 6 sfo_phase_pkt_start[11:0], sfo_phase_pkt_end[23:12], rtt_che_buffer_pointer_high8[31:24]
  32. // 7 rtt_che_buffer_pointer_low32[31:0]
  33. // 8 rtt_cfo_measurement[13:0], rtt_chan_spread[21:14], rtt_timing_backoff_sel[23:22], reserved_8[30:24], rx_location_info_valid[31]
  34. //
  35. // ################ END SUMMARY #################
  36. #define NUM_OF_DWORDS_RX_LOCATION_INFO 9
  37. struct rx_location_info {
  38. uint32_t rtt_fac_legacy : 16, //[15:0]
  39. rtt_fac_legacy_ext80 : 16; //[31:16]
  40. uint32_t rtt_fac_vht : 16, //[15:0]
  41. rtt_fac_vht_ext80 : 16; //[31:16]
  42. uint32_t rtt_fac_legacy_status : 1, //[0]
  43. rtt_fac_legacy_ext80_status : 1, //[1]
  44. rtt_fac_vht_status : 1, //[2]
  45. rtt_fac_vht_ext80_status : 1, //[3]
  46. rtt_fac_sifs : 12, //[15:4]
  47. rtt_fac_sifs_status : 2, //[17:16]
  48. rtt_cfr_status : 1, //[18]
  49. rtt_cir_status : 1, //[19]
  50. rtt_channel_dump_size : 11, //[30:20]
  51. rtt_hw_ifft_mode : 1; //[31]
  52. uint32_t rtt_btcf_status : 1, //[0]
  53. rtt_preamble_type : 5, //[5:1]
  54. rtt_pkt_bw_leg : 2, //[7:6]
  55. rtt_pkt_bw_vht : 2, //[9:8]
  56. rtt_gi_type : 2, //[11:10]
  57. rtt_mcs_rate : 5, //[16:12]
  58. rtt_strongest_chain : 3, //[19:17]
  59. rtt_strongest_chain_ext80 : 3, //[22:20]
  60. rtt_rx_chain_mask : 8, //[30:23]
  61. reserved_3 : 1; //[31]
  62. uint32_t rx_start_ts : 32; //[31:0]
  63. uint32_t rx_end_ts : 32; //[31:0]
  64. uint32_t sfo_phase_pkt_start : 12, //[11:0]
  65. sfo_phase_pkt_end : 12, //[23:12]
  66. rtt_che_buffer_pointer_high8 : 8; //[31:24]
  67. uint32_t rtt_che_buffer_pointer_low32 : 32; //[31:0]
  68. uint32_t rtt_cfo_measurement : 14, //[13:0]
  69. rtt_chan_spread : 8, //[21:14]
  70. rtt_timing_backoff_sel : 2, //[23:22]
  71. reserved_8 : 7, //[30:24]
  72. rx_location_info_valid : 1; //[31]
  73. };
  74. /*
  75. rtt_fac_legacy
  76. For 20/40/80, this field shows the RTT first arrival
  77. correction value computed from L-LTF on the first selected
  78. Rx chain
  79. For 80+80, this field shows the RTT first arrival
  80. correction value computed from L-LTF on pri80 on the
  81. selected pri80 Rx chain
  82. 16 bits, signed 12.4. 12 bits integer to cover -6.4us to
  83. 6.4us, and 4 bits fraction to cover pri80 and 32x FAC
  84. interpolation
  85. clock unit is 320MHz
  86. <legal all>
  87. rtt_fac_legacy_ext80
  88. For 20/40/80, this field shows the RTT first arrival
  89. correction value computed from L-LTF on the second selected
  90. Rx chain
  91. For 80+80, this field shows the RTT first arrival
  92. correction value computed from L-LTF on ext80 on the
  93. selected ext80 Rx chain
  94. 16 bits, signed 12.4. 12 bits integer to cover -6.4us to
  95. 6.4us, and 4 bits fraction to cover ext80 and 32x FAC
  96. interpolation
  97. clock unit is 320MHz
  98. <legal all>
  99. rtt_fac_vht
  100. For 20/40/80, this field shows the RTT first arrival
  101. correction value computed from (V)HT/HE-LTF on the first
  102. selected Rx chain
  103. For 80+80, this field shows the RTT first arrival
  104. correction value computed from (V)HT/HE-LTF on pri80 on the
  105. selected pri80 Rx chain
  106. 16 bits, signed 12.4. 12 bits integer to cover -6.4us to
  107. 6.4us, and 4 bits fraction to cover pri80 and 32x FAC
  108. interpolation
  109. clock unit is 320MHz
  110. <legal all>
  111. rtt_fac_vht_ext80
  112. For 20/40/80, this field shows the RTT first arrival
  113. correction value computed from (V)HT/HE-LTF on the second
  114. selected Rx chain
  115. For 80+80, this field shows the RTT first arrival
  116. correction value computed from (V)HT/HE-LTF on ext80 on the
  117. selected ext80 Rx chain
  118. 16 bits, signed 12.4. 12 bits integer to cover -6.4us to
  119. 6.4us, and 4 bits fraction to cover ext80 and 32x FAC
  120. interpolation
  121. clock unit is 320MHz
  122. <legal all>
  123. rtt_fac_legacy_status
  124. Status of rtt_fac_legacy
  125. <enum 0 location_fac_legacy_status_not_valid>
  126. <enum 1 location_fac_legacy_status_valid>
  127. <legal all>
  128. rtt_fac_legacy_ext80_status
  129. Status of rtt_fac_legacy_ext80
  130. <enum 0 location_fac_legacy_ext80_status_not_valid>
  131. <enum 1 location_fac_legacy_ext80_status_valid>
  132. <legal all>
  133. rtt_fac_vht_status
  134. Status of rtt_fac_vht
  135. <enum 0 location_fac_vht_status_not_valid>
  136. <enum 1 location_fac_vht_status_valid>
  137. <legal all>
  138. rtt_fac_vht_ext80_status
  139. Status of rtt_fac_vht_ext80
  140. <enum 0 location_fac_vht_ext80_status_not_valid>
  141. <enum 1 location_fac_vht_ext80_status_valid>
  142. <legal all>
  143. rtt_fac_sifs
  144. To support fine SIFS adjustment, need to provide FAC
  145. value @ integer number of 320 MHz clock cycles to MAC.  It
  146. is from L-LTF if it is a Legacy packet and from (V)HT/HE-LTF
  147. if it is a (V)HT/HE packet
  148. 12 bits, signed, no fractional part
  149. <legal all>
  150. rtt_fac_sifs_status
  151. Status of rtt_fac_sifs
  152. 0: not valid
  153. 1: valid and from L-LTF
  154. 2: valid and from (V)HT/HE-LTF
  155. 3: reserved
  156. <legal 0-2>
  157. rtt_cfr_status
  158. Status of channel frequency response dump
  159. <enum 0 location_CFR_dump_not_valid>
  160. <enum 1 location_CFR_dump_valid>
  161. <legal all>
  162. rtt_cir_status
  163. Status of channel impulse response dump
  164. <enum 0 location_CIR_dump_not_valid>
  165. <enum 1 location_CIR_dump_valid>
  166. <legal all>
  167. rtt_channel_dump_size
  168. Channel dump size.  It shows how many tones in CFR in
  169. one chain, for example, it will show 52 for Legacy20 and 484
  170. for VHT160
  171. <legal all>
  172. rtt_hw_ifft_mode
  173. Indicator showing if HW IFFT mode or SW IFFT mode
  174. <enum 0 location_sw_ifft_mode>
  175. <enum 1 location_hw_ifft_mode>
  176. <legal all>
  177. rtt_btcf_status
  178. Indicate if BTCF is used to capture the timestamps
  179. <enum 0 location_not_BTCF_based_ts>
  180. <enum 1 location_BTCF_based_ts>
  181. <legal all>
  182. rtt_preamble_type
  183. Indicate preamble type
  184. <enum 0 location_preamble_type_legacy>
  185. <enum 1 location_preamble_type_ht>
  186. <enum 2 location_preamble_type_vht>
  187. <enum 3 location_preamble_type_he_su_4xltf>
  188. <enum 4 location_preamble_type_he_su_2xltf>
  189. <enum 5 location_preamble_type_he_su_1xltf>
  190. <enum 6
  191. location_preamble_type_he_trigger_based_ul_4xltf>
  192. <enum 7
  193. location_preamble_type_he_trigger_based_ul_2xltf>
  194. <enum 8
  195. location_preamble_type_he_trigger_based_ul_1xltf>
  196. <enum 9 location_preamble_type_he_mu_4xltf>
  197. <enum 10 location_preamble_type_he_mu_2xltf>
  198. <enum 11 location_preamble_type_he_mu_1xltf>
  199. <enum 12
  200. location_preamble_type_he_extended_range_su_4xltf>
  201. <enum 13
  202. location_preamble_type_he_extended_range_su_2xltf>
  203. <enum 14
  204. location_preamble_type_he_extended_range_su_1xltf>
  205. <legal 0-14>
  206. rtt_pkt_bw_leg
  207. Indicate the bandwidth of L-LTF
  208. <enum 0 location_pkt_bw_20MHz>
  209. <enum 1 location_pkt_bw_40MHz>
  210. <enum 2 location_pkt_bw_80MHz>
  211. <enum 3 location_pkt_bw_160MHz>
  212. <legal all>
  213. rtt_pkt_bw_vht
  214. Indicate the bandwidth of (V)HT/HE-LTF
  215. <enum 0 location_pkt_bw_20MHz>
  216. <enum 1 location_pkt_bw_40MHz>
  217. <enum 2 location_pkt_bw_80MHz>
  218. <enum 3 location_pkt_bw_160MHz>
  219. <legal all>
  220. rtt_gi_type
  221. Indicate GI (guard interval) type
  222. <enum 0 gi_0_8_us > HE related GI. Can also be used
  223. for HE
  224. <enum 1 gi_0_4_us > HE related GI. Can also be used
  225. for HE
  226. <enum 2 gi_1_6_us > HE related GI
  227. <enum 3 gi_3_2_us > HE related GI
  228. <legal 0 - 3>
  229. rtt_mcs_rate
  230. Bits 0~4 indicate MCS rate, if Legacy,
  231. 0: 48 Mbps,
  232. 1: 24 Mbps,
  233. 2: 12 Mbps,
  234. 3: 6 Mbps,
  235. 4: 54 Mbps,
  236. 5: 36 Mbps,
  237. 6: 18 Mbps,
  238. 7: 9 Mbps,
  239. if HT, 0-7: MCS0-MCS7,
  240. if VHT, 0-9: MCS0-MCS9,
  241. <legal all>
  242. rtt_strongest_chain
  243. For 20/40/80, this field shows the first selected Rx
  244. chain that is used in HW IFFT mode
  245. For 80+80, this field shows the selected pri80 Rx chain
  246. that is used in HW IFFT mode
  247. <enum 0 location_strongest_chain_is_0>
  248. <enum 1 location_strongest_chain_is_1>
  249. <enum 2 location_strongest_chain_is_2>
  250. <enum 3 location_strongest_chain_is_3>
  251. <enum 4 location_strongest_chain_is_4>
  252. <enum 5 location_strongest_chain_is_5>
  253. <enum 6 location_strongest_chain_is_6>
  254. <enum 7 location_strongest_chain_is_7>
  255. <legal all>
  256. rtt_strongest_chain_ext80
  257. For 20/40/80, this field shows the second selected Rx
  258. chain that is used in HW IFFT mode
  259. For 80+80, this field shows the selected ext80 Rx chain
  260. that is used in HW IFFT mode
  261. <enum 0 location_strongest_chain_is_0>
  262. <enum 1 location_strongest_chain_is_1>
  263. <enum 2 location_strongest_chain_is_2>
  264. <enum 3 location_strongest_chain_is_3>
  265. <enum 4 location_strongest_chain_is_4>
  266. <enum 5 location_strongest_chain_is_5>
  267. <enum 6 location_strongest_chain_is_6>
  268. <enum 7 location_strongest_chain_is_7>
  269. <legal all>
  270. rtt_rx_chain_mask
  271. Rx chain mask, each bit is a Rx chain
  272. 0: the Rx chain is not used
  273. 1: the Rx chain is used
  274. Support up to 8 Rx chains
  275. <legal all>
  276. reserved_3
  277. <legal 0>
  278. rx_start_ts
  279. RX packet start timestamp
  280. It reports the time the first L-STF ADC sample arrived
  281. at RX antenna
  282. clock unit is 480MHz
  283. <legal all>
  284. rx_end_ts
  285. RX packet end timestamp
  286. It reports the time the last symbol's last ADC sample
  287. arrived at RX antenna
  288. clock unit is 480MHz
  289. <legal all>
  290. sfo_phase_pkt_start
  291. The phase of the SFO of the first symbol's first FFT
  292. input sample
  293. 12 bits, signed 6.6. 6 bits integer to cover -66.7ns to
  294. 66.7ns, and 6 bits fraction to provide a resolution of
  295. 0.03ns
  296. clock unit is 480MHz
  297. <legal all>
  298. sfo_phase_pkt_end
  299. The phase of the SFO of the last symbol's last FFT input
  300. sample
  301. 12 bits, signed 6.6. 6 bits integer to cover -66.7ns to
  302. 66.7ns, and 6 bits fraction to provide a resolution of
  303. 0.03ns
  304. clock unit is 480MHz
  305. <legal all>
  306. rtt_che_buffer_pointer_high8
  307. The high 8 bits of the 40 bits pointer pointed to the
  308. external RTT channel information buffer
  309. 8 bits
  310. <legal all>
  311. rtt_che_buffer_pointer_low32
  312. The low 32 bits of the 40 bits pointer pointed to the
  313. external RTT channel information buffer
  314. 32 bits
  315. <legal all>
  316. rtt_cfo_measurement
  317. CFO measurement. Needed for passive locationing
  318. 14 bits, signed 1.13. 13 bits fraction to provide a
  319. resolution of 153 Hz
  320. In units of cycles/800 ns
  321. <legal all>
  322. rtt_chan_spread
  323. Channel delay spread measurement. Needed for selecting
  324. GI length
  325. 8 bits, unsigned. At 25 ns step. Can represent up to
  326. 6375 ns
  327. In units of cycles @ 40 MHz
  328. <legal all>
  329. rtt_timing_backoff_sel
  330. Indicate which timing backoff value is used
  331. <enum 0 timing_backoff_low_rssi>
  332. <enum 1 timing_backoff_mid_rssi>
  333. <enum 2 timing_backoff_high_rssi>
  334. <enum 3 reserved>
  335. <legal all>
  336. reserved_8
  337. <legal 0>
  338. rx_location_info_valid
  339. <enum 0 rx_location_info_is_not_valid>
  340. <enum 1 rx_location_info_is_valid>
  341. <legal all>
  342. */
  343. /* Description RX_LOCATION_INFO_0_RTT_FAC_LEGACY
  344. For 20/40/80, this field shows the RTT first arrival
  345. correction value computed from L-LTF on the first selected
  346. Rx chain
  347. For 80+80, this field shows the RTT first arrival
  348. correction value computed from L-LTF on pri80 on the
  349. selected pri80 Rx chain
  350. 16 bits, signed 12.4. 12 bits integer to cover -6.4us to
  351. 6.4us, and 4 bits fraction to cover pri80 and 32x FAC
  352. interpolation
  353. clock unit is 320MHz
  354. <legal all>
  355. */
  356. #define RX_LOCATION_INFO_0_RTT_FAC_LEGACY_OFFSET 0x00000000
  357. #define RX_LOCATION_INFO_0_RTT_FAC_LEGACY_LSB 0
  358. #define RX_LOCATION_INFO_0_RTT_FAC_LEGACY_MASK 0x0000ffff
  359. /* Description RX_LOCATION_INFO_0_RTT_FAC_LEGACY_EXT80
  360. For 20/40/80, this field shows the RTT first arrival
  361. correction value computed from L-LTF on the second selected
  362. Rx chain
  363. For 80+80, this field shows the RTT first arrival
  364. correction value computed from L-LTF on ext80 on the
  365. selected ext80 Rx chain
  366. 16 bits, signed 12.4. 12 bits integer to cover -6.4us to
  367. 6.4us, and 4 bits fraction to cover ext80 and 32x FAC
  368. interpolation
  369. clock unit is 320MHz
  370. <legal all>
  371. */
  372. #define RX_LOCATION_INFO_0_RTT_FAC_LEGACY_EXT80_OFFSET 0x00000000
  373. #define RX_LOCATION_INFO_0_RTT_FAC_LEGACY_EXT80_LSB 16
  374. #define RX_LOCATION_INFO_0_RTT_FAC_LEGACY_EXT80_MASK 0xffff0000
  375. /* Description RX_LOCATION_INFO_1_RTT_FAC_VHT
  376. For 20/40/80, this field shows the RTT first arrival
  377. correction value computed from (V)HT/HE-LTF on the first
  378. selected Rx chain
  379. For 80+80, this field shows the RTT first arrival
  380. correction value computed from (V)HT/HE-LTF on pri80 on the
  381. selected pri80 Rx chain
  382. 16 bits, signed 12.4. 12 bits integer to cover -6.4us to
  383. 6.4us, and 4 bits fraction to cover pri80 and 32x FAC
  384. interpolation
  385. clock unit is 320MHz
  386. <legal all>
  387. */
  388. #define RX_LOCATION_INFO_1_RTT_FAC_VHT_OFFSET 0x00000004
  389. #define RX_LOCATION_INFO_1_RTT_FAC_VHT_LSB 0
  390. #define RX_LOCATION_INFO_1_RTT_FAC_VHT_MASK 0x0000ffff
  391. /* Description RX_LOCATION_INFO_1_RTT_FAC_VHT_EXT80
  392. For 20/40/80, this field shows the RTT first arrival
  393. correction value computed from (V)HT/HE-LTF on the second
  394. selected Rx chain
  395. For 80+80, this field shows the RTT first arrival
  396. correction value computed from (V)HT/HE-LTF on ext80 on the
  397. selected ext80 Rx chain
  398. 16 bits, signed 12.4. 12 bits integer to cover -6.4us to
  399. 6.4us, and 4 bits fraction to cover ext80 and 32x FAC
  400. interpolation
  401. clock unit is 320MHz
  402. <legal all>
  403. */
  404. #define RX_LOCATION_INFO_1_RTT_FAC_VHT_EXT80_OFFSET 0x00000004
  405. #define RX_LOCATION_INFO_1_RTT_FAC_VHT_EXT80_LSB 16
  406. #define RX_LOCATION_INFO_1_RTT_FAC_VHT_EXT80_MASK 0xffff0000
  407. /* Description RX_LOCATION_INFO_2_RTT_FAC_LEGACY_STATUS
  408. Status of rtt_fac_legacy
  409. <enum 0 location_fac_legacy_status_not_valid>
  410. <enum 1 location_fac_legacy_status_valid>
  411. <legal all>
  412. */
  413. #define RX_LOCATION_INFO_2_RTT_FAC_LEGACY_STATUS_OFFSET 0x00000008
  414. #define RX_LOCATION_INFO_2_RTT_FAC_LEGACY_STATUS_LSB 0
  415. #define RX_LOCATION_INFO_2_RTT_FAC_LEGACY_STATUS_MASK 0x00000001
  416. /* Description RX_LOCATION_INFO_2_RTT_FAC_LEGACY_EXT80_STATUS
  417. Status of rtt_fac_legacy_ext80
  418. <enum 0 location_fac_legacy_ext80_status_not_valid>
  419. <enum 1 location_fac_legacy_ext80_status_valid>
  420. <legal all>
  421. */
  422. #define RX_LOCATION_INFO_2_RTT_FAC_LEGACY_EXT80_STATUS_OFFSET 0x00000008
  423. #define RX_LOCATION_INFO_2_RTT_FAC_LEGACY_EXT80_STATUS_LSB 1
  424. #define RX_LOCATION_INFO_2_RTT_FAC_LEGACY_EXT80_STATUS_MASK 0x00000002
  425. /* Description RX_LOCATION_INFO_2_RTT_FAC_VHT_STATUS
  426. Status of rtt_fac_vht
  427. <enum 0 location_fac_vht_status_not_valid>
  428. <enum 1 location_fac_vht_status_valid>
  429. <legal all>
  430. */
  431. #define RX_LOCATION_INFO_2_RTT_FAC_VHT_STATUS_OFFSET 0x00000008
  432. #define RX_LOCATION_INFO_2_RTT_FAC_VHT_STATUS_LSB 2
  433. #define RX_LOCATION_INFO_2_RTT_FAC_VHT_STATUS_MASK 0x00000004
  434. /* Description RX_LOCATION_INFO_2_RTT_FAC_VHT_EXT80_STATUS
  435. Status of rtt_fac_vht_ext80
  436. <enum 0 location_fac_vht_ext80_status_not_valid>
  437. <enum 1 location_fac_vht_ext80_status_valid>
  438. <legal all>
  439. */
  440. #define RX_LOCATION_INFO_2_RTT_FAC_VHT_EXT80_STATUS_OFFSET 0x00000008
  441. #define RX_LOCATION_INFO_2_RTT_FAC_VHT_EXT80_STATUS_LSB 3
  442. #define RX_LOCATION_INFO_2_RTT_FAC_VHT_EXT80_STATUS_MASK 0x00000008
  443. /* Description RX_LOCATION_INFO_2_RTT_FAC_SIFS
  444. To support fine SIFS adjustment, need to provide FAC
  445. value @ integer number of 320 MHz clock cycles to MAC.  It
  446. is from L-LTF if it is a Legacy packet and from (V)HT/HE-LTF
  447. if it is a (V)HT/HE packet
  448. 12 bits, signed, no fractional part
  449. <legal all>
  450. */
  451. #define RX_LOCATION_INFO_2_RTT_FAC_SIFS_OFFSET 0x00000008
  452. #define RX_LOCATION_INFO_2_RTT_FAC_SIFS_LSB 4
  453. #define RX_LOCATION_INFO_2_RTT_FAC_SIFS_MASK 0x0000fff0
  454. /* Description RX_LOCATION_INFO_2_RTT_FAC_SIFS_STATUS
  455. Status of rtt_fac_sifs
  456. 0: not valid
  457. 1: valid and from L-LTF
  458. 2: valid and from (V)HT/HE-LTF
  459. 3: reserved
  460. <legal 0-2>
  461. */
  462. #define RX_LOCATION_INFO_2_RTT_FAC_SIFS_STATUS_OFFSET 0x00000008
  463. #define RX_LOCATION_INFO_2_RTT_FAC_SIFS_STATUS_LSB 16
  464. #define RX_LOCATION_INFO_2_RTT_FAC_SIFS_STATUS_MASK 0x00030000
  465. /* Description RX_LOCATION_INFO_2_RTT_CFR_STATUS
  466. Status of channel frequency response dump
  467. <enum 0 location_CFR_dump_not_valid>
  468. <enum 1 location_CFR_dump_valid>
  469. <legal all>
  470. */
  471. #define RX_LOCATION_INFO_2_RTT_CFR_STATUS_OFFSET 0x00000008
  472. #define RX_LOCATION_INFO_2_RTT_CFR_STATUS_LSB 18
  473. #define RX_LOCATION_INFO_2_RTT_CFR_STATUS_MASK 0x00040000
  474. /* Description RX_LOCATION_INFO_2_RTT_CIR_STATUS
  475. Status of channel impulse response dump
  476. <enum 0 location_CIR_dump_not_valid>
  477. <enum 1 location_CIR_dump_valid>
  478. <legal all>
  479. */
  480. #define RX_LOCATION_INFO_2_RTT_CIR_STATUS_OFFSET 0x00000008
  481. #define RX_LOCATION_INFO_2_RTT_CIR_STATUS_LSB 19
  482. #define RX_LOCATION_INFO_2_RTT_CIR_STATUS_MASK 0x00080000
  483. /* Description RX_LOCATION_INFO_2_RTT_CHANNEL_DUMP_SIZE
  484. Channel dump size.  It shows how many tones in CFR in
  485. one chain, for example, it will show 52 for Legacy20 and 484
  486. for VHT160
  487. <legal all>
  488. */
  489. #define RX_LOCATION_INFO_2_RTT_CHANNEL_DUMP_SIZE_OFFSET 0x00000008
  490. #define RX_LOCATION_INFO_2_RTT_CHANNEL_DUMP_SIZE_LSB 20
  491. #define RX_LOCATION_INFO_2_RTT_CHANNEL_DUMP_SIZE_MASK 0x7ff00000
  492. /* Description RX_LOCATION_INFO_2_RTT_HW_IFFT_MODE
  493. Indicator showing if HW IFFT mode or SW IFFT mode
  494. <enum 0 location_sw_ifft_mode>
  495. <enum 1 location_hw_ifft_mode>
  496. <legal all>
  497. */
  498. #define RX_LOCATION_INFO_2_RTT_HW_IFFT_MODE_OFFSET 0x00000008
  499. #define RX_LOCATION_INFO_2_RTT_HW_IFFT_MODE_LSB 31
  500. #define RX_LOCATION_INFO_2_RTT_HW_IFFT_MODE_MASK 0x80000000
  501. /* Description RX_LOCATION_INFO_3_RTT_BTCF_STATUS
  502. Indicate if BTCF is used to capture the timestamps
  503. <enum 0 location_not_BTCF_based_ts>
  504. <enum 1 location_BTCF_based_ts>
  505. <legal all>
  506. */
  507. #define RX_LOCATION_INFO_3_RTT_BTCF_STATUS_OFFSET 0x0000000c
  508. #define RX_LOCATION_INFO_3_RTT_BTCF_STATUS_LSB 0
  509. #define RX_LOCATION_INFO_3_RTT_BTCF_STATUS_MASK 0x00000001
  510. /* Description RX_LOCATION_INFO_3_RTT_PREAMBLE_TYPE
  511. Indicate preamble type
  512. <enum 0 location_preamble_type_legacy>
  513. <enum 1 location_preamble_type_ht>
  514. <enum 2 location_preamble_type_vht>
  515. <enum 3 location_preamble_type_he_su_4xltf>
  516. <enum 4 location_preamble_type_he_su_2xltf>
  517. <enum 5 location_preamble_type_he_su_1xltf>
  518. <enum 6
  519. location_preamble_type_he_trigger_based_ul_4xltf>
  520. <enum 7
  521. location_preamble_type_he_trigger_based_ul_2xltf>
  522. <enum 8
  523. location_preamble_type_he_trigger_based_ul_1xltf>
  524. <enum 9 location_preamble_type_he_mu_4xltf>
  525. <enum 10 location_preamble_type_he_mu_2xltf>
  526. <enum 11 location_preamble_type_he_mu_1xltf>
  527. <enum 12
  528. location_preamble_type_he_extended_range_su_4xltf>
  529. <enum 13
  530. location_preamble_type_he_extended_range_su_2xltf>
  531. <enum 14
  532. location_preamble_type_he_extended_range_su_1xltf>
  533. <legal 0-14>
  534. */
  535. #define RX_LOCATION_INFO_3_RTT_PREAMBLE_TYPE_OFFSET 0x0000000c
  536. #define RX_LOCATION_INFO_3_RTT_PREAMBLE_TYPE_LSB 1
  537. #define RX_LOCATION_INFO_3_RTT_PREAMBLE_TYPE_MASK 0x0000003e
  538. /* Description RX_LOCATION_INFO_3_RTT_PKT_BW_LEG
  539. Indicate the bandwidth of L-LTF
  540. <enum 0 location_pkt_bw_20MHz>
  541. <enum 1 location_pkt_bw_40MHz>
  542. <enum 2 location_pkt_bw_80MHz>
  543. <enum 3 location_pkt_bw_160MHz>
  544. <legal all>
  545. */
  546. #define RX_LOCATION_INFO_3_RTT_PKT_BW_LEG_OFFSET 0x0000000c
  547. #define RX_LOCATION_INFO_3_RTT_PKT_BW_LEG_LSB 6
  548. #define RX_LOCATION_INFO_3_RTT_PKT_BW_LEG_MASK 0x000000c0
  549. /* Description RX_LOCATION_INFO_3_RTT_PKT_BW_VHT
  550. Indicate the bandwidth of (V)HT/HE-LTF
  551. <enum 0 location_pkt_bw_20MHz>
  552. <enum 1 location_pkt_bw_40MHz>
  553. <enum 2 location_pkt_bw_80MHz>
  554. <enum 3 location_pkt_bw_160MHz>
  555. <legal all>
  556. */
  557. #define RX_LOCATION_INFO_3_RTT_PKT_BW_VHT_OFFSET 0x0000000c
  558. #define RX_LOCATION_INFO_3_RTT_PKT_BW_VHT_LSB 8
  559. #define RX_LOCATION_INFO_3_RTT_PKT_BW_VHT_MASK 0x00000300
  560. /* Description RX_LOCATION_INFO_3_RTT_GI_TYPE
  561. Indicate GI (guard interval) type
  562. <enum 0 gi_0_8_us > HE related GI. Can also be used
  563. for HE
  564. <enum 1 gi_0_4_us > HE related GI. Can also be used
  565. for HE
  566. <enum 2 gi_1_6_us > HE related GI
  567. <enum 3 gi_3_2_us > HE related GI
  568. <legal 0 - 3>
  569. */
  570. #define RX_LOCATION_INFO_3_RTT_GI_TYPE_OFFSET 0x0000000c
  571. #define RX_LOCATION_INFO_3_RTT_GI_TYPE_LSB 10
  572. #define RX_LOCATION_INFO_3_RTT_GI_TYPE_MASK 0x00000c00
  573. /* Description RX_LOCATION_INFO_3_RTT_MCS_RATE
  574. Bits 0~4 indicate MCS rate, if Legacy,
  575. 0: 48 Mbps,
  576. 1: 24 Mbps,
  577. 2: 12 Mbps,
  578. 3: 6 Mbps,
  579. 4: 54 Mbps,
  580. 5: 36 Mbps,
  581. 6: 18 Mbps,
  582. 7: 9 Mbps,
  583. if HT, 0-7: MCS0-MCS7,
  584. if VHT, 0-9: MCS0-MCS9,
  585. <legal all>
  586. */
  587. #define RX_LOCATION_INFO_3_RTT_MCS_RATE_OFFSET 0x0000000c
  588. #define RX_LOCATION_INFO_3_RTT_MCS_RATE_LSB 12
  589. #define RX_LOCATION_INFO_3_RTT_MCS_RATE_MASK 0x0001f000
  590. /* Description RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN
  591. For 20/40/80, this field shows the first selected Rx
  592. chain that is used in HW IFFT mode
  593. For 80+80, this field shows the selected pri80 Rx chain
  594. that is used in HW IFFT mode
  595. <enum 0 location_strongest_chain_is_0>
  596. <enum 1 location_strongest_chain_is_1>
  597. <enum 2 location_strongest_chain_is_2>
  598. <enum 3 location_strongest_chain_is_3>
  599. <enum 4 location_strongest_chain_is_4>
  600. <enum 5 location_strongest_chain_is_5>
  601. <enum 6 location_strongest_chain_is_6>
  602. <enum 7 location_strongest_chain_is_7>
  603. <legal all>
  604. */
  605. #define RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_OFFSET 0x0000000c
  606. #define RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_LSB 17
  607. #define RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_MASK 0x000e0000
  608. /* Description RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_EXT80
  609. For 20/40/80, this field shows the second selected Rx
  610. chain that is used in HW IFFT mode
  611. For 80+80, this field shows the selected ext80 Rx chain
  612. that is used in HW IFFT mode
  613. <enum 0 location_strongest_chain_is_0>
  614. <enum 1 location_strongest_chain_is_1>
  615. <enum 2 location_strongest_chain_is_2>
  616. <enum 3 location_strongest_chain_is_3>
  617. <enum 4 location_strongest_chain_is_4>
  618. <enum 5 location_strongest_chain_is_5>
  619. <enum 6 location_strongest_chain_is_6>
  620. <enum 7 location_strongest_chain_is_7>
  621. <legal all>
  622. */
  623. #define RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_EXT80_OFFSET 0x0000000c
  624. #define RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_EXT80_LSB 20
  625. #define RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_EXT80_MASK 0x00700000
  626. /* Description RX_LOCATION_INFO_3_RTT_RX_CHAIN_MASK
  627. Rx chain mask, each bit is a Rx chain
  628. 0: the Rx chain is not used
  629. 1: the Rx chain is used
  630. Support up to 8 Rx chains
  631. <legal all>
  632. */
  633. #define RX_LOCATION_INFO_3_RTT_RX_CHAIN_MASK_OFFSET 0x0000000c
  634. #define RX_LOCATION_INFO_3_RTT_RX_CHAIN_MASK_LSB 23
  635. #define RX_LOCATION_INFO_3_RTT_RX_CHAIN_MASK_MASK 0x7f800000
  636. /* Description RX_LOCATION_INFO_3_RESERVED_3
  637. <legal 0>
  638. */
  639. #define RX_LOCATION_INFO_3_RESERVED_3_OFFSET 0x0000000c
  640. #define RX_LOCATION_INFO_3_RESERVED_3_LSB 31
  641. #define RX_LOCATION_INFO_3_RESERVED_3_MASK 0x80000000
  642. /* Description RX_LOCATION_INFO_4_RX_START_TS
  643. RX packet start timestamp
  644. It reports the time the first L-STF ADC sample arrived
  645. at RX antenna
  646. clock unit is 480MHz
  647. <legal all>
  648. */
  649. #define RX_LOCATION_INFO_4_RX_START_TS_OFFSET 0x00000010
  650. #define RX_LOCATION_INFO_4_RX_START_TS_LSB 0
  651. #define RX_LOCATION_INFO_4_RX_START_TS_MASK 0xffffffff
  652. /* Description RX_LOCATION_INFO_5_RX_END_TS
  653. RX packet end timestamp
  654. It reports the time the last symbol's last ADC sample
  655. arrived at RX antenna
  656. clock unit is 480MHz
  657. <legal all>
  658. */
  659. #define RX_LOCATION_INFO_5_RX_END_TS_OFFSET 0x00000014
  660. #define RX_LOCATION_INFO_5_RX_END_TS_LSB 0
  661. #define RX_LOCATION_INFO_5_RX_END_TS_MASK 0xffffffff
  662. /* Description RX_LOCATION_INFO_6_SFO_PHASE_PKT_START
  663. The phase of the SFO of the first symbol's first FFT
  664. input sample
  665. 12 bits, signed 6.6. 6 bits integer to cover -66.7ns to
  666. 66.7ns, and 6 bits fraction to provide a resolution of
  667. 0.03ns
  668. clock unit is 480MHz
  669. <legal all>
  670. */
  671. #define RX_LOCATION_INFO_6_SFO_PHASE_PKT_START_OFFSET 0x00000018
  672. #define RX_LOCATION_INFO_6_SFO_PHASE_PKT_START_LSB 0
  673. #define RX_LOCATION_INFO_6_SFO_PHASE_PKT_START_MASK 0x00000fff
  674. /* Description RX_LOCATION_INFO_6_SFO_PHASE_PKT_END
  675. The phase of the SFO of the last symbol's last FFT input
  676. sample
  677. 12 bits, signed 6.6. 6 bits integer to cover -66.7ns to
  678. 66.7ns, and 6 bits fraction to provide a resolution of
  679. 0.03ns
  680. clock unit is 480MHz
  681. <legal all>
  682. */
  683. #define RX_LOCATION_INFO_6_SFO_PHASE_PKT_END_OFFSET 0x00000018
  684. #define RX_LOCATION_INFO_6_SFO_PHASE_PKT_END_LSB 12
  685. #define RX_LOCATION_INFO_6_SFO_PHASE_PKT_END_MASK 0x00fff000
  686. /* Description RX_LOCATION_INFO_6_RTT_CHE_BUFFER_POINTER_HIGH8
  687. The high 8 bits of the 40 bits pointer pointed to the
  688. external RTT channel information buffer
  689. 8 bits
  690. <legal all>
  691. */
  692. #define RX_LOCATION_INFO_6_RTT_CHE_BUFFER_POINTER_HIGH8_OFFSET 0x00000018
  693. #define RX_LOCATION_INFO_6_RTT_CHE_BUFFER_POINTER_HIGH8_LSB 24
  694. #define RX_LOCATION_INFO_6_RTT_CHE_BUFFER_POINTER_HIGH8_MASK 0xff000000
  695. /* Description RX_LOCATION_INFO_7_RTT_CHE_BUFFER_POINTER_LOW32
  696. The low 32 bits of the 40 bits pointer pointed to the
  697. external RTT channel information buffer
  698. 32 bits
  699. <legal all>
  700. */
  701. #define RX_LOCATION_INFO_7_RTT_CHE_BUFFER_POINTER_LOW32_OFFSET 0x0000001c
  702. #define RX_LOCATION_INFO_7_RTT_CHE_BUFFER_POINTER_LOW32_LSB 0
  703. #define RX_LOCATION_INFO_7_RTT_CHE_BUFFER_POINTER_LOW32_MASK 0xffffffff
  704. /* Description RX_LOCATION_INFO_8_RTT_CFO_MEASUREMENT
  705. CFO measurement. Needed for passive locationing
  706. 14 bits, signed 1.13. 13 bits fraction to provide a
  707. resolution of 153 Hz
  708. In units of cycles/800 ns
  709. <legal all>
  710. */
  711. #define RX_LOCATION_INFO_8_RTT_CFO_MEASUREMENT_OFFSET 0x00000020
  712. #define RX_LOCATION_INFO_8_RTT_CFO_MEASUREMENT_LSB 0
  713. #define RX_LOCATION_INFO_8_RTT_CFO_MEASUREMENT_MASK 0x00003fff
  714. /* Description RX_LOCATION_INFO_8_RTT_CHAN_SPREAD
  715. Channel delay spread measurement. Needed for selecting
  716. GI length
  717. 8 bits, unsigned. At 25 ns step. Can represent up to
  718. 6375 ns
  719. In units of cycles @ 40 MHz
  720. <legal all>
  721. */
  722. #define RX_LOCATION_INFO_8_RTT_CHAN_SPREAD_OFFSET 0x00000020
  723. #define RX_LOCATION_INFO_8_RTT_CHAN_SPREAD_LSB 14
  724. #define RX_LOCATION_INFO_8_RTT_CHAN_SPREAD_MASK 0x003fc000
  725. /* Description RX_LOCATION_INFO_8_RTT_TIMING_BACKOFF_SEL
  726. Indicate which timing backoff value is used
  727. <enum 0 timing_backoff_low_rssi>
  728. <enum 1 timing_backoff_mid_rssi>
  729. <enum 2 timing_backoff_high_rssi>
  730. <enum 3 reserved>
  731. <legal all>
  732. */
  733. #define RX_LOCATION_INFO_8_RTT_TIMING_BACKOFF_SEL_OFFSET 0x00000020
  734. #define RX_LOCATION_INFO_8_RTT_TIMING_BACKOFF_SEL_LSB 22
  735. #define RX_LOCATION_INFO_8_RTT_TIMING_BACKOFF_SEL_MASK 0x00c00000
  736. /* Description RX_LOCATION_INFO_8_RESERVED_8
  737. <legal 0>
  738. */
  739. #define RX_LOCATION_INFO_8_RESERVED_8_OFFSET 0x00000020
  740. #define RX_LOCATION_INFO_8_RESERVED_8_LSB 24
  741. #define RX_LOCATION_INFO_8_RESERVED_8_MASK 0x7f000000
  742. /* Description RX_LOCATION_INFO_8_RX_LOCATION_INFO_VALID
  743. <enum 0 rx_location_info_is_not_valid>
  744. <enum 1 rx_location_info_is_valid>
  745. <legal all>
  746. */
  747. #define RX_LOCATION_INFO_8_RX_LOCATION_INFO_VALID_OFFSET 0x00000020
  748. #define RX_LOCATION_INFO_8_RX_LOCATION_INFO_VALID_LSB 31
  749. #define RX_LOCATION_INFO_8_RX_LOCATION_INFO_VALID_MASK 0x80000000
  750. #endif // _RX_LOCATION_INFO_H_