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