| 1 |
|
| 2 |
|
| 3 |
#include <boardid.h> |
| 4 |
#include <console/console.h> |
| 5 |
#include <soc/emi.h> |
| 6 |
|
| 7 |
static const struct mt8173_sdram_params sdram_configs[] = { |
| 8 |
#include "sdram_inf/sdram-lpddr3-H9CCNNN8GTMLAR-2GB.inc" |
| 9 |
#include "sdram_inf/sdram-lpddr3-K4E8E304EE-2GB.inc" |
| 10 |
#include "sdram_inf/sdram-lpddr3-K4E6E304EE-4GB.inc" |
| 11 |
#include "sdram_inf/sdram-lpddr3-H9CCNNNBLTBLAR-4GB.inc" |
| 12 |
#include "sdram_inf/sdram-lpddr3-K4E6E304EB-4GB.inc" |
| 13 |
#include "sdram_inf/sdram-lpddr3-K4E8E324EB-2GB.inc" |
| 14 |
#include "sdram_inf/sdram-lpddr3-MT52L512M32D2PF-4GB.inc" |
| 15 |
#include "sdram_inf/sdram-lpddr3-H9CCNNNBJTALAR-4GB.inc" |
| 16 |
#include "sdram_inf/sdram-lpddr3-MT52L256M32D1PF-2GB.inc" |
| 17 |
#include "sdram_inf/sdram-lpddr3-K4E6E304ED-4GB.inc" |
| 18 |
#include "sdram_inf/sdram-lpddr3-NT6CL512T32AM-H0-4GB.inc" |
| 19 |
#include "sdram_inf/sdram-lpddr3-K4E6E304EC-EGCG-4GB.inc" |
| 20 |
#include "sdram_inf/sdram-unused.inc" |
| 21 |
#include "sdram_inf/sdram-unused.inc" |
| 22 |
#include "sdram_inf/sdram-unused.inc" |
| 23 |
#include "sdram_inf/sdram-unused.inc" |
| 24 |
}; |
| 25 |
|
| 26 |
const struct mt8173_sdram_params *get_sdram_config(void) |
| 27 |
{ |
| 28 |
u32 ramcode = ram_code(); |
| 29 |
|
| 30 |
if (ramcode >= ARRAY_SIZE(sdram_configs) |
| 31 |
|| sdram_configs[ramcode].type == TYPE_INVALID) |
| 32 |
die("Invalid RAMCODE."); |
| 33 |
|
| 34 |
return &sdram_configs[ramcode]; |
| 35 |
} |