rx_location_info.h 31 KB

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