xref: /wlan-driver/qca-wifi-host-cmn/hif/src/qcn6122def.c (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2020-2021, 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 
18 #include "qdf_module.h"
19 
20 #if defined(QCN6122_HEADERS_DEF)
21 
22 #undef UMAC
23 #define WLAN_HEADERS 1
24 
25 #include "wcss_version.h"
26 #include "wcss_seq_hwiobase.h"
27 #include "wfss_ce_reg_seq_hwioreg.h"
28 
29 #define MISSING 0
30 
31 #define SOC_RESET_CONTROL_OFFSET MISSING
32 #define GPIO_PIN0_OFFSET                        MISSING
33 #define GPIO_PIN1_OFFSET                        MISSING
34 #define GPIO_PIN0_CONFIG_MASK                   MISSING
35 #define GPIO_PIN1_CONFIG_MASK                   MISSING
36 #define LOCAL_SCRATCH_OFFSET 0x18
37 #define GPIO_PIN10_OFFSET MISSING
38 #define GPIO_PIN11_OFFSET MISSING
39 #define GPIO_PIN12_OFFSET MISSING
40 #define GPIO_PIN13_OFFSET MISSING
41 #define MBOX_BASE_ADDRESS MISSING
42 #define INT_STATUS_ENABLE_ERROR_LSB MISSING
43 #define INT_STATUS_ENABLE_ERROR_MASK MISSING
44 #define INT_STATUS_ENABLE_CPU_LSB MISSING
45 #define INT_STATUS_ENABLE_CPU_MASK MISSING
46 #define INT_STATUS_ENABLE_COUNTER_LSB MISSING
47 #define INT_STATUS_ENABLE_COUNTER_MASK MISSING
48 #define INT_STATUS_ENABLE_MBOX_DATA_LSB MISSING
49 #define INT_STATUS_ENABLE_MBOX_DATA_MASK MISSING
50 #define ERROR_STATUS_ENABLE_RX_UNDERFLOW_LSB MISSING
51 #define ERROR_STATUS_ENABLE_RX_UNDERFLOW_MASK MISSING
52 #define ERROR_STATUS_ENABLE_TX_OVERFLOW_LSB MISSING
53 #define ERROR_STATUS_ENABLE_TX_OVERFLOW_MASK MISSING
54 #define COUNTER_INT_STATUS_ENABLE_BIT_LSB MISSING
55 #define COUNTER_INT_STATUS_ENABLE_BIT_MASK MISSING
56 #define INT_STATUS_ENABLE_ADDRESS MISSING
57 #define CPU_INT_STATUS_ENABLE_BIT_LSB MISSING
58 #define CPU_INT_STATUS_ENABLE_BIT_MASK MISSING
59 #define HOST_INT_STATUS_ADDRESS MISSING
60 #define CPU_INT_STATUS_ADDRESS MISSING
61 #define ERROR_INT_STATUS_ADDRESS MISSING
62 #define ERROR_INT_STATUS_WAKEUP_MASK MISSING
63 #define ERROR_INT_STATUS_WAKEUP_LSB MISSING
64 #define ERROR_INT_STATUS_RX_UNDERFLOW_MASK MISSING
65 #define ERROR_INT_STATUS_RX_UNDERFLOW_LSB MISSING
66 #define ERROR_INT_STATUS_TX_OVERFLOW_MASK MISSING
67 #define ERROR_INT_STATUS_TX_OVERFLOW_LSB MISSING
68 #define COUNT_DEC_ADDRESS MISSING
69 #define HOST_INT_STATUS_CPU_MASK MISSING
70 #define HOST_INT_STATUS_CPU_LSB MISSING
71 #define HOST_INT_STATUS_ERROR_MASK MISSING
72 #define HOST_INT_STATUS_ERROR_LSB MISSING
73 #define HOST_INT_STATUS_COUNTER_MASK MISSING
74 #define HOST_INT_STATUS_COUNTER_LSB MISSING
75 #define RX_LOOKAHEAD_VALID_ADDRESS MISSING
76 #define WINDOW_DATA_ADDRESS MISSING
77 #define WINDOW_READ_ADDR_ADDRESS MISSING
78 #define WINDOW_WRITE_ADDR_ADDRESS MISSING
79 /* GPIO Register */
80 #define GPIO_ENABLE_W1TS_LOW_ADDRESS            MISSING
81 #define GPIO_PIN0_CONFIG_LSB                    MISSING
82 #define GPIO_PIN0_PAD_PULL_LSB                  MISSING
83 #define GPIO_PIN0_PAD_PULL_MASK                 MISSING
84 /* SI reg */
85 #define SI_CONFIG_ERR_INT_MASK                  MISSING
86 #define SI_CONFIG_ERR_INT_LSB                   MISSING
87 
88 #define RTC_SOC_BASE_ADDRESS MISSING
89 #define RTC_WMAC_BASE_ADDRESS MISSING
90 #define SOC_CORE_BASE_ADDRESS MISSING
91 #define WLAN_MAC_BASE_ADDRESS MISSING
92 #define GPIO_BASE_ADDRESS MISSING
93 #define ANALOG_INTF_BASE_ADDRESS MISSING
94 #define CE0_BASE_ADDRESS MISSING
95 #define CE1_BASE_ADDRESS MISSING
96 #define CE_COUNT 12
97 #define CE_WRAPPER_BASE_ADDRESS MISSING
98 #define SI_BASE_ADDRESS MISSING
99 #define DRAM_BASE_ADDRESS MISSING
100 
101 #define WLAN_SYSTEM_SLEEP_DISABLE_LSB MISSING
102 #define WLAN_SYSTEM_SLEEP_DISABLE_MASK MISSING
103 #define CLOCK_CONTROL_OFFSET MISSING
104 #define CLOCK_CONTROL_SI0_CLK_MASK MISSING
105 #define RESET_CONTROL_SI0_RST_MASK MISSING
106 #define WLAN_RESET_CONTROL_OFFSET MISSING
107 #define WLAN_RESET_CONTROL_COLD_RST_MASK MISSING
108 #define WLAN_RESET_CONTROL_WARM_RST_MASK MISSING
109 #define CPU_CLOCK_OFFSET MISSING
110 
111 #define CPU_CLOCK_STANDARD_LSB MISSING
112 #define CPU_CLOCK_STANDARD_MASK MISSING
113 #define LPO_CAL_ENABLE_LSB MISSING
114 #define LPO_CAL_ENABLE_MASK MISSING
115 #define WLAN_SYSTEM_SLEEP_OFFSET MISSING
116 
117 #define SOC_CHIP_ID_ADDRESS	  MISSING
118 #define SOC_CHIP_ID_REVISION_MASK MISSING
119 #define SOC_CHIP_ID_REVISION_LSB  MISSING
120 #define SOC_CHIP_ID_REVISION_MSB  MISSING
121 
122 #define FW_IND_EVENT_PENDING MISSING
123 #define FW_IND_INITIALIZED MISSING
124 
125 #define MSDU_LINK_EXT_3_TCP_OVER_IPV4_CHECKSUM_EN_MASK MISSING
126 #define MSDU_LINK_EXT_3_TCP_OVER_IPV6_CHECKSUM_EN_MASK MISSING
127 #define MSDU_LINK_EXT_3_UDP_OVER_IPV4_CHECKSUM_EN_MASK MISSING
128 #define MSDU_LINK_EXT_3_UDP_OVER_IPV6_CHECKSUM_EN_MASK MISSING
129 #define MSDU_LINK_EXT_3_TCP_OVER_IPV4_CHECKSUM_EN_LSB  MISSING
130 #define MSDU_LINK_EXT_3_TCP_OVER_IPV6_CHECKSUM_EN_LSB  MISSING
131 #define MSDU_LINK_EXT_3_UDP_OVER_IPV4_CHECKSUM_EN_LSB  MISSING
132 #define MSDU_LINK_EXT_3_UDP_OVER_IPV6_CHECKSUM_EN_LSB  MISSING
133 
134 #define SR_WR_INDEX_ADDRESS MISSING
135 #define DST_WATERMARK_ADDRESS MISSING
136 
137 #define DST_WR_INDEX_ADDRESS MISSING
138 #define SRC_WATERMARK_ADDRESS MISSING
139 #define SRC_WATERMARK_LOW_MASK MISSING
140 #define SRC_WATERMARK_HIGH_MASK MISSING
141 #define DST_WATERMARK_LOW_MASK MISSING
142 #define DST_WATERMARK_HIGH_MASK MISSING
143 #define CURRENT_SRRI_ADDRESS MISSING
144 #define CURRENT_DRRI_ADDRESS MISSING
145 #define HOST_IS_SRC_RING_HIGH_WATERMARK_MASK MISSING
146 #define HOST_IS_SRC_RING_LOW_WATERMARK_MASK MISSING
147 #define HOST_IS_DST_RING_HIGH_WATERMARK_MASK MISSING
148 #define HOST_IS_DST_RING_LOW_WATERMARK_MASK MISSING
149 #define HOST_IS_ADDRESS MISSING
150 #define MISC_IS_ADDRESS MISSING
151 #define HOST_IS_COPY_COMPLETE_MASK MISSING
152 #define CE_WRAPPER_BASE_ADDRESS MISSING
153 #define CE_WRAPPER_INTERRUPT_SUMMARY_ADDRESS MISSING
154 #define CE_DDR_ADDRESS_FOR_RRI_LOW MISSING
155 #define CE_DDR_ADDRESS_FOR_RRI_HIGH MISSING
156 #undef WFSS_CE_COMMON_REG_REG_BASE
157 #define WFSS_CE_COMMON_REG_REG_BASE 0x1B80000
158 
159 #define HOST_IE_ADDRESS \
160 	HWIO_WFSS_CE_COMMON_R0_CE_HOST_IE_0_ADDR(\
161 		WFSS_CE_COMMON_REG_REG_BASE)
162 #define HOST_IE_REG1_CE_LSB HWIO_WFSS_CE_COMMON_R0_CE_HOST_IE_0_SRC_RING_IE_SHFT
163 #define HOST_IE_ADDRESS_2 \
164 	HWIO_WFSS_CE_COMMON_R0_CE_HOST_IE_1_ADDR(\
165 		WFSS_CE_COMMON_REG_REG_BASE)
166 #define HOST_IE_REG2_CE_LSB HWIO_WFSS_CE_COMMON_R0_CE_HOST_IE_1_STS_RING_IE_SHFT
167 #define HOST_IE_ADDRESS_3 \
168 	HWIO_WFSS_CE_COMMON_R0_CE_HOST_IE_0_ADDR(\
169 		WFSS_CE_COMMON_REG_REG_BASE)
170 #define HOST_IE_REG3_CE_LSB HWIO_WFSS_CE_COMMON_R0_CE_HOST_IE_0_DST_RING_IE_SHFT
171 
172 #define HOST_CE_ADDRESS SOC_WFSS_CE_REG_BASE
173 
174 #define HOST_IE_COPY_COMPLETE_MASK MISSING
175 #define SR_BA_ADDRESS MISSING
176 #define SR_BA_ADDRESS_HIGH MISSING
177 #define SR_SIZE_ADDRESS MISSING
178 #define CE_CTRL1_ADDRESS MISSING
179 #define CE_CTRL1_DMAX_LENGTH_MASK MISSING
180 #define DR_BA_ADDRESS MISSING
181 #define DR_BA_ADDRESS_HIGH MISSING
182 #define DR_SIZE_ADDRESS MISSING
183 #define CE_CMD_REGISTER MISSING
184 #define CE_MSI_ADDRESS MISSING
185 #define CE_MSI_ADDRESS_HIGH MISSING
186 #define CE_MSI_DATA MISSING
187 #define CE_MSI_ENABLE_BIT MISSING
188 #define MISC_IE_ADDRESS MISSING
189 #define MISC_IS_AXI_ERR_MASK MISSING
190 #define MISC_IS_DST_ADDR_ERR_MASK MISSING
191 #define MISC_IS_SRC_LEN_ERR_MASK MISSING
192 #define MISC_IS_DST_MAX_LEN_VIO_MASK MISSING
193 #define MISC_IS_DST_RING_OVERFLOW_MASK MISSING
194 #define MISC_IS_SRC_RING_OVERFLOW_MASK MISSING
195 #define SRC_WATERMARK_LOW_LSB MISSING
196 #define SRC_WATERMARK_HIGH_LSB MISSING
197 #define DST_WATERMARK_LOW_LSB MISSING
198 #define DST_WATERMARK_HIGH_LSB MISSING
199 #define CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_MASK MISSING
200 #define CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_LSB MISSING
201 #define CE_CTRL1_DMAX_LENGTH_LSB MISSING
202 #define CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MASK MISSING
203 #define CE_CTRL1_DST_RING_BYTE_SWAP_EN_MASK MISSING
204 #define CE_CTRL1_SRC_RING_BYTE_SWAP_EN_LSB MISSING
205 #define CE_CTRL1_DST_RING_BYTE_SWAP_EN_LSB MISSING
206 #define CE_CTRL1_IDX_UPD_EN_MASK MISSING
207 #define CE_WRAPPER_DEBUG_OFFSET MISSING
208 #define CE_WRAPPER_DEBUG_SEL_MSB MISSING
209 #define CE_WRAPPER_DEBUG_SEL_LSB MISSING
210 #define CE_WRAPPER_DEBUG_SEL_MASK MISSING
211 #define CE_DEBUG_OFFSET MISSING
212 #define CE_DEBUG_SEL_MSB MISSING
213 #define CE_DEBUG_SEL_LSB MISSING
214 #define CE_DEBUG_SEL_MASK MISSING
215 #define CE0_BASE_ADDRESS MISSING
216 #define CE1_BASE_ADDRESS MISSING
217 #define A_WIFI_APB_3_A_WCMN_APPS_CE_INTR_ENABLES MISSING
218 #define A_WIFI_APB_3_A_WCMN_APPS_CE_INTR_STATUS MISSING
219 
220 #define QCN6122_BOARD_DATA_SZ MISSING
221 #define QCN6122_BOARD_EXT_DATA_SZ MISSING
222 
223 #define MY_TARGET_DEF QCN6122_TARGETDEF
224 #define MY_HOST_DEF QCN6122_HOSTDEF
225 #define MY_CEREG_DEF QCN6122_CE_TARGETDEF
226 #define MY_TARGET_BOARD_DATA_SZ QCN6122_BOARD_DATA_SZ
227 #define MY_TARGET_BOARD_EXT_DATA_SZ QCN6122_BOARD_EXT_DATA_SZ
228 #include "targetdef.h"
229 #include "hostdef.h"
230 qdf_export_symbol(QCN6122_CE_TARGETDEF);
231 #else
232 #include "common_drv.h"
233 #include "targetdef.h"
234 #include "hostdef.h"
235 struct targetdef_s *QCN6122_TARGETDEF;
236 struct hostdef_s *QCN6122_HOSTDEF;
237 #endif /*QCN6122_HEADERS_DEF */
238 qdf_export_symbol(QCN6122_TARGETDEF);
239 qdf_export_symbol(QCN6122_HOSTDEF);
240