blob: 1bf3ea825944b64ebc246f2132c7efde4227bc94 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001#include <platform/mt_reg_base.h>
2
3#ifndef __EMI_HW_H__
4#define __EMI_HW_H__
5
6#define EMI_BASE (IO_PHYS + 0x219000)
7#define CHN0_EMI_BASE (IO_PHYS + 0x22D000)
8#define EMI_MPU_BASE (IO_PHYS + 0x226000)
9
10#define EMI_CONA ((volatile unsigned int *)(EMI_BASE+0x000))
11#define EMI_CONB ((volatile unsigned int *)(EMI_BASE+0x008))
12#define EMI_CONC ((volatile unsigned int *)(EMI_BASE+0x010))
13#define EMI_COND ((volatile unsigned int *)(EMI_BASE+0x018))
14#define EMI_CONE ((volatile unsigned int *)(EMI_BASE+0x020))
15#define EMI_CONF ((volatile unsigned int *)(EMI_BASE+0x028))
16#define EMI_CONG ((volatile unsigned int *)(EMI_BASE+0x030))
17#define EMI_CONH ((volatile unsigned int *)(EMI_BASE+0x038))
18#define EMI_CONH_2ND ((volatile unsigned int *)(EMI_BASE+0x03C))
19#define EMI_CONI ((volatile unsigned int *)(EMI_BASE+0x040))
20#define EMI_CONJ ((volatile unsigned int *)(EMI_BASE+0x048))
21#define EMI_CONM ((volatile unsigned int *)(EMI_BASE+0x060))
22#define EMI_CONN ((volatile unsigned int *)(EMI_BASE+0x068))
23#define EMI_CONO ((volatile unsigned int *)(EMI_BASE+0x070))
24#define EMI_MDCT ((volatile unsigned int *)(EMI_BASE+0x078))
25#define EMI_MDCT_2ND ((volatile unsigned int *)(EMI_BASE+0x07C))
26#define EMI_IOCL ((volatile unsigned int *)(EMI_BASE+0x0D0))
27#define EMI_IOCL_2ND ((volatile unsigned int *)(EMI_BASE+0x0D4))
28#define EMI_IOCM ((volatile unsigned int *)(EMI_BASE+0x0D8))
29#define EMI_IOCM_2ND ((volatile unsigned int *)(EMI_BASE+0x0DC))
30#define EMI_TESTB ((volatile unsigned int *)(EMI_BASE+0x0E8))
31#define EMI_TESTC ((volatile unsigned int *)(EMI_BASE+0x0F0))
32#define EMI_TESTD ((volatile unsigned int *)(EMI_BASE+0x0F8))
33#define EMI_ARBA ((volatile unsigned int *)(EMI_BASE+0x100))
34#define EMI_ARBC ((volatile unsigned int *)(EMI_BASE+0x110))
35#define EMI_ARBD ((volatile unsigned int *)(EMI_BASE+0x118))
36#define EMI_ARBE ((volatile unsigned int *)(EMI_BASE+0x120))
37#define EMI_ARBF ((volatile unsigned int *)(EMI_BASE+0x128))
38#define EMI_ARBG ((volatile unsigned int *)(EMI_BASE+0x130))
39#define EMI_ARBH ((volatile unsigned int *)(EMI_BASE+0x138))
40#define EMI_ARBI ((volatile unsigned int *)(EMI_BASE+0x140))
41#define EMI_ARBI_2ND ((volatile unsigned int *)(EMI_BASE+0x144))
42#define EMI_ARBK ((volatile unsigned int *)(EMI_BASE+0x150))
43#define EMI_ARBK_2ND ((volatile unsigned int *)(EMI_BASE+0x154))
44#define EMI_SLCT ((volatile unsigned int *)(EMI_BASE+0x158))
45#define EMI_MPUD0_ST ((volatile unsigned int *)(EMI_BASE+0x160))
46#define EMI_MPUD1_ST ((volatile unsigned int *)(EMI_BASE+0x164))
47#define EMI_MPUD2_ST ((volatile unsigned int *)(EMI_BASE+0x168))
48#define EMI_MPUD3_ST ((volatile unsigned int *)(EMI_BASE+0x16C))
49#define EMI_MPUD4_ST ((volatile unsigned int *)(EMI_BASE+0x170))
50#define EMI_MPUD5_ST ((volatile unsigned int *)(EMI_BASE+0x174))
51#define EMI_MPUD6_ST ((volatile unsigned int *)(EMI_BASE+0x178))
52#define EMI_MPUD7_ST ((volatile unsigned int *)(EMI_BASE+0x17C))
53#define EMI_MPUD8_ST ((volatile unsigned int *)(EMI_BASE+0x180))
54#define EMI_MPUD9_ST ((volatile unsigned int *)(EMI_BASE+0x184))
55#define EMI_MPUD10_ST ((volatile unsigned int *)(EMI_BASE+0x188))
56#define EMI_MPUD11_ST ((volatile unsigned int *)(EMI_BASE+0x18C))
57#define EMI_MPUD12_ST ((volatile unsigned int *)(EMI_BASE+0x190))
58#define EMI_MPUD13_ST ((volatile unsigned int *)(EMI_BASE+0x194))
59#define EMI_MPUD14_ST ((volatile unsigned int *)(EMI_BASE+0x198))
60#define EMI_MPUD15_ST ((volatile unsigned int *)(EMI_BASE+0x19C))
61#define EMI_MPUD16_ST ((volatile unsigned int *)(EMI_BASE+0x1A0))
62#define EMI_MPUD17_ST ((volatile unsigned int *)(EMI_BASE+0x1A4))
63#define EMI_MPUD18_ST ((volatile unsigned int *)(EMI_BASE+0x1A8))
64#define EMI_MPUD19_ST ((volatile unsigned int *)(EMI_BASE+0x1AC))
65#define EMI_MPUD20_ST ((volatile unsigned int *)(EMI_BASE+0x1B0))
66#define EMI_MPUD21_ST ((volatile unsigned int *)(EMI_BASE+0x1B4))
67#define EMI_MPUD22_ST ((volatile unsigned int *)(EMI_BASE+0x1B8))
68#define EMI_MPUD23_ST ((volatile unsigned int *)(EMI_BASE+0x1BC))
69#define EMI_MPUD24_ST ((volatile unsigned int *)(EMI_BASE+0x1C0))
70#define EMI_MPUD25_ST ((volatile unsigned int *)(EMI_BASE+0x1C4))
71#define EMI_MPUD26_ST ((volatile unsigned int *)(EMI_BASE+0x1C8))
72#define EMI_MPUD27_ST ((volatile unsigned int *)(EMI_BASE+0x1CC))
73#define EMI_MPUD28_ST ((volatile unsigned int *)(EMI_BASE+0x1D0))
74#define EMI_MPUD29_ST ((volatile unsigned int *)(EMI_BASE+0x1D4))
75#define EMI_MPUD30_ST ((volatile unsigned int *)(EMI_BASE+0x1D8))
76#define EMI_MPUD31_ST ((volatile unsigned int *)(EMI_BASE+0x1DC))
77#define EMI_MPUS ((volatile unsigned int *)(EMI_BASE+0x1F0))
78#define EMI_MPUT ((volatile unsigned int *)(EMI_BASE+0x1F8))
79#define EMI_MPUT_2ND ((volatile unsigned int *)(EMI_BASE+0x1FC))
80#define EMI_D0_ST2 ((volatile unsigned int *)(EMI_BASE+0x200))
81#define EMI_D1_ST2 ((volatile unsigned int *)(EMI_BASE+0x204))
82#define EMI_D2_ST2 ((volatile unsigned int *)(EMI_BASE+0x208))
83#define EMI_D3_ST2 ((volatile unsigned int *)(EMI_BASE+0x20C))
84#define EMI_D4_ST2 ((volatile unsigned int *)(EMI_BASE+0x210))
85#define EMI_D5_ST2 ((volatile unsigned int *)(EMI_BASE+0x214))
86#define EMI_D6_ST2 ((volatile unsigned int *)(EMI_BASE+0x218))
87#define EMI_D7_ST2 ((volatile unsigned int *)(EMI_BASE+0x21C))
88#define EMI_D8_ST2 ((volatile unsigned int *)(EMI_BASE+0x220))
89#define EMI_D9_ST2 ((volatile unsigned int *)(EMI_BASE+0x224))
90#define EMI_D10_ST2 ((volatile unsigned int *)(EMI_BASE+0x228))
91#define EMI_D11_ST2 ((volatile unsigned int *)(EMI_BASE+0x22C))
92#define EMI_D12_ST2 ((volatile unsigned int *)(EMI_BASE+0x230))
93#define EMI_D13_ST2 ((volatile unsigned int *)(EMI_BASE+0x234))
94#define EMI_D14_ST2 ((volatile unsigned int *)(EMI_BASE+0x238))
95#define EMI_D15_ST2 ((volatile unsigned int *)(EMI_BASE+0x23C))
96#define EMI_D16_ST2 ((volatile unsigned int *)(EMI_BASE+0x240))
97#define EMI_D17_ST2 ((volatile unsigned int *)(EMI_BASE+0x244))
98#define EMI_D18_ST2 ((volatile unsigned int *)(EMI_BASE+0x248))
99#define EMI_D19_ST2 ((volatile unsigned int *)(EMI_BASE+0x24C))
100#define EMI_D20_ST2 ((volatile unsigned int *)(EMI_BASE+0x250))
101#define EMI_D21_ST2 ((volatile unsigned int *)(EMI_BASE+0x254))
102#define EMI_D22_ST2 ((volatile unsigned int *)(EMI_BASE+0x258))
103#define EMI_D23_ST2 ((volatile unsigned int *)(EMI_BASE+0x25C))
104#define EMI_D24_ST2 ((volatile unsigned int *)(EMI_BASE+0x260))
105#define EMI_D25_ST2 ((volatile unsigned int *)(EMI_BASE+0x264))
106#define EMI_D26_ST2 ((volatile unsigned int *)(EMI_BASE+0x268))
107#define EMI_D27_ST2 ((volatile unsigned int *)(EMI_BASE+0x26C))
108#define EMI_D28_ST2 ((volatile unsigned int *)(EMI_BASE+0x270))
109#define EMI_D29_ST2 ((volatile unsigned int *)(EMI_BASE+0x274))
110#define EMI_D30_ST2 ((volatile unsigned int *)(EMI_BASE+0x278))
111#define EMI_D31_ST2 ((volatile unsigned int *)(EMI_BASE+0x27C))
112#define EMI_BMEN ((volatile unsigned int *)(EMI_BASE+0x400))
113#define EMI_BSTP ((volatile unsigned int *)(EMI_BASE+0x404))
114#define EMI_BCNT ((volatile unsigned int *)(EMI_BASE+0x408))
115#define EMI_TACT ((volatile unsigned int *)(EMI_BASE+0x410))
116#define EMI_TSCT ((volatile unsigned int *)(EMI_BASE+0x418))
117#define EMI_WACT ((volatile unsigned int *)(EMI_BASE+0x420))
118#define EMI_WSCT ((volatile unsigned int *)(EMI_BASE+0x428))
119#define EMI_BACT ((volatile unsigned int *)(EMI_BASE+0x430))
120#define EMI_BSCT ((volatile unsigned int *)(EMI_BASE+0x438))
121#define EMI_MSEL ((volatile unsigned int *)(EMI_BASE+0x440))
122#define EMI_TSCT2 ((volatile unsigned int *)(EMI_BASE+0x448))
123#define EMI_TSCT3 ((volatile unsigned int *)(EMI_BASE+0x450))
124#define EMI_WSCT2 ((volatile unsigned int *)(EMI_BASE+0x458))
125#define EMI_WSCT3 ((volatile unsigned int *)(EMI_BASE+0x460))
126#define EMI_WSCT4 ((volatile unsigned int *)(EMI_BASE+0x464))
127#define EMI_MSEL2 ((volatile unsigned int *)(EMI_BASE+0x468))
128#define EMI_MSEL3 ((volatile unsigned int *)(EMI_BASE+0x470))
129#define EMI_MSEL4 ((volatile unsigned int *)(EMI_BASE+0x478))
130#define EMI_MSEL5 ((volatile unsigned int *)(EMI_BASE+0x480))
131#define EMI_MSEL6 ((volatile unsigned int *)(EMI_BASE+0x488))
132#define EMI_MSEL7 ((volatile unsigned int *)(EMI_BASE+0x490))
133#define EMI_MSEL8 ((volatile unsigned int *)(EMI_BASE+0x498))
134#define EMI_MSEL9 ((volatile unsigned int *)(EMI_BASE+0x4A0))
135#define EMI_MSEL10 ((volatile unsigned int *)(EMI_BASE+0x4A8))
136#define EMI_BMID0 ((volatile unsigned int *)(EMI_BASE+0x4B0))
137#define EMI_BMID1 ((volatile unsigned int *)(EMI_BASE+0x4B4))
138#define EMI_BMID2 ((volatile unsigned int *)(EMI_BASE+0x4B8))
139#define EMI_BMID3 ((volatile unsigned int *)(EMI_BASE+0x4BC))
140#define EMI_BMID4 ((volatile unsigned int *)(EMI_BASE+0x4C0))
141#define EMI_BMID5 ((volatile unsigned int *)(EMI_BASE+0x4C4))
142#define EMI_BMID6 ((volatile unsigned int *)(EMI_BASE+0x4C8))
143#define EMI_BMID7 ((volatile unsigned int *)(EMI_BASE+0x4CC))
144#define EMI_BMID8 ((volatile unsigned int *)(EMI_BASE+0x4D0))
145#define EMI_BMID9 ((volatile unsigned int *)(EMI_BASE+0x4D4))
146#define EMI_BMID10 ((volatile unsigned int *)(EMI_BASE+0x4D8))
147#define EMI_BMEN1 ((volatile unsigned int *)(EMI_BASE+0x4E0))
148#define EMI_BMEN2 ((volatile unsigned int *)(EMI_BASE+0x4E8))
149#define EMI_BMRW0 ((volatile unsigned int *)(EMI_BASE+0x4F8))
150#define EMI_BMRW1 ((volatile unsigned int *)(EMI_BASE+0x4FC))
151#define EMI_TTYPE1 ((volatile unsigned int *)(EMI_BASE+0x500))
152#define EMI_TTYPE2 ((volatile unsigned int *)(EMI_BASE+0x508))
153#define EMI_TTYPE3 ((volatile unsigned int *)(EMI_BASE+0x510))
154#define EMI_TTYPE4 ((volatile unsigned int *)(EMI_BASE+0x518))
155#define EMI_TTYPE5 ((volatile unsigned int *)(EMI_BASE+0x520))
156#define EMI_TTYPE6 ((volatile unsigned int *)(EMI_BASE+0x528))
157#define EMI_TTYPE7 ((volatile unsigned int *)(EMI_BASE+0x530))
158#define EMI_TTYPE8 ((volatile unsigned int *)(EMI_BASE+0x538))
159#define EMI_TTYPE9 ((volatile unsigned int *)(EMI_BASE+0x540))
160#define EMI_TTYPE10 ((volatile unsigned int *)(EMI_BASE+0x548))
161#define EMI_TTYPE11 ((volatile unsigned int *)(EMI_BASE+0x550))
162#define EMI_TTYPE12 ((volatile unsigned int *)(EMI_BASE+0x558))
163#define EMI_TTYPE13 ((volatile unsigned int *)(EMI_BASE+0x560))
164#define EMI_TTYPE14 ((volatile unsigned int *)(EMI_BASE+0x568))
165#define EMI_TTYPE15 ((volatile unsigned int *)(EMI_BASE+0x570))
166#define EMI_TTYPE16 ((volatile unsigned int *)(EMI_BASE+0x578))
167#define EMI_TTYPE17 ((volatile unsigned int *)(EMI_BASE+0x580))
168#define EMI_TTYPE18 ((volatile unsigned int *)(EMI_BASE+0x588))
169#define EMI_TTYPE19 ((volatile unsigned int *)(EMI_BASE+0x590))
170#define EMI_TTYPE20 ((volatile unsigned int *)(EMI_BASE+0x598))
171#define EMI_TTYPE21 ((volatile unsigned int *)(EMI_BASE+0x5A0))
172#define EMI_BWCT0 ((volatile unsigned int *)(EMI_BASE+0x5B0))
173#define EMI_BWCT1 ((volatile unsigned int *)(EMI_BASE+0x5B4))
174#define EMI_BWCT2 ((volatile unsigned int *)(EMI_BASE+0x5B8))
175#define EMI_BWCT3 ((volatile unsigned int *)(EMI_BASE+0x5BC))
176#define EMI_BWCT4 ((volatile unsigned int *)(EMI_BASE+0x5C0))
177#define EMI_BWST0 ((volatile unsigned int *)(EMI_BASE+0x5C4))
178#define EMI_BWST1 ((volatile unsigned int *)(EMI_BASE+0x5C8))
179#define EMI_EX_CON ((volatile unsigned int *)(EMI_BASE+0x5D0))
180#define EMI_EX_ST0 ((volatile unsigned int *)(EMI_BASE+0x5D4))
181#define EMI_EX_ST1 ((volatile unsigned int *)(EMI_BASE+0x5D8))
182#define EMI_EX_ST2 ((volatile unsigned int *)(EMI_BASE+0x5DC))
183#define EMI_WP_ADR ((volatile unsigned int *)(EMI_BASE+0x5E0))
184#define EMI_WP_ADR_2ND ((volatile unsigned int *)(EMI_BASE+0x5E4))
185#define EMI_WP_CTRL ((volatile unsigned int *)(EMI_BASE+0x5E8))
186#define EMI_CHKER ((volatile unsigned int *)(EMI_BASE+0x5F0))
187#define EMI_CHKER_TYPE ((volatile unsigned int *)(EMI_BASE+0x5F4))
188#define EMI_CHKER_ADR ((volatile unsigned int *)(EMI_BASE+0x5F8))
189#define EMI_CHKER_ADR_2ND ((volatile unsigned int *)(EMI_BASE+0x5FC))
190#define EMI_BWCT0_2ND ((volatile unsigned int *)(EMI_BASE+0x6A0))
191#define EMI_LTCT0_2ND ((volatile unsigned int *)(EMI_BASE+0x750))
192#define EMI_LTCT1_2ND ((volatile unsigned int *)(EMI_BASE+0x754))
193#define EMI_LTCT2_2ND ((volatile unsigned int *)(EMI_BASE+0x758))
194#define EMI_LTCT3_2ND ((volatile unsigned int *)(EMI_BASE+0x75C))
195#define EMI_BWCT0_3RD ((volatile unsigned int *)(EMI_BASE+0x770))
196#define EMI_BWCT0_4TH ((volatile unsigned int *)(EMI_BASE+0x780))
197#define EMI_BWCT0_5TH ((volatile unsigned int *)(EMI_BASE+0x7B0))
198#define EMI_SLVA ((volatile unsigned int *)(EMI_BASE+0x800))
199
200#define EMI_MPU_CTRL ((volatile unsigned int *)(EMI_MPU_BASE+0x000))
201#define EMI_MPU_DBG ((volatile unsigned int *)(EMI_MPU_BASE+0x004))
202#define EMI_MPU_SA0 (EMI_MPU_BASE+0x100)
203#define EMI_MPU_EA0 (EMI_MPU_BASE+0x200)
204#define EMI_MPU_SA(region) ((volatile unsigned int *)(EMI_MPU_SA0+(region*4)))
205#define EMI_MPU_EA(region) ((volatile unsigned int *)(EMI_MPU_EA0+(region*4)))
206#define EMI_MPU_APC0 (EMI_MPU_BASE+0x300)
207#define EMI_MPU_APC(region, dgroup) ((volatile unsigned int *)(EMI_MPU_APC0+(region*4)+((dgroup)*0x100)))
208#define EMI_MPU_CTRL_D0 (EMI_MPU_BASE+0x800)
209#define EMI_MPU_CTRL_D(domain) ((volatile unsigned int *)(EMI_MPU_CTRL_D0+(domain*4)))
210#define EMI_RG_MASK_D0 (EMI_MPU_BASE+0x900)
211#define EMI_RG_MASK_D(domain) ((volatile unsigned int *)(EMI_RG_MASK_D0+(domain*4)))
212
213#endif // __EMI_HW_H__