Shashank Mittal | 23b8f42 | 2010-04-16 19:27:21 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2008, Google Inc. |
| 2 | * All rights reserved. |
| 3 | * |
Duy Truong | f3ac7b3 | 2013-02-13 01:07:28 -0800 | [diff] [blame] | 4 | * Copyright (c) 2009-2011, The Linux Foundation. All rights reserved. |
Shashank Mittal | 23b8f42 | 2010-04-16 19:27:21 -0700 | [diff] [blame] | 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_MSM8X60_IOMAP_H_ |
| 34 | #define _PLATFORM_MSM8X60_IOMAP_H_ |
| 35 | |
Amol Jadi | 4421e65 | 2011-06-16 15:00:48 -0700 | [diff] [blame] | 36 | #define MSM_IOMAP_BASE 0x00100000 |
| 37 | #define MSM_IOMAP_END 0x28000000 |
| 38 | |
Shashank Mittal | ed17773 | 2011-05-06 19:12:59 -0700 | [diff] [blame] | 39 | #define MSM_USB_BASE 0x12500000 |
Shashank Mittal | 23b8f42 | 2010-04-16 19:27:21 -0700 | [diff] [blame] | 40 | #define MSM_UART3_BASE 0xA9C00000 |
| 41 | |
| 42 | #define MSM_VIC_BASE 0x02080000 |
Amol Jadi | ca4f4c9 | 2011-01-13 20:19:34 -0800 | [diff] [blame] | 43 | |
Amol Jadi | aeda4e6 | 2011-07-19 18:07:29 -0700 | [diff] [blame] | 44 | #define MSM_TMR_BASE 0x02000000 |
| 45 | #define MSM_GPT_BASE (MSM_TMR_BASE + 0x04) |
| 46 | #define MSM_DGT_BASE (MSM_TMR_BASE + 0x24) |
| 47 | #define SPSS_TIMER_STATUS (MSM_TMR_BASE + 0x88) |
| 48 | |
| 49 | #define GPT_REG(off) (MSM_GPT_BASE + (off)) |
| 50 | #define DGT_REG(off) (MSM_DGT_BASE + (off)) |
| 51 | |
| 52 | #define GPT_MATCH_VAL GPT_REG(0x0000) |
| 53 | #define GPT_COUNT_VAL GPT_REG(0x0004) |
| 54 | #define GPT_ENABLE GPT_REG(0x0008) |
| 55 | #define GPT_CLEAR GPT_REG(0x000C) |
| 56 | |
| 57 | #define DGT_MATCH_VAL DGT_REG(0x0000) |
| 58 | #define DGT_COUNT_VAL DGT_REG(0x0004) |
| 59 | #define DGT_ENABLE DGT_REG(0x0008) |
| 60 | #define DGT_CLEAR DGT_REG(0x000C) |
| 61 | #define DGT_CLK_CTL DGT_REG(0x0010) |
| 62 | |
Amol Jadi | cd43ea0 | 2011-02-15 20:56:04 -0800 | [diff] [blame] | 63 | #define MSM_TCSR_BASE 0x16B00000 |
| 64 | #define MSM_GIC_CPU_BASE 0x02081000 |
| 65 | #define MSM_GIC_DIST_BASE 0x02080000 |
Amol Jadi | ca4f4c9 | 2011-01-13 20:19:34 -0800 | [diff] [blame] | 66 | |
Subbaraman Narayanamurthy | 346bdcb | 2011-02-24 12:02:58 -0800 | [diff] [blame] | 67 | #define MSM_TCSR_SIZE 4096 |
Shashank Mittal | 23b8f42 | 2010-04-16 19:27:21 -0700 | [diff] [blame] | 68 | #define MSM_GPT_BASE (MSM_TMR_BASE + 0x04) |
| 69 | #define MSM_CSR_BASE 0x02081000 |
| 70 | #define MSM_GCC_BASE 0x02082000 |
| 71 | #define MSM_ACC0_BASE 0x02041000 |
| 72 | #define MSM_ACC1_BASE 0x02051000 |
| 73 | |
Shashank Mittal | 6df1607 | 2011-07-14 18:44:01 -0700 | [diff] [blame] | 74 | #define TLMM_BASE_ADDR 0x00800000 |
| 75 | |
Subbaraman Narayanamurthy | c647278 | 2010-09-30 12:39:14 -0700 | [diff] [blame] | 76 | #define TCSR_WDOG_CFG 0x30 |
| 77 | #define MSM_WDT0_RST (MSM_TMR_BASE + 0x38) |
| 78 | #define MSM_WDT0_EN (MSM_TMR_BASE + 0x40) |
| 79 | #define MSM_WDT0_BT (MSM_TMR_BASE + 0x4C) |
Shashank Mittal | 6df1607 | 2011-07-14 18:44:01 -0700 | [diff] [blame] | 80 | #define MSM_PSHOLD_CTL_SU (TLMM_BASE_ADDR + 0x820) |
Shashank Mittal | 23b8f42 | 2010-04-16 19:27:21 -0700 | [diff] [blame] | 81 | |
| 82 | #define MSM_SDC1_BASE 0x12400000 |
Subbaraman Narayanamurthy | 05872db | 2011-02-28 11:34:58 -0800 | [diff] [blame] | 83 | #define MSM_CRYPTO_BASE 0x18500000 |
Shashank Mittal | 23b8f42 | 2010-04-16 19:27:21 -0700 | [diff] [blame] | 84 | |
Subbaraman Narayanamurthy | c647278 | 2010-09-30 12:39:14 -0700 | [diff] [blame] | 85 | #define MSM_SHARED_BASE 0x40000000 |
Subbaraman Narayanamurthy | f9b6e0d | 2010-09-08 16:51:43 -0700 | [diff] [blame] | 86 | |
Subbaraman Narayanamurthy | c647278 | 2010-09-30 12:39:14 -0700 | [diff] [blame] | 87 | #define SURF_DEBUG_LED_ADDR 0x1D000202 |
Subbaraman Narayanamurthy | f9b6e0d | 2010-09-08 16:51:43 -0700 | [diff] [blame] | 88 | |
Amol Jadi | c52c8a3 | 2011-07-12 11:27:04 -0700 | [diff] [blame] | 89 | #define TLMM_BASE_ADDR 0x00800000 |
| 90 | #define GPIO_CONFIG_ADDR(x) (TLMM_BASE_ADDR + 0x1000 + (x)*0x10) |
| 91 | #define GPIO_IN_OUT_ADDR(x) (TLMM_BASE_ADDR + 0x1004 + (x)*0x10) |
| 92 | |
Subbaraman Narayanamurthy | f9b6e0d | 2010-09-08 16:51:43 -0700 | [diff] [blame] | 93 | #define GPIO_CFG133_ADDR 0x00801850 |
| 94 | #define GPIO_CFG135_ADDR 0x00801870 |
| 95 | #define GPIO_CFG136_ADDR 0x00801880 |
| 96 | #define GPIO_CFG137_ADDR 0x00801890 |
| 97 | #define GPIO_CFG138_ADDR 0x008018A0 |
| 98 | #define GPIO_CFG139_ADDR 0x008018B0 |
| 99 | #define GPIO_CFG140_ADDR 0x008018C0 |
| 100 | #define GPIO_CFG141_ADDR 0x008018D0 |
| 101 | #define GPIO_CFG142_ADDR 0x008018E0 |
| 102 | #define GPIO_CFG143_ADDR 0x008018F0 |
| 103 | #define GPIO_CFG144_ADDR 0x00801900 |
| 104 | #define GPIO_CFG145_ADDR 0x00801910 |
| 105 | #define GPIO_CFG146_ADDR 0x00801920 |
| 106 | #define GPIO_CFG147_ADDR 0x00801930 |
| 107 | #define GPIO_CFG148_ADDR 0x00801940 |
| 108 | #define GPIO_CFG149_ADDR 0x00801950 |
| 109 | #define GPIO_CFG150_ADDR 0x00801960 |
| 110 | #define GPIO_CFG151_ADDR 0x00801970 |
| 111 | #define GPIO_CFG152_ADDR 0x00801980 |
| 112 | #define GPIO_CFG153_ADDR 0x00801990 |
| 113 | #define GPIO_CFG154_ADDR 0x008019A0 |
| 114 | #define GPIO_CFG155_ADDR 0x008019B0 |
| 115 | #define GPIO_CFG156_ADDR 0x008019C0 |
| 116 | #define GPIO_CFG157_ADDR 0x008019D0 |
| 117 | #define GPIO_CFG158_ADDR 0x008019E0 |
| 118 | |
Amol Jadi | c52c8a3 | 2011-07-12 11:27:04 -0700 | [diff] [blame] | 119 | #define GSBI_BASE(id) ((id) <= 7 ? (0x16000000 + (((id)-1) << 20)) : \ |
| 120 | (0x19800000 + (((id)-8) << 20))) |
| 121 | #define GSBI_UART_DM_BASE(id) (GSBI_BASE(id) + 0x40000) |
| 122 | #define QUP_BASE(id) (GSBI_BASE(id) + 0x80000) |
Shashank Mittal | c69512e | 2010-09-22 16:40:48 -0700 | [diff] [blame] | 123 | |
Shashank Mittal | ed17773 | 2011-05-06 19:12:59 -0700 | [diff] [blame] | 124 | #define CLK_CTL_BASE 0x00900000 |
Amol Jadi | 8225456 | 2011-06-27 11:25:48 -0700 | [diff] [blame] | 125 | #define SDC_MD(n) (CLK_CTL_BASE + 0x2828 + (32 * ((n) - 1))) |
| 126 | #define SDC_NS(n) (CLK_CTL_BASE + 0x282C + (32 * ((n) - 1))) |
Shashank Mittal | ed17773 | 2011-05-06 19:12:59 -0700 | [diff] [blame] | 127 | #define USB_HS1_HCLK_CTL (CLK_CTL_BASE + 0x2900) |
| 128 | #define USB_HS1_XCVR_FS_CLK_MD (CLK_CTL_BASE + 0x2908) |
| 129 | #define USB_HS1_XCVR_FS_CLK_NS (CLK_CTL_BASE + 0x290C) |
| 130 | #define MSM_BOOT_PLL_ENABLE_SC0 (CLK_CTL_BASE + 0x34C0) |
| 131 | #define MSM_BOOT_PLL8_STATUS (CLK_CTL_BASE + 0x3158) |
| 132 | #define GSBIn_HCLK_CTL(n) (CLK_CTL_BASE + 0x29C0 + (32 * ((n) - 1))) |
| 133 | #define GSBIn_HCLK_FS(n) (CLK_CTL_BASE + 0x29C4 + (32 * ((n) - 1))) |
Amol Jadi | c52c8a3 | 2011-07-12 11:27:04 -0700 | [diff] [blame] | 134 | #define GSBIn_QUP_APPS_MD(n) (CLK_CTL_BASE + 0x29C8 + (32 * ((n) - 1))) |
| 135 | #define GSBIn_QUP_APPS_NS(n) (CLK_CTL_BASE + 0x29CC + (32 * ((n) - 1))) |
| 136 | #define GSBIn_UART_APPS_MD(n) (CLK_CTL_BASE + 0x29D0 + (32 * ((n) - 1))) |
| 137 | #define GSBIn_UART_APPS_NS(n) (CLK_CTL_BASE + 0x29D4 + (32 * ((n) - 1))) |
Shashank Mittal | c69512e | 2010-09-22 16:40:48 -0700 | [diff] [blame] | 138 | |
| 139 | /* Defines for the GPIO EXPANDER chip, SX1509QIULTRT */ |
| 140 | #define GPIO_EXPANDER_REG_OPEN_DRAIN_A (0x0B) |
| 141 | #define GPIO_EXPANDER_REG_DIR_B (0x0E) |
| 142 | #define GPIO_EXPANDER_REG_DIR_A (0x0F) |
| 143 | #define GPIO_EXPANDER_REG_DATA_B (0x10) |
| 144 | #define GPIO_EXPANDER_REG_DATA_A (0x11) |
| 145 | #define CORE_GPIO_EXPANDER_I2C_ADDRESS (0x3E) |
| 146 | #define EEPROM_I2C_ADDRESS (0x52) |
| 147 | |
Subbaraman Narayanamurthy | f9b6e0d | 2010-09-08 16:51:43 -0700 | [diff] [blame] | 148 | #define EBI2_CHIP_SELECT_CFG0 0x1A100000 |
| 149 | #define EBI2_XMEM_CS3_CFG1 0x1A110034 |
Ajay Dudani | 7d60552 | 2010-10-01 19:52:37 -0700 | [diff] [blame] | 150 | |
Amol Jadi | 84a546a | 2011-03-02 12:09:11 -0800 | [diff] [blame] | 151 | #define MSM_ADM_BASE 0x18400000 |
| 152 | #define MSM_ADM_SD_OFFSET 0x00020800 |
| 153 | |
Kinson Chik | fe93103 | 2011-07-21 10:01:34 -0700 | [diff] [blame] | 154 | /* MMSS CLK CTR base address */ |
| 155 | #define MSM_MMSS_CLK_CTL_BASE 0x04000000 |
| 156 | |
| 157 | #define MIPI_DSI_BASE (0x04700000) |
| 158 | #define REG_DSI(off) (MIPI_DSI_BASE + (off)) |
| 159 | |
| 160 | #define DSIPHY_REGULATOR_BASE (0x2CC) |
| 161 | #define DSIPHY_TIMING_BASE (0x260) |
| 162 | #define DSIPHY_CTRL_BASE (0x290) |
| 163 | #define DSIPHY_PLL_BASE (0x200) |
| 164 | #define DSIPHY_STRENGTH_BASE (0x2A0) |
| 165 | |
| 166 | /* Range 0 - 4 */ |
| 167 | #define DSIPHY_REGULATOR_CTRL(x) REG_DSI(DSIPHY_REGULATOR_BASE + (x) * 4) |
| 168 | /* Range 0 - 11 */ |
| 169 | #define DSIPHY_TIMING_CTRL(x) REG_DSI(DSIPHY_TIMING_BASE + (x) * 4) |
| 170 | /* Range 0 - 3 */ |
| 171 | #define DSIPHY_CTRL(x) REG_DSI(DSIPHY_CTRL_BASE + (x) * 4) |
| 172 | /* Range 0 - 2 */ |
| 173 | #define DSIPHY_STRENGTH_CTRL(x) REG_DSI(DSIPHY_STRENGTH_BASE + (x) * 4) |
| 174 | /* Range 0 - 19 */ |
| 175 | #define DSIPHY_PLL_CTRL(x) REG_DSI(DSIPHY_PLL_BASE + (x) * 4) |
| 176 | |
| 177 | //TODO: Use mem on the stack |
| 178 | #define DSI_CMD_DMA_MEM_START_ADDR_PANEL (0x46000000) |
| 179 | |
| 180 | #define MDP_BASE (0x05100000) |
| 181 | #define REG_MDP(off) (MDP_BASE + (off)) |
| 182 | |
| 183 | //TODO: Where does this belong? |
| 184 | #define MMSS_SFPB_GPREG (0x05700058) |
| 185 | |
Channagoud Kadabi | e488412 | 2011-09-21 23:54:44 +0530 | [diff] [blame] | 186 | /* HDMI base addresses */ |
| 187 | #define MSM_HDMI_BASE 0x04A00000 |
| 188 | #define DTV_BASE 0xD0000 |
| 189 | |
| 190 | #define HDMI_USEC_REFTIMER (MSM_HDMI_BASE + 0x0208) |
| 191 | #define HDMI_CTRL (MSM_HDMI_BASE + 0x0000) |
| 192 | |
| 193 | #define HDMI_PHY_REG_0 (MSM_HDMI_BASE + 0x00000300) |
| 194 | #define HDMI_PHY_REG_1 (MSM_HDMI_BASE + 0x00000304) |
| 195 | #define HDMI_PHY_REG_2 (MSM_HDMI_BASE + 0x00000308) |
| 196 | #define HDMI_PHY_REG_3 (MSM_HDMI_BASE + 0x0000030c) |
| 197 | #define HDMI_PHY_REG_4 (MSM_HDMI_BASE + 0x00000310) |
| 198 | #define HDMI_PHY_REG_9 (MSM_HDMI_BASE + 0x00000324) |
| 199 | #define HDMI_PHY_REG_11 (MSM_HDMI_BASE + 0x0000032c) |
| 200 | #define HDMI_PHY_REG_12 (MSM_HDMI_BASE + 0x00000330) |
| 201 | #define HDMI_TOTAL (MSM_HDMI_BASE + 0x000002C0) |
| 202 | #define HDMI_ACTIVE_HSYNC (MSM_HDMI_BASE + 0x000002B4) |
| 203 | #define HDMI_ACTIVE_VSYNC (MSM_HDMI_BASE + 0x000002B8) |
| 204 | #define HDMI_VSYNC_TOTAL_F2 (MSM_HDMI_BASE + 0x000002C4) |
| 205 | #define HDMI_VSYNC_ACTIVE_F2 (MSM_HDMI_BASE + 0x000002BC) |
| 206 | #define HDMI_FRAME_CTRL (MSM_HDMI_BASE + 0x000002C8) |
| 207 | |
Shashank Mittal | 23b8f42 | 2010-04-16 19:27:21 -0700 | [diff] [blame] | 208 | #endif |