Channagoud Kadabi | 196b27c | 2015-01-19 13:53:38 -0500 | [diff] [blame^] | 1 | /* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. |
Channagoud Kadabi | 92db112 | 2014-06-25 16:00:13 -0400 | [diff] [blame] | 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_FSM9010_IOMAP_H_ |
| 30 | #define _PLATFORM_FSM9010_IOMAP_H_ |
| 31 | |
| 32 | #define MSM_IOMAP_BASE 0xF9000000 |
| 33 | #define MSM_IOMAP_END 0xFEFFFFFF |
| 34 | |
| 35 | #define SDRAM_START_ADDR 0x00000000 |
| 36 | #define SDRAM_SEC_BANK_START_ADDR 0x10000000 |
| 37 | |
Channagoud Kadabi | 27ee2dc | 2014-10-29 11:07:02 -0400 | [diff] [blame] | 38 | #define MSM_SHARED_BASE 0x13600000 |
Channagoud Kadabi | 92db112 | 2014-06-25 16:00:13 -0400 | [diff] [blame] | 39 | |
| 40 | #define RPM_MSG_RAM_BASE 0xFC42B000 |
| 41 | #define SYSTEM_IMEM_BASE 0xFE800000 |
| 42 | #define MSM_SHARED_IMEM_BASE 0xFE805000 |
| 43 | |
| 44 | #define RESTART_REASON_ADDR (RPM_MSG_RAM_BASE + 0x65C) |
| 45 | #define RESTART_REASON_ADDR_V2 (MSM_SHARED_IMEM_BASE + 0x65C) |
| 46 | #define DLOAD_MODE_ADDR_V2 (MSM_SHARED_IMEM_BASE + 0x0) |
| 47 | #define EMERGENCY_DLOAD_MODE_ADDR_V2 (MSM_SHARED_IMEM_BASE + 0xFE0) |
| 48 | |
| 49 | #define APPS_SS_BASE 0xF9000000 |
| 50 | |
| 51 | #define MSM_GIC_DIST_BASE APPS_SS_BASE |
| 52 | #define MSM_GIC_CPU_BASE (APPS_SS_BASE + 0x2000) |
| 53 | #define APPS_APCS_QTMR_AC_BASE (APPS_SS_BASE + 0x00020000) |
| 54 | #define APPS_APCS_F0_QTMR_V1_BASE (APPS_SS_BASE + 0x00021000) |
| 55 | #define QTMR_BASE APPS_APCS_F0_QTMR_V1_BASE |
| 56 | #define PERIPH_SS_BASE 0xF9800000 |
| 57 | |
| 58 | #define MSM_SDC1_BAM_BASE (PERIPH_SS_BASE + 0x00004000) |
| 59 | #define MSM_SDC1_BASE (PERIPH_SS_BASE + 0x00024000) |
| 60 | #define MSM_SDC1_DML_BASE (PERIPH_SS_BASE + 0x00024800) |
| 61 | #define MSM_SDC1_SDHCI_BASE (PERIPH_SS_BASE + 0x00024900) |
| 62 | |
| 63 | /* BLSP1_UART[0:5] */ |
| 64 | #define BLSP1_UART0_BASE (PERIPH_SS_BASE + 0x0011D000) |
| 65 | #define BLSP1_UART1_BASE (PERIPH_SS_BASE + 0x0011E000) |
| 66 | #define BLSP1_UART2_BASE (PERIPH_SS_BASE + 0x0011F000) |
| 67 | #define BLSP1_UART3_BASE (PERIPH_SS_BASE + 0x00120000) |
| 68 | |
| 69 | #define MSM_USB_BASE (PERIPH_SS_BASE + 0x00200000) |
Channagoud Kadabi | 196b27c | 2015-01-19 13:53:38 -0500 | [diff] [blame^] | 70 | #define TCSR_PHSS_USB2_PHY_SEL 0xFD4AB000 |
Channagoud Kadabi | 92db112 | 2014-06-25 16:00:13 -0400 | [diff] [blame] | 71 | |
| 72 | #define CLK_CTL_BASE 0xFC400000 |
| 73 | |
| 74 | #define GCC_WDOG_DEBUG (CLK_CTL_BASE + 0x00001780) |
| 75 | |
| 76 | #define USB_HS_BCR (CLK_CTL_BASE + 0x480) |
| 77 | |
| 78 | #define SPMI_BASE 0xFC4C0000 |
| 79 | #define SPMI_GENI_BASE (SPMI_BASE + 0xA000) |
| 80 | #define SPMI_PIC_BASE (SPMI_BASE + 0xB000) |
| 81 | |
| 82 | #define MSM_CE2_BAM_BASE 0xFD444000 |
| 83 | #define MSM_CE2_BASE 0xFD45A000 |
| 84 | |
| 85 | #define TLMM_BASE_ADDR 0xFD510000 |
| 86 | #define GPIO_CONFIG_ADDR(x) (TLMM_BASE_ADDR + 0x1000 + (x)*0x10) |
| 87 | #define GPIO_IN_OUT_ADDR(x) (TLMM_BASE_ADDR + 0x1004 + (x)*0x10) |
| 88 | |
| 89 | #define MPM2_MPM_CTRL_BASE 0xFC4A1000 |
| 90 | #define MPM2_MPM_PS_HOLD 0xFC4AB000 |
| 91 | #define MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL 0xFC4A3000 |
| 92 | |
| 93 | /* CE 1 */ |
| 94 | #define GCC_CE1_BCR (CLK_CTL_BASE + 0x1040) |
| 95 | #define GCC_CE1_CMD_RCGR (CLK_CTL_BASE + 0x1050) |
| 96 | #define GCC_CE1_CFG_RCGR (CLK_CTL_BASE + 0x1054) |
| 97 | #define GCC_CE1_CBCR (CLK_CTL_BASE + 0x1044) |
| 98 | #define GCC_CE1_AXI_CBCR (CLK_CTL_BASE + 0x1048) |
| 99 | #define GCC_CE1_AHB_CBCR (CLK_CTL_BASE + 0x104C) |
| 100 | |
| 101 | /* CE 2 */ |
| 102 | #define GCC_CE2_BCR (CLK_CTL_BASE + 0x1080) |
| 103 | #define GCC_CE2_CMD_RCGR (CLK_CTL_BASE + 0x1090) |
| 104 | #define GCC_CE2_CFG_RCGR (CLK_CTL_BASE + 0x1094) |
| 105 | #define GCC_CE2_CBCR (CLK_CTL_BASE + 0x1084) |
| 106 | #define GCC_CE2_AXI_CBCR (CLK_CTL_BASE + 0x1088) |
| 107 | #define GCC_CE2_AHB_CBCR (CLK_CTL_BASE + 0x108C) |
| 108 | |
| 109 | /* GPLL */ |
| 110 | #define GPLL0_STATUS (CLK_CTL_BASE + 0x001C) |
| 111 | #define APCS_GPLL_ENA_VOTE (CLK_CTL_BASE + 0x1480) |
| 112 | #define APCS_CLOCK_BRANCH_ENA_VOTE (CLK_CTL_BASE + 0x1484) |
| 113 | |
| 114 | /* SDCC 1 */ |
| 115 | #define SDCC1_BCR (CLK_CTL_BASE + 0x4C0) /* block reset */ |
| 116 | #define SDCC1_APPS_CBCR (CLK_CTL_BASE + 0x4C4) /* branch control */ |
| 117 | #define SDCC1_AHB_CBCR (CLK_CTL_BASE + 0x4C8) |
| 118 | #define SDCC1_INACTIVITY_TIMER_CBCR (CLK_CTL_BASE + 0x4CC) |
| 119 | #define SDCC1_CMD_RCGR (CLK_CTL_BASE + 0x4D0) /* cmd */ |
| 120 | #define SDCC1_CFG_RCGR (CLK_CTL_BASE + 0x4D4) /* cfg */ |
| 121 | #define SDCC1_M (CLK_CTL_BASE + 0x4D8) /* m */ |
| 122 | #define SDCC1_N (CLK_CTL_BASE + 0x4DC) /* n */ |
| 123 | #define SDCC1_D (CLK_CTL_BASE + 0x4E0) /* d */ |
| 124 | |
| 125 | /* UART |
| 126 | BLSP1_UART[0:3] |
| 127 | */ |
| 128 | #define BLSP1_AHB_CBCR (CLK_CTL_BASE + 0x5C4) |
| 129 | |
| 130 | #define BLSP1_UART0_APPS_CBCR (CLK_CTL_BASE + 0x684) |
| 131 | #define BLSP1_UART0_APPS_CMD_RCGR (CLK_CTL_BASE + 0x68C) |
| 132 | #define BLSP1_UART0_APPS_CFG_RCGR (CLK_CTL_BASE + 0x690) |
| 133 | #define BLSP1_UART0_APPS_M (CLK_CTL_BASE + 0x694) |
| 134 | #define BLSP1_UART0_APPS_N (CLK_CTL_BASE + 0x698) |
| 135 | #define BLSP1_UART0_APPS_D (CLK_CTL_BASE + 0x69C) |
| 136 | |
| 137 | #define BLSP1_UART1_APPS_CBCR (CLK_CTL_BASE + 0x704) |
| 138 | #define BLSP1_UART1_APPS_CMD_RCGR (CLK_CTL_BASE + 0x70C) |
| 139 | #define BLSP1_UART1_APPS_CFG_RCGR (CLK_CTL_BASE + 0x710) |
| 140 | #define BLSP1_UART1_APPS_M (CLK_CTL_BASE + 0x714) |
| 141 | #define BLSP1_UART1_APPS_N (CLK_CTL_BASE + 0x718) |
| 142 | #define BLSP1_UART1_APPS_D (CLK_CTL_BASE + 0x71C) |
| 143 | |
| 144 | #define BLSP1_UART2_APPS_CBCR (CLK_CTL_BASE + 0x784) |
| 145 | #define BLSP1_UART2_APPS_CMD_RCGR (CLK_CTL_BASE + 0x78C) |
| 146 | #define BLSP1_UART2_APPS_CFG_RCGR (CLK_CTL_BASE + 0x790) |
| 147 | #define BLSP1_UART2_APPS_M (CLK_CTL_BASE + 0x794) |
| 148 | #define BLSP1_UART2_APPS_N (CLK_CTL_BASE + 0x798) |
| 149 | #define BLSP1_UART2_APPS_D (CLK_CTL_BASE + 0x79C) |
| 150 | |
| 151 | #define BLSP1_UART3_APPS_CBCR (CLK_CTL_BASE + 0x804) |
| 152 | #define BLSP1_UART3_APPS_CMD_RCGR (CLK_CTL_BASE + 0x80C) |
| 153 | #define BLSP1_UART3_APPS_CFG_RCGR (CLK_CTL_BASE + 0x810) |
| 154 | #define BLSP1_UART3_APPS_M (CLK_CTL_BASE + 0x814) |
| 155 | #define BLSP1_UART3_APPS_N (CLK_CTL_BASE + 0x818) |
| 156 | #define BLSP1_UART3_APPS_D (CLK_CTL_BASE + 0x81C) |
| 157 | |
| 158 | /* USB */ |
| 159 | #define USB_HS_SYSTEM_CBCR (CLK_CTL_BASE + 0x484) |
| 160 | #define USB_HS_AHB_CBCR (CLK_CTL_BASE + 0x488) |
| 161 | #define USB_HS_SYSTEM_CMD_RCGR (CLK_CTL_BASE + 0x490) |
| 162 | #define USB_HS_SYSTEM_CFG_RCGR (CLK_CTL_BASE + 0x494) |
| 163 | |
| 164 | /* I2C */ |
| 165 | #define BLSP_QUP_BASE(blsp_id, qup_id) ((blsp_id == 1) ? \ |
| 166 | (PERIPH_SS_BASE + 0x00123000 \ |
| 167 | + (qup_id * 0x1000)) :\ |
| 168 | (PERIPH_SS_BASE + 0x00163000 + \ |
| 169 | (qup_id * 0x1000))) |
| 170 | |
| 171 | /* DRV strength for sdcc */ |
| 172 | #define SDC1_HDRV_PULL_CTL (TLMM_BASE_ADDR + 0x00002044) |
| 173 | |
| 174 | /* SDHCI */ |
| 175 | #define SDCC_MCI_HC_MODE (0x00000078) |
| 176 | #define SDCC_HC_PWRCTL_STATUS_REG (0x000000DC) |
| 177 | #define SDCC_HC_PWRCTL_MASK_REG (0x000000E0) |
| 178 | #define SDCC_HC_PWRCTL_CLEAR_REG (0x000000E4) |
| 179 | #define SDCC_HC_PWRCTL_CTL_REG (0x000000E8) |
Channagoud Kadabi | 196b27c | 2015-01-19 13:53:38 -0500 | [diff] [blame^] | 180 | |
| 181 | /* USB 3.0 clocks */ |
| 182 | #define GCC_USB30_MASTER_CBCR (CLK_CTL_BASE + 0x0240) |
| 183 | #define GCC_USB30_SLEEP_CBCR (CLK_CTL_BASE + 0x0244) |
| 184 | #define GCC_USB30_MOCK_UTMI_CBCR (CLK_CTL_BASE + 0x0248) |
| 185 | #define GCC_USB30_MASTER_CMD_RCGR (CLK_CTL_BASE + 0x024C) |
| 186 | #define GCC_USB30_MASTER_CFG_RCGR (CLK_CTL_BASE + 0x0250) |
| 187 | #define GCC_USB30_MASTER_M (CLK_CTL_BASE + 0x0254) |
| 188 | #define GCC_USB30_MASTER_N (CLK_CTL_BASE + 0x0258) |
| 189 | #define GCC_USB30_MASTER_D (CLK_CTL_BASE + 0x025C) |
| 190 | #define GCC_USB30_MOCK_UTMI_CMD_RCGR (CLK_CTL_BASE + 0x0260) |
| 191 | #define GCC_USB30_MOCK_UTMI_CFG_RCGR (CLK_CTL_BASE + 0x0264) |
| 192 | |
| 193 | /* USB Phy */ |
| 194 | #define GCC_USB3_PHY_BCR (CLK_CTL_BASE + 0x280) |
| 195 | #define GCC_USB3PHY_PHY_BCR (CLK_CTL_BASE + 0x284) |
| 196 | #define GCC_USB3_PHY_AUX_CBCR (CLK_CTL_BASE + 0x288) |
| 197 | #define GCC_USB3_PHY_PIPE_CBCR (CLK_CTL_BASE + 0x28C) |
| 198 | #define GCC_USB3_PHY_PIPE_MISC (CLK_CTL_BASE + 0x290) |
| 199 | #define GCC_USB3_PHY_AUX_CMD_RCGR (CLK_CTL_BASE + 0x294) |
| 200 | #define GCC_USB3_PHY_AUX_CFG_RCGR (CLK_CTL_BASE + 0x298) |
| 201 | |
| 202 | #define GCC_USB30_BCR (CLK_CTL_BASE + 0x274) |
| 203 | #define GCC_SYS_NOC_USB3_AXI_CBCR (CLK_CTL_BASE + 0x278) |
| 204 | |
| 205 | /* USB Misc */ |
| 206 | #define GCC_USB_HS_HSIC_BCR (CLK_CTL_BASE + 0x3C0) |
| 207 | #define GCC_USB_HS_HSIC_GDSCR (CLK_CTL_BASE + 0x3C4) |
| 208 | #define GCC_USB_BOOT_CLOCK_CTL (CLK_CTL_BASE + 0x1A00) |
| 209 | #define GCC_USB_HS_PHY_CFG_AHB_CBCR (CLK_CTL_BASE + 0x3EC0) |
| 210 | #define GCC_USB_SS_PHY_LDO_EN (CLK_CTL_BASE + 0x3F00) |
| 211 | |
| 212 | /* USB HS */ |
| 213 | #define GCC_USB_HS_BCR (CLK_CTL_BASE + 0x480) |
| 214 | #define GCC_USB_HS_SYSTEM_CBCR (CLK_CTL_BASE + 0x484) |
| 215 | #define GCC_USB_HS_AHB_CBCR (CLK_CTL_BASE + 0x488) |
| 216 | #define GCC_USB_HS_SYSTEM_CMD_RCGR (CLK_CTL_BASE + 0x490) |
| 217 | #define GCC_USB_HS_SYSTEM_CFG_RCGR (CLK_CTL_BASE + 0x494) |
| 218 | #define GCC_USB2A_PHY_BCR (CLK_CTL_BASE + 0x4A8) |
| 219 | #define GCC_USB2A_PHY_SLEEP_CBCR (CLK_CTL_BASE + 0x4AC) |
| 220 | #define GCC_USB2_HS_PHY_ONLY_BCR (CLK_CTL_BASE + 0x4B0) |
| 221 | |
| 222 | #define GCC_QUSB2_PHY_BCR GCC_USB2A_PHY_BCR |
| 223 | |
| 224 | /* USB30 base */ |
| 225 | #define MSM_USB30_BASE 0xF9200000 |
| 226 | #define MSM_USB30_QSCRATCH_BASE 0xF92F8800 |
| 227 | |
| 228 | /* USB PHY */ |
| 229 | #define CM_DWC_USB2_CM_DWC_USB2_BASE 0xFCA00000 |
| 230 | #define CM_DWC_USB3_CM_DWC_USB3_BASE 0xFCA10000 |
| 231 | #define AHB2PHY_AHB2PHY_BASE 0xFCA06000 |
| 232 | |
Channagoud Kadabi | 92db112 | 2014-06-25 16:00:13 -0400 | [diff] [blame] | 233 | #endif |