include/spd_bin.h: Add SPD IO layer
[coreboot2.git] / src / include / sdram_mode.h
blob7fd0159508042e174f1ee34b2cd39b90772e1863
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /*
4 * sdram_mode.h: Definitions for SDRAM Mode Register and Extended Mode Register
5 */
7 #ifndef __SDRAMMODE_H_DEFINED
8 #define __SDRAMMODE_H_DEFINED
10 // SDRAM Mode Register definitions, per JESD79D
11 // These are transmitted via A0-A13
13 // Burst length
14 #define SDRAM_BURST_2 (1<<0)
15 #define SDRAM_BURST_4 (2<<0)
16 #define SDRAM_BURST_8 (3<<0)
18 #define SDRAM_BURST_SEQUENTIAL (0<<3)
19 #define SDRAM_BURST_INTERLEAVED (1<<3)
21 #define SDRAM_CAS_2_0 (2<<4)
22 #define SDRAM_CAS_3_0 (3<<4) /* Optional for DDR 200-333 */
23 #define SDRAM_CAS_1_5 (5<<4) /* Optional */
24 #define SDRAM_CAS_2_5 (6<<4)
25 #define SDRAM_CAS_MASK (7<<4)
27 #define SDRAM_MODE_NORMAL (0 << 7)
28 #define SDRAM_MODE_TEST (1 << 7)
29 #define SDRAM_MODE_DLL_RESET (2 << 7)
31 // Extended Mode Register
33 #define SDRAM_EXTMODE_DLL_ENABLE (0 << 0)
34 #define SDRAM_EXTMODE_DLL_DISABLE (1 << 0)
36 #define SDRAM_EXTMODE_DRIVE_NORMAL (0 << 1)
37 #define SDRAM_EXTMODE_DRIVE_WEAK (1 << 1) /* Optional */
39 #endif // __SDRAMMODE_H_DEFINED