ARM: stm32: Power cycle Buck3 in reset on DHSOM
PATCH 1/1 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 .
---
NOTE: This is 2023.07 material
NOTE: d1a4b09de64 ("board: st: stpmic1: add function stpmic1_init")
mentions 'keep vdd on during the reset cycle (to avoid issue when backup battery is absent)', but there is no further description of the 'issue'. Can you please elaborate ?
---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: [email protected]
--- board/st/common/stpmic1.c | 10 +++------- board/st/common/stpmic1.h | 2 +- board/st/stm32mp1/spl.c | 13 +++++++++++-- 3 files changed, 15 insertions(+), 10 deletions(-)
board/st/common/stpmic1.c +3 -7
@@ -185,21 +185,17 @@ static int stmpic_buck1_set(struct udevice *dev, u32 voltage_mv) }/* early init of PMIC */ -void stpmic1_init (u32 voltage_mv) +struct udevice *stpmic1_init (u32 voltage_mv) {struct udevice *dev;if (uclass_get_device_by_driver (UCLASS_PMIC ,DM_DRIVER_GET (pmic_stpmic1), &dev)) -return ; +return NULL ;/* update VDDCORE = BUCK1 */ if (voltage_mv)stmpic_buck1_set (dev, voltage_mv); -/* Keep vdd on during the reset cycle */ -pmic_clrsetbits (dev, -STPMIC1_BUCKS_MRST_CR , -STPMIC1_MRST_BUCK (STPMIC1_BUCK3 ), -STPMIC1_MRST_BUCK (STPMIC1_BUCK3 )); +return dev; }
board/st/common/stpmic1.h +1 -1
@@ -3,4 +3,4 @@* Copyright (C) 2020, STMicroelectronics - All Rights Reserved */ -void stpmic1_init (u32 voltage_mv); +struct udevice *stpmic1_init (u32 voltage_mv);
board/st/stm32mp1/spl.c +11 -2
@@ -5,6 +5,8 @@#include <config.h> #include <common.h> +#include <power/pmic.h> +#include <power/stpmic1.h> #include <asm/arch/sys_proto.h> #include "../common/stpmic1.h"
@@ -19,8 +21,15 @@ void board_vddcore_init(u32 voltage_mv)int board_early_init_f (void ) { -if (IS_ENABLED (CONFIG_PMIC_STPMIC1 ) &&CONFIG_IS_ENABLED (POWER )) -stpmic1_init (opp_voltage_mv); +if (IS_ENABLED (CONFIG_PMIC_STPMIC1 ) &&CONFIG_IS_ENABLED (POWER )) { +struct udevice *dev =stpmic1_init (opp_voltage_mv); + +/* Keep vdd on during the reset cycle */ +pmic_clrsetbits (dev, +STPMIC1_BUCKS_MRST_CR , +STPMIC1_MRST_BUCK (STPMIC1_BUCK3 ), +STPMIC1_MRST_BUCK (STPMIC1_BUCK3 )); + }return 0 ; }
Signature · 1 line
2.39.2
Hi Marek,
Quoted 16 lines · Marek Vasut
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 .
Quoted 7 lines
Signed-off-by Marek Vasut <[email protected]>---
NOTE: This is 2023.07 material
NOTE:d1a4b09de64("board: st: stpmic1: add functionstpmic1_init")
mentions 'keep vdd on during the reset cycle (to avoid issue when backup battery is absent)', but there is no further description of the 'issue'. Can you please elaborate ?
In the commit message of d1a4b09de643 ("board: st: stpmic1:
add function stpmic1_init"), I indicated
- keep vdd on during the reset cycle (to avoid issue when backup battery is absent)
On ST boards we have support of cell coin to allow support of backup domain,
but by default this cell are absent and the backup domain is directly powered
by VDD (directly connected by resistor).
We keep powered this domain to don't loss the backup domain support,
to avoid to loss the information saved in backup RAM / registers,
and to be abble to keep DEBUG part powered also.
On this ST board, if the VDD is shut down with reset, the backup domain can't be
correctly managed for reboot.
And to handle correctly power OFF on ST boards with PMIC, we will don't shut down
the VDD (full PMIC shut down) but we keep it.
So the backup domain is loosed on ST board with STPMIC1 only when the power
is removed and not for reset or for power off.
Quoted 70 lines
---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: [email protected]--- board/st/common/stpmic1.c | 10 +++------- board/st/common/stpmic1.h | 2 +- board/st/stm32mp1/spl.c | 13 +++++++++++-- 3 files changed, 15 insertions(+), 10 deletions(-)board/st/common/stpmic1.c +3
-7@@ -185,21 +185,17 @@ static int stmpic_buck1_set(struct udevice *dev, u32 voltage_mv) }/* early init of PMIC */ -void stpmic1_init (u32 voltage_mv) +struct udevice *stpmic1_init (u32 voltage_mv) {struct udevice *dev;if (uclass_get_device_by_driver (UCLASS_PMIC ,DM_DRIVER_GET (pmic_stpmic1), &dev)) -return ; +return NULL ;/* update VDDCORE = BUCK1 */ if (voltage_mv)stmpic_buck1_set (dev, voltage_mv); -/* Keep vdd on during the reset cycle */ -pmic_clrsetbits (dev, -STPMIC1_BUCKS_MRST_CR , -STPMIC1_MRST_BUCK (STPMIC1_BUCK3 ), -STPMIC1_MRST_BUCK (STPMIC1_BUCK3 )); +return dev; }board/st/common/stpmic1.h +1
-1@@ -3,4 +3,4 @@* Copyright (C) 2020, STMicroelectronics - All Rights Reserved */ -void stpmic1_init (u32 voltage_mv); +struct udevice *stpmic1_init (u32 voltage_mv);board/st/stm32mp1/spl.c +4
-2@@ -5,6 +5,8 @@#include <config.h> #include <common.h> +#include <power/pmic.h> +#include <power/stpmic1.h> #include <asm/arch/sys_proto.h> #include "../common/stpmic1.h" @@ -19,8 +21,15 @@ void board_vddcore_init(u32 voltage_mv)int board_early_init_f (void ) { -if (IS_ENABLED (CONFIG_PMIC_STPMIC1 ) &&CONFIG_IS_ENABLED (POWER )) -stpmic1_init (opp_voltage_mv); +if (IS_ENABLED (CONFIG_PMIC_STPMIC1 ) &&CONFIG_IS_ENABLED (POWER )) { +struct udevice *dev =stpmic1_init (opp_voltage_mv);
board/st/stm32mp1/spl.c void board_vddcore_init(u32 voltage_mv) · line 35
Quoted 10 lines
board/st/stm32mp1/spl.c +7
-0+ +/* Keep vdd on during the reset cycle */ +pmic_clrsetbits (dev, +STPMIC1_BUCKS_MRST_CR , +STPMIC1_MRST_BUCK (STPMIC1_BUCK3 ), +STPMIC1_MRST_BUCK (STPMIC1_BUCK3 )); + }return 0 ; }
Thanks
Patrick
Quoted 1 line · Patrick DELAUNAY
Hi Marek,
Hello Patrick,
sorry for the abysmal delay.
Quoted 54 lines · Marek Vasut
Quoted 16 lines
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, expected0x40000000
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 .
Quoted 7 lines
Signed-off-by Marek Vasut <[email protected]>---
NOTE: This is 2023.07 material
NOTE:d1a4b09de64("board: st: stpmic1: add functionstpmic1_init") mentions 'keep vdd on during the reset cycle (to avoid issue when backup battery is absent)', but there is no further description of the 'issue'. Can you please elaborate ?In the commit message of
d1a4b09de643("board: st: stpmic1:add function
stpmic1_init"), I indicated- keep vdd on during the reset cycle (to avoid issue when backup battery is absent)
On ST boards we have support of cell coin to allow support of backup domain,
but by default this cell are absent and the backup domain is directly powered
by VDD (directly connected by resistor).
We keep powered this domain to don't loss the backup domain support,
to avoid to loss the information saved in backup RAM / registers,
and to be abble to keep DEBUG part powered also.
On this ST board, if the VDD is shut down with reset, the backup domain can't be
correctly managed for reboot.
Quoted 8 lines
And to handle correctly power OFF on ST boards with PMIC, we will don't shut down
the VDD (full PMIC shut down) but we keep it.
So the backup domain is loosed on ST board with STPMIC1 only when the power
is removed and not for reset or for power off.
Thank you for the clarification.
I should check suspend/resume on EV1 soon ...
On 5/29/23 03:57, Marek Vasut wrote:
Hello again,
[...]
Quoted 7 lines
Quoted 3 lines
So the backup domain is loosed on ST board with STPMIC1 only when the power
is removed and not for reset or for power off.
Thank you for the clarification.
I should check suspend/resume on EV1 soon ...
We do have this problem on EV1 too I'm afraid:
# U-Boot 2f4664f5c3e ("Merge branch '2023-06-14-assorted-fixes'")
$ git clean -fqdx ; make stm32mp15_basic_defconfig && make -j$(nproc) $ dd if=u-boot-spl.stm32 of=/dev/sdX1 && dd if=u-boot-spl.stm32 of=/dev/sdX2 && dd if=u-boot.img of=/dev/sdX3
# Linux next 925294c9aa184 ("Add linux-next specific files for 20230615")
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout)
image entry point: 0xc0100000
U-Boot 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
CPU: STM32MP157FAA Rev.Z
Model: STMicroelectronics STM32MP157C eval daughter on eval mother
Board: stm32mp1 in basic mode (st,stm32mp157c-ev1)
Board: MB1263 Var4.0 Rev.C-03
...
boot as usual into Linux with initramfs for simplicity sake
...
$ cat /proc/cmdline console=ttySTM0,115200 no_console_suspend
# Suspend the system repeatedly (failure happens after 2-3 wake up cycles)
$ while true ; do rtcwake -s 100 -m mem ; done wakeup from "mem" at Sat Jan 1 00:03:11 2000 [ 39.316598] PM: suspend entry (deep) [ 39.318905] Filesystems sync: 0.000 seconds [ 39.324327] Freezing user space processes [ 39.328194] Freezing user space processes completed (elapsed 0.001 seconds) [ 39.334006] OOM killer disabled. [ 39.337158] Freezing remaining freezable tasks [ 39.342777] Freezing remaining freezable tasks completed (elapsed 0.001 seconds) [ 39.426015] Disabling non-boot CPUs ... [ 39.448635] Retrying again to check for CPU kill [ 39.451909] CPU1 killed. U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200) RAM: DDR3-DDR3L 32bits 533000kHz DDR invalid size : 0x4, expected 0x40000000 DRAM init failed: -22 ### ERROR ### Please RESET the board ###
Press RESET button
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
DDR invalid size : 0x4, expected 0x40000000
DRAM init failed: -22
### ERROR ### Please RESET the board ###
Hi,
Quoted 59 lines · Marek Vasut
On 5/29/23 03:57, Marek Vasut wrote:
Hello again,
[...]
Quoted 7 lines
Quoted 3 lines
So the backup domain is loosed on ST board with STPMIC1 only when the power
is removed and not for reset or for power off.
Thank you for the clarification.
I should check suspend/resume on EV1 soon ...
We do have this problem on EV1 too I'm afraid:
# U-Boot
2f4664f5c3e("Merge branch '2023-06-14-assorted-fixes'")$ git clean -fqdx ; make stm32mp15_basic_defconfig && make -j$(nproc) $ dd if=u-boot-spl.stm32 of=/dev/sdX1 && dd if=u-boot-spl.stm32 of=/dev/sdX2 && dd if=u-boot.img of=/dev/sdX3# Linux next
925294c9aa184("Add linux-next specific files for 20230615")U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) image entry point:0xc0100000U-Boot 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
CPU: STM32MP157FAA Rev.Z
Model: STMicroelectronics STM32MP157C eval daughter on eval mother
Board: stm32mp1 in basic mode (st,stm32mp157c-ev1)
Board: MB1263 Var4.0 Rev.C-03
...
boot as usual into Linux with initramfs for simplicity sake
...$ cat /proc/cmdline console=ttySTM0,115200 no_console_suspend# Suspend the system repeatedly (failure happens after 2-3 wake up cycles)
$ while true ; do rtcwake -s 100 -m mem ; done wakeup from "mem" at Sat Jan 1 00:03:11 2000 [ 39.316598] PM: suspend entry (deep) [ 39.318905] Filesystems sync: 0.000 seconds [ 39.324327] Freezing user space processes [ 39.328194] Freezing user space processes completed (elapsed 0.001 seconds) [ 39.334006] OOM killer disabled. [ 39.337158] Freezing remaining freezable tasks [ 39.342777] Freezing remaining freezable tasks completed (elapsed 0.001 seconds) [ 39.426015] Disabling non-boot CPUs ... [ 39.448635] Retrying again to check for CPU kill [ 39.451909] CPU1 killed. U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200) RAM: DDR3-DDR3L 32bits 533000kHz DDR invalid size : 0x4, expected 0x40000000 DRAM init failed: -22 ### ERROR ### Please RESET the board ###
Quoted 9 lines
Press RESET button
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
DDR invalid size :0x4, expected0x40000000
DRAM init failed: -22
### ERROR ### Please RESET the board ###
I try it with the latest STMicroelectronics OSS image.
I just change in U-Boot config to be aligned the expected SD-Card partionning
configs/stm32mp15_basic_defconfig:
-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=3
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=5
But low power is not supported in this downstream config :-<
I got the error:
.......
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3ed-dirty (Jun 16 2023 - 11:37:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) image entry point: 0xc0100000
U-Boot 2023.07-rc4-00008-g2f4664f5c3ed-dirty (Jun 16 2023 - 11:37:52 +0200)
CPU: STM32MP157FAA Rev.Z
Model: STMicroelectronics STM32MP157C eval daughter on eval mother
Board: stm32mp1 in basic mode (st,stm32mp157c-ev1)
Board: MB1263 Var4.0 Rev.C-03
DRAM: 1 GiB
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
Core: 288 devices, 42 uclasses, devicetree: separate
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) NAND: 1024 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... Invalid ENV offset in MMC, copy=0 In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000
Hit any key to stop autoboot: 0
....
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 6.4.0-rc6 (oe-user@oe-host) (arm-ostl-linux-gnueabi-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.40.20230119) #1 SMP PREEMPT Sun Jun 11 21:35:30 UTC 2023
....
root@stm32mp1-disco-oss:~# while true ; do rtcwake -s 100 -m mem ; done rtcwake: unrecognized suspend state 'mem'
I check also with downstream (OpenSTLinux V4.0),
and I can't reproduced the issue but we are using TF-A / OP-TEE / SCMI to support all the low power modes.
And this low power support (in TF-A/ OP-TEE / Linux with SCMI) is not yet up streamed.
PS: if you are not able to restart even after a RESET, I assume something is wrong in the PMIC configuration
(for example in NVM or in initial regulator configuration)
so you have no power cycle on DDR during reset...
=> something is wrong in PMIC configuration in linux ?
before you configure the low power mode in U-Boot and set the DDR in self-refresh in PSCI FW
u-boot/arch/arm/mach-stm32mp/psci.c
Even if we don't support officially the lower power mode with U-Boot SPL,
you can contact directly the STMicroelectonics support on online support :
https://community.st.com/s/onlinesupport
or post a message on STM32MPUs forum:
https://community.st.com/s/topic/0TO0X0000003u2AWAQ/stm32-mpus
Regards
Patrick
Quoted 1 line · Patrick DELAUNAY
Hi,
Hi,
Quoted 27 lines
Quoted 9 lines
[ 39.426015] Disabling non-boot CPUs ...
[ 39.448635] Retrying again to check for CPU kill
[ 39.451909] CPU1 killed.
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
DDR invalid size :0x4, expected0x40000000
DRAM init failed: -22
### ERROR ### Please RESET the board ###Quoted 9 lines
Press RESET button
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
DDR invalid size :0x4, expected0x40000000
DRAM init failed: -22
### ERROR ### Please RESET the board ###I try it with the latest STMicroelectronics OSS image.
I just change in U-Boot config to be aligned the expected SD-Card partionning
configs/stm32mp15_basic_defconfig:
(quoted diff) +1
-1-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=3 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=5
Quoted 1 line
But low power is not supported in this downstream config :-<
Use multi_v7_defconfig or some such ?
Quoted 35 lines
I got the error:
.......
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3ed-dirty (Jun 16 2023 - 11:37:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) image entry point:0xc0100000U-Boot 2023.07-rc4-00008-g2f4664f5c3ed-dirty (Jun 16 2023 - 11:37:52 +0200)
CPU: STM32MP157FAA Rev.Z
Model: STMicroelectronics STM32MP157C eval daughter on eval mother
Board: stm32mp1 in basic mode (st,stm32mp157c-ev1)
Board: MB1263 Var4.0 Rev.C-03
DRAM: 1 GiB
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
Core: 288 devices, 42 uclasses, devicetree: separate
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) NAND: 1024 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... Invalid ENV offset in MMC, copy=0 In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000
Hit any key to stop autoboot: 0
Quoted 6 lines
....
[ 0.000000] Booting Linux on physical CPU0x0
[ 0.000000] Linux version 6.4.0-rc6 (oe-user@oe-host) (arm-ostl-linux-gnueabi-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.40.20230119) #1 SMP PREEMPT Sun Jun 11 21:35:30 UTC 2023
....root@stm32mp1-disco-oss:~# while true ; do rtcwake -s 100 -m mem ; done rtcwake: unrecognized suspend state 'mem'
Please fix your kernel config and enable suspend to mem, I am sure that is not difficult.
Quoted 1 line
I check also with downstream (OpenSTLinux V4.0),
This is not relevant to this discussion.
Quoted 6 lines
and I can't reproduced the issue but we are using TF-A / OP-TEE / SCMI to support all the low power modes.
And this low power support (in TF-A/ OP-TEE / Linux with SCMI) is not yet up streamed.
Quoted 8 lines
PS: if you are not able to restart even after a RESET,
I assume something is wrong in the PMIC configuration(for example in NVM or in initial regulator configuration)
so you have no power cycle on DDR during reset...
=> something is wrong in PMIC configuration in linux ?
Possibly, but then it is also something wrong on STM32MP157C EV1, because I can reproduce the failure on EV1 too. I specifically did check this on the EV1. Please fix your kernel config and try again, then you should be able to see it yourself.
Quoted 9 lines
before you configure the low power mode in U-Boot and set
the DDR in self-refresh in PSCI FW
u-boot/arch/arm/mach-stm32mp/psci.cEven if we don't support officially the lower power mode with U-Boot SPL,
you can contact directly the STMicroelectonics support on online support :
This is upstream U-Boot discussion topic, so that discussion should stay on the U-Boot ML.
Quoted 93 lines · Marek Vasut
Quoted 1 line · Patrick DELAUNAY
Hi,
Hi,
Quoted 27 lines
Quoted 9 lines
[ 39.426015] Disabling non-boot CPUs ...
[ 39.448635] Retrying again to check for CPU kill
[ 39.451909] CPU1 killed.
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
DDR invalid size :0x4, expected0x40000000
DRAM init failed: -22
### ERROR ### Please RESET the board ###Quoted 9 lines
Press RESET button
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
DDR invalid size :0x4, expected0x40000000
DRAM init failed: -22
### ERROR ### Please RESET the board ###I try it with the latest STMicroelectronics OSS image.
I just change in U-Boot config to be aligned the expected SD-Card partionning
configs/stm32mp15_basic_defconfig:
(quoted diff) +1
-1-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=3 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=5Quoted 1 line
But low power is not supported in this downstream config :-<
Use
multi_v7_defconfigor some such ?Quoted 35 lines
I got the error:
.......
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3ed-dirty (Jun 16 2023 - 11:37:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) image entry point:0xc0100000U-Boot 2023.07-rc4-00008-g2f4664f5c3ed-dirty (Jun 16 2023 - 11:37:52 +0200)
CPU: STM32MP157FAA Rev.Z
Model: STMicroelectronics STM32MP157C eval daughter on eval mother
Board: stm32mp1 in basic mode (st,stm32mp157c-ev1)
Board: MB1263 Var4.0 Rev.C-03
DRAM: 1 GiB
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
Core: 288 devices, 42 uclasses, devicetree: separate
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) NAND: 1024 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... Invalid ENV offset in MMC, copy=0 In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000
Hit any key to stop autoboot: 0Quoted 6 lines
....
[ 0.000000] Booting Linux on physical CPU0x0
[ 0.000000] Linux version 6.4.0-rc6 (oe-user@oe-host) (arm-ostl-linux-gnueabi-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.40.20230119) #1 SMP PREEMPT Sun Jun 11 21:35:30 UTC 2023
....root@stm32mp1-disco-oss:~# while true ; do rtcwake -s 100 -m mem ; done rtcwake: unrecognized suspend state 'mem'Please fix your kernel config and enable suspend to mem, I am sure that is not difficult.
Quoted 1 line
I check also with downstream (OpenSTLinux V4.0),
This is not relevant to this discussion.
Quoted 9 lines
and I can't reproduced the issue but we are using TF-A / OP-TEE / SCMI to support all the low power modes.
And this low power support (in TF-A/ OP-TEE / Linux with SCMI) is not yet up streamed.
PS: if you are not able to restart even after a RESET, I assume something is wrong in the PMIC configuration
Quoted 7 lines
Quoted 5 lines
(for example in NVM or in initial regulator configuration)
so you have no power cycle on DDR during reset...
=> something is wrong in PMIC configuration in linux ?
Possibly, but then it is also something wrong on STM32MP157C EV1, because I can reproduce the failure on EV1 too. I specifically did check this on the EV1. Please fix your kernel config and try again, then you should be able to see it yourself.
Has there been any news on this defect of EV1 or has this been ignored by ST ?
Quoted 95 lines · Marek Vasut
Quoted 94 lines · Marek Vasut
Quoted 1 line · Patrick DELAUNAY
Hi,
Hi,
Quoted 27 lines
Quoted 9 lines
[ 39.426015] Disabling non-boot CPUs ...
[ 39.448635] Retrying again to check for CPU kill
[ 39.451909] CPU1 killed.
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
DDR invalid size :0x4, expected0x40000000
DRAM init failed: -22
### ERROR ### Please RESET the board ###Quoted 9 lines
Press RESET button
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
DDR invalid size :0x4, expected0x40000000
DRAM init failed: -22
### ERROR ### Please RESET the board ###I try it with the latest STMicroelectronics OSS image.
I just change in U-Boot config to be aligned the expected SD-Card partionning
configs/stm32mp15_basic_defconfig:
(quoted diff) +1
-1-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=3 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=5Quoted 1 line
But low power is not supported in this downstream config :-<
Use
multi_v7_defconfigor some such ?Quoted 34 lines
I got the error:
.......
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3ed-dirty (Jun 16 2023 - 11:37:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) image entry point:0xc0100000U-Boot 2023.07-rc4-00008-g2f4664f5c3ed-dirty (Jun 16 2023 - 11:37:52 +0200)
CPU: STM32MP157FAA Rev.Z
Model: STMicroelectronics STM32MP157C eval daughter on eval mother
Board: stm32mp1 in basic mode (st,stm32mp157c-ev1)
Board: MB1263 Var4.0 Rev.C-03
DRAM: 1 GiB
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
Core: 288 devices, 42 uclasses, devicetree: separate
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) NAND: 1024 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... Invalid ENV offset in MMC, copy=0 In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000
Hit any key to stop autoboot: 0Quoted 6 lines
....
[ 0.000000] Booting Linux on physical CPU0x0
[ 0.000000] Linux version 6.4.0-rc6 (oe-user@oe-host) (arm-ostl-linux-gnueabi-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.40.20230119) #1 SMP PREEMPT Sun Jun 11 21:35:30 UTC 2023
....root@stm32mp1-disco-oss:~# while true ; do rtcwake -s 100 -m mem ; done rtcwake: unrecognized suspend state 'mem'Please fix your kernel config and enable suspend to mem, I am sure that is not difficult.
Quoted 1 line
I check also with downstream (OpenSTLinux V4.0),
This is not relevant to this discussion.
Quoted 11 lines
and I can't reproduced the issue but we are using TF-A / OP-TEE / SCMI to support all the low power modes.
And this low power support (in TF-A/ OP-TEE / Linux with SCMI) is not yet up streamed.
PS: if you are not able to restart even after a RESET, I assume something is wrong in the PMIC configuration
(for example in NVM or in initial regulator configuration)
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
so you have no power cycle on DDR during reset...
=> something is wrong in PMIC configuration in linux ?
Possibly, but then it is also something wrong on STM32MP157C EV1, because I can reproduce the failure on EV1 too. I specifically did check this on the EV1. Please fix your kernel config and try again, then you should be able to see it yourself.
Has there been any news on this defect of EV1 or has this been ignored by ST ?
Hi Marek
Sorry for the delay,
Patch applied on stm32-master
Thanks
Patrice
Quoted 100 lines · Patrice CHOTARD
Quoted 97 lines · Marek Vasut
Quoted 96 lines · Marek Vasut
Quoted 1 line · Patrick DELAUNAY
Hi,
Hi,
Quoted 27 lines
Quoted 9 lines
[ 39.426015] Disabling non-boot CPUs ...
[ 39.448635] Retrying again to check for CPU kill
[ 39.451909] CPU1 killed.
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
DDR invalid size :0x4, expected0x40000000
DRAM init failed: -22
### ERROR ### Please RESET the board ###Quoted 9 lines
Press RESET button
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
DDR invalid size :0x4, expected0x40000000
DRAM init failed: -22
### ERROR ### Please RESET the board ###I try it with the latest STMicroelectronics OSS image.
I just change in U-Boot config to be aligned the expected SD-Card partionning
configs/stm32mp15_basic_defconfig:
(quoted diff) +1
-1-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=3 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=5Quoted 1 line
But low power is not supported in this downstream config :-<
Use
multi_v7_defconfigor some such ?Quoted 34 lines
I got the error:
.......
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3ed-dirty (Jun 16 2023 - 11:37:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) image entry point:0xc0100000U-Boot 2023.07-rc4-00008-g2f4664f5c3ed-dirty (Jun 16 2023 - 11:37:52 +0200)
CPU: STM32MP157FAA Rev.Z
Model: STMicroelectronics STM32MP157C eval daughter on eval mother
Board: stm32mp1 in basic mode (st,stm32mp157c-ev1)
Board: MB1263 Var4.0 Rev.C-03
DRAM: 1 GiB
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
Core: 288 devices, 42 uclasses, devicetree: separate
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) NAND: 1024 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... Invalid ENV offset in MMC, copy=0 In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000
Hit any key to stop autoboot: 0Quoted 6 lines
....
[ 0.000000] Booting Linux on physical CPU0x0
[ 0.000000] Linux version 6.4.0-rc6 (oe-user@oe-host) (arm-ostl-linux-gnueabi-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.40.20230119) #1 SMP PREEMPT Sun Jun 11 21:35:30 UTC 2023
....root@stm32mp1-disco-oss:~# while true ; do rtcwake -s 100 -m mem ; done rtcwake: unrecognized suspend state 'mem'Please fix your kernel config and enable suspend to mem, I am sure that is not difficult.
Quoted 1 line
I check also with downstream (OpenSTLinux V4.0),
This is not relevant to this discussion.
Quoted 13 lines
and I can't reproduced the issue but we are using TF-A / OP-TEE / SCMI to support all the low power modes.
And this low power support (in TF-A/ OP-TEE / Linux with SCMI) is not yet up streamed.
PS: if you are not able to restart even after a RESET,
I assume something is wrong in the PMIC configuration(for example in NVM or in initial regulator configuration)
so you have no power cycle on DDR during reset...
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
=> something is wrong in PMIC configuration in linux ?
Possibly, but then it is also something wrong on STM32MP157C EV1, because I can reproduce the failure on EV1 too. I specifically did check this on the EV1. Please fix your kernel config and try again, then you should be able to see it yourself.
Has there been any news on this defect of EV1 or has this been ignored by ST ?
Hi Marek
Hi,
Quoted 1 line
Sorry for the delay,
No worries.
What I am more concerned about is -- why is this problem present on EV1 too and how to solve it there ? (and no, "add more unnecessary software to the stack to cover this up" is not the answer)
Quoted 1 line
Patch applied on stm32-master
Thank you
Quoted 111 lines · Marek Vasut
Quoted 102 lines · Patrice CHOTARD
Quoted 99 lines · Marek Vasut
Quoted 98 lines · Marek Vasut
Quoted 1 line · Patrick DELAUNAY
Hi,
Hi,
Quoted 29 lines
Quoted 10 lines
[ 39.426015] Disabling non-boot CPUs ...
[ 39.448635] Retrying again to check for CPU kill
[ 39.451909] CPU1 killed.
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
DDR invalid size :0x4, expected0x40000000
DRAM init failed: -22
### ERROR ### Please RESET the board ###Quoted 10 lines
Press RESET button
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3e (Jun 15 2023 - 08:36:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
DDR invalid size :0x4, expected0x40000000
DRAM init failed: -22
### ERROR ### Please RESET the board ###I try it with the latest STMicroelectronics OSS image.
I just change in U-Boot config to be aligned the expected SD-Card partionning
configs/stm32mp15_basic_defconfig:
(quoted diff) +1
-1-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=3 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=5Quoted 1 line
But low power is not supported in this downstream config :-<
Use
multi_v7_defconfigor some such ?Quoted 34 lines
I got the error:
.......
U-Boot SPL 2023.07-rc4-00008-g2f4664f5c3ed-dirty (Jun 16 2023 - 11:37:52 +0200)
RAM: DDR3-DDR3L 32bits 533000kHz
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) image entry point:0xc0100000U-Boot 2023.07-rc4-00008-g2f4664f5c3ed-dirty (Jun 16 2023 - 11:37:52 +0200)
CPU: STM32MP157FAA Rev.Z
Model: STMicroelectronics STM32MP157C eval daughter on eval mother
Board: stm32mp1 in basic mode (st,stm32mp157c-ev1)
Board: MB1263 Var4.0 Rev.C-03
DRAM: 1 GiB
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
Core: 288 devices, 42 uclasses, devicetree: separate
WDT: Started watchdog@5a002000 with servicing every 1000ms (32s timeout) NAND: 1024 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... Invalid ENV offset in MMC, copy=0 In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000
Hit any key to stop autoboot: 0Quoted 6 lines
....
[ 0.000000] Booting Linux on physical CPU0x0
[ 0.000000] Linux version 6.4.0-rc6 (oe-user@oe-host) (arm-ostl-linux-gnueabi-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.40.20230119) #1 SMP PREEMPT Sun Jun 11 21:35:30 UTC 2023
....root@stm32mp1-disco-oss:~# while true ; do rtcwake -s 100 -m mem ; done rtcwake: unrecognized suspend state 'mem'Please fix your kernel config and enable suspend to mem, I am sure that is not difficult.
Quoted 1 line
I check also with downstream (OpenSTLinux V4.0),
This is not relevant to this discussion.
Quoted 13 lines
and I can't reproduced the issue but we are using TF-A / OP-TEE / SCMI to support all the low power modes.
And this low power support (in TF-A/ OP-TEE / Linux with SCMI) is not yet up streamed.
PS: if you are not able to restart even after a RESET, I assume something is wrong in the PMIC configuration
(for example in NVM or in initial regulator configuration)
so you have no power cycle on DDR during reset...
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
=> something is wrong in PMIC configuration in linux ?
Possibly, but then it is also something wrong on STM32MP157C EV1, because I can reproduce the failure on EV1 too. I specifically did check this on the EV1. Please fix your kernel config and try again, then you should be able to see it yourself.
Has there been any news on this defect of EV1 or has this been ignored by ST ?
Hi Marek
Quoted 7 lines
Hi,
Quoted 1 line
Sorry for the delay,
No worries.
What I am more concerned about is -- why is this problem present on EV1 too and how to solve it there ? (and no, "add more unnecessary software to the stack to cover this up" is not the answer)
I ran into this defect again, it seems the EV1 problem is ignored by ST, or are there any news ?
Quoted 11 lines · Marek Vasut
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 ### "
Quoted 8 lines
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 <[email protected]>---
NOTE: This is 2023.07 material
I don't see this one in 2023.07 yet, can you please pick it and send PR?
Thanks
Quoted 17 lines · Marek Vasut
Quoted 16 lines · Marek Vasut
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, expected0x40000000
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 .
Quoted 5 lines
Quoted 3 lines
Signed-off-by Marek Vasut <[email protected]>---
NOTE: This is 2023.07 materialI don't see this one in 2023.07 yet, can you please pick it and send PR?
Sadly, this bugfix has not made it into 2023.07, even though the fix was posted a month and half before the actual release.