blob: a0052e15883ffa40ea763fec54354687aa5d48be [file] [log] [blame]
Channagoud Kadabi634ac6d2012-12-12 18:13:56 -08001/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
Deepa Dinamani1e094942012-10-30 15:49:02 -07002 *
Deepa Dinamani7d6c8972011-12-14 15:16:56 -08003 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions are
5 * met:
Deepa Dinamani1e094942012-10-30 15:49:02 -07006 * * 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.
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080015 *
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_MSMCOPPER_IOMAP_H_
30#define _PLATFORM_MSMCOPPER_IOMAP_H_
31
Neeti Desai13e688d2012-08-22 16:30:55 -070032#define MSM_IOMAP_BASE 0xF9000000
33#define MSM_IOMAP_END 0xFEFFFFFF
34
Deepa Dinamani81eddd52012-05-31 11:18:50 -070035#define SDRAM_START_ADDR 0x00000000
Deepa Dinamani07e66872012-06-29 18:32:05 -070036#define SDRAM_SEC_BANK_START_ADDR 0x10000000
Deepa Dinamani81eddd52012-05-31 11:18:50 -070037
38#define MSM_SHARED_BASE 0x0FA00000
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080039
Neeti Desai120b55d2012-08-20 17:15:56 -070040#define RPM_MSG_RAM_BASE 0xFC42B000
41#define RESTART_REASON_ADDR (RPM_MSG_RAM_BASE + 0x65C)
Amol Jadi6639d452012-08-16 14:51:19 -070042
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080043#define KPSS_BASE 0xF9000000
44
45#define MSM_GIC_DIST_BASE KPSS_BASE
46#define MSM_GIC_CPU_BASE (KPSS_BASE + 0x2000)
47#define APCS_KPSS_ACS_BASE (KPSS_BASE + 0x00008000)
48#define APCS_APC_KPSS_PLL_BASE (KPSS_BASE + 0x0000A000)
49#define APCS_KPSS_CFG_BASE (KPSS_BASE + 0x00010000)
50#define APCS_KPSS_WDT_BASE (KPSS_BASE + 0x00017000)
Deepa Dinamani1f01f192012-08-10 16:04:10 -070051#define KPSS_APCS_QTMR_AC_BASE (KPSS_BASE + 0x00020000)
52#define KPSS_APCS_F0_QTMR_V1_BASE (KPSS_BASE + 0x00021000)
53#define QTMR_BASE KPSS_APCS_F0_QTMR_V1_BASE
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080054
55#define PERIPH_SS_BASE 0xF9800000
Deepa Dinamani07e66872012-06-29 18:32:05 -070056
57#define MSM_SDC1_BAM_BASE (PERIPH_SS_BASE + 0x00004000)
Deepa Dinamanica5ad852012-05-07 18:19:47 -070058#define MSM_SDC1_BASE (PERIPH_SS_BASE + 0x00024000)
Deepa Dinamani07e66872012-06-29 18:32:05 -070059#define MSM_SDC1_DML_BASE (PERIPH_SS_BASE + 0x00024800)
60#define MSM_SDC3_BAM_BASE (PERIPH_SS_BASE + 0x00044000)
Deepa Dinamanica5ad852012-05-07 18:19:47 -070061#define MSM_SDC3_BASE (PERIPH_SS_BASE + 0x00064000)
Deepa Dinamani07e66872012-06-29 18:32:05 -070062#define MSM_SDC3_DML_BASE (PERIPH_SS_BASE + 0x00064800)
63#define MSM_SDC2_BAM_BASE (PERIPH_SS_BASE + 0x00084000)
Deepa Dinamanica5ad852012-05-07 18:19:47 -070064#define MSM_SDC2_BASE (PERIPH_SS_BASE + 0x000A4000)
Deepa Dinamani07e66872012-06-29 18:32:05 -070065#define MSM_SDC2_DML_BASE (PERIPH_SS_BASE + 0x000A4800)
66#define MSM_SDC4_BAM_BASE (PERIPH_SS_BASE + 0x000C4000)
Deepa Dinamanica5ad852012-05-07 18:19:47 -070067#define MSM_SDC4_BASE (PERIPH_SS_BASE + 0x000E4000)
Deepa Dinamani07e66872012-06-29 18:32:05 -070068#define MSM_SDC4_DML_BASE (PERIPH_SS_BASE + 0x000E4800)
69
Deepa Dinamani26e93262012-05-21 17:35:14 -070070#define BLSP1_UART0_BASE (PERIPH_SS_BASE + 0x0011D000)
Amol Jadi29f95032012-06-22 12:52:54 -070071#define BLSP1_UART1_BASE (PERIPH_SS_BASE + 0x0011E000)
72#define BLSP1_UART2_BASE (PERIPH_SS_BASE + 0x0011F000)
73#define BLSP1_UART3_BASE (PERIPH_SS_BASE + 0x00120000)
74#define BLSP1_UART4_BASE (PERIPH_SS_BASE + 0x00121000)
75#define BLSP1_UART5_BASE (PERIPH_SS_BASE + 0x00122000)
Deepa Dinamani26e93262012-05-21 17:35:14 -070076#define MSM_USB_BASE (PERIPH_SS_BASE + 0x00255000)
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080077
78#define CLK_CTL_BASE 0xFC400000
Deepa Dinamani1e094942012-10-30 15:49:02 -070079
80#define GCC_WDOG_DEBUG (CLK_CTL_BASE + 0x00001780)
81
Deepa Dinamani0687ecd2012-08-10 16:00:26 -070082#define USB_HS_BCR (CLK_CTL_BASE + 0x480)
83#define USB_BOOT_CLOCK_CTL (CLK_CTL_BASE + 0x1A00)
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080084
Deepa Dinamanic2a9b362012-02-23 15:15:54 -080085#define SPMI_BASE 0xFC4C0000
86#define SPMI_GENI_BASE (SPMI_BASE + 0xA000)
87#define SPMI_PIC_BASE (SPMI_BASE + 0xB000)
88
Deepa Dinamanib9a57202012-12-20 18:05:11 -080089#define MSM_CE2_BAM_BASE 0xFD444000
90#define MSM_CE2_BASE 0xFD45A000
91
Neeti Desaiac011272012-08-29 18:24:54 -070092#define TLMM_BASE_ADDR 0xFD510000
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080093#define GPIO_CONFIG_ADDR(x) (TLMM_BASE_ADDR + 0x1000 + (x)*0x10)
94#define GPIO_IN_OUT_ADDR(x) (TLMM_BASE_ADDR + 0x1004 + (x)*0x10)
95
Deepa Dinamanid642b802012-05-16 10:49:01 -070096#define MPM2_MPM_CTRL_BASE 0xFC4A1000
Neeti Desai120b55d2012-08-20 17:15:56 -070097#define MPM2_MPM_PS_HOLD 0xFC4AB000
Amol Jadi29f95032012-06-22 12:52:54 -070098
Deepa Dinamani32bfad02012-11-02 12:15:05 -070099/* CE 2 */
100#define GCC_CE2_BCR (CLK_CTL_BASE + 0x1080)
101#define GCC_CE2_CMD_RCGR (CLK_CTL_BASE + 0x1090)
102#define GCC_CE2_CFG_RCGR (CLK_CTL_BASE + 0x1094)
103#define GCC_CE2_CBCR (CLK_CTL_BASE + 0x1084)
104#define GCC_CE2_AXI_CBCR (CLK_CTL_BASE + 0x1088)
105#define GCC_CE2_AHB_CBCR (CLK_CTL_BASE + 0x108C)
106
Amol Jadi29f95032012-06-22 12:52:54 -0700107/* GPLL */
108#define GPLL0_STATUS (CLK_CTL_BASE + 0x001C)
109#define APCS_GPLL_ENA_VOTE (CLK_CTL_BASE + 0x1480)
Neeti Desaiac011272012-08-29 18:24:54 -0700110#define APCS_CLOCK_BRANCH_ENA_VOTE (CLK_CTL_BASE + 0x1484)
Amol Jadi29f95032012-06-22 12:52:54 -0700111
112/* SDCC */
113#define SDCC1_BCR (CLK_CTL_BASE + 0x4C0) /* block reset */
114#define SDCC1_APPS_CBCR (CLK_CTL_BASE + 0x4C4) /* branch control */
115#define SDCC1_AHB_CBCR (CLK_CTL_BASE + 0x4C8)
116#define SDCC1_INACTIVITY_TIMER_CBCR (CLK_CTL_BASE + 0x4CC)
117#define SDCC1_CMD_RCGR (CLK_CTL_BASE + 0x4D0) /* cmd */
118#define SDCC1_CFG_RCGR (CLK_CTL_BASE + 0x4D4) /* cfg */
119#define SDCC1_M (CLK_CTL_BASE + 0x4D8) /* m */
120#define SDCC1_N (CLK_CTL_BASE + 0x4DC) /* n */
121#define SDCC1_D (CLK_CTL_BASE + 0x4E0) /* d */
122
123/* UART */
Neeti Desaiac011272012-08-29 18:24:54 -0700124#define BLSP1_AHB_CBCR (CLK_CTL_BASE + 0x5C4)
Channagoud Kadabi634ac6d2012-12-12 18:13:56 -0800125#define BLSP2_AHB_CBCR (CLK_CTL_BASE + 0x944)
Neeti Desaiac011272012-08-29 18:24:54 -0700126#define BLSP1_UART2_APPS_CBCR (CLK_CTL_BASE + 0x704)
127#define BLSP1_UART2_APPS_CMD_RCGR (CLK_CTL_BASE + 0x70C)
128#define BLSP1_UART2_APPS_CFG_RCGR (CLK_CTL_BASE + 0x710)
129#define BLSP1_UART2_APPS_M (CLK_CTL_BASE + 0x714)
130#define BLSP1_UART2_APPS_N (CLK_CTL_BASE + 0x718)
131#define BLSP1_UART2_APPS_D (CLK_CTL_BASE + 0x71C)
Amol Jadi29f95032012-06-22 12:52:54 -0700132
133/* USB */
134#define USB_HS_SYSTEM_CBCR (CLK_CTL_BASE + 0x484)
135#define USB_HS_AHB_CBCR (CLK_CTL_BASE + 0x488)
136#define USB_HS_SYSTEM_CMD_RCGR (CLK_CTL_BASE + 0x490)
137#define USB_HS_SYSTEM_CFG_RCGR (CLK_CTL_BASE + 0x494)
138
Channagoud Kadabi634ac6d2012-12-12 18:13:56 -0800139/* I2C */
140#define BLSP2_QUP5_I2C_APPS_CBCR (CLK_CTL_BASE + 0xB88)
141
142#define BLSP_QUP_BASE(blsp_id, qup_id) ((blsp_id == 1) ? \
143 (PERIPH_SS_BASE + 0x00023000 \
144 + (qup_id * 0x1000)) :\
145 (PERIPH_SS_BASE + 0x00163000 + \
146 (qup_id * 0x1000)))
Siddhartha Agrawal7ac6d512013-01-22 18:39:50 -0800147
Siddhartha Agrawalacdaf5b2013-01-22 18:14:53 -0800148#define MSM_MMSS_CLK_CTL_BASE 0xFD8C0000
Siddhartha Agrawal7ac6d512013-01-22 18:39:50 -0800149
150#define MIPI_DSI_BASE (0xFD922800)
151#define REG_DSI(off) (MIPI_DSI_BASE + 0x04 + (off))
152
153#define MDP_BASE (0xfd900000)
154#define REG_MDP(off) (MDP_BASE + (off))
155
Deepa Dinamani7d6c8972011-12-14 15:16:56 -0800156#endif