ARM: stm32: Power cycle Buck3 in reset on DHSOM
authorMarek Vasut <marex@denx.de>
Wed, 17 May 2023 22:02:39 +0000 (00:02 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Wed, 16 Aug 2023 13:19:57 +0000 (15:19 +0200)
commitb3d97f8ce34011b8928919822eb17b98477f3d72
tree5cdcc92067973c361982d2c2d5ddbfa36ad43a74
parent9b54b0e37b72aa9bfff09cbbe13465abfa143f84
ARM: stm32: Power cycle Buck3 in reset on DHSOM

In case the DHSOM is in suspend state and either reset button is pushed
or IWDG2 triggers a watchdog reset, then DRAM initialization could fail
as follows:

  "
  RAM: DDR3L 32bits 2x4Gb 533MHz
  DDR invalid size : 0x4, expected 0x40000000
  DRAM init failed: -22
  ### ERROR ### Please RESET the board ###
  "

Avoid this failure by not keeping any Buck regulators enabled during reset,
let the SoC and DRAMs power cycle fully. Since the change which keeps Buck3
VDD enabled during reset is ST specific, move this addition to ST specific
SPL board initialization so that it wouldn't affect the DHSOM .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
board/st/common/stpmic1.c
board/st/common/stpmic1.h
board/st/stm32mp1/spl.c