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