xref: /wlan-dirver/qca-wifi-host-cmn/hif/src/snoc/if_ahb.h (revision a86b23ee68a2491aede2e03991f3fb37046f4e41)
1 /*
2  * Copyright (c) 2013-2020 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  * DOC: if_ahb.h
21  *
22  * h file for ahb specific implementations.
23  */
24 
25 #ifndef __IF_AHB_H
26 #define __IF_AHB_H
27 
28 #define GCC_BASE 0x1800000
29 #define GCC_SIZE 0x60000
30 #define GCC_FEPLL_PLL_DIV 0x2f020
31 #define GCC_FEPLL_PLL_CLK_WIFI_0_SEL_MASK 0x00000300
32 #define GCC_FEPLL_PLL_CLK_WIFI_0_SEL_SHIFT 8
33 #define GCC_FEPLL_PLL_CLK_WIFI_1_SEL_MASK 0x00003000
34 #define GCC_FEPLL_PLL_CLK_WIFI_1_SEL_SHIFT 12
35 
36 
37 /* These registers are outsize Wifi space. */
38 /* TBD: Should we add these offsets as device tree properties? */
39 #define TCSR_BASE 0x1900000
40 #define TCSR_SIZE 0x80000
41 #define TCSR_WIFI0_GLB_CFG 0x49000
42 #define TCSR_WIFI1_GLB_CFG 0x49004
43 #define TCSR_WCSS0_HALTREQ 0x52000
44 #define TCSR_WCSS1_HALTREQ 0x52004
45 #define TCSR_WCSS0_HALTACK 0x52010
46 #define TCSR_WCSS1_HALTACK 0x52014
47 #define ATH_AHB_RESET_WAIT_MAX 10 /* Ms */
48 #define HOST_CE_SIZE 0x200000
49 
50 irqreturn_t hif_ahb_interrupt_handler(int irq, void *context);
51 
52 #endif
53 
54