blob: decc0d2bf582d7a62a65cb87cdce2cc08121fc21 [file] [log] [blame]
Sridhar Parasurambe12c3d2015-01-16 13:42:26 -08001/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
Channagoud Kadabied60a8b2014-06-27 15:35:09 -07002 *
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_THULIUM_IOMAP_H_
30#define _PLATFORM_THULIUM_IOMAP_H_
31
32#define MSM_SHARED_BASE 0x86000000
33
34#define MSM_IOMAP_HMSS_START 0x09800000
35
36#define MSM_IOMAP_BASE 0x00000000
37#define MSM_IOMAP_END 0x10000000
38
39#define MSM_SHARED_IMEM_BASE 0x066BF000
40#define RESTART_REASON_ADDR (MSM_SHARED_IMEM_BASE + 0x65C)
Channagoud Kadabi99d23702015-02-02 20:52:17 -080041#define BS_INFO_ADDR (MSM_SHARED_IMEM_BASE + 0x6B0)
Channagoud Kadabied60a8b2014-06-27 15:35:09 -070042
43#define MSM_GIC_DIST_BASE (MSM_IOMAP_HMSS_START + 0x003C0000)
44#define MSM_GIC_REDIST_BASE (MSM_IOMAP_HMSS_START + 0x00400000)
45
46#define HMSS_APCS_F0_QTMR_V1_BASE (MSM_IOMAP_HMSS_START + 0x00050000)
47#define QTMR_BASE HMSS_APCS_F0_QTMR_V1_BASE
48
Sridhar Parasurambe12c3d2015-01-16 13:42:26 -080049#define RPM_SS_MSG_RAM_START_ADDRESS_BASE_PHYS 0x00068000
50#define RPM_SS_MSG_RAM_START_ADDRESS_BASE RPM_SS_MSG_RAM_START_ADDRESS_BASE_PHYS
51#define RPM_SS_MSG_RAM_START_ADDRESS_BASE_SIZE 0x00006000
52
Sridhar Parasuram103702f2015-01-26 18:07:55 -080053#define APCS_HLOS_IPC_INTERRUPT_0 0x9820010
54
Channagoud Kadabied60a8b2014-06-27 15:35:09 -070055#define PERIPH_SS_BASE 0x07400000
56
57#define MSM_SDC1_BASE (PERIPH_SS_BASE + 0x00064000)
58#define MSM_SDC1_SDHCI_BASE (PERIPH_SS_BASE + 0x00064900)
59#define MSM_SDC2_BASE (PERIPH_SS_BASE + 0x000A4000)
60#define MSM_SDC2_SDHCI_BASE (PERIPH_SS_BASE + 0x000A4900)
61
62#define BLSP1_UART0_BASE (PERIPH_SS_BASE + 0x0016F000)
63#define BLSP1_UART1_BASE (PERIPH_SS_BASE + 0x00170000)
64#define BLSP1_UART2_BASE (PERIPH_SS_BASE + 0x00171000)
65#define BLSP1_UART3_BASE (PERIPH_SS_BASE + 0x00172000)
66#define BLSP1_UART4_BASE (PERIPH_SS_BASE + 0x00173000)
67#define BLSP1_UART5_BASE (PERIPH_SS_BASE + 0x00174000)
68
69#define BLSP2_UART1_BASE (PERIPH_SS_BASE + 0x001B0000)
70
71/* USB3.0 */
72#define MSM_USB30_BASE 0x6A00000
73#define MSM_USB30_QSCRATCH_BASE 0x6AF8800
74/* SS QMP (Qulacomm Multi Protocol) */
75#define QMP_PHY_BASE 0x7410000
76
77/* QUSB2 PHY */
78#define QUSB2_PHY_BASE 0x7411000
79#define QUSB2PHY_PORT_POWERDOWN (QUSB2_PHY_BASE + 0x000000B4)
80#define GCC_QUSB2_PHY_BCR (CLK_CTL_BASE + 0x00012038)
81#define QUSB2PHY_PORT_UTMI_CTRL2 (QUSB2_PHY_BASE + 0x000000C4)
82#define QUSB2PHY_PORT_TUNE1 (QUSB2_PHY_BASE + 0x00000080)
83#define QUSB2PHY_PORT_TUNE2 (QUSB2_PHY_BASE + 0x00000084)
84#define QUSB2PHY_PORT_TUNE3 (QUSB2_PHY_BASE + 0x00000088)
85#define QUSB2PHY_PORT_TUNE4 (QUSB2_PHY_BASE + 0x0000008C)
86
87/* Clocks */
88#define CLK_CTL_BASE 0x300000
89
90/* GPLL */
91#define GPLL0_MODE (CLK_CTL_BASE + 0x0000)
92#define GPLL4_MODE (CLK_CTL_BASE + 0x77000)
93#define APCS_GPLL_ENA_VOTE (CLK_CTL_BASE + 0x52000)
94#define APCS_CLOCK_BRANCH_ENA_VOTE (CLK_CTL_BASE + 0x52004)
95
96/* UART Clocks */
Channagoud Kadabi99d23702015-02-02 20:52:17 -080097#define BLSP2_AHB_CBCR (CLK_CTL_BASE + 0x25004)
98#define BLSP2_UART2_APPS_CBCR (CLK_CTL_BASE + 0x29004)
Channagoud Kadabi35503c42014-11-14 16:22:43 -080099#define BLSP2_UART2_APPS_CMD_RCGR (CLK_CTL_BASE + 0x2900C)
100#define BLSP2_UART2_APPS_CFG_RCGR (CLK_CTL_BASE + 0x29010)
101#define BLSP2_UART2_APPS_M (CLK_CTL_BASE + 0x29014)
102#define BLSP2_UART2_APPS_N (CLK_CTL_BASE + 0x29018)
103#define BLSP2_UART2_APPS_D (CLK_CTL_BASE + 0x2901C)
Channagoud Kadabied60a8b2014-06-27 15:35:09 -0700104
105/* USB3 clocks */
106#define USB_30_BCR (CLK_CTL_BASE + 0xF000)
Channagoud Kadabidf233d22015-02-11 11:56:48 -0800107#define GCC_USB30_GDSCR (CLK_CTL_BASE + 0xF004)
Channagoud Kadabied60a8b2014-06-27 15:35:09 -0700108#define USB30_MASTER_CBCR (CLK_CTL_BASE + 0xF008)
Channagoud Kadabidf233d22015-02-11 11:56:48 -0800109#define USB30_SLEEP_CBCR (CLK_CTL_BASE + 0xF00C)
110#define USB30_MOCK_UTMI_CBCR (CLK_CTL_BASE + 0xF010)
Channagoud Kadabied60a8b2014-06-27 15:35:09 -0700111#define USB30_MASTER_CMD_RCGR (CLK_CTL_BASE + 0xF014)
112#define USB30_MASTER_CFG_RCGR (CLK_CTL_BASE + 0xF018)
113#define USB30_MASTER_M (CLK_CTL_BASE + 0xF01C)
114#define USB30_MASTER_N (CLK_CTL_BASE + 0xF020)
115#define USB30_MASTER_D (CLK_CTL_BASE + 0xF024)
Channagoud Kadabidf233d22015-02-11 11:56:48 -0800116#define USB30_MOCK_UTMI_CMD_RCGR (CLK_CTL_BASE + 0xF028)
117#define USB30_MOCK_UTMI_CFG_RCGR (CLK_CTL_BASE + 0xF02C)
Channagoud Kadabied60a8b2014-06-27 15:35:09 -0700118#define SYS_NOC_USB3_AXI_CBCR (CLK_CTL_BASE + 0xF03C)
119
Channagoud Kadabied60a8b2014-06-27 15:35:09 -0700120#define USB30_PHY_AUX_CMD_RCGR (CLK_CTL_BASE + 0x5000C)
121#define USB30_PHY_AUX_CFG_RCGR (CLK_CTL_BASE + 0x50010)
122#define USB30_PHY_AUX_CBCR (CLK_CTL_BASE + 0x50000)
123#define USB30_PHY_PIPE_CBCR (CLK_CTL_BASE + 0x50004)
124#define USB30_PHY_BCR (CLK_CTL_BASE + 0x50020)
125#define USB30PHY_PHY_BCR (CLK_CTL_BASE + 0x50024)
Channagoud Kadabied60a8b2014-06-27 15:35:09 -0700126#define USB_PHY_CFG_AHB2PHY_CBCR (CLK_CTL_BASE + 0x6A004)
Channagoud Kadabidf233d22015-02-11 11:56:48 -0800127#define GCC_AGGRE2_USB3_AXI_CBCR (CLK_CTL_BASE + 0x83018)
Channagoud Kadabied60a8b2014-06-27 15:35:09 -0700128
129/* SDCC */
130#define SDCC1_BCR (CLK_CTL_BASE + 0x13000) /* block reset */
131#define SDCC1_APPS_CBCR (CLK_CTL_BASE + 0x13004) /* branch control */
132#define SDCC1_AHB_CBCR (CLK_CTL_BASE + 0x13008)
133#define SDCC1_CMD_RCGR (CLK_CTL_BASE + 0x13010) /* cmd */
134#define SDCC1_CFG_RCGR (CLK_CTL_BASE + 0x13014) /* cfg */
135#define SDCC1_M (CLK_CTL_BASE + 0x13018) /* m */
136#define SDCC1_N (CLK_CTL_BASE + 0x1301C) /* n */
137#define SDCC1_D (CLK_CTL_BASE + 0x13020) /* d */
138
139/* SDCC2 */
140#define SDCC2_BCR (CLK_CTL_BASE + 0x14000) /* block reset */
141#define SDCC2_APPS_CBCR (CLK_CTL_BASE + 0x14004) /* branch control */
142#define SDCC2_AHB_CBCR (CLK_CTL_BASE + 0x14008)
143#define SDCC2_CMD_RCGR (CLK_CTL_BASE + 0x14010) /* cmd */
144#define SDCC2_CFG_RCGR (CLK_CTL_BASE + 0x14014) /* cfg */
145#define SDCC2_M (CLK_CTL_BASE + 0x14018) /* m */
146#define SDCC2_N (CLK_CTL_BASE + 0x1401C) /* n */
147#define SDCC2_D (CLK_CTL_BASE + 0x14020) /* d */
148
149#define UFS_BASE 0x624000
150
151#define SPMI_BASE 0x4000000
152#define SPMI_GENI_BASE (SPMI_BASE + 0xA000)
153#define SPMI_PIC_BASE (SPMI_BASE + 0x1800000)
Channagoud Kadabi7b20dea2014-11-11 13:27:33 -0800154#define PMIC_ARB_CORE 0x400F000
Channagoud Kadabied60a8b2014-06-27 15:35:09 -0700155
Channagoud Kadabi037c8b82015-02-05 12:09:32 -0800156#define MSM_CE_BAM_BASE 0x644000
157#define MSM_CE_BASE 0x67A000
158#define GCC_CE1_BCR (CLK_CTL_BASE + 0x00041000)
Channagoud Kadabied60a8b2014-06-27 15:35:09 -0700159
160#define TLMM_BASE_ADDR 0x1010000
161#define GPIO_CONFIG_ADDR(x) (TLMM_BASE_ADDR + (x)*0x1000)
162#define GPIO_IN_OUT_ADDR(x) (TLMM_BASE_ADDR + 0x4 + (x)*0x1000)
163
164#define MPM2_MPM_CTRL_BASE 0x4A1000
165#define MPM2_MPM_PS_HOLD 0x4AB000
166#define MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL 0x4A3000
167
Dinesh K Garg6bbbb702015-01-30 11:13:31 -0800168/* QSEECOM: Secure app region notification */
169#define APP_REGION_ADDR 0x86600000
170#define APP_REGION_SIZE 0xd00000
171
Channagoud Kadabied60a8b2014-06-27 15:35:09 -0700172/* DRV strength for sdcc */
Channagoud Kadabi99d23702015-02-02 20:52:17 -0800173#define SDC1_HDRV_PULL_CTL (TLMM_BASE_ADDR + 0x0012C000)
Channagoud Kadabied60a8b2014-06-27 15:35:09 -0700174
175/* SDHCI - power control registers */
176#define SDCC_MCI_HC_MODE (0x00000078)
177#define SDCC_HC_PWRCTL_STATUS_REG (0x000000DC)
178#define SDCC_HC_PWRCTL_MASK_REG (0x000000E0)
179#define SDCC_HC_PWRCTL_CLEAR_REG (0x000000E4)
180#define SDCC_HC_PWRCTL_CTL_REG (0x000000E8)
181
182/* Boot config */
183#define SEC_CTRL_CORE_BASE 0x70000
184#define BOOT_CONFIG_OFFSET 0x00006044
185#define BOOT_CONFIG_REG (SEC_CTRL_CORE_BASE + BOOT_CONFIG_OFFSET)
186
Channagoud Kadabi652a6f62014-11-17 17:23:23 -0800187/* QMP rev registers */
188#define USB3_PHY_REVISION_ID0 (QMP_PHY_BASE + 0x788)
189#define USB3_PHY_REVISION_ID1 (QMP_PHY_BASE + 0x78C)
190#define USB3_PHY_REVISION_ID2 (QMP_PHY_BASE + 0x790)
191#define USB3_PHY_REVISION_ID3 (QMP_PHY_BASE + 0x794)
192
193/* Dummy macro needed for compilation only */
194#define PLATFORM_QMP_OFFSET 0x0
Channagoud Kadabied60a8b2014-06-27 15:35:09 -0700195
196#endif