rx_location_info.h 33 KB

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