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