xref: /wlan-driver/fw-api/hw/peach/v2/coex_tx_req.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. 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 
18 #ifndef _COEX_TX_REQ_H_
19 #define _COEX_TX_REQ_H_
20 
21 #define NUM_OF_DWORDS_COEX_TX_REQ 4
22 
23 struct coex_tx_req {
24 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
25              uint32_t tx_pwr                                                  :  8,
26                       min_tx_pwr                                              :  8,
27                       nss                                                     :  3,
28                       tx_chain_mask                                           :  8,
29                       bw                                                      :  3,
30                       reserved_0                                              :  2;
31              uint32_t alt_tx_pwr                                              :  8,
32                       alt_min_tx_pwr                                          :  8,
33                       alt_nss                                                 :  3,
34                       alt_tx_chain_mask                                       :  8,
35                       alt_bw                                                  :  3,
36                       reserved_1                                              :  2;
37              uint32_t tx_pwr_1                                                :  8,
38                       alt_tx_pwr_1                                            :  8,
39                       wlan_request_duration                                   : 16;
40              uint32_t wlan_pkt_type                                           :  4,
41                       coex_tx_reason                                          :  2,
42                       response_frame_type                                     :  5,
43                       wlan_low_priority_slicing_allowed                       :  1,
44                       wlan_high_priority_slicing_allowed                      :  1,
45                       sch_tx_burst_ongoing                                    :  1,
46                       coex_tx_priority                                        :  4,
47                       reserved_3a                                             : 14;
48 #else
49              uint32_t reserved_0                                              :  2,
50                       bw                                                      :  3,
51                       tx_chain_mask                                           :  8,
52                       nss                                                     :  3,
53                       min_tx_pwr                                              :  8,
54                       tx_pwr                                                  :  8;
55              uint32_t reserved_1                                              :  2,
56                       alt_bw                                                  :  3,
57                       alt_tx_chain_mask                                       :  8,
58                       alt_nss                                                 :  3,
59                       alt_min_tx_pwr                                          :  8,
60                       alt_tx_pwr                                              :  8;
61              uint32_t wlan_request_duration                                   : 16,
62                       alt_tx_pwr_1                                            :  8,
63                       tx_pwr_1                                                :  8;
64              uint32_t reserved_3a                                             : 14,
65                       coex_tx_priority                                        :  4,
66                       sch_tx_burst_ongoing                                    :  1,
67                       wlan_high_priority_slicing_allowed                      :  1,
68                       wlan_low_priority_slicing_allowed                       :  1,
69                       response_frame_type                                     :  5,
70                       coex_tx_reason                                          :  2,
71                       wlan_pkt_type                                           :  4;
72 #endif
73 };
74 
75 #define COEX_TX_REQ_TX_PWR_OFFSET                                                   0x00000000
76 #define COEX_TX_REQ_TX_PWR_LSB                                                      0
77 #define COEX_TX_REQ_TX_PWR_MSB                                                      7
78 #define COEX_TX_REQ_TX_PWR_MASK                                                     0x000000ff
79 
80 #define COEX_TX_REQ_MIN_TX_PWR_OFFSET                                               0x00000000
81 #define COEX_TX_REQ_MIN_TX_PWR_LSB                                                  8
82 #define COEX_TX_REQ_MIN_TX_PWR_MSB                                                  15
83 #define COEX_TX_REQ_MIN_TX_PWR_MASK                                                 0x0000ff00
84 
85 #define COEX_TX_REQ_NSS_OFFSET                                                      0x00000000
86 #define COEX_TX_REQ_NSS_LSB                                                         16
87 #define COEX_TX_REQ_NSS_MSB                                                         18
88 #define COEX_TX_REQ_NSS_MASK                                                        0x00070000
89 
90 #define COEX_TX_REQ_TX_CHAIN_MASK_OFFSET                                            0x00000000
91 #define COEX_TX_REQ_TX_CHAIN_MASK_LSB                                               19
92 #define COEX_TX_REQ_TX_CHAIN_MASK_MSB                                               26
93 #define COEX_TX_REQ_TX_CHAIN_MASK_MASK                                              0x07f80000
94 
95 #define COEX_TX_REQ_BW_OFFSET                                                       0x00000000
96 #define COEX_TX_REQ_BW_LSB                                                          27
97 #define COEX_TX_REQ_BW_MSB                                                          29
98 #define COEX_TX_REQ_BW_MASK                                                         0x38000000
99 
100 #define COEX_TX_REQ_RESERVED_0_OFFSET                                               0x00000000
101 #define COEX_TX_REQ_RESERVED_0_LSB                                                  30
102 #define COEX_TX_REQ_RESERVED_0_MSB                                                  31
103 #define COEX_TX_REQ_RESERVED_0_MASK                                                 0xc0000000
104 
105 #define COEX_TX_REQ_ALT_TX_PWR_OFFSET                                               0x00000004
106 #define COEX_TX_REQ_ALT_TX_PWR_LSB                                                  0
107 #define COEX_TX_REQ_ALT_TX_PWR_MSB                                                  7
108 #define COEX_TX_REQ_ALT_TX_PWR_MASK                                                 0x000000ff
109 
110 #define COEX_TX_REQ_ALT_MIN_TX_PWR_OFFSET                                           0x00000004
111 #define COEX_TX_REQ_ALT_MIN_TX_PWR_LSB                                              8
112 #define COEX_TX_REQ_ALT_MIN_TX_PWR_MSB                                              15
113 #define COEX_TX_REQ_ALT_MIN_TX_PWR_MASK                                             0x0000ff00
114 
115 #define COEX_TX_REQ_ALT_NSS_OFFSET                                                  0x00000004
116 #define COEX_TX_REQ_ALT_NSS_LSB                                                     16
117 #define COEX_TX_REQ_ALT_NSS_MSB                                                     18
118 #define COEX_TX_REQ_ALT_NSS_MASK                                                    0x00070000
119 
120 #define COEX_TX_REQ_ALT_TX_CHAIN_MASK_OFFSET                                        0x00000004
121 #define COEX_TX_REQ_ALT_TX_CHAIN_MASK_LSB                                           19
122 #define COEX_TX_REQ_ALT_TX_CHAIN_MASK_MSB                                           26
123 #define COEX_TX_REQ_ALT_TX_CHAIN_MASK_MASK                                          0x07f80000
124 
125 #define COEX_TX_REQ_ALT_BW_OFFSET                                                   0x00000004
126 #define COEX_TX_REQ_ALT_BW_LSB                                                      27
127 #define COEX_TX_REQ_ALT_BW_MSB                                                      29
128 #define COEX_TX_REQ_ALT_BW_MASK                                                     0x38000000
129 
130 #define COEX_TX_REQ_RESERVED_1_OFFSET                                               0x00000004
131 #define COEX_TX_REQ_RESERVED_1_LSB                                                  30
132 #define COEX_TX_REQ_RESERVED_1_MSB                                                  31
133 #define COEX_TX_REQ_RESERVED_1_MASK                                                 0xc0000000
134 
135 #define COEX_TX_REQ_TX_PWR_1_OFFSET                                                 0x00000008
136 #define COEX_TX_REQ_TX_PWR_1_LSB                                                    0
137 #define COEX_TX_REQ_TX_PWR_1_MSB                                                    7
138 #define COEX_TX_REQ_TX_PWR_1_MASK                                                   0x000000ff
139 
140 #define COEX_TX_REQ_ALT_TX_PWR_1_OFFSET                                             0x00000008
141 #define COEX_TX_REQ_ALT_TX_PWR_1_LSB                                                8
142 #define COEX_TX_REQ_ALT_TX_PWR_1_MSB                                                15
143 #define COEX_TX_REQ_ALT_TX_PWR_1_MASK                                               0x0000ff00
144 
145 #define COEX_TX_REQ_WLAN_REQUEST_DURATION_OFFSET                                    0x00000008
146 #define COEX_TX_REQ_WLAN_REQUEST_DURATION_LSB                                       16
147 #define COEX_TX_REQ_WLAN_REQUEST_DURATION_MSB                                       31
148 #define COEX_TX_REQ_WLAN_REQUEST_DURATION_MASK                                      0xffff0000
149 
150 #define COEX_TX_REQ_WLAN_PKT_TYPE_OFFSET                                            0x0000000c
151 #define COEX_TX_REQ_WLAN_PKT_TYPE_LSB                                               0
152 #define COEX_TX_REQ_WLAN_PKT_TYPE_MSB                                               3
153 #define COEX_TX_REQ_WLAN_PKT_TYPE_MASK                                              0x0000000f
154 
155 #define COEX_TX_REQ_COEX_TX_REASON_OFFSET                                           0x0000000c
156 #define COEX_TX_REQ_COEX_TX_REASON_LSB                                              4
157 #define COEX_TX_REQ_COEX_TX_REASON_MSB                                              5
158 #define COEX_TX_REQ_COEX_TX_REASON_MASK                                             0x00000030
159 
160 #define COEX_TX_REQ_RESPONSE_FRAME_TYPE_OFFSET                                      0x0000000c
161 #define COEX_TX_REQ_RESPONSE_FRAME_TYPE_LSB                                         6
162 #define COEX_TX_REQ_RESPONSE_FRAME_TYPE_MSB                                         10
163 #define COEX_TX_REQ_RESPONSE_FRAME_TYPE_MASK                                        0x000007c0
164 
165 #define COEX_TX_REQ_WLAN_LOW_PRIORITY_SLICING_ALLOWED_OFFSET                        0x0000000c
166 #define COEX_TX_REQ_WLAN_LOW_PRIORITY_SLICING_ALLOWED_LSB                           11
167 #define COEX_TX_REQ_WLAN_LOW_PRIORITY_SLICING_ALLOWED_MSB                           11
168 #define COEX_TX_REQ_WLAN_LOW_PRIORITY_SLICING_ALLOWED_MASK                          0x00000800
169 
170 #define COEX_TX_REQ_WLAN_HIGH_PRIORITY_SLICING_ALLOWED_OFFSET                       0x0000000c
171 #define COEX_TX_REQ_WLAN_HIGH_PRIORITY_SLICING_ALLOWED_LSB                          12
172 #define COEX_TX_REQ_WLAN_HIGH_PRIORITY_SLICING_ALLOWED_MSB                          12
173 #define COEX_TX_REQ_WLAN_HIGH_PRIORITY_SLICING_ALLOWED_MASK                         0x00001000
174 
175 #define COEX_TX_REQ_SCH_TX_BURST_ONGOING_OFFSET                                     0x0000000c
176 #define COEX_TX_REQ_SCH_TX_BURST_ONGOING_LSB                                        13
177 #define COEX_TX_REQ_SCH_TX_BURST_ONGOING_MSB                                        13
178 #define COEX_TX_REQ_SCH_TX_BURST_ONGOING_MASK                                       0x00002000
179 
180 #define COEX_TX_REQ_COEX_TX_PRIORITY_OFFSET                                         0x0000000c
181 #define COEX_TX_REQ_COEX_TX_PRIORITY_LSB                                            14
182 #define COEX_TX_REQ_COEX_TX_PRIORITY_MSB                                            17
183 #define COEX_TX_REQ_COEX_TX_PRIORITY_MASK                                           0x0003c000
184 
185 #define COEX_TX_REQ_RESERVED_3A_OFFSET                                              0x0000000c
186 #define COEX_TX_REQ_RESERVED_3A_LSB                                                 18
187 #define COEX_TX_REQ_RESERVED_3A_MSB                                                 31
188 #define COEX_TX_REQ_RESERVED_3A_MASK                                                0xfffc0000
189 
190 #endif
191