blob: d9660e02b29a5817163efcedf6a1fcd943b3e32b [file] [log] [blame]
Amol Jadicd43ea02011-02-15 20:56:04 -08001/* Copyright (c) 2008, Google Inc.
2 * All rights reserved.
3 *
4 * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in
13 * the documentation and/or other materials provided with the
14 * distribution.
15 * * Neither the name of Google, Inc. nor the names of its contributors
16 * may be used to endorse or promote products derived from this
17 * software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
29 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#ifndef _PLATFORM_MSM8960_IOMAP_H_
34#define _PLATFORM_MSM8960_IOMAP_H_
35
Amol Jadida055742011-06-14 16:15:12 -070036#define MSM_IOMAP_BASE 0x00100000
37#define MSM_IOMAP_END 0x28000000
38
Shashank Mittal0207df72011-06-15 15:20:43 -070039#define MSM_SHARED_IMEM_BASE 0x2A03F000
40#define RESTART_REASON_ADDR (MSM_SHARED_IMEM_BASE + 0x65C)
Amol Jadic52c8a32011-07-12 11:27:04 -070041#define MSM_SHARED_BASE 0x80000000
Amol Jadicd43ea02011-02-15 20:56:04 -080042
Amol Jadida055742011-06-14 16:15:12 -070043#define MSM_SHARED_BASE 0x80000000
44
Amol Jadicd43ea02011-02-15 20:56:04 -080045#define MSM_TCSR_BASE 0x1A400000
46#define MSM_GIC_DIST_BASE 0x02000000
47#define MSM_TMR_BASE 0x0200A000
Amol Jadic52c8a32011-07-12 11:27:04 -070048#define MSM_GPT_BASE (MSM_TMR_BASE + 0x04)
49
Amol Jadicd43ea02011-02-15 20:56:04 -080050#define MSM_GIC_CPU_BASE 0x02002000
51#define MSM_VIC_BASE 0x02080000
Shashank Mittaled177732011-05-06 19:12:59 -070052#define MSM_USB_BASE 0x12500000
Shashank Mittal6239b162011-06-28 17:59:33 -070053#define TLMM_BASE_ADDR 0x00800000
Amol Jadicd43ea02011-02-15 20:56:04 -080054
Amol Jadicd43ea02011-02-15 20:56:04 -080055#define TCSR_WDOG_CFG 0x30
56#define MSM_WDT0_RST (MSM_TMR_BASE + 0x38)
57#define MSM_WDT0_EN (MSM_TMR_BASE + 0x40)
58#define MSM_WDT0_BT (MSM_TMR_BASE + 0x4C)
Shashank Mittal6239b162011-06-28 17:59:33 -070059#define MSM_PSHOLD_CTL_SU (TLMM_BASE_ADDR + 0x820)
Amol Jadicd43ea02011-02-15 20:56:04 -080060
61#define MSM_SDC1_BASE 0x12400000
62#define MSM_SDC2_BASE 0x12140000
63#define MSM_SDC3_BASE 0x12180000
64#define MSM_SDC4_BASE 0x121C0000
65
Amol Jadic52c8a32011-07-12 11:27:04 -070066#define GPIO_CONFIG_ADDR(x) (TLMM_BASE_ADDR + 0x1000 + (x)*0x10)
67#define GPIO_IN_OUT_ADDR(x) (TLMM_BASE_ADDR + 0x1004 + (x)*0x10)
Amol Jadicd43ea02011-02-15 20:56:04 -080068
Amol Jadic52c8a32011-07-12 11:27:04 -070069#define GSBI_BASE(id) ((id) <= 7 ? (0x16000000 + (((id)-1) << 20)) : \
70 (0x1A000000 + (((id)-8) << 20)))
71#define GSBI_UART_DM_BASE(id) (GSBI_BASE(id) + 0x40000)
72#define QUP_BASE(id) (GSBI_BASE(id) + 0x80000)
Amol Jadicd43ea02011-02-15 20:56:04 -080073
Amol Jadicd43ea02011-02-15 20:56:04 -080074
Amol Jadicd43ea02011-02-15 20:56:04 -080075#define EBI2_CHIP_SELECT_CFG0 0x1A100000
76#define EBI2_XMEM_CS3_CFG1 0x1A110034
77
Shashank Mittaled177732011-05-06 19:12:59 -070078#define CLK_CTL_BASE 0x00900000
79#define SDC_MD(n) (CLK_CTL_BASE + 0x2828 + (32 * ((n) - 1)))
80#define SDC_NS(n) (CLK_CTL_BASE + 0x282C + (32 * ((n) - 1)))
81#define USB_HS1_HCLK_CTL (CLK_CTL_BASE + 0x2900)
82#define USB_HS1_XCVR_FS_CLK_MD (CLK_CTL_BASE + 0x2908)
83#define USB_HS1_XCVR_FS_CLK_NS (CLK_CTL_BASE + 0x290C)
84#define GSBIn_HCLK_CTL(n) (CLK_CTL_BASE + 0x29C0 + (32 * ((n) - 1)))
85#define GSBIn_HCLK_FS(n) (CLK_CTL_BASE + 0x29C4 + (32 * ((n) - 1)))
Amol Jadic52c8a32011-07-12 11:27:04 -070086#define GSBIn_QUP_APPS_MD(n) (CLK_CTL_BASE + 0x29C8 + (32 * ((n) - 1)))
87#define GSBIn_QUP_APPS_NS(n) (CLK_CTL_BASE + 0x29CC + (32 * ((n) - 1)))
88#define GSBIn_UART_APPS_MD(n) (CLK_CTL_BASE + 0x29D0 + (32 * ((n) - 1)))
89#define GSBIn_UART_APPS_NS(n) (CLK_CTL_BASE + 0x29D4 + (32 * ((n) - 1)))
Shashank Mittaled177732011-05-06 19:12:59 -070090#define MSM_BOOT_PLL8_STATUS (CLK_CTL_BASE + 0x3158)
91#define MSM_BOOT_PLL_ENABLE_SC0 (CLK_CTL_BASE + 0x34C0)
Amol Jadicd43ea02011-02-15 20:56:04 -080092
Kinson Chike5c93432011-06-17 09:10:29 -070093#define MSM_MMSS_CLK_CTL_BASE 0x04000000
94
Kinson Chikfe931032011-07-21 10:01:34 -070095#define MIPI_DSI_BASE (0x04700000)
96#define REG_DSI(off) (MIPI_DSI_BASE + (off))
97
98#define DSIPHY_REGULATOR_BASE (0x500)
99#define DSIPHY_TIMING_BASE (0x440)
100#define DSIPHY_CTRL_BASE (0x470)
101#define DSIPHY_PLL_BASE (0x200)
102#define DSIPHY_STRENGTH_BASE (0x480)
103
104/* Range 0 - 4 */
105#define DSIPHY_REGULATOR_CTRL(x) REG_DSI(DSIPHY_REGULATOR_BASE + (x) * 4)
106/* Range 0 - 11 */
107#define DSIPHY_TIMING_CTRL(x) REG_DSI(DSIPHY_TIMING_BASE + (x) * 4)
108/* Range 0 - 3 */
109#define DSIPHY_CTRL(x) REG_DSI(DSIPHY_CTRL_BASE + (x) * 4)
110/* Range 0 - 2 */
111#define DSIPHY_STRENGTH_CTRL(x) REG_DSI(DSIPHY_STRENGTH_BASE + (x) * 4)
112/* Range 0 - 19 */
113#define DSIPHY_PLL_CTRL(x) REG_DSI(DSIPHY_PLL_BASE + (x) * 4)
114
115//TODO: Use mem on the stack
116#define DSI_CMD_DMA_MEM_START_ADDR_PANEL (0x90000000)
117
118#define MDP_BASE (0x05100000)
119#define REG_MDP(off) (MDP_BASE + (off))
120
121//TODO: Where does this go?
122#define MMSS_SFPB_GPREG (0x05700058)
123
Amol Jadicd43ea02011-02-15 20:56:04 -0800124#endif