mb/google/nissa/var/rull: add ssd timing and modify ssd GPIO pins of rtd3
[coreboot2.git] / src / mainboard / google / veyron_rialto / sdram_configs.c
blob91b9439b0e4af46ce141e92b98b556b7d2285bc2
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #include <boardid.h>
3 #include <console/console.h>
4 #include <gpio.h>
5 #include <soc/sdram.h>
6 #include <types.h>
8 static struct rk3288_sdram_params sdram_configs[] = {
9 #include "sdram_inf/sdram-lpddr3-K4E8E304EE-1GB.inc" /* ram_code = 0000 */
10 #include "sdram_inf/sdram-lpddr3-K4E6E304EB-2GB-1CH.inc"/* ram_code = 0001 */
11 #include "sdram_inf/sdram-unused.inc" /* ram_code = 0010 */
12 #include "sdram_inf/sdram-unused.inc" /* ram_code = 0011 */
13 #include "sdram_inf/sdram-unused.inc" /* ram_code = 0100 */
14 #include "sdram_inf/sdram-unused.inc" /* ram_code = 0101 */
15 #include "sdram_inf/sdram-unused.inc" /* ram_code = 0110 */
16 #include "sdram_inf/sdram-unused.inc" /* ram_code = 0111 */
17 #include "sdram_inf/sdram-unused.inc" /* ram_code = 1000 */
18 #include "sdram_inf/sdram-unused.inc" /* ram_code = 1001 */
19 #include "sdram_inf/sdram-unused.inc" /* ram_code = 1010 */
20 #include "sdram_inf/sdram-unused.inc" /* ram_code = 1011 */
21 #include "sdram_inf/sdram-unused.inc" /* ram_code = 1100 */
22 #include "sdram_inf/sdram-unused.inc" /* ram_code = 1101 */
23 #include "sdram_inf/sdram-unused.inc" /* ram_code = 1110 */
24 #include "sdram_inf/sdram-unused.inc" /* ram_code = 1111 */
25 #include "sdram_inf/sdram-unused.inc" /* ram_code = 000Z */
26 #include "sdram_inf/sdram-unused.inc" /* ram_code = 001Z */
27 #include "sdram_inf/sdram-unused.inc" /* ram_code = 00Z0 */
28 #include "sdram_inf/sdram-unused.inc" /* ram_code = 00Z1 */
29 #include "sdram_inf/sdram-unused.inc" /* ram_code = 00ZZ */
30 #include "sdram_inf/sdram-unused.inc" /* ram_code = 010Z */
31 #include "sdram_inf/sdram-unused.inc" /* ram_code = 011Z */
32 #include "sdram_inf/sdram-unused.inc" /* ram_code = 01Z0 */
35 _Static_assert(ARRAY_SIZE(sdram_configs) == 24, "Must have 24 sdram_configs!");
37 const struct rk3288_sdram_params *get_sdram_config(void)
39 u32 ramcode = ram_code();
41 if (ramcode >= ARRAY_SIZE(sdram_configs)
42 || sdram_configs[ramcode].dramtype == UNUSED)
43 die("Invalid RAMCODE.");
44 return &sdram_configs[ramcode];