aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorAneesh V <aneesh@ti.com>2012-04-27 08:24:04 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-02 03:05:51 -0400
commit6c8b0906cf447adf2aeeed3d79eb5cec7f362d1f (patch)
tree53610e3a67f6269f0e2b598f713411e4671af045 /drivers/memory
parent9c1c21a0533aa37a475e8e8cce7ee064ed771881 (diff)
memory: emif: add register definitions for EMIF
Add register offsets and bit field definitions for EMIF module in TI SoCs Signed-off-by: Aneesh V <aneesh@ti.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Benoit Cousson <b-cousson@ti.com> [santosh.shilimkar@ti.com: Moved to drivers/memory from drivers/misc] Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/emif.h454
1 files changed, 454 insertions, 0 deletions
diff --git a/drivers/memory/emif.h b/drivers/memory/emif.h
new file mode 100644
index 000000000000..44b97dfe95b4
--- /dev/null
+++ b/drivers/memory/emif.h
@@ -0,0 +1,454 @@
1/*
2 * Defines for the EMIF driver
3 *
4 * Copyright (C) 2012 Texas Instruments, Inc.
5 *
6 * Benoit Cousson (b-cousson@ti.com)
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12#ifndef __EMIF_H
13#define __EMIF_H
14
15/* Registers offset */
16#define EMIF_MODULE_ID_AND_REVISION 0x0000
17#define EMIF_STATUS 0x0004
18#define EMIF_SDRAM_CONFIG 0x0008
19#define EMIF_SDRAM_CONFIG_2 0x000c
20#define EMIF_SDRAM_REFRESH_CONTROL 0x0010
21#define EMIF_SDRAM_REFRESH_CTRL_SHDW 0x0014
22#define EMIF_SDRAM_TIMING_1 0x0018
23#define EMIF_SDRAM_TIMING_1_SHDW 0x001c
24#define EMIF_SDRAM_TIMING_2 0x0020
25#define EMIF_SDRAM_TIMING_2_SHDW 0x0024
26#define EMIF_SDRAM_TIMING_3 0x0028
27#define EMIF_SDRAM_TIMING_3_SHDW 0x002c
28#define EMIF_LPDDR2_NVM_TIMING 0x0030
29#define EMIF_LPDDR2_NVM_TIMING_SHDW 0x0034
30#define EMIF_POWER_MANAGEMENT_CONTROL 0x0038
31#define EMIF_POWER_MANAGEMENT_CTRL_SHDW 0x003c
32#define EMIF_LPDDR2_MODE_REG_DATA 0x0040
33#define EMIF_LPDDR2_MODE_REG_CONFIG 0x0050
34#define EMIF_OCP_CONFIG 0x0054
35#define EMIF_OCP_CONFIG_VALUE_1 0x0058
36#define EMIF_OCP_CONFIG_VALUE_2 0x005c
37#define EMIF_IODFT_TEST_LOGIC_GLOBAL_CONTROL 0x0060
38#define EMIF_IODFT_TEST_LOGIC_CTRL_MISR_RESULT 0x0064
39#define EMIF_IODFT_TEST_LOGIC_ADDRESS_MISR_RESULT 0x0068
40#define EMIF_IODFT_TEST_LOGIC_DATA_MISR_RESULT_1 0x006c
41#define EMIF_IODFT_TEST_LOGIC_DATA_MISR_RESULT_2 0x0070
42#define EMIF_IODFT_TEST_LOGIC_DATA_MISR_RESULT_3 0x0074
43#define EMIF_PERFORMANCE_COUNTER_1 0x0080
44#define EMIF_PERFORMANCE_COUNTER_2 0x0084
45#define EMIF_PERFORMANCE_COUNTER_CONFIG 0x0088
46#define EMIF_PERFORMANCE_COUNTER_MASTER_REGION_SELECT 0x008c
47#define EMIF_PERFORMANCE_COUNTER_TIME 0x0090
48#define EMIF_MISC_REG 0x0094
49#define EMIF_DLL_CALIB_CTRL 0x0098
50#define EMIF_DLL_CALIB_CTRL_SHDW 0x009c
51#define EMIF_END_OF_INTERRUPT 0x00a0
52#define EMIF_SYSTEM_OCP_INTERRUPT_RAW_STATUS 0x00a4
53#define EMIF_LL_OCP_INTERRUPT_RAW_STATUS 0x00a8
54#define EMIF_SYSTEM_OCP_INTERRUPT_STATUS 0x00ac
55#define EMIF_LL_OCP_INTERRUPT_STATUS 0x00b0
56#define EMIF_SYSTEM_OCP_INTERRUPT_ENABLE_SET 0x00b4
57#define EMIF_LL_OCP_INTERRUPT_ENABLE_SET 0x00b8
58#define EMIF_SYSTEM_OCP_INTERRUPT_ENABLE_CLEAR 0x00bc
59#define EMIF_LL_OCP_INTERRUPT_ENABLE_CLEAR 0x00c0
60#define EMIF_SDRAM_OUTPUT_IMPEDANCE_CALIBRATION_CONFIG 0x00c8
61#define EMIF_TEMPERATURE_ALERT_CONFIG 0x00cc
62#define EMIF_OCP_ERROR_LOG 0x00d0
63#define EMIF_READ_WRITE_LEVELING_RAMP_WINDOW 0x00d4
64#define EMIF_READ_WRITE_LEVELING_RAMP_CONTROL 0x00d8
65#define EMIF_READ_WRITE_LEVELING_CONTROL 0x00dc
66#define EMIF_DDR_PHY_CTRL_1 0x00e4
67#define EMIF_DDR_PHY_CTRL_1_SHDW 0x00e8
68#define EMIF_DDR_PHY_CTRL_2 0x00ec
69#define EMIF_PRIORITY_TO_CLASS_OF_SERVICE_MAPPING 0x0100
70#define EMIF_CONNECTION_ID_TO_CLASS_OF_SERVICE_1_MAPPING 0x0104
71#define EMIF_CONNECTION_ID_TO_CLASS_OF_SERVICE_2_MAPPING 0x0108
72#define EMIF_READ_WRITE_EXECUTION_THRESHOLD 0x0120
73#define EMIF_COS_CONFIG 0x0124
74#define EMIF_PHY_STATUS_1 0x0140
75#define EMIF_PHY_STATUS_2 0x0144
76#define EMIF_PHY_STATUS_3 0x0148
77#define EMIF_PHY_STATUS_4 0x014c
78#define EMIF_PHY_STATUS_5 0x0150
79#define EMIF_PHY_STATUS_6 0x0154
80#define EMIF_PHY_STATUS_7 0x0158
81#define EMIF_PHY_STATUS_8 0x015c
82#define EMIF_PHY_STATUS_9 0x0160
83#define EMIF_PHY_STATUS_10 0x0164
84#define EMIF_PHY_STATUS_11 0x0168
85#define EMIF_PHY_STATUS_12 0x016c
86#define EMIF_PHY_STATUS_13 0x0170
87#define EMIF_PHY_STATUS_14 0x0174
88#define EMIF_PHY_STATUS_15 0x0178
89#define EMIF_PHY_STATUS_16 0x017c
90#define EMIF_PHY_STATUS_17 0x0180
91#define EMIF_PHY_STATUS_18 0x0184
92#define EMIF_PHY_STATUS_19 0x0188
93#define EMIF_PHY_STATUS_20 0x018c
94#define EMIF_PHY_STATUS_21 0x0190
95#define EMIF_EXT_PHY_CTRL_1 0x0200
96#define EMIF_EXT_PHY_CTRL_1_SHDW 0x0204
97#define EMIF_EXT_PHY_CTRL_2 0x0208
98#define EMIF_EXT_PHY_CTRL_2_SHDW 0x020c
99#define EMIF_EXT_PHY_CTRL_3 0x0210
100#define EMIF_EXT_PHY_CTRL_3_SHDW 0x0214
101#define EMIF_EXT_PHY_CTRL_4 0x0218
102#define EMIF_EXT_PHY_CTRL_4_SHDW 0x021c
103#define EMIF_EXT_PHY_CTRL_5 0x0220
104#define EMIF_EXT_PHY_CTRL_5_SHDW 0x0224
105#define EMIF_EXT_PHY_CTRL_6 0x0228
106#define EMIF_EXT_PHY_CTRL_6_SHDW 0x022c
107#define EMIF_EXT_PHY_CTRL_7 0x0230
108#define EMIF_EXT_PHY_CTRL_7_SHDW 0x0234
109#define EMIF_EXT_PHY_CTRL_8 0x0238
110#define EMIF_EXT_PHY_CTRL_8_SHDW 0x023c
111#define EMIF_EXT_PHY_CTRL_9 0x0240
112#define EMIF_EXT_PHY_CTRL_9_SHDW 0x0244
113#define EMIF_EXT_PHY_CTRL_10 0x0248
114#define EMIF_EXT_PHY_CTRL_10_SHDW 0x024c
115#define EMIF_EXT_PHY_CTRL_11 0x0250
116#define EMIF_EXT_PHY_CTRL_11_SHDW 0x0254
117#define EMIF_EXT_PHY_CTRL_12 0x0258
118#define EMIF_EXT_PHY_CTRL_12_SHDW 0x025c
119#define EMIF_EXT_PHY_CTRL_13 0x0260
120#define EMIF_EXT_PHY_CTRL_13_SHDW 0x0264
121#define EMIF_EXT_PHY_CTRL_14 0x0268
122#define EMIF_EXT_PHY_CTRL_14_SHDW 0x026c
123#define EMIF_EXT_PHY_CTRL_15 0x0270
124#define EMIF_EXT_PHY_CTRL_15_SHDW 0x0274
125#define EMIF_EXT_PHY_CTRL_16 0x0278
126#define EMIF_EXT_PHY_CTRL_16_SHDW 0x027c
127#define EMIF_EXT_PHY_CTRL_17 0x0280
128#define EMIF_EXT_PHY_CTRL_17_SHDW 0x0284
129#define EMIF_EXT_PHY_CTRL_18 0x0288
130#define EMIF_EXT_PHY_CTRL_18_SHDW 0x028c
131#define EMIF_EXT_PHY_CTRL_19 0x0290
132#define EMIF_EXT_PHY_CTRL_19_SHDW 0x0294
133#define EMIF_EXT_PHY_CTRL_20 0x0298
134#define EMIF_EXT_PHY_CTRL_20_SHDW 0x029c
135#define EMIF_EXT_PHY_CTRL_21 0x02a0
136#define EMIF_EXT_PHY_CTRL_21_SHDW 0x02a4
137#define EMIF_EXT_PHY_CTRL_22 0x02a8
138#define EMIF_EXT_PHY_CTRL_22_SHDW 0x02ac
139#define EMIF_EXT_PHY_CTRL_23 0x02b0
140#define EMIF_EXT_PHY_CTRL_23_SHDW 0x02b4
141#define EMIF_EXT_PHY_CTRL_24 0x02b8
142#define EMIF_EXT_PHY_CTRL_24_SHDW 0x02bc
143#define EMIF_EXT_PHY_CTRL_25 0x02c0
144#define EMIF_EXT_PHY_CTRL_25_SHDW 0x02c4
145#define EMIF_EXT_PHY_CTRL_26 0x02c8
146#define EMIF_EXT_PHY_CTRL_26_SHDW 0x02cc
147#define EMIF_EXT_PHY_CTRL_27 0x02d0
148#define EMIF_EXT_PHY_CTRL_27_SHDW 0x02d4
149#define EMIF_EXT_PHY_CTRL_28 0x02d8
150#define EMIF_EXT_PHY_CTRL_28_SHDW 0x02dc
151#define EMIF_EXT_PHY_CTRL_29 0x02e0
152#define EMIF_EXT_PHY_CTRL_29_SHDW 0x02e4
153#define EMIF_EXT_PHY_CTRL_30 0x02e8
154#define EMIF_EXT_PHY_CTRL_30_SHDW 0x02ec
155
156/* Registers shifts and masks */
157
158/* EMIF_MODULE_ID_AND_REVISION */
159#define SCHEME_SHIFT 30
160#define SCHEME_MASK (0x3 << 30)
161#define MODULE_ID_SHIFT 16
162#define MODULE_ID_MASK (0xfff << 16)
163#define RTL_VERSION_SHIFT 11
164#define RTL_VERSION_MASK (0x1f << 11)
165#define MAJOR_REVISION_SHIFT 8
166#define MAJOR_REVISION_MASK (0x7 << 8)
167#define MINOR_REVISION_SHIFT 0
168#define MINOR_REVISION_MASK (0x3f << 0)
169
170/* STATUS */
171#define BE_SHIFT 31
172#define BE_MASK (1 << 31)
173#define DUAL_CLK_MODE_SHIFT 30
174#define DUAL_CLK_MODE_MASK (1 << 30)
175#define FAST_INIT_SHIFT 29
176#define FAST_INIT_MASK (1 << 29)
177#define RDLVLGATETO_SHIFT 6
178#define RDLVLGATETO_MASK (1 << 6)
179#define RDLVLTO_SHIFT 5
180#define RDLVLTO_MASK (1 << 5)
181#define WRLVLTO_SHIFT 4
182#define WRLVLTO_MASK