summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/common/include
diff options
context:
space:
mode:
authorCrystal Guo <crystal.guo@mediatek.corp-partner.google.com>2024-08-12 15:02:36 +0800
committerYu-Ping Wu <yupingso@google.com>2024-11-13 02:27:13 +0000
commita356d234f8e95ff7a95637a0599e0642a1f16eef (patch)
tree6e564ee8523a80f2ec7b1d4e877ae3c9c66cf1b5 /src/soc/mediatek/common/include
parentb8724cd9a55b8f9d233f4ac3164fad7681517308 (diff)
soc/mediatek: Obtain LPDDR type from trained memory info
Add lpddr_type to ddr_base_info struct to obtain LPDDR type from trained memory info. BUG=b:357743097 TEST=build pass Change-Id: I73c9014784cc4872826d721f3fab9ed1c5255f31 Signed-off-by: Crystal Guo <crystal.guo@mediatek.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/85033 Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc/mediatek/common/include')
-rw-r--r--src/soc/mediatek/common/include/soc/dramc_param_common.h3
-rw-r--r--src/soc/mediatek/common/include/soc/emi.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/soc/mediatek/common/include/soc/dramc_param_common.h b/src/soc/mediatek/common/include/soc/dramc_param_common.h
index 7dd8bba5d8..a1fac9af85 100644
--- a/src/soc/mediatek/common/include/soc/dramc_param_common.h
+++ b/src/soc/mediatek/common/include/soc/dramc_param_common.h
@@ -92,7 +92,8 @@ enum SDRAM_VOLTAGE_TYPE {
struct ddr_base_info {
u32 config_dvfs; /* SDRAM_DVFS_FLAG */
struct sdram_info sdram;
- u32 voltage_type; /* SDRAM_VOLTAGE_TYPE */
+ u16 lpddr_type;
+ u16 voltage_type; /* SDRAM_VOLTAGE_TYPE */
u32 support_ranks;
u64 rank_size[RANK_MAX];
struct emi_mdl emi_config;
diff --git a/src/soc/mediatek/common/include/soc/emi.h b/src/soc/mediatek/common/include/soc/emi.h
index 0070ec1bcd..313ccff30e 100644
--- a/src/soc/mediatek/common/include/soc/emi.h
+++ b/src/soc/mediatek/common/include/soc/emi.h
@@ -16,5 +16,6 @@ bool is_dvfs_enabled(void);
u32 get_ddr_geometry(void);
u32 get_ddr_type(void);
void init_dram_by_params(struct dramc_param *dparam);
+enum mem_chip_type map_to_lpddr_dram_type(uint16_t lpddr_type);
#endif /* SOC_MEDIATEK_COMMON_EMI_H */