Hi,

On 6/15/23 08:44, Marek Vasut wrote:

On 5/29/23 03:57, Marek Vasut wrote:

Hello again,

[...]

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 ###


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

Reply via email to