diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2020-03-06 11:14:03 +0100 |
---|---|---|
committer | Patrick Delaunay <patrick.delaunay@st.com> | 2020-03-24 14:20:50 +0100 |
commit | e9a20f8a198c11a4108ca4b4deef8398f0cd93aa (patch) | |
tree | a73a69e7f9e1f8b08a76cb78dfe2e6817576cec8 /board | |
parent | 1a4f57c895ccebc15a33a36f5c0fc0bcb1dbdea4 (diff) |
ram: stm32mp1: increase vdd2_ddr: buck2 for 32bits LPDDR
Need to increase the LPDDR2/LPDDR3 the voltage vdd2_ddr: buck2
form 1.2V to 1.25V for 32bits configuration.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/st/stm32mp1/board.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/board/st/stm32mp1/board.c b/board/st/stm32mp1/board.c index c3d832f584..4e35d36c76 100644 --- a/board/st/stm32mp1/board.c +++ b/board/st/stm32mp1/board.c @@ -43,6 +43,7 @@ int board_ddr_power_init(enum ddr_type ddr_type) struct udevice *dev; bool buck3_at_1800000v = false; int ret; + u32 buck2; ret = uclass_get_device_by_driver(UCLASS_PMIC, DM_GET_DRIVER(pmic_stpmic1), &dev); @@ -102,8 +103,10 @@ int board_ddr_power_init(enum ddr_type ddr_type) break; - case STM32MP_LPDDR2: - case STM32MP_LPDDR3: + case STM32MP_LPDDR2_16: + case STM32MP_LPDDR2_32: + case STM32MP_LPDDR3_16: + case STM32MP_LPDDR3_32: /* * configure VDD_DDR1 = LDO3 * Set LDO3 to 1.8V @@ -133,11 +136,23 @@ int board_ddr_power_init(enum ddr_type ddr_type) if (ret < 0) return ret; - /* VDD_DDR2 : Set BUCK2 to 1.2V */ + /* VDD_DDR2 : Set BUCK2 to 1.2V (16bits) or 1.25V (32 bits)*/ + switch (ddr_type) { + case STM32MP_LPDDR2_32: + case STM32MP_LPDDR3_32: + buck2 = STPMIC1_BUCK2_1250000V; + break; + default: + case STM32MP_LPDDR2_16: + case STM32MP_LPDDR3_16: + buck2 = STPMIC1_BUCK2_1200000V; + break; + } + ret = pmic_clrsetbits(dev, STPMIC1_BUCKX_MAIN_CR(STPMIC1_BUCK2), STPMIC1_BUCK_VOUT_MASK, - STPMIC1_BUCK2_1200000V); + buck2); if (ret < 0) return ret; |