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