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 17 // $ATH_LICENSE_HW_HDR_C$ 18 // 19 // DO NOT EDIT! This file is automatically generated 20 // These definitions are tied to a particular hardware layout 21 22 23 #ifndef _RX_LOCATION_INFO_H_ 24 #define _RX_LOCATION_INFO_H_ 25 #if !defined(__ASSEMBLER__) 26 #endif 27 28 29 // ################ START SUMMARY ################# 30 // 31 // Dword Fields 32 // 0 rtt_fac_legacy[15:0], rtt_fac_legacy_ext80[31:16] 33 // 1 rtt_fac_vht[15:0], rtt_fac_vht_ext80[31:16] 34 // 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] 35 // 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] 36 // 4 rx_start_ts[31:0] 37 // 5 rx_end_ts[31:0] 38 // 6 sfo_phase_pkt_start[11:0], sfo_phase_pkt_end[23:12], rtt_che_buffer_pointer_high8[31:24] 39 // 7 rtt_che_buffer_pointer_low32[31:0] 40 // 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] 41 // 42 // ################ END SUMMARY ################# 43 44 #define NUM_OF_DWORDS_RX_LOCATION_INFO 9 45 46 struct rx_location_info { 47 uint32_t rtt_fac_legacy : 16, //[15:0] 48 rtt_fac_legacy_ext80 : 16; //[31:16] 49 uint32_t rtt_fac_vht : 16, //[15:0] 50 rtt_fac_vht_ext80 : 16; //[31:16] 51 uint32_t rtt_fac_legacy_status : 1, //[0] 52 rtt_fac_legacy_ext80_status : 1, //[1] 53 rtt_fac_vht_status : 1, //[2] 54 rtt_fac_vht_ext80_status : 1, //[3] 55 rtt_fac_sifs : 12, //[15:4] 56 rtt_fac_sifs_status : 2, //[17:16] 57 rtt_cfr_status : 1, //[18] 58 rtt_cir_status : 1, //[19] 59 rtt_channel_dump_size : 11, //[30:20] 60 rtt_hw_ifft_mode : 1; //[31] 61 uint32_t rtt_btcf_status : 1, //[0] 62 rtt_preamble_type : 5, //[5:1] 63 rtt_pkt_bw_leg : 2, //[7:6] 64 rtt_pkt_bw_vht : 2, //[9:8] 65 rtt_gi_type : 2, //[11:10] 66 rtt_mcs_rate : 5, //[16:12] 67 rtt_strongest_chain : 3, //[19:17] 68 rtt_strongest_chain_ext80 : 3, //[22:20] 69 rtt_rx_chain_mask : 8, //[30:23] 70 reserved_3 : 1; //[31] 71 uint32_t rx_start_ts : 32; //[31:0] 72 uint32_t rx_end_ts : 32; //[31:0] 73 uint32_t sfo_phase_pkt_start : 12, //[11:0] 74 sfo_phase_pkt_end : 12, //[23:12] 75 rtt_che_buffer_pointer_high8 : 8; //[31:24] 76 uint32_t rtt_che_buffer_pointer_low32 : 32; //[31:0] 77 uint32_t rtt_cfo_measurement : 14, //[13:0] 78 rtt_chan_spread : 8, //[21:14] 79 rtt_timing_backoff_sel : 2, //[23:22] 80 reserved_8 : 7, //[30:24] 81 rx_location_info_valid : 1; //[31] 82 }; 83 84 /* 85 86 rtt_fac_legacy 87 88 For 20/40/80, this field shows the RTT first arrival 89 correction value computed from L-LTF on the first selected 90 Rx chain 91 92 93 94 For 80+80, this field shows the RTT first arrival 95 correction value computed from L-LTF on pri80 on the 96 selected pri80 Rx chain 97 98 99 100 16 bits, signed 12.4. 12 bits integer to cover -6.4us to 101 6.4us, and 4 bits fraction to cover pri80 and 32x FAC 102 interpolation 103 104 105 106 clock unit is 320MHz 107 108 <legal all> 109 110 rtt_fac_legacy_ext80 111 112 For 20/40/80, this field shows the RTT first arrival 113 correction value computed from L-LTF on the second selected 114 Rx chain 115 116 117 118 For 80+80, this field shows the RTT first arrival 119 correction value computed from L-LTF on ext80 on the 120 selected ext80 Rx chain 121 122 123 124 16 bits, signed 12.4. 12 bits integer to cover -6.4us to 125 6.4us, and 4 bits fraction to cover ext80 and 32x FAC 126 interpolation 127 128 129 130 clock unit is 320MHz 131 132 <legal all> 133 134 rtt_fac_vht 135 136 For 20/40/80, this field shows the RTT first arrival 137 correction value computed from (V)HT/HE-LTF on the first 138 selected Rx chain 139 140 141 142 For 80+80, this field shows the RTT first arrival 143 correction value computed from (V)HT/HE-LTF on pri80 on the 144 selected pri80 Rx chain 145 146 147 148 16 bits, signed 12.4. 12 bits integer to cover -6.4us to 149 6.4us, and 4 bits fraction to cover pri80 and 32x FAC 150 interpolation 151 152 153 154 clock unit is 320MHz 155 156 <legal all> 157 158 rtt_fac_vht_ext80 159 160 For 20/40/80, this field shows the RTT first arrival 161 correction value computed from (V)HT/HE-LTF on the second 162 selected Rx chain 163 164 165 166 For 80+80, this field shows the RTT first arrival 167 correction value computed from (V)HT/HE-LTF on ext80 on the 168 selected ext80 Rx chain 169 170 171 172 16 bits, signed 12.4. 12 bits integer to cover -6.4us to 173 6.4us, and 4 bits fraction to cover ext80 and 32x FAC 174 interpolation 175 176 177 178 clock unit is 320MHz 179 180 <legal all> 181 182 rtt_fac_legacy_status 183 184 Status of rtt_fac_legacy 185 186 187 188 <enum 0 location_fac_legacy_status_not_valid> 189 190 <enum 1 location_fac_legacy_status_valid> 191 192 <legal all> 193 194 rtt_fac_legacy_ext80_status 195 196 Status of rtt_fac_legacy_ext80 197 198 199 200 <enum 0 location_fac_legacy_ext80_status_not_valid> 201 202 <enum 1 location_fac_legacy_ext80_status_valid> 203 204 <legal all> 205 206 rtt_fac_vht_status 207 208 Status of rtt_fac_vht 209 210 211 212 <enum 0 location_fac_vht_status_not_valid> 213 214 <enum 1 location_fac_vht_status_valid> 215 216 <legal all> 217 218 rtt_fac_vht_ext80_status 219 220 Status of rtt_fac_vht_ext80 221 222 223 224 <enum 0 location_fac_vht_ext80_status_not_valid> 225 226 <enum 1 location_fac_vht_ext80_status_valid> 227 228 <legal all> 229 230 rtt_fac_sifs 231 232 To support fine SIFS adjustment, need to provide FAC 233 value @ integer number of 320 MHz clock cycles to MAC. It 234 is from L-LTF if it is a Legacy packet and from (V)HT/HE-LTF 235 if it is a (V)HT/HE packet 236 237 238 239 12 bits, signed, no fractional part 240 241 <legal all> 242 243 rtt_fac_sifs_status 244 245 Status of rtt_fac_sifs 246 247 0: not valid 248 249 1: valid and from L-LTF 250 251 2: valid and from (V)HT/HE-LTF 252 253 3: reserved 254 255 <legal 0-2> 256 257 rtt_cfr_status 258 259 Status of channel frequency response dump 260 261 262 263 <enum 0 location_CFR_dump_not_valid> 264 265 <enum 1 location_CFR_dump_valid> 266 267 <legal all> 268 269 rtt_cir_status 270 271 Status of channel impulse response dump 272 273 274 275 <enum 0 location_CIR_dump_not_valid> 276 277 <enum 1 location_CIR_dump_valid> 278 279 <legal all> 280 281 rtt_channel_dump_size 282 283 Channel dump size. It shows how many tones in CFR in 284 one chain, for example, it will show 52 for Legacy20 and 484 285 for VHT160 286 287 288 289 <legal all> 290 291 rtt_hw_ifft_mode 292 293 Indicator showing if HW IFFT mode or SW IFFT mode 294 295 296 297 <enum 0 location_sw_ifft_mode> 298 299 <enum 1 location_hw_ifft_mode> 300 301 <legal all> 302 303 rtt_btcf_status 304 305 Indicate if BTCF is used to capture the timestamps 306 307 308 309 <enum 0 location_not_BTCF_based_ts> 310 311 <enum 1 location_BTCF_based_ts> 312 313 <legal all> 314 315 rtt_preamble_type 316 317 Indicate preamble type 318 319 320 321 <enum 0 location_preamble_type_legacy> 322 323 <enum 1 location_preamble_type_ht> 324 325 <enum 2 location_preamble_type_vht> 326 327 <enum 3 location_preamble_type_he_su_4xltf> 328 329 <enum 4 location_preamble_type_he_su_2xltf> 330 331 <enum 5 location_preamble_type_he_su_1xltf> 332 333 <enum 6 334 location_preamble_type_he_trigger_based_ul_4xltf> 335 336 <enum 7 337 location_preamble_type_he_trigger_based_ul_2xltf> 338 339 <enum 8 340 location_preamble_type_he_trigger_based_ul_1xltf> 341 342 <enum 9 location_preamble_type_he_mu_4xltf> 343 344 <enum 10 location_preamble_type_he_mu_2xltf> 345 346 <enum 11 location_preamble_type_he_mu_1xltf> 347 348 <enum 12 349 location_preamble_type_he_extended_range_su_4xltf> 350 351 <enum 13 352 location_preamble_type_he_extended_range_su_2xltf> 353 354 <enum 14 355 location_preamble_type_he_extended_range_su_1xltf> 356 357 <legal 0-14> 358 359 rtt_pkt_bw_leg 360 361 Indicate the bandwidth of L-LTF 362 363 364 365 <enum 0 location_pkt_bw_20MHz> 366 367 <enum 1 location_pkt_bw_40MHz> 368 369 <enum 2 location_pkt_bw_80MHz> 370 371 <enum 3 location_pkt_bw_160MHz> 372 373 <legal all> 374 375 rtt_pkt_bw_vht 376 377 Indicate the bandwidth of (V)HT/HE-LTF 378 379 380 381 <enum 0 location_pkt_bw_20MHz> 382 383 <enum 1 location_pkt_bw_40MHz> 384 385 <enum 2 location_pkt_bw_80MHz> 386 387 <enum 3 location_pkt_bw_160MHz> 388 389 <legal all> 390 391 rtt_gi_type 392 393 Indicate GI (guard interval) type 394 395 396 397 <enum 0 gi_0_8_us > HE related GI. Can also be used 398 for HE 399 400 <enum 1 gi_0_4_us > HE related GI. Can also be used 401 for HE 402 403 <enum 2 gi_1_6_us > HE related GI 404 405 <enum 3 gi_3_2_us > HE related GI 406 407 <legal 0 - 3> 408 409 rtt_mcs_rate 410 411 Bits 0~4 indicate MCS rate, if Legacy, 412 413 0: 48 Mbps, 414 415 1: 24 Mbps, 416 417 2: 12 Mbps, 418 419 3: 6 Mbps, 420 421 4: 54 Mbps, 422 423 5: 36 Mbps, 424 425 6: 18 Mbps, 426 427 7: 9 Mbps, 428 429 430 431 if HT, 0-7: MCS0-MCS7, 432 433 if VHT, 0-9: MCS0-MCS9, 434 435 436 <legal all> 437 438 rtt_strongest_chain 439 440 For 20/40/80, this field shows the first selected Rx 441 chain that is used in HW IFFT mode 442 443 444 445 For 80+80, this field shows the selected pri80 Rx chain 446 that is used in HW IFFT mode 447 448 449 450 <enum 0 location_strongest_chain_is_0> 451 452 <enum 1 location_strongest_chain_is_1> 453 454 <enum 2 location_strongest_chain_is_2> 455 456 <enum 3 location_strongest_chain_is_3> 457 458 <enum 4 location_strongest_chain_is_4> 459 460 <enum 5 location_strongest_chain_is_5> 461 462 <enum 6 location_strongest_chain_is_6> 463 464 <enum 7 location_strongest_chain_is_7> 465 466 <legal all> 467 468 rtt_strongest_chain_ext80 469 470 For 20/40/80, this field shows the second selected Rx 471 chain that is used in HW IFFT mode 472 473 474 475 For 80+80, this field shows the selected ext80 Rx chain 476 that is used in HW IFFT mode 477 478 479 480 <enum 0 location_strongest_chain_is_0> 481 482 <enum 1 location_strongest_chain_is_1> 483 484 <enum 2 location_strongest_chain_is_2> 485 486 <enum 3 location_strongest_chain_is_3> 487 488 <enum 4 location_strongest_chain_is_4> 489 490 <enum 5 location_strongest_chain_is_5> 491 492 <enum 6 location_strongest_chain_is_6> 493 494 <enum 7 location_strongest_chain_is_7> 495 496 <legal all> 497 498 rtt_rx_chain_mask 499 500 Rx chain mask, each bit is a Rx chain 501 502 0: the Rx chain is not used 503 504 1: the Rx chain is used 505 506 Support up to 8 Rx chains 507 508 <legal all> 509 510 reserved_3 511 512 <legal 0> 513 514 rx_start_ts 515 516 RX packet start timestamp 517 518 519 520 It reports the time the first L-STF ADC sample arrived 521 at RX antenna 522 523 524 525 clock unit is 480MHz 526 527 <legal all> 528 529 rx_end_ts 530 531 RX packet end timestamp 532 533 534 535 It reports the time the last symbol's last ADC sample 536 arrived at RX antenna 537 538 539 540 clock unit is 480MHz 541 542 <legal all> 543 544 sfo_phase_pkt_start 545 546 The phase of the SFO of the first symbol's first FFT 547 input sample 548 549 550 551 12 bits, signed 6.6. 6 bits integer to cover -66.7ns to 552 66.7ns, and 6 bits fraction to provide a resolution of 553 0.03ns 554 555 556 557 clock unit is 480MHz 558 559 <legal all> 560 561 sfo_phase_pkt_end 562 563 The phase of the SFO of the last symbol's last FFT input 564 sample 565 566 567 568 12 bits, signed 6.6. 6 bits integer to cover -66.7ns to 569 66.7ns, and 6 bits fraction to provide a resolution of 570 0.03ns 571 572 573 574 clock unit is 480MHz 575 576 <legal all> 577 578 rtt_che_buffer_pointer_high8 579 580 The high 8 bits of the 40 bits pointer pointed to the 581 external RTT channel information buffer 582 583 584 585 8 bits 586 587 <legal all> 588 589 rtt_che_buffer_pointer_low32 590 591 The low 32 bits of the 40 bits pointer pointed to the 592 external RTT channel information buffer 593 594 595 596 32 bits 597 598 <legal all> 599 600 rtt_cfo_measurement 601 602 CFO measurement. Needed for passive locationing 603 604 605 606 14 bits, signed 1.13. 13 bits fraction to provide a 607 resolution of 153 Hz 608 609 610 611 In units of cycles/800 ns 612 613 <legal all> 614 615 rtt_chan_spread 616 617 Channel delay spread measurement. Needed for selecting 618 GI length 619 620 621 622 8 bits, unsigned. At 25 ns step. Can represent up to 623 6375 ns 624 625 626 627 In units of cycles @ 40 MHz 628 629 <legal all> 630 631 rtt_timing_backoff_sel 632 633 Indicate which timing backoff value is used 634 635 636 637 <enum 0 timing_backoff_low_rssi> 638 639 <enum 1 timing_backoff_mid_rssi> 640 641 <enum 2 timing_backoff_high_rssi> 642 643 <enum 3 reserved> 644 645 <legal all> 646 647 reserved_8 648 649 <legal 0> 650 651 rx_location_info_valid 652 653 <enum 0 rx_location_info_is_not_valid> 654 655 <enum 1 rx_location_info_is_valid> 656 657 <legal all> 658 */ 659 660 661 /* Description RX_LOCATION_INFO_0_RTT_FAC_LEGACY 662 663 For 20/40/80, this field shows the RTT first arrival 664 correction value computed from L-LTF on the first selected 665 Rx chain 666 667 668 669 For 80+80, this field shows the RTT first arrival 670 correction value computed from L-LTF on pri80 on the 671 selected pri80 Rx chain 672 673 674 675 16 bits, signed 12.4. 12 bits integer to cover -6.4us to 676 6.4us, and 4 bits fraction to cover pri80 and 32x FAC 677 interpolation 678 679 680 681 clock unit is 320MHz 682 683 <legal all> 684 */ 685 #define RX_LOCATION_INFO_0_RTT_FAC_LEGACY_OFFSET 0x00000000 686 #define RX_LOCATION_INFO_0_RTT_FAC_LEGACY_LSB 0 687 #define RX_LOCATION_INFO_0_RTT_FAC_LEGACY_MASK 0x0000ffff 688 689 /* Description RX_LOCATION_INFO_0_RTT_FAC_LEGACY_EXT80 690 691 For 20/40/80, this field shows the RTT first arrival 692 correction value computed from L-LTF on the second selected 693 Rx chain 694 695 696 697 For 80+80, this field shows the RTT first arrival 698 correction value computed from L-LTF on ext80 on the 699 selected ext80 Rx chain 700 701 702 703 16 bits, signed 12.4. 12 bits integer to cover -6.4us to 704 6.4us, and 4 bits fraction to cover ext80 and 32x FAC 705 interpolation 706 707 708 709 clock unit is 320MHz 710 711 <legal all> 712 */ 713 #define RX_LOCATION_INFO_0_RTT_FAC_LEGACY_EXT80_OFFSET 0x00000000 714 #define RX_LOCATION_INFO_0_RTT_FAC_LEGACY_EXT80_LSB 16 715 #define RX_LOCATION_INFO_0_RTT_FAC_LEGACY_EXT80_MASK 0xffff0000 716 717 /* Description RX_LOCATION_INFO_1_RTT_FAC_VHT 718 719 For 20/40/80, this field shows the RTT first arrival 720 correction value computed from (V)HT/HE-LTF on the first 721 selected Rx chain 722 723 724 725 For 80+80, this field shows the RTT first arrival 726 correction value computed from (V)HT/HE-LTF on pri80 on the 727 selected pri80 Rx chain 728 729 730 731 16 bits, signed 12.4. 12 bits integer to cover -6.4us to 732 6.4us, and 4 bits fraction to cover pri80 and 32x FAC 733 interpolation 734 735 736 737 clock unit is 320MHz 738 739 <legal all> 740 */ 741 #define RX_LOCATION_INFO_1_RTT_FAC_VHT_OFFSET 0x00000004 742 #define RX_LOCATION_INFO_1_RTT_FAC_VHT_LSB 0 743 #define RX_LOCATION_INFO_1_RTT_FAC_VHT_MASK 0x0000ffff 744 745 /* Description RX_LOCATION_INFO_1_RTT_FAC_VHT_EXT80 746 747 For 20/40/80, this field shows the RTT first arrival 748 correction value computed from (V)HT/HE-LTF on the second 749 selected Rx chain 750 751 752 753 For 80+80, this field shows the RTT first arrival 754 correction value computed from (V)HT/HE-LTF on ext80 on the 755 selected ext80 Rx chain 756 757 758 759 16 bits, signed 12.4. 12 bits integer to cover -6.4us to 760 6.4us, and 4 bits fraction to cover ext80 and 32x FAC 761 interpolation 762 763 764 765 clock unit is 320MHz 766 767 <legal all> 768 */ 769 #define RX_LOCATION_INFO_1_RTT_FAC_VHT_EXT80_OFFSET 0x00000004 770 #define RX_LOCATION_INFO_1_RTT_FAC_VHT_EXT80_LSB 16 771 #define RX_LOCATION_INFO_1_RTT_FAC_VHT_EXT80_MASK 0xffff0000 772 773 /* Description RX_LOCATION_INFO_2_RTT_FAC_LEGACY_STATUS 774 775 Status of rtt_fac_legacy 776 777 778 779 <enum 0 location_fac_legacy_status_not_valid> 780 781 <enum 1 location_fac_legacy_status_valid> 782 783 <legal all> 784 */ 785 #define RX_LOCATION_INFO_2_RTT_FAC_LEGACY_STATUS_OFFSET 0x00000008 786 #define RX_LOCATION_INFO_2_RTT_FAC_LEGACY_STATUS_LSB 0 787 #define RX_LOCATION_INFO_2_RTT_FAC_LEGACY_STATUS_MASK 0x00000001 788 789 /* Description RX_LOCATION_INFO_2_RTT_FAC_LEGACY_EXT80_STATUS 790 791 Status of rtt_fac_legacy_ext80 792 793 794 795 <enum 0 location_fac_legacy_ext80_status_not_valid> 796 797 <enum 1 location_fac_legacy_ext80_status_valid> 798 799 <legal all> 800 */ 801 #define RX_LOCATION_INFO_2_RTT_FAC_LEGACY_EXT80_STATUS_OFFSET 0x00000008 802 #define RX_LOCATION_INFO_2_RTT_FAC_LEGACY_EXT80_STATUS_LSB 1 803 #define RX_LOCATION_INFO_2_RTT_FAC_LEGACY_EXT80_STATUS_MASK 0x00000002 804 805 /* Description RX_LOCATION_INFO_2_RTT_FAC_VHT_STATUS 806 807 Status of rtt_fac_vht 808 809 810 811 <enum 0 location_fac_vht_status_not_valid> 812 813 <enum 1 location_fac_vht_status_valid> 814 815 <legal all> 816 */ 817 #define RX_LOCATION_INFO_2_RTT_FAC_VHT_STATUS_OFFSET 0x00000008 818 #define RX_LOCATION_INFO_2_RTT_FAC_VHT_STATUS_LSB 2 819 #define RX_LOCATION_INFO_2_RTT_FAC_VHT_STATUS_MASK 0x00000004 820 821 /* Description RX_LOCATION_INFO_2_RTT_FAC_VHT_EXT80_STATUS 822 823 Status of rtt_fac_vht_ext80 824 825 826 827 <enum 0 location_fac_vht_ext80_status_not_valid> 828 829 <enum 1 location_fac_vht_ext80_status_valid> 830 831 <legal all> 832 */ 833 #define RX_LOCATION_INFO_2_RTT_FAC_VHT_EXT80_STATUS_OFFSET 0x00000008 834 #define RX_LOCATION_INFO_2_RTT_FAC_VHT_EXT80_STATUS_LSB 3 835 #define RX_LOCATION_INFO_2_RTT_FAC_VHT_EXT80_STATUS_MASK 0x00000008 836 837 /* Description RX_LOCATION_INFO_2_RTT_FAC_SIFS 838 839 To support fine SIFS adjustment, need to provide FAC 840 value @ integer number of 320 MHz clock cycles to MAC. It 841 is from L-LTF if it is a Legacy packet and from (V)HT/HE-LTF 842 if it is a (V)HT/HE packet 843 844 845 846 12 bits, signed, no fractional part 847 848 <legal all> 849 */ 850 #define RX_LOCATION_INFO_2_RTT_FAC_SIFS_OFFSET 0x00000008 851 #define RX_LOCATION_INFO_2_RTT_FAC_SIFS_LSB 4 852 #define RX_LOCATION_INFO_2_RTT_FAC_SIFS_MASK 0x0000fff0 853 854 /* Description RX_LOCATION_INFO_2_RTT_FAC_SIFS_STATUS 855 856 Status of rtt_fac_sifs 857 858 0: not valid 859 860 1: valid and from L-LTF 861 862 2: valid and from (V)HT/HE-LTF 863 864 3: reserved 865 866 <legal 0-2> 867 */ 868 #define RX_LOCATION_INFO_2_RTT_FAC_SIFS_STATUS_OFFSET 0x00000008 869 #define RX_LOCATION_INFO_2_RTT_FAC_SIFS_STATUS_LSB 16 870 #define RX_LOCATION_INFO_2_RTT_FAC_SIFS_STATUS_MASK 0x00030000 871 872 /* Description RX_LOCATION_INFO_2_RTT_CFR_STATUS 873 874 Status of channel frequency response dump 875 876 877 878 <enum 0 location_CFR_dump_not_valid> 879 880 <enum 1 location_CFR_dump_valid> 881 882 <legal all> 883 */ 884 #define RX_LOCATION_INFO_2_RTT_CFR_STATUS_OFFSET 0x00000008 885 #define RX_LOCATION_INFO_2_RTT_CFR_STATUS_LSB 18 886 #define RX_LOCATION_INFO_2_RTT_CFR_STATUS_MASK 0x00040000 887 888 /* Description RX_LOCATION_INFO_2_RTT_CIR_STATUS 889 890 Status of channel impulse response dump 891 892 893 894 <enum 0 location_CIR_dump_not_valid> 895 896 <enum 1 location_CIR_dump_valid> 897 898 <legal all> 899 */ 900 #define RX_LOCATION_INFO_2_RTT_CIR_STATUS_OFFSET 0x00000008 901 #define RX_LOCATION_INFO_2_RTT_CIR_STATUS_LSB 19 902 #define RX_LOCATION_INFO_2_RTT_CIR_STATUS_MASK 0x00080000 903 904 /* Description RX_LOCATION_INFO_2_RTT_CHANNEL_DUMP_SIZE 905 906 Channel dump size. It shows how many tones in CFR in 907 one chain, for example, it will show 52 for Legacy20 and 484 908 for VHT160 909 910 911 912 <legal all> 913 */ 914 #define RX_LOCATION_INFO_2_RTT_CHANNEL_DUMP_SIZE_OFFSET 0x00000008 915 #define RX_LOCATION_INFO_2_RTT_CHANNEL_DUMP_SIZE_LSB 20 916 #define RX_LOCATION_INFO_2_RTT_CHANNEL_DUMP_SIZE_MASK 0x7ff00000 917 918 /* Description RX_LOCATION_INFO_2_RTT_HW_IFFT_MODE 919 920 Indicator showing if HW IFFT mode or SW IFFT mode 921 922 923 924 <enum 0 location_sw_ifft_mode> 925 926 <enum 1 location_hw_ifft_mode> 927 928 <legal all> 929 */ 930 #define RX_LOCATION_INFO_2_RTT_HW_IFFT_MODE_OFFSET 0x00000008 931 #define RX_LOCATION_INFO_2_RTT_HW_IFFT_MODE_LSB 31 932 #define RX_LOCATION_INFO_2_RTT_HW_IFFT_MODE_MASK 0x80000000 933 934 /* Description RX_LOCATION_INFO_3_RTT_BTCF_STATUS 935 936 Indicate if BTCF is used to capture the timestamps 937 938 939 940 <enum 0 location_not_BTCF_based_ts> 941 942 <enum 1 location_BTCF_based_ts> 943 944 <legal all> 945 */ 946 #define RX_LOCATION_INFO_3_RTT_BTCF_STATUS_OFFSET 0x0000000c 947 #define RX_LOCATION_INFO_3_RTT_BTCF_STATUS_LSB 0 948 #define RX_LOCATION_INFO_3_RTT_BTCF_STATUS_MASK 0x00000001 949 950 /* Description RX_LOCATION_INFO_3_RTT_PREAMBLE_TYPE 951 952 Indicate preamble type 953 954 955 956 <enum 0 location_preamble_type_legacy> 957 958 <enum 1 location_preamble_type_ht> 959 960 <enum 2 location_preamble_type_vht> 961 962 <enum 3 location_preamble_type_he_su_4xltf> 963 964 <enum 4 location_preamble_type_he_su_2xltf> 965 966 <enum 5 location_preamble_type_he_su_1xltf> 967 968 <enum 6 969 location_preamble_type_he_trigger_based_ul_4xltf> 970 971 <enum 7 972 location_preamble_type_he_trigger_based_ul_2xltf> 973 974 <enum 8 975 location_preamble_type_he_trigger_based_ul_1xltf> 976 977 <enum 9 location_preamble_type_he_mu_4xltf> 978 979 <enum 10 location_preamble_type_he_mu_2xltf> 980 981 <enum 11 location_preamble_type_he_mu_1xltf> 982 983 <enum 12 984 location_preamble_type_he_extended_range_su_4xltf> 985 986 <enum 13 987 location_preamble_type_he_extended_range_su_2xltf> 988 989 <enum 14 990 location_preamble_type_he_extended_range_su_1xltf> 991 992 <legal 0-14> 993 */ 994 #define RX_LOCATION_INFO_3_RTT_PREAMBLE_TYPE_OFFSET 0x0000000c 995 #define RX_LOCATION_INFO_3_RTT_PREAMBLE_TYPE_LSB 1 996 #define RX_LOCATION_INFO_3_RTT_PREAMBLE_TYPE_MASK 0x0000003e 997 998 /* Description RX_LOCATION_INFO_3_RTT_PKT_BW_LEG 999 1000 Indicate the bandwidth of L-LTF 1001 1002 1003 1004 <enum 0 location_pkt_bw_20MHz> 1005 1006 <enum 1 location_pkt_bw_40MHz> 1007 1008 <enum 2 location_pkt_bw_80MHz> 1009 1010 <enum 3 location_pkt_bw_160MHz> 1011 1012 <legal all> 1013 */ 1014 #define RX_LOCATION_INFO_3_RTT_PKT_BW_LEG_OFFSET 0x0000000c 1015 #define RX_LOCATION_INFO_3_RTT_PKT_BW_LEG_LSB 6 1016 #define RX_LOCATION_INFO_3_RTT_PKT_BW_LEG_MASK 0x000000c0 1017 1018 /* Description RX_LOCATION_INFO_3_RTT_PKT_BW_VHT 1019 1020 Indicate the bandwidth of (V)HT/HE-LTF 1021 1022 1023 1024 <enum 0 location_pkt_bw_20MHz> 1025 1026 <enum 1 location_pkt_bw_40MHz> 1027 1028 <enum 2 location_pkt_bw_80MHz> 1029 1030 <enum 3 location_pkt_bw_160MHz> 1031 1032 <legal all> 1033 */ 1034 #define RX_LOCATION_INFO_3_RTT_PKT_BW_VHT_OFFSET 0x0000000c 1035 #define RX_LOCATION_INFO_3_RTT_PKT_BW_VHT_LSB 8 1036 #define RX_LOCATION_INFO_3_RTT_PKT_BW_VHT_MASK 0x00000300 1037 1038 /* Description RX_LOCATION_INFO_3_RTT_GI_TYPE 1039 1040 Indicate GI (guard interval) type 1041 1042 1043 1044 <enum 0 gi_0_8_us > HE related GI. Can also be used 1045 for HE 1046 1047 <enum 1 gi_0_4_us > HE related GI. Can also be used 1048 for HE 1049 1050 <enum 2 gi_1_6_us > HE related GI 1051 1052 <enum 3 gi_3_2_us > HE related GI 1053 1054 <legal 0 - 3> 1055 */ 1056 #define RX_LOCATION_INFO_3_RTT_GI_TYPE_OFFSET 0x0000000c 1057 #define RX_LOCATION_INFO_3_RTT_GI_TYPE_LSB 10 1058 #define RX_LOCATION_INFO_3_RTT_GI_TYPE_MASK 0x00000c00 1059 1060 /* Description RX_LOCATION_INFO_3_RTT_MCS_RATE 1061 1062 Bits 0~4 indicate MCS rate, if Legacy, 1063 1064 0: 48 Mbps, 1065 1066 1: 24 Mbps, 1067 1068 2: 12 Mbps, 1069 1070 3: 6 Mbps, 1071 1072 4: 54 Mbps, 1073 1074 5: 36 Mbps, 1075 1076 6: 18 Mbps, 1077 1078 7: 9 Mbps, 1079 1080 1081 1082 if HT, 0-7: MCS0-MCS7, 1083 1084 if VHT, 0-9: MCS0-MCS9, 1085 1086 1087 <legal all> 1088 */ 1089 #define RX_LOCATION_INFO_3_RTT_MCS_RATE_OFFSET 0x0000000c 1090 #define RX_LOCATION_INFO_3_RTT_MCS_RATE_LSB 12 1091 #define RX_LOCATION_INFO_3_RTT_MCS_RATE_MASK 0x0001f000 1092 1093 /* Description RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN 1094 1095 For 20/40/80, this field shows the first selected Rx 1096 chain that is used in HW IFFT mode 1097 1098 1099 1100 For 80+80, this field shows the selected pri80 Rx chain 1101 that is used in HW IFFT mode 1102 1103 1104 1105 <enum 0 location_strongest_chain_is_0> 1106 1107 <enum 1 location_strongest_chain_is_1> 1108 1109 <enum 2 location_strongest_chain_is_2> 1110 1111 <enum 3 location_strongest_chain_is_3> 1112 1113 <enum 4 location_strongest_chain_is_4> 1114 1115 <enum 5 location_strongest_chain_is_5> 1116 1117 <enum 6 location_strongest_chain_is_6> 1118 1119 <enum 7 location_strongest_chain_is_7> 1120 1121 <legal all> 1122 */ 1123 #define RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_OFFSET 0x0000000c 1124 #define RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_LSB 17 1125 #define RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_MASK 0x000e0000 1126 1127 /* Description RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_EXT80 1128 1129 For 20/40/80, this field shows the second selected Rx 1130 chain that is used in HW IFFT mode 1131 1132 1133 1134 For 80+80, this field shows the selected ext80 Rx chain 1135 that is used in HW IFFT mode 1136 1137 1138 1139 <enum 0 location_strongest_chain_is_0> 1140 1141 <enum 1 location_strongest_chain_is_1> 1142 1143 <enum 2 location_strongest_chain_is_2> 1144 1145 <enum 3 location_strongest_chain_is_3> 1146 1147 <enum 4 location_strongest_chain_is_4> 1148 1149 <enum 5 location_strongest_chain_is_5> 1150 1151 <enum 6 location_strongest_chain_is_6> 1152 1153 <enum 7 location_strongest_chain_is_7> 1154 1155 <legal all> 1156 */ 1157 #define RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_EXT80_OFFSET 0x0000000c 1158 #define RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_EXT80_LSB 20 1159 #define RX_LOCATION_INFO_3_RTT_STRONGEST_CHAIN_EXT80_MASK 0x00700000 1160 1161 /* Description RX_LOCATION_INFO_3_RTT_RX_CHAIN_MASK 1162 1163 Rx chain mask, each bit is a Rx chain 1164 1165 0: the Rx chain is not used 1166 1167 1: the Rx chain is used 1168 1169 Support up to 8 Rx chains 1170 1171 <legal all> 1172 */ 1173 #define RX_LOCATION_INFO_3_RTT_RX_CHAIN_MASK_OFFSET 0x0000000c 1174 #define RX_LOCATION_INFO_3_RTT_RX_CHAIN_MASK_LSB 23 1175 #define RX_LOCATION_INFO_3_RTT_RX_CHAIN_MASK_MASK 0x7f800000 1176 1177 /* Description RX_LOCATION_INFO_3_RESERVED_3 1178 1179 <legal 0> 1180 */ 1181 #define RX_LOCATION_INFO_3_RESERVED_3_OFFSET 0x0000000c 1182 #define RX_LOCATION_INFO_3_RESERVED_3_LSB 31 1183 #define RX_LOCATION_INFO_3_RESERVED_3_MASK 0x80000000 1184 1185 /* Description RX_LOCATION_INFO_4_RX_START_TS 1186 1187 RX packet start timestamp 1188 1189 1190 1191 It reports the time the first L-STF ADC sample arrived 1192 at RX antenna 1193 1194 1195 1196 clock unit is 480MHz 1197 1198 <legal all> 1199 */ 1200 #define RX_LOCATION_INFO_4_RX_START_TS_OFFSET 0x00000010 1201 #define RX_LOCATION_INFO_4_RX_START_TS_LSB 0 1202 #define RX_LOCATION_INFO_4_RX_START_TS_MASK 0xffffffff 1203 1204 /* Description RX_LOCATION_INFO_5_RX_END_TS 1205 1206 RX packet end timestamp 1207 1208 1209 1210 It reports the time the last symbol's last ADC sample 1211 arrived at RX antenna 1212 1213 1214 1215 clock unit is 480MHz 1216 1217 <legal all> 1218 */ 1219 #define RX_LOCATION_INFO_5_RX_END_TS_OFFSET 0x00000014 1220 #define RX_LOCATION_INFO_5_RX_END_TS_LSB 0 1221 #define RX_LOCATION_INFO_5_RX_END_TS_MASK 0xffffffff 1222 1223 /* Description RX_LOCATION_INFO_6_SFO_PHASE_PKT_START 1224 1225 The phase of the SFO of the first symbol's first FFT 1226 input sample 1227 1228 1229 1230 12 bits, signed 6.6. 6 bits integer to cover -66.7ns to 1231 66.7ns, and 6 bits fraction to provide a resolution of 1232 0.03ns 1233 1234 1235 1236 clock unit is 480MHz 1237 1238 <legal all> 1239 */ 1240 #define RX_LOCATION_INFO_6_SFO_PHASE_PKT_START_OFFSET 0x00000018 1241 #define RX_LOCATION_INFO_6_SFO_PHASE_PKT_START_LSB 0 1242 #define RX_LOCATION_INFO_6_SFO_PHASE_PKT_START_MASK 0x00000fff 1243 1244 /* Description RX_LOCATION_INFO_6_SFO_PHASE_PKT_END 1245 1246 The phase of the SFO of the last symbol's last FFT input 1247 sample 1248 1249 1250 1251 12 bits, signed 6.6. 6 bits integer to cover -66.7ns to 1252 66.7ns, and 6 bits fraction to provide a resolution of 1253 0.03ns 1254 1255 1256 1257 clock unit is 480MHz 1258 1259 <legal all> 1260 */ 1261 #define RX_LOCATION_INFO_6_SFO_PHASE_PKT_END_OFFSET 0x00000018 1262 #define RX_LOCATION_INFO_6_SFO_PHASE_PKT_END_LSB 12 1263 #define RX_LOCATION_INFO_6_SFO_PHASE_PKT_END_MASK 0x00fff000 1264 1265 /* Description RX_LOCATION_INFO_6_RTT_CHE_BUFFER_POINTER_HIGH8 1266 1267 The high 8 bits of the 40 bits pointer pointed to the 1268 external RTT channel information buffer 1269 1270 1271 1272 8 bits 1273 1274 <legal all> 1275 */ 1276 #define RX_LOCATION_INFO_6_RTT_CHE_BUFFER_POINTER_HIGH8_OFFSET 0x00000018 1277 #define RX_LOCATION_INFO_6_RTT_CHE_BUFFER_POINTER_HIGH8_LSB 24 1278 #define RX_LOCATION_INFO_6_RTT_CHE_BUFFER_POINTER_HIGH8_MASK 0xff000000 1279 1280 /* Description RX_LOCATION_INFO_7_RTT_CHE_BUFFER_POINTER_LOW32 1281 1282 The low 32 bits of the 40 bits pointer pointed to the 1283 external RTT channel information buffer 1284 1285 1286 1287 32 bits 1288 1289 <legal all> 1290 */ 1291 #define RX_LOCATION_INFO_7_RTT_CHE_BUFFER_POINTER_LOW32_OFFSET 0x0000001c 1292 #define RX_LOCATION_INFO_7_RTT_CHE_BUFFER_POINTER_LOW32_LSB 0 1293 #define RX_LOCATION_INFO_7_RTT_CHE_BUFFER_POINTER_LOW32_MASK 0xffffffff 1294 1295 /* Description RX_LOCATION_INFO_8_RTT_CFO_MEASUREMENT 1296 1297 CFO measurement. Needed for passive locationing 1298 1299 1300 1301 14 bits, signed 1.13. 13 bits fraction to provide a 1302 resolution of 153 Hz 1303 1304 1305 1306 In units of cycles/800 ns 1307 1308 <legal all> 1309 */ 1310 #define RX_LOCATION_INFO_8_RTT_CFO_MEASUREMENT_OFFSET 0x00000020 1311 #define RX_LOCATION_INFO_8_RTT_CFO_MEASUREMENT_LSB 0 1312 #define RX_LOCATION_INFO_8_RTT_CFO_MEASUREMENT_MASK 0x00003fff 1313 1314 /* Description RX_LOCATION_INFO_8_RTT_CHAN_SPREAD 1315 1316 Channel delay spread measurement. Needed for selecting 1317 GI length 1318 1319 1320 1321 8 bits, unsigned. At 25 ns step. Can represent up to 1322 6375 ns 1323 1324 1325 1326 In units of cycles @ 40 MHz 1327 1328 <legal all> 1329 */ 1330 #define RX_LOCATION_INFO_8_RTT_CHAN_SPREAD_OFFSET 0x00000020 1331 #define RX_LOCATION_INFO_8_RTT_CHAN_SPREAD_LSB 14 1332 #define RX_LOCATION_INFO_8_RTT_CHAN_SPREAD_MASK 0x003fc000 1333 1334 /* Description RX_LOCATION_INFO_8_RTT_TIMING_BACKOFF_SEL 1335 1336 Indicate which timing backoff value is used 1337 1338 1339 1340 <enum 0 timing_backoff_low_rssi> 1341 1342 <enum 1 timing_backoff_mid_rssi> 1343 1344 <enum 2 timing_backoff_high_rssi> 1345 1346 <enum 3 reserved> 1347 1348 <legal all> 1349 */ 1350 #define RX_LOCATION_INFO_8_RTT_TIMING_BACKOFF_SEL_OFFSET 0x00000020 1351 #define RX_LOCATION_INFO_8_RTT_TIMING_BACKOFF_SEL_LSB 22 1352 #define RX_LOCATION_INFO_8_RTT_TIMING_BACKOFF_SEL_MASK 0x00c00000 1353 1354 /* Description RX_LOCATION_INFO_8_RESERVED_8 1355 1356 <legal 0> 1357 */ 1358 #define RX_LOCATION_INFO_8_RESERVED_8_OFFSET 0x00000020 1359 #define RX_LOCATION_INFO_8_RESERVED_8_LSB 24 1360 #define RX_LOCATION_INFO_8_RESERVED_8_MASK 0x7f000000 1361 1362 /* Description RX_LOCATION_INFO_8_RX_LOCATION_INFO_VALID 1363 1364 <enum 0 rx_location_info_is_not_valid> 1365 1366 <enum 1 rx_location_info_is_valid> 1367 1368 <legal all> 1369 */ 1370 #define RX_LOCATION_INFO_8_RX_LOCATION_INFO_VALID_OFFSET 0x00000020 1371 #define RX_LOCATION_INFO_8_RX_LOCATION_INFO_VALID_LSB 31 1372 #define RX_LOCATION_INFO_8_RX_LOCATION_INFO_VALID_MASK 0x80000000 1373 1374 1375 #endif // _RX_LOCATION_INFO_H_ 1376