Skip to content

Commit 94fdc2a

Browse files
ycchen0221airlied
authored andcommitted
drm/ast: POST code for the new AST2500
This is used when the BMC isn't running any code and thus has to be initialized by the host. The code originates from Aspeed (Y.C. Chen) and has been cleaned up for coding style purposes by BenH. Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com> Acked-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent d95618e commit 94fdc2a

2 files changed

Lines changed: 476 additions & 3 deletions

File tree

‎drivers/gpu/drm/ast/ast_dram_tables.h‎

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,66 @@ static const struct ast_dramstruct ast2100_dram_table_data[] = {
141141
{ 0xffff, 0xffffffff },
142142
};
143143

144+
/*
145+
* AST2500 DRAM settings modules
146+
*/
147+
#define REGTBL_NUM 17
148+
#define REGIDX_010 0
149+
#define REGIDX_014 1
150+
#define REGIDX_018 2
151+
#define REGIDX_020 3
152+
#define REGIDX_024 4
153+
#define REGIDX_02C 5
154+
#define REGIDX_030 6
155+
#define REGIDX_214 7
156+
#define REGIDX_2E0 8
157+
#define REGIDX_2E4 9
158+
#define REGIDX_2E8 10
159+
#define REGIDX_2EC 11
160+
#define REGIDX_2F0 12
161+
#define REGIDX_2F4 13
162+
#define REGIDX_2F8 14
163+
#define REGIDX_RFC 15
164+
#define REGIDX_PLL 16
165+
166+
static const u32 ast2500_ddr3_1600_timing_table[REGTBL_NUM] = {
167+
0x64604D38, /* 0x010 */
168+
0x29690599, /* 0x014 */
169+
0x00000300, /* 0x018 */
170+
0x00000000, /* 0x020 */
171+
0x00000000, /* 0x024 */
172+
0x02181E70, /* 0x02C */
173+
0x00000040, /* 0x030 */
174+
0x00000024, /* 0x214 */
175+
0x02001300, /* 0x2E0 */
176+
0x0E0000A0, /* 0x2E4 */
177+
0x000E001B, /* 0x2E8 */
178+
0x35B8C105, /* 0x2EC */
179+
0x08090408, /* 0x2F0 */
180+
0x9B000800, /* 0x2F4 */
181+
0x0E400A00, /* 0x2F8 */
182+
0x9971452F, /* tRFC */
183+
0x000071C1 /* PLL */
184+
};
185+
186+
static const u32 ast2500_ddr4_1600_timing_table[REGTBL_NUM] = {
187+
0x63604E37, /* 0x010 */
188+
0xE97AFA99, /* 0x014 */
189+
0x00019000, /* 0x018 */
190+
0x08000000, /* 0x020 */
191+
0x00000400, /* 0x024 */
192+
0x00000410, /* 0x02C */
193+
0x00000101, /* 0x030 */
194+
0x00000024, /* 0x214 */
195+
0x03002900, /* 0x2E0 */
196+
0x0E0000A0, /* 0x2E4 */
197+
0x000E001C, /* 0x2E8 */
198+
0x35B8C106, /* 0x2EC */
199+
0x08080607, /* 0x2F0 */
200+
0x9B000900, /* 0x2F4 */
201+
0x0E400A00, /* 0x2F8 */
202+
0x99714545, /* tRFC */
203+
0x000071C1 /* PLL */
204+
};
205+
144206
#endif

0 commit comments

Comments
 (0)