blob: 14109d722cdb55854d30b312e16e5eb39c43cedc [file] [log] [blame]
Unnati Gandhib3820bc2014-07-04 16:56:27 +05301/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
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_FERRUM_IOMAP_H_
30#define _PLATFORM_FERRUM_IOMAP_H_
31
32#define MSM_IOMAP_BASE 0x00000000
33#define MSM_IOMAP_END 0x08000000
34
35#define SDRAM_START_ADDR 0x80000000
36
37#define MSM_SHARED_BASE 0x86300000
38
39#define APPS_SS_BASE 0x0B000000
40
41#define MSM_GIC_DIST_BASE APPS_SS_BASE
42#define MSM_GIC_CPU_BASE (APPS_SS_BASE + 0x2000)
43#define APPS_APCS_QTMR_AC_BASE (APPS_SS_BASE + 0x00020000)
44#define APPS_APCS_F0_QTMR_V1_BASE (APPS_SS_BASE + 0x00021000)
45#define QTMR_BASE APPS_APCS_F0_QTMR_V1_BASE
46
47#define PERIPH_SS_BASE 0x07800000
48
49#define MSM_SDC1_BASE (PERIPH_SS_BASE + 0x00024000)
50#define MSM_SDC2_BASE (PERIPH_SS_BASE + 0x00064000)
51
52#define BLSP1_UART0_BASE (PERIPH_SS_BASE + 0x000AF000)
53#define BLSP1_UART1_BASE (PERIPH_SS_BASE + 0x000B0000)
54#define MSM_USB_BASE (PERIPH_SS_BASE + 0x000D9000)
55
56#define CLK_CTL_BASE 0x1800000
57
58#define SPMI_BASE 0x02000000
59#define SPMI_GENI_BASE (SPMI_BASE + 0xA000)
60#define SPMI_PIC_BASE (SPMI_BASE + 0x01800000)
61
62#define TLMM_BASE_ADDR 0x1000000
63#define GPIO_CONFIG_ADDR(x) (TLMM_BASE_ADDR + (x)*0x1000)
64#define GPIO_IN_OUT_ADDR(x) (TLMM_BASE_ADDR + 0x00000004 + (x)*0x1000)
65
66#define MPM2_MPM_CTRL_BASE 0x004A0000
67#define MPM2_MPM_PS_HOLD 0x004AB000
68
69/* CRYPTO ENGINE */
70#define MSM_CE1_BASE 0x073A000
71#define MSM_CE1_BAM_BASE 0x0704000
72
73
74/* GPLL */
75#define GPLL0_STATUS (CLK_CTL_BASE + 0x21024)
76#define APCS_GPLL_ENA_VOTE (CLK_CTL_BASE + 0x45000)
77#define APCS_CLOCK_BRANCH_ENA_VOTE (CLK_CTL_BASE + 0x45004)
78
79/* SDCC */
80#define SDC1_HDRV_PULL_CTL (TLMM_BASE_ADDR + 0x10A000)
81#define SDCC1_BCR (CLK_CTL_BASE + 0x42000) /* block reset*/
82#define SDCC1_APPS_CBCR (CLK_CTL_BASE + 0x42018) /* branch ontrol */
83#define SDCC1_AHB_CBCR (CLK_CTL_BASE + 0x4201C)
84#define SDCC1_CMD_RCGR (CLK_CTL_BASE + 0x42004) /* cmd */
85#define SDCC1_CFG_RCGR (CLK_CTL_BASE + 0x42008) /* cfg */
86#define SDCC1_M (CLK_CTL_BASE + 0x4200C) /* m */
87#define SDCC1_N (CLK_CTL_BASE + 0x42010) /* n */
88#define SDCC1_D (CLK_CTL_BASE + 0x42014) /* d */
89
90
91/* UART */
92#define BLSP1_AHB_CBCR (CLK_CTL_BASE + 0x1008)
93#define BLSP1_UART2_APPS_CBCR (CLK_CTL_BASE + 0x302C)
94#define BLSP1_UART2_APPS_CMD_RCGR (CLK_CTL_BASE + 0x3034)
95#define BLSP1_UART2_APPS_CFG_RCGR (CLK_CTL_BASE + 0x3038)
96#define BLSP1_UART2_APPS_M (CLK_CTL_BASE + 0x303C)
97#define BLSP1_UART2_APPS_N (CLK_CTL_BASE + 0x3040)
98#define BLSP1_UART2_APPS_D (CLK_CTL_BASE + 0x3044)
99
100
101/* USB */
102#define USB_HS_BCR (CLK_CTL_BASE + 0x41000)
103#define USB_HS_SYSTEM_CBCR (CLK_CTL_BASE + 0x41004)
104#define USB_HS_AHB_CBCR (CLK_CTL_BASE + 0x41008)
105#define USB_HS_SYSTEM_CMD_RCGR (CLK_CTL_BASE + 0x41010)
106#define USB_HS_SYSTEM_CFG_RCGR (CLK_CTL_BASE + 0x41014)
107
108#endif