rx_location_info.h 33 KB

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