1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <mainboard/google/cyan/spd/spd_util.h>
7 * 0b0000 - 4GiB total - 2 x 2GiB Hynix H9CCNNN8GTMLAR-NUD 1600MHz
8 * 0b0001 - 2GiB total - 1 x 2GiB Hynix H9CCNNN8GTMLAR-NUD 1600MHz
9 * 0b0010 - 4GiB total - 2 x 2GiB Micron MT52L256M32D1PF-107
10 * 0b0011 - 2GiB total - 1 x 2GiB Micron MT52L256M32D1PF-107
11 * 0b0100 - 4GiB total - 2 x 2GiB Samsung K4E8E324EB-EGCF 1600MHz
12 * 0b0101 - 2GiB total - 1 x 2GiB Samsung K4E8E324EB-EGCF 1600MHz
13 * 0b0110 - 4GiB total - 2 x 2GiB Hynix H9CCNNN8GTALAR-NUD
14 * 0b0111 - 2GiB total - 1 x 2GiB Hynix H9CCNNN8GTALAR-NUD
18 static const uint32_t dual_channel_config
=
19 (1 << 0) | (1 << 2) | (1 << 4) | (1 << 6);
21 int get_variant_spd_index(int ram_id
, int *dual
)
23 /* Determine if single or dual channel memory system */
24 *dual
= (dual_channel_config
& (1 << ram_id
)) ? 1 : 0;
26 /* Display the RAM type */
29 printk(BIOS_DEBUG
, "4GiB Hynix H9CCNNN8GTMLAR-NUD\n");
32 printk(BIOS_DEBUG
, "2GiB Hynix H9CCNNN8GTMLAR-NUD\n");
35 printk(BIOS_DEBUG
, "4GiB Micron MT52L256M32D1PF-107\n");
38 printk(BIOS_DEBUG
, "2GiB Micron MT52L256M32D1PF-107\n");
41 printk(BIOS_DEBUG
, "4GiB Samsung K4E8E324EB-EGCF\n");
44 printk(BIOS_DEBUG
, "2GiB Samsung K4E8E324EB-EGCF\n");
47 printk(BIOS_DEBUG
, "4GiB Hynix H9CCNNN8GTALAR-NUD\n");
50 printk(BIOS_DEBUG
, "2GiB Hynix H9CCNNN8GTALAR-NUD\n");
54 /* 1:1 mapping between ram_id and spd_index for kefka */