blob: 37182da365c37bf446d1886b3d944698e31babd5 [file] [log] [blame]
Matt DeVillierbb9d1062022-08-22 17:27:11 -05001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#ifndef DEVICE_DRAM_DDR5_H
4#define DEVICE_DRAM_DDR5_H
5
6/**
7 * @file ddr5.h
8 *
9 * \brief Utilities for decoding (LP)DDR5 info
10 */
11
12#include <device/dram/common.h>
13#include <types.h>
14
Martin Roth58964ff2023-10-23 09:59:09 -060015/** Maximum SPD size supported */
16#define SPD_SIZE_MAX_DDR5 1024
17
Elyes Haouas305ee062024-04-30 22:38:25 +020018enum ddr5_module_type {
19 DDR5_SPD_RDIMM = 0x01,
20 DDR5_SPD_UDIMM = 0x02,
21 DDR5_SPD_SODIMM = 0x03,
22 DDR5_SPD_LRDIMM = 0x04,
23 DDR5_SPD_MINI_RDIMM = 0x05,
24 DDR5_SPD_MINI_UDIMM = 0x06,
25 DDR5_SPD_72B_SO_UDIMM = 0x08,
26 DDR5_SPD_72B_SO_RDIMM = 0x09,
27 DDR5_SPD_SOLDERED_DOWN = 0x0b,
28 DDR5_SPD_16B_SO_DIMM = 0x0c,
29 DDR5_SPD_32B_SO_RDIMM = 0x0d,
30 DDR5_SPD_1DPC = 0x0e,
31 DDR5_SPD_2DPC = 0x0f,
32};
33
Matt DeVillierbb9d1062022-08-22 17:27:11 -050034/**
35 * Converts DDR5 clock speed in MHz to the standard reported speed in MT/s
36 */
37uint16_t ddr5_speed_mhz_to_reported_mts(uint16_t speed_mhz);
38
39#endif /* DEVICE_DRAM_DDR5_H */