blob: 60c98657d511347e6862d4789ad36b5edd2f0ea5 [file] [log] [blame]
Channagoud Kadabi123c9722014-02-06 13:22:50 -08001/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions are
5 * met:
6 * * Redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer.
8 * * Redistributions in binary form must reproduce the above
9 * copyright notice, this list of conditions and the following
10 * disclaimer in the documentation and/or other materials provided
11 * with the distribution.
12 * * Neither the name of The Linux Foundation nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
Channagoud Kadabi608b6a72014-04-14 13:58:03 -070029#ifndef _PLATFORM_MSM8994_IOMAP_H_
30#define _PLATFORM_MSM8994_IOMAP_H_
Channagoud Kadabi123c9722014-02-06 13:22:50 -080031
Channagoud Kadabi4983cf02014-05-06 17:34:52 -070032#define MSM_SHARED_BASE 0x06A00000
Channagoud Kadabi123c9722014-02-06 13:22:50 -080033
34#define MSM_IOMAP_BASE 0xF9000000
35#define MSM_IOMAP_END 0xFEFFFFFF
36
37#define SYSTEM_IMEM_BASE 0xFE800000
38#define MSM_SHARED_IMEM_BASE 0xFE87F000
39#define RESTART_REASON_ADDR (MSM_SHARED_IMEM_BASE + 0x65C)
40
41#define BS_INFO_OFFSET (0x6B0)
42#define BS_INFO_ADDR (MSM_SHARED_IMEM_BASE + BS_INFO_OFFSET)
43
44
45#define KPSS_BASE 0xF9000000
46
47#define MSM_GIC_DIST_BASE KPSS_BASE
48#define MSM_GIC_CPU_BASE (KPSS_BASE + 0x00002000)
49#define APCS_KPSS_ACS_BASE (KPSS_BASE + 0x00008000)
50#define APCS_APC_KPSS_PLL_BASE (KPSS_BASE + 0x0000A000)
51#define APCS_KPSS_CFG_BASE (KPSS_BASE + 0x00010000)
52#define APCS_KPSS_WDT_BASE (KPSS_BASE + 0x00017000)
53#define KPSS_APCS_QTMR_AC_BASE (KPSS_BASE + 0x00020000)
54#define KPSS_APCS_F0_QTMR_V1_BASE (KPSS_BASE + 0x00021000)
55#define QTMR_BASE KPSS_APCS_F0_QTMR_V1_BASE
56
57#define PERIPH_SS_BASE 0xF9800000
58
59#define MSM_SDC1_BASE (PERIPH_SS_BASE + 0x00024000)
60#define MSM_SDC1_SDHCI_BASE (PERIPH_SS_BASE + 0x00024900)
61#define MSM_SDC3_BASE (PERIPH_SS_BASE + 0x00064000)
62#define MSM_SDC3_SDHCI_BASE (PERIPH_SS_BASE + 0x00064900)
63#define MSM_SDC2_BASE (PERIPH_SS_BASE + 0x000A4000)
64#define MSM_SDC2_SDHCI_BASE (PERIPH_SS_BASE + 0x000A4900)
65#define MSM_SDC4_BASE (PERIPH_SS_BASE + 0x000E4000)
66#define MSM_SDC4_SDHCI_BASE (PERIPH_SS_BASE + 0x000E4900)
67
68#define BLSP1_UART0_BASE (PERIPH_SS_BASE + 0x0011D000)
69#define BLSP1_UART1_BASE (PERIPH_SS_BASE + 0x0011E000)
70#define BLSP1_UART2_BASE (PERIPH_SS_BASE + 0x0011F000)
71#define BLSP1_UART3_BASE (PERIPH_SS_BASE + 0x00120000)
72#define BLSP1_UART4_BASE (PERIPH_SS_BASE + 0x00121000)
73#define BLSP1_UART5_BASE (PERIPH_SS_BASE + 0x00122000)
74
75#define BLSP2_UART1_BASE (PERIPH_SS_BASE + 0x0015E000)
76
77#define MSM_USB_BASE (PERIPH_SS_BASE + 0x00255000)
Sundarajan Srinivasan0ebf2fc2014-04-23 16:45:18 -070078#define USB2_PHY_SEL 0xFD4AB000
79
80/* QUSB2 PHY */
81#define QUSB2_PHY_BASE (PERIPH_SS_BASE + 0x00339000)
82
83#define QUSB2PHY_PORT_POWERDOWN (QUSB2_PHY_BASE + 0x000000B4)
Channagoud Kadabi123c9722014-02-06 13:22:50 -080084
Channagoud Kadabi3dcc4ed2014-04-10 14:59:41 -070085#define MSM_USB30_BASE 0xF9200000
86#define MSM_USB30_QSCRATCH_BASE 0xF92F8800
87
88/* SS QMP (Qulacomm Multi Protocol) */
89#define QMP_PHY_BASE 0xF9B38000
90
Channagoud Kadabi123c9722014-02-06 13:22:50 -080091/* Clocks */
92#define CLK_CTL_BASE 0xFC400000
93
94/* GPLL */
95#define GPLL0_MODE (CLK_CTL_BASE + 0x0000)
96#define GPLL4_MODE (CLK_CTL_BASE + 0x1DC0)
97#define APCS_GPLL_ENA_VOTE (CLK_CTL_BASE + 0x1480)
98#define APCS_CLOCK_BRANCH_ENA_VOTE (CLK_CTL_BASE + 0x1484)
99
100/* UART */
101#define BLSP1_AHB_CBCR (CLK_CTL_BASE + 0x5C4)
102#define BLSP1_UART2_APPS_CBCR (CLK_CTL_BASE + 0x704)
103#define BLSP1_UART2_APPS_CMD_RCGR (CLK_CTL_BASE + 0x70C)
104#define BLSP1_UART2_APPS_CFG_RCGR (CLK_CTL_BASE + 0x710)
105#define BLSP1_UART2_APPS_M (CLK_CTL_BASE + 0x714)
106#define BLSP1_UART2_APPS_N (CLK_CTL_BASE + 0x718)
107#define BLSP1_UART2_APPS_D (CLK_CTL_BASE + 0x71C)
108#define BLSP2_AHB_CBCR (CLK_CTL_BASE + 0x944)
109#define BLSP2_UART2_APPS_CBCR (CLK_CTL_BASE + 0xA44)
110#define BLSP2_UART2_APPS_CMD_RCGR (CLK_CTL_BASE + 0xA4C)
111#define BLSP2_UART2_APPS_CFG_RCGR (CLK_CTL_BASE + 0xA50)
112#define BLSP2_UART2_APPS_M (CLK_CTL_BASE + 0xA54)
113#define BLSP2_UART2_APPS_N (CLK_CTL_BASE + 0xA58)
114#define BLSP2_UART2_APPS_D (CLK_CTL_BASE + 0xA5C)
115
116/* USB */
117#define USB_HS_BCR (CLK_CTL_BASE + 0x480)
118
119#define USB_HS_SYSTEM_CBCR (CLK_CTL_BASE + 0x484)
120#define USB_HS_AHB_CBCR (CLK_CTL_BASE + 0x488)
121#define USB_HS_SYSTEM_CMD_RCGR (CLK_CTL_BASE + 0x490)
122#define USB_HS_SYSTEM_CFG_RCGR (CLK_CTL_BASE + 0x494)
123
Channagoud Kadabi3dcc4ed2014-04-10 14:59:41 -0700124/* USB3 clocks */
125#define SYS_NOC_USB3_AXI_CBCR (CLK_CTL_BASE + 0x03FC)
126#define USB2B_PHY_SLEEP_CBCR (CLK_CTL_BASE + 0x04AC)
127#define USB2B_PHY_BCR (CLK_CTL_BASE + 0x04A8)
128#define USB30_MASTER_CMD_RCGR (CLK_CTL_BASE + 0x03D4)
129#define USB30_MASTER_CFG_RCGR (CLK_CTL_BASE + 0x03D8)
130#define USB30_MASTER_M (CLK_CTL_BASE + 0x03DC)
131#define USB30_MASTER_N (CLK_CTL_BASE + 0x03E0)
132#define USB30_MASTER_D (CLK_CTL_BASE + 0x03E4)
133#define USB30_MASTER_CBCR (CLK_CTL_BASE + 0x03C8)
134#define USB_30_BCR (CLK_CTL_BASE + 0x03C0)
135#define USB30_MOCK_UTMI_CMD_RCGR (CLK_CTL_BASE + 0x03E8)
136#define USB30_MOCK_UTMI_CFG_RCGR (CLK_CTL_BASE + 0x03EC)
137#define USB30_MOCK_UTMI_CBCR (CLK_CTL_BASE + 0x03D0)
138#define USB30_SLEEP_CBCR (CLK_CTL_BASE + 0x03CC)
139#define USB30_PHY_AUX_CMD_RCGR (CLK_CTL_BASE + 0x1414)
140#define USB30_PHY_AUX_CFG_RCGR (CLK_CTL_BASE + 0x1418)
141#define USB30_PHY_AUX_CBCR (CLK_CTL_BASE + 0x1408)
142#define USB30_PHY_PIPE_CBCR (CLK_CTL_BASE + 0x140C)
143#define USB30_PHY_BCR (CLK_CTL_BASE + 0x1400)
144#define USB30PHY_PHY_BCR (CLK_CTL_BASE + 0x1404)
145#define GCC_USB30_GDSCR (CLK_CTL_BASE + 0x03C4)
Sundarajan Srinivasan0ebf2fc2014-04-23 16:45:18 -0700146#define GCC_QUSB2_PHY_BCR (CLK_CTL_BASE + 0x04B8)
Channagoud Kadabi3c2be1c2014-06-01 18:59:21 -0700147#define USB_PHY_CFG_AHB2PHY_CBCR (CLK_CTL_BASE + 0x1A84)
Channagoud Kadabi3dcc4ed2014-04-10 14:59:41 -0700148
Channagoud Kadabi123c9722014-02-06 13:22:50 -0800149/* SDCC */
150#define SDCC1_BCR (CLK_CTL_BASE + 0x4C0) /* block reset */
151#define SDCC1_APPS_CBCR (CLK_CTL_BASE + 0x4C4) /* branch control */
152#define SDCC1_AHB_CBCR (CLK_CTL_BASE + 0x4C8)
153#define SDCC1_CMD_RCGR (CLK_CTL_BASE + 0x4D0) /* cmd */
154#define SDCC1_CFG_RCGR (CLK_CTL_BASE + 0x4D4) /* cfg */
155#define SDCC1_M (CLK_CTL_BASE + 0x4D8) /* m */
156#define SDCC1_N (CLK_CTL_BASE + 0x4DC) /* n */
157#define SDCC1_D (CLK_CTL_BASE + 0x4E0) /* d */
158
159/* SDCC3 */
160#define SDCC3_BCR (CLK_CTL_BASE + 0x540) /* block reset */
161#define SDCC3_APPS_CBCR (CLK_CTL_BASE + 0x544) /* branch control */
162#define SDCC3_AHB_CBCR (CLK_CTL_BASE + 0x548)
163#define SDCC3_INACTIVITY_TIMER_CBCR (CLK_CTL_BASE + 0x54C)
164#define SDCC3_CMD_RCGR (CLK_CTL_BASE + 0x550) /* cmd */
165#define SDCC3_CFG_RCGR (CLK_CTL_BASE + 0x554) /* cfg */
166#define SDCC3_M (CLK_CTL_BASE + 0x558) /* m */
167#define SDCC3_N (CLK_CTL_BASE + 0x55C) /* n */
168#define SDCC3_D (CLK_CTL_BASE + 0x560) /* d */
169
170
171#define GCC_WDOG_DEBUG (CLK_CTL_BASE + 0x00001780)
172
173#define UFS_BASE (0xFC590000 + 0x00004000)
174
175#define SPMI_BASE 0xFC4C0000
176#define SPMI_GENI_BASE (SPMI_BASE + 0xA000)
177#define SPMI_PIC_BASE (SPMI_BASE + 0xB000)
178
Channagoud Kadabi4b93fd32014-06-04 17:28:03 -0700179#define MSM_CE3_BAM_BASE 0xFD3C4000
180#define MSM_CE3_BASE 0xFD3DA000
Channagoud Kadabi123c9722014-02-06 13:22:50 -0800181
182#define TLMM_BASE_ADDR 0xFD510000
183#define GPIO_CONFIG_ADDR(x) (TLMM_BASE_ADDR + 0x1000 + (x)*0x10)
184#define GPIO_IN_OUT_ADDR(x) (TLMM_BASE_ADDR + 0x1004 + (x)*0x10)
185
186#define MPM2_MPM_CTRL_BASE 0xFC4A1000
187#define MPM2_MPM_PS_HOLD 0xFC4AB000
188#define MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL 0xFC4A3000
189
190/* DRV strength for sdcc */
191#define SDC1_HDRV_PULL_CTL (TLMM_BASE_ADDR + 0x00002044)
192
193/* SDHCI */
194#define SDCC_MCI_HC_MODE (0x00000078)
195#define SDCC_HC_PWRCTL_STATUS_REG (0x000000DC)
196#define SDCC_HC_PWRCTL_MASK_REG (0x000000E0)
197#define SDCC_HC_PWRCTL_CLEAR_REG (0x000000E4)
198#define SDCC_HC_PWRCTL_CTL_REG (0x000000E8)
199
200/* Boot config */
201#define SEC_CTRL_CORE_BASE 0xFC4B8000
202#define BOOT_CONFIG_OFFSET 0x00006034
203#define BOOT_CONFIG_REG (SEC_CTRL_CORE_BASE+BOOT_CONFIG_OFFSET)
204
205#define MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL 0xFC4A3000
206
Channagoud Kadabi3dcc4ed2014-04-10 14:59:41 -0700207#define TCSR_PHSS_USB2_PHY_SEL 0xFD4AB000
208#define PLATFORM_QMP_OFFSET 0x8
209
Channagoud Kadabi123c9722014-02-06 13:22:50 -0800210#endif