1
2
3
4
5
6
7 #ifndef __TARGADDRS_H__
8 #define __TARGADDRS_H__
9
10 #include "hw.h"
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 #define QCA988X_HOST_INTEREST_ADDRESS 0x00400800
26 #define HOST_INTEREST_MAX_SIZE 0x200
27
28
29
30
31
32
33
34 struct host_interest {
35
36
37
38
39 u32 hi_app_host_interest;
40
41
42 u32 hi_failure_state;
43
44
45 u32 hi_dbglog_hdr;
46
47 u32 hi_unused0c;
48
49
50
51
52
53 u32 hi_option_flag;
54
55
56
57
58
59 u32 hi_serial_enable;
60
61
62 u32 hi_dset_list_head;
63
64
65 u32 hi_app_start;
66
67
68 u32 hi_skip_clock_init;
69 u32 hi_core_clock_setting;
70 u32 hi_cpu_clock_setting;
71 u32 hi_system_sleep_setting;
72 u32 hi_xtal_control_setting;
73 u32 hi_pll_ctrl_setting_24ghz;
74 u32 hi_pll_ctrl_setting_5ghz;
75 u32 hi_ref_voltage_trim_setting;
76 u32 hi_clock_info;
77
78
79 u32 hi_be;
80
81 u32 hi_stack;
82 u32 hi_err_stack;
83 u32 hi_desired_cpu_speed_hz;
84
85
86 u32 hi_board_data;
87
88
89
90
91
92
93
94 u32 hi_board_data_initialized;
95
96 u32 hi_dset_ram_index_table;
97
98 u32 hi_desired_baud_rate;
99 u32 hi_dbglog_config;
100 u32 hi_end_ram_reserve_sz;
101 u32 hi_mbox_io_block_sz;
102
103 u32 hi_num_bpatch_streams;
104 u32 hi_mbox_isr_yield_limit;
105
106 u32 hi_refclk_hz;
107 u32 hi_ext_clk_detected;
108 u32 hi_dbg_uart_txpin;
109 u32 hi_dbg_uart_rxpin;
110 u32 hi_hci_uart_baud;
111 u32 hi_hci_uart_pin_assignments;
112
113 u32 hi_hci_uart_baud_scale_val;
114 u32 hi_hci_uart_baud_step_val;
115
116 u32 hi_allocram_start;
117 u32 hi_allocram_sz;
118 u32 hi_hci_bridge_flags;
119 u32 hi_hci_uart_support_pins;
120
121 u32 hi_hci_uart_pwr_mgmt_params;
122
123
124
125
126
127
128 u32 hi_board_ext_data;
129 u32 hi_board_ext_data_config;
130
131
132
133
134
135
136
137
138
139 u32 hi_reset_flag;
140
141 u32 hi_reset_flag_valid;
142 u32 hi_hci_uart_pwr_mgmt_params_ext;
143
144
145 u32 hi_acs_flags;
146 u32 hi_console_flags;
147 u32 hi_nvram_state;
148 u32 hi_option_flag2;
149
150
151 u32 hi_sw_version_override;
152 u32 hi_abi_version_override;
153
154
155
156
157
158 u32 hi_hp_rx_traffic_ratio;
159
160
161 u32 hi_test_apps_related;
162
163 u32 hi_ota_testscript;
164
165 u32 hi_cal_data;
166
167
168 u32 hi_pktlog_num_buffers;
169
170
171 u32 hi_wow_ext_config;
172 u32 hi_pwr_save_flags;
173
174
175 u32 hi_smps_options;
176
177
178 u32 hi_interconnect_state;
179
180
181 u32 hi_coex_config;
182
183
184 u32 hi_early_alloc;
185
186
187
188
189
190
191
192
193
194
195
196 u32 hi_fw_swap;
197
198
199 u32 hi_dynamic_mem_arenas_addr;
200
201
202 u32 hi_dynamic_mem_allocated;
203
204
205 u32 hi_dynamic_mem_remaining;
206
207
208 u32 hi_dynamic_mem_track_max;
209
210
211 u32 hi_minidump;
212
213
214 u32 hi_bd_sig_key;
215 } __packed;
216
217 #define HI_ITEM(item) offsetof(struct host_interest, item)
218
219
220
221
222 #define HI_OPTION_TIMER_WAR 0x01
223
224 #define HI_OPTION_BMI_CRED_LIMIT 0x02
225
226 #define HI_OPTION_RELAY_DOT11_HDR 0x04
227
228 #define HI_OPTION_MAC_ADDR_METHOD 0x08
229
230 #define HI_OPTION_FW_BRIDGE 0x10
231
232 #define HI_OPTION_ENABLE_PROFILE 0x20
233
234 #define HI_OPTION_DISABLE_DBGLOG 0x40
235
236 #define HI_OPTION_SKIP_ERA_TRACKING 0x80
237
238 #define HI_OPTION_PAPRD_DISABLE 0x100
239 #define HI_OPTION_NUM_DEV_LSB 0x200
240 #define HI_OPTION_NUM_DEV_MSB 0x800
241 #define HI_OPTION_DEV_MODE_LSB 0x1000
242 #define HI_OPTION_DEV_MODE_MSB 0x8000000
243
244 #define HI_OPTION_NO_LFT_STBL 0x10000000
245
246 #define HI_OPTION_SKIP_REG_SCAN 0x20000000
247
248
249
250
251 #define HI_OPTION_INIT_REG_SCAN 0x40000000
252
253
254 #define HI_OPTION_SKIP_MEMMAP 0x80000000
255
256 #define HI_OPTION_MAC_ADDR_METHOD_SHIFT 3
257
258
259 #define HI_OPTION_FW_MODE_IBSS 0x0
260 #define HI_OPTION_FW_MODE_BSS_STA 0x1
261 #define HI_OPTION_FW_MODE_AP 0x2
262 #define HI_OPTION_FW_MODE_BT30AMP 0x3
263
264
265 #define HI_OPTION_FW_SUBMODE_NONE 0x0
266 #define HI_OPTION_FW_SUBMODE_P2PDEV 0x1
267 #define HI_OPTION_FW_SUBMODE_P2PCLIENT 0x2
268 #define HI_OPTION_FW_SUBMODE_P2PGO 0x3
269
270
271 #define HI_OPTION_NUM_DEV_MASK 0x7
272 #define HI_OPTION_NUM_DEV_SHIFT 0x9
273
274
275 #define HI_OPTION_FW_BRIDGE_SHIFT 0x04
276
277
278
279
280
281
282
283
284
285 #define HI_OPTION_FW_MODE_BITS 0x2
286 #define HI_OPTION_FW_MODE_MASK 0x3
287 #define HI_OPTION_FW_MODE_SHIFT 0xC
288 #define HI_OPTION_ALL_FW_MODE_MASK 0xFF
289
290 #define HI_OPTION_FW_SUBMODE_BITS 0x2
291 #define HI_OPTION_FW_SUBMODE_MASK 0x3
292 #define HI_OPTION_FW_SUBMODE_SHIFT 0x14
293 #define HI_OPTION_ALL_FW_SUBMODE_MASK 0xFF00
294 #define HI_OPTION_ALL_FW_SUBMODE_SHIFT 0x8
295
296
297 #define HI_OPTION_OFFLOAD_AMSDU 0x01
298 #define HI_OPTION_DFS_SUPPORT 0x02
299 #define HI_OPTION_ENABLE_RFKILL 0x04
300 #define HI_OPTION_RADIO_RETENTION_DISABLE 0x08
301 #define HI_OPTION_EARLY_CFG_DONE 0x10
302
303 #define HI_OPTION_RF_KILL_SHIFT 0x2
304 #define HI_OPTION_RF_KILL_MASK 0x1
305
306
307
308 #define HI_RESET_FLAG_PRESERVE_APP_START 0x01
309
310 #define HI_RESET_FLAG_PRESERVE_HOST_INTEREST 0x02
311
312 #define HI_RESET_FLAG_PRESERVE_ROMDATA 0x04
313 #define HI_RESET_FLAG_PRESERVE_NVRAM_STATE 0x08
314 #define HI_RESET_FLAG_PRESERVE_BOOT_INFO 0x10
315 #define HI_RESET_FLAG_WARM_RESET 0x20
316
317
318 #define HI_DESC_IN_FW_BIT 0x01
319
320
321 #define HI_RESET_FLAG_IS_VALID 0x12345678
322
323
324 #define HI_ACS_FLAGS_ENABLED (1 << 0)
325
326 #define HI_ACS_FLAGS_USE_WWAN (1 << 1)
327
328 #define HI_ACS_FLAGS_TEST_VAP (1 << 2)
329
330 #define HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_SET (1 << 0)
331 #define HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET (1 << 1)
332 #define HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE (1 << 2)
333 #define HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_FW_ACK (1 << 16)
334 #define HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_FW_ACK (1 << 17)
335
336
337
338
339
340
341
342
343
344
345
346
347
348 #define HI_CONSOLE_FLAGS_ENABLE (1 << 31)
349 #define HI_CONSOLE_FLAGS_UART_MASK (0x7)
350 #define HI_CONSOLE_FLAGS_UART_SHIFT 0
351 #define HI_CONSOLE_FLAGS_BAUD_SELECT (1 << 3)
352
353
354 #define HI_SMPS_ALLOW_MASK (0x00000001)
355 #define HI_SMPS_MODE_MASK (0x00000002)
356 #define HI_SMPS_MODE_STATIC (0x00000000)
357 #define HI_SMPS_MODE_DYNAMIC (0x00000002)
358 #define HI_SMPS_DISABLE_AUTO_MODE (0x00000004)
359 #define HI_SMPS_DATA_THRESH_MASK (0x000007f8)
360 #define HI_SMPS_DATA_THRESH_SHIFT (3)
361 #define HI_SMPS_RSSI_THRESH_MASK (0x0007f800)
362 #define HI_SMPS_RSSI_THRESH_SHIFT (11)
363 #define HI_SMPS_LOWPWR_CM_MASK (0x00380000)
364 #define HI_SMPS_LOWPWR_CM_SHIFT (15)
365 #define HI_SMPS_HIPWR_CM_MASK (0x03c00000)
366 #define HI_SMPS_HIPWR_CM_SHIFT (19)
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382 #define HI_WOW_EXT_ENABLED_MASK (1 << 31)
383 #define HI_WOW_EXT_NUM_LIST_SHIFT 16
384 #define HI_WOW_EXT_NUM_LIST_MASK (0x3 << HI_WOW_EXT_NUM_LIST_SHIFT)
385 #define HI_WOW_EXT_NUM_PATTERNS_SHIFT 9
386 #define HI_WOW_EXT_NUM_PATTERNS_MASK (0x7F << HI_WOW_EXT_NUM_PATTERNS_SHIFT)
387 #define HI_WOW_EXT_PATTERN_SIZE_SHIFT 0
388 #define HI_WOW_EXT_PATTERN_SIZE_MASK (0x1FF << HI_WOW_EXT_PATTERN_SIZE_SHIFT)
389
390 #define HI_WOW_EXT_MAKE_CONFIG(num_lists, count, size) \
391 ((((num_lists) << HI_WOW_EXT_NUM_LIST_SHIFT) & \
392 HI_WOW_EXT_NUM_LIST_MASK) | \
393 (((count) << HI_WOW_EXT_NUM_PATTERNS_SHIFT) & \
394 HI_WOW_EXT_NUM_PATTERNS_MASK) | \
395 (((size) << HI_WOW_EXT_PATTERN_SIZE_SHIFT) & \
396 HI_WOW_EXT_PATTERN_SIZE_MASK))
397
398 #define HI_WOW_EXT_GET_NUM_LISTS(config) \
399 (((config) & HI_WOW_EXT_NUM_LIST_MASK) >> HI_WOW_EXT_NUM_LIST_SHIFT)
400 #define HI_WOW_EXT_GET_NUM_PATTERNS(config) \
401 (((config) & HI_WOW_EXT_NUM_PATTERNS_MASK) >> \
402 HI_WOW_EXT_NUM_PATTERNS_SHIFT)
403 #define HI_WOW_EXT_GET_PATTERN_SIZE(config) \
404 (((config) & HI_WOW_EXT_PATTERN_SIZE_MASK) >> \
405 HI_WOW_EXT_PATTERN_SIZE_SHIFT)
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427 #define HI_EARLY_ALLOC_MAGIC 0x6d8a
428 #define HI_EARLY_ALLOC_MAGIC_MASK 0xffff0000
429 #define HI_EARLY_ALLOC_MAGIC_SHIFT 16
430 #define HI_EARLY_ALLOC_IRAM_BANKS_MASK 0x0000000f
431 #define HI_EARLY_ALLOC_IRAM_BANKS_SHIFT 0
432
433 #define HI_EARLY_ALLOC_VALID() \
434 ((((HOST_INTEREST->hi_early_alloc) & HI_EARLY_ALLOC_MAGIC_MASK) >> \
435 HI_EARLY_ALLOC_MAGIC_SHIFT) == (HI_EARLY_ALLOC_MAGIC))
436 #define HI_EARLY_ALLOC_GET_IRAM_BANKS() \
437 (((HOST_INTEREST->hi_early_alloc) & HI_EARLY_ALLOC_IRAM_BANKS_MASK) \
438 >> HI_EARLY_ALLOC_IRAM_BANKS_SHIFT)
439
440
441 #define HI_PWR_SAVE_LPL_ENABLED 0x1
442
443
444
445
446
447
448 #define HI_PWR_SAVE_LPL_DEV0_LSB 4
449 #define HI_PWR_SAVE_LPL_DEV_MASK 0x3
450
451 #define HI_LPL_ENABLED() \
452 ((HOST_INTEREST->hi_pwr_save_flags & HI_PWR_SAVE_LPL_ENABLED))
453 #define HI_DEV_LPL_TYPE_GET(_devix) \
454 (HOST_INTEREST->hi_pwr_save_flags & ((HI_PWR_SAVE_LPL_DEV_MASK) << \
455 (HI_PWR_SAVE_LPL_DEV0_LSB + (_devix) * 2)))
456
457 #define HOST_INTEREST_SMPS_IS_ALLOWED() \
458 ((HOST_INTEREST->hi_smps_options & HI_SMPS_ALLOW_MASK))
459
460
461 #define QCA988X_BOARD_DATA_SZ 7168
462 #define QCA988X_BOARD_EXT_DATA_SZ 0
463
464 #define QCA9887_BOARD_DATA_SZ 7168
465 #define QCA9887_BOARD_EXT_DATA_SZ 0
466
467 #define QCA6174_BOARD_DATA_SZ 8192
468 #define QCA6174_BOARD_EXT_DATA_SZ 0
469
470 #define QCA9377_BOARD_DATA_SZ QCA6174_BOARD_DATA_SZ
471 #define QCA9377_BOARD_EXT_DATA_SZ 0
472
473 #define QCA99X0_BOARD_DATA_SZ 12288
474 #define QCA99X0_BOARD_EXT_DATA_SZ 0
475
476
477 #define QCA99X0_EXT_BOARD_DATA_SZ 2048
478 #define EXT_BOARD_ADDRESS_OFFSET 0x3000
479
480 #define QCA4019_BOARD_DATA_SZ 12064
481 #define QCA4019_BOARD_EXT_DATA_SZ 0
482
483 #endif