payloads/edk2: Disable the CPU Timer Lib unless supported
[coreboot.git] / src / mainboard / intel / kunimitsu / spd / spd.h
blobc53c6e4379a001cc5f1d0e6cf4808fa41d650126
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef MAINBOARD_SPD_H
5 #include <fsp/soc_binding.h>
6 #include <gpio.h>
7 #include "../gpio.h"
9 #define MAINBOARD_SPD_H
11 #define SPD_LEN 256
13 #define SPD_DRAM_TYPE 2
14 #define SPD_DRAM_DDR3 0x0b
15 #define SPD_DRAM_LPDDR3 0xf1
16 #define SPD_DENSITY_BANKS 4
17 #define SPD_ADDRESSING 5
18 #define SPD_ORGANIZATION 7
19 #define SPD_BUS_DEV_WIDTH 8
20 #define SPD_PART_OFF 128
21 #define SPD_PART_LEN 18
22 #define SPD_MANU_OFF 148
24 #define HYNIX_SINGLE_CHAN 0x1
25 #define SAMSUNG_SINGLE_CHAN 0x4
26 #define MIC_SINGLE_CHAN 0x5
28 /* PCH_MEM_CFG[3:0] */
29 #define MAX_MEMORY_CONFIG 0x10
30 #define K4E6E304EE_MEM_ID 0x3
32 static inline int get_spd_index(void) {
33 /* PCH_MEM_CFG[3:0] */
34 gpio_t spd_gpios[] = {
35 GPIO_MEM_CONFIG_0,
36 GPIO_MEM_CONFIG_1,
37 GPIO_MEM_CONFIG_2,
38 GPIO_MEM_CONFIG_3,
40 return (gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios)));
42 void mainboard_fill_dq_map_data(void *dq_map_ch0, void *dq_map_ch1);
43 void mainboard_fill_dqs_map_data(void *dqs_map_ch0, void *dqs_map_ch1);
44 void mainboard_fill_rcomp_res_data(void *rcomp_ptr);
45 void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr);
46 uintptr_t mainboard_get_spd_data(void);
47 int mainboard_has_dual_channel_mem(void);
48 #endif