rx_location_info.h 33 KB

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