xref: /wlan-driver/qca-wifi-host-cmn/hif/src/snoc/if_ahb.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: if_ahb.h
22  *
23  * h file for ahb specific implementations.
24  */
25 
26 #ifndef __IF_AHB_H
27 #define __IF_AHB_H
28 
29 #define GCC_BASE 0x1800000
30 #define GCC_SIZE 0x60000
31 #define GCC_FEPLL_PLL_DIV 0x2f020
32 #define GCC_FEPLL_PLL_CLK_WIFI_0_SEL_MASK 0x00000300
33 #define GCC_FEPLL_PLL_CLK_WIFI_0_SEL_SHIFT 8
34 #define GCC_FEPLL_PLL_CLK_WIFI_1_SEL_MASK 0x00003000
35 #define GCC_FEPLL_PLL_CLK_WIFI_1_SEL_SHIFT 12
36 
37 
38 /* These registers are outsize Wifi space. */
39 /* TBD: Should we add these offsets as device tree properties? */
40 #define TCSR_BASE 0x1900000
41 #define TCSR_SIZE 0x80000
42 #define TCSR_WIFI0_GLB_CFG 0x49000
43 #define TCSR_WIFI1_GLB_CFG 0x49004
44 #define TCSR_WCSS0_HALTREQ 0x52000
45 #define TCSR_WCSS1_HALTREQ 0x52004
46 #define TCSR_WCSS0_HALTACK 0x52010
47 #define TCSR_WCSS1_HALTACK 0x52014
48 #define ATH_AHB_RESET_WAIT_MAX 10 /* Ms */
49 #define HOST_CMEM_SIZE 0x40000
50 #define PMM_SCRATCH_SIZE 0x100
51 #define HOST_CE_SIZE 0x200000
52 
53 irqreturn_t hif_ahb_interrupt_handler(int irq, void *context);
54 
55 #endif
56 
57