blob: 33e0090dd45d0c7d98b771856d511bfb00338303 [file] [log] [blame]
Deepa Dinamani554b0622013-05-16 15:00:30 -07001/* Copyright (c) 2013, 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
29#ifndef _PLATFORM_APQ8084_IOMAP_H_
30#define _PLATFORM_APQ8084_IOMAP_H_
31
32#define MSM_SHARED_BASE 0x0FA00000
33
Sundarajan Srinivasand43b28b2013-06-25 16:59:13 -070034#define MSM_SHARED_IMEM_BASE 0xFE805000
35
36#define RESTART_REASON_ADDR (MSM_SHARED_IMEM_BASE + 0x65C)
37
Deepa Dinamani554b0622013-05-16 15:00:30 -070038#define KPSS_BASE 0xF9000000
39
40#define MSM_GIC_DIST_BASE KPSS_BASE
41#define MSM_GIC_CPU_BASE (KPSS_BASE + 0x2000)
42#define APCS_KPSS_ACS_BASE (KPSS_BASE + 0x00008000)
43#define APCS_APC_KPSS_PLL_BASE (KPSS_BASE + 0x0000A000)
44#define APCS_KPSS_CFG_BASE (KPSS_BASE + 0x00010000)
45#define APCS_KPSS_WDT_BASE (KPSS_BASE + 0x00017000)
46#define KPSS_APCS_QTMR_AC_BASE (KPSS_BASE + 0x00020000)
47#define KPSS_APCS_F0_QTMR_V1_BASE (KPSS_BASE + 0x00021000)
48#define QTMR_BASE KPSS_APCS_F0_QTMR_V1_BASE
49
50#define PERIPH_SS_BASE 0xF9800000
51
52#define MSM_SDC1_BASE (PERIPH_SS_BASE + 0x00024000)
53#define MSM_SDC1_SDHCI_BASE (PERIPH_SS_BASE + 0x00024900)
54#define MSM_SDC3_BASE (PERIPH_SS_BASE + 0x00064000)
55#define MSM_SDC3_SDHCI_BASE (PERIPH_SS_BASE + 0x00064900)
56#define MSM_SDC2_BASE (PERIPH_SS_BASE + 0x000A4000)
57#define MSM_SDC2_SDHCI_BASE (PERIPH_SS_BASE + 0x000A4900)
58#define MSM_SDC4_BASE (PERIPH_SS_BASE + 0x000E4000)
59#define MSM_SDC4_SDHCI_BASE (PERIPH_SS_BASE + 0x000E4900)
60
61#define BLSP1_UART0_BASE (PERIPH_SS_BASE + 0x0011D000)
62#define BLSP1_UART1_BASE (PERIPH_SS_BASE + 0x0011E000)
63#define BLSP1_UART2_BASE (PERIPH_SS_BASE + 0x0011F000)
64#define BLSP1_UART3_BASE (PERIPH_SS_BASE + 0x00120000)
65#define BLSP1_UART4_BASE (PERIPH_SS_BASE + 0x00121000)
66#define BLSP1_UART5_BASE (PERIPH_SS_BASE + 0x00122000)
67
Sundarajan Srinivasand8b7c6f2013-09-13 16:50:22 -070068#define BLSP2_UART1_BASE (PERIPH_SS_BASE + 0x0015E000)
69
Sundarajan Srinivasan09374ed2013-06-18 13:29:32 -070070#define CLK_CTL_BASE 0xFC400000
71
72/* GPLL */
73#define GPLL0_STATUS (CLK_CTL_BASE + 0x001C)
74#define APCS_GPLL_ENA_VOTE (CLK_CTL_BASE + 0x1480)
75#define APCS_CLOCK_BRANCH_ENA_VOTE (CLK_CTL_BASE + 0x1484)
76
77/* UART */
78#define BLSP1_AHB_CBCR (CLK_CTL_BASE + 0x5C4)
79#define BLSP2_AHB_CBCR (CLK_CTL_BASE + 0x944)
Sundarajan Srinivasand8b7c6f2013-09-13 16:50:22 -070080#define BLSP2_UART2_APPS_CBCR (CLK_CTL_BASE + 0xA44)
81#define BLSP2_UART2_APPS_CMD_RCGR (CLK_CTL_BASE + 0xA4C)
82#define BLSP2_UART2_APPS_CFG_RCGR (CLK_CTL_BASE + 0xA50)
83#define BLSP2_UART2_APPS_M (CLK_CTL_BASE + 0xA54)
84#define BLSP2_UART2_APPS_N (CLK_CTL_BASE + 0xA58)
85#define BLSP2_UART2_APPS_D (CLK_CTL_BASE + 0xA5C)
Sundarajan Srinivasan09374ed2013-06-18 13:29:32 -070086
87/* USB */
88#define USB_HS_BCR (CLK_CTL_BASE + 0x480)
89
90#define USB_HS_SYSTEM_CBCR (CLK_CTL_BASE + 0x484)
91#define USB_HS_AHB_CBCR (CLK_CTL_BASE + 0x488)
92#define USB_HS_SYSTEM_CMD_RCGR (CLK_CTL_BASE + 0x490)
93#define USB_HS_SYSTEM_CFG_RCGR (CLK_CTL_BASE + 0x494)
94
95/* SDCC */
96#define SDCC1_BCR (CLK_CTL_BASE + 0x4C0) /* block reset */
97#define SDCC1_APPS_CBCR (CLK_CTL_BASE + 0x4C4) /* branch control */
98#define SDCC1_AHB_CBCR (CLK_CTL_BASE + 0x4C8)
99#define SDCC1_CMD_RCGR (CLK_CTL_BASE + 0x4D0) /* cmd */
100#define SDCC1_CFG_RCGR (CLK_CTL_BASE + 0x4D4) /* cfg */
101#define SDCC1_M (CLK_CTL_BASE + 0x4D8) /* m */
102#define SDCC1_N (CLK_CTL_BASE + 0x4DC) /* n */
103#define SDCC1_D (CLK_CTL_BASE + 0x4E0) /* d */
104#define SDCC1_CDCCAL_SLEEP_CBCR (CLK_CTL_BASE + 0x4E4)
105
Deepa Dinamani554b0622013-05-16 15:00:30 -0700106/* Addresses below this point needs to be verified.
107 * Included only for compilation purposes.
108 */
109#define MSM_USB_BASE (PERIPH_SS_BASE + 0x00255000)
110
111#define CLK_CTL_BASE 0xFC400000
112
113#define GCC_WDOG_DEBUG (CLK_CTL_BASE + 0x00001780)
114
115#define USB_HS_BCR (CLK_CTL_BASE + 0x480)
116
117#define SPMI_BASE 0xFC4C0000
118#define SPMI_GENI_BASE (SPMI_BASE + 0xA000)
119#define SPMI_PIC_BASE (SPMI_BASE + 0xB000)
120
121#define MSM_CE2_BAM_BASE 0xFD444000
122#define MSM_CE2_BASE 0xFD45A000
123#define USB2_PHY_SEL 0xFD4AB000
124
125#define TLMM_BASE_ADDR 0xFD510000
126#define GPIO_CONFIG_ADDR(x) (TLMM_BASE_ADDR + 0x1000 + (x)*0x10)
127#define GPIO_IN_OUT_ADDR(x) (TLMM_BASE_ADDR + 0x1004 + (x)*0x10)
128
129#define MPM2_MPM_CTRL_BASE 0xFC4A1000
130#define MPM2_MPM_PS_HOLD 0xFC4AB000
131#define MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL 0xFC4A3000
132
133/* DRV strength for sdcc */
134#define SDC1_HDRV_PULL_CTL (TLMM_BASE_ADDR + 0x00002044)
135
Sundarajan Srinivasanf7ef47f2013-09-05 17:46:24 -0700136/* SDHCI */
137#define SDCC_MCI_HC_MODE (0x00000078)
138#define SDCC_HC_PWRCTL_STATUS_REG (0x000000DC)
139#define SDCC_HC_PWRCTL_MASK_REG (0x000000E0)
140#define SDCC_HC_PWRCTL_CLEAR_REG (0x000000E4)
141#define SDCC_HC_PWRCTL_CTL_REG (0x000000E8)
142
Deepa Dinamani554b0622013-05-16 15:00:30 -0700143#endif