From: Yann Gautier Date: Tue, 16 Apr 2019 14:20:58 +0000 (+0200) Subject: stm32mp1: add support for LpDDR3 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4b549b215360bfed4d7cd14247d9c99a995ca217;p=project%2Fbcm63xx%2Fatf.git stm32mp1: add support for LpDDR3 This change enables LpDDR3 initialization with PMIC. Change-Id: I2409a808335dfacd69a8517cb8510cee98bb8161 Signed-off-by: Yann Gautier --- diff --git a/drivers/st/ddr/stm32mp1_ddr.c b/drivers/st/ddr/stm32mp1_ddr.c index caf8eefa..7d89d027 100644 --- a/drivers/st/ddr/stm32mp1_ddr.c +++ b/drivers/st/ddr/stm32mp1_ddr.c @@ -717,6 +717,8 @@ void stm32mp1_ddr_init(struct ddr_info *priv, ret = board_ddr_power_init(STM32MP_DDR3); } else if ((config->c_reg.mstr & DDRCTRL_MSTR_LPDDR2) != 0U) { ret = board_ddr_power_init(STM32MP_LPDDR2); + } else if ((config->c_reg.mstr & DDRCTRL_MSTR_LPDDR3) != 0U) { + ret = board_ddr_power_init(STM32MP_LPDDR3); } else { ERROR("DDR type not supported\n"); } diff --git a/drivers/st/pmic/stm32mp_pmic.c b/drivers/st/pmic/stm32mp_pmic.c index 6fe51f44..9e9dddc4 100644 --- a/drivers/st/pmic/stm32mp_pmic.c +++ b/drivers/st/pmic/stm32mp_pmic.c @@ -299,6 +299,7 @@ int pmic_ddr_power_init(enum ddr_type ddr_type) break; case STM32MP_LPDDR2: + case STM32MP_LPDDR3: /* * Set LDO3 to 1.8V * Set LDO3 to bypass mode if BUCK3 = 1.8V diff --git a/plat/st/stm32mp1/stm32mp1_def.h b/plat/st/stm32mp1/stm32mp1_def.h index 77a95e68..0eba8a64 100644 --- a/plat/st/stm32mp1/stm32mp1_def.h +++ b/plat/st/stm32mp1/stm32mp1_def.h @@ -66,6 +66,7 @@ enum ddr_type { STM32MP_DDR3, STM32MP_LPDDR2, + STM32MP_LPDDR3 }; #endif