STM32MP1 OLinuXino-LIME U-Boot freezes, AXP209 bug

Started by ninevoltz, January 31, 2025, 05:17:20 PM

Previous topic - Next topic

ninevoltz

I shutdown my Lime board yesterday, and when I turned it on this morning, it will not boot. I get the following output on the serial console:

U-Boot SPL 2021.04+olimex-1-20240312.134658 (Mar 12 2024 - 13:48:01 +0000)
Model: STM32MP1 OLinuXino-LIME
Init AXP209 PMIC
VDD Core set to: 1350 mv

I've seen other posts claiming this is a bug in the AXP209 PMIC when enabling the LDO3 output, which causes the PMIC to shut down and freeze the system. Is there a fix for this? I was going to build this board into some test equipment, but I can't do it with this bug. I can sometimes get it to boot if I reduce the supply voltage to 4 volts and wait a minute before powering up.

Also, is there a way to mirror the console output to HDMI so I don't have to hook up a serial cable to view the kernel boot messages?

Thanks!

ninevoltz

A successful U-Boot start looks like this, for reference:

U-Boot SPL 2021.04+olimex-1-20240312.134658 (Mar 12 2024 - 13:48:01 +0000)
Model: STM32MP1 OLinuXino-LIME
Init AXP209 PMIC
VDD Core set to: 1350 mv
---------0------------
RAM: DDR3-DDR3L 32bits 533000kHz
Trying to boot from MMC1


U-Boot 2021.04+olimex-1-20240312.134658 (Mar 12 2024 - 13:48:01 +0000)

CPU: STM32MP157DAA Rev.Z
Model: STM32MP1 OLinuXino-LIME
Verifying data: EEPROM Valid
ID:    STMP157-OLinuXino-LIME2H-EXT Rev.B1
SN:    0002BDCD
MAC:   30:1F:9A:D1:70:32
Board: stm32mp1 in basic mode (olimex,stm32mp1xx-olinuxino-lime)
DRAM:  1 GiB
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
NAND:  0 MiB
MMC:   STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
invalid MAC address in OTP 00:00:00:00:00:00
## Error: Can't force access to "ethaddr"
Net:   eth0: ethernet@5800a000
Hit any key to stop autoboot:  0
Boot over mmc0!
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:4...
Found U-Boot script /boot/boot.scr
2025 bytes read in 22 ms (89.8 KiB/s)
## Executing script at c4100000
Checking for /uEnv.txt...
Checking for /boot/uEnv.txt...
455 bytes read in 22 ms (19.5 KiB/s)
Loaded environment from /boot/uEnv.txt
Loading FIT image...
21649747 bytes read in 928 ms (22.2 MiB/s)
## Loading kernel from FIT Image at c2000000 ...
   Using 'config-1001' configuration
   Trying 'kernel-1' kernel subimage
     Description:  Linux kernel 5.10.180-olimex
     Created:      2025-01-30  17:02:24 UTC
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0xc20000d4
     Data Size:    6574480 Bytes = 6.3 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0xc0000000
     Entry Point:  0xc0000000
     Hash algo:    crc32
     Hash value:   0d5f6ea4
     Hash algo:    sha1
     Hash value:   fe349f56ad42d4d72dabe061c09c77c73bc0a02b
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading ramdisk from FIT Image at c2000000 ...
   Using 'config-1001' configuration
   Trying 'ramdisk-1' ramdisk subimage
     Description:  Ramdisk for kernel 5.10.180-olimex
     Created:      2025-01-30  17:02:24 UTC
     Type:         RAMDisk Image
     Compression:  Unknown Compression
     Data Start:   0xc2645398
     Data Size:    14994991 Bytes = 14.3 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0xc4400000
     Entry Point:  0xc4400000
     Hash algo:    crc32
     Hash value:   18f6e8cf
     Hash algo:    sha1
     Hash value:   26ccb7467f325526e2209aa4905407f3f3f5dbef
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Loading ramdisk from 0xc2645398 to 0xc4400000
WARNING: 'compression' nodes for ramdisks are deprecated, please fix your .its file!
## Loading fdt from FIT Image at c2000000 ...
   Using 'config-1001' configuration
   Trying 'fdt-1' fdt subimage
     Description:  unavailable
     Created:      2025-01-30  17:02:24 UTC
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0xc34922b4
     Data Size:    78071 Bytes = 76.2 KiB
     Architecture: ARM
     Load Address: 0xc4000000
     Hash algo:    crc32
     Hash value:   0b1f824a
     Hash algo:    sha1
     Hash value:   3387e34719ef8faf007e1702266e915f3a024f51
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Loading fdt from 0xc34922b4 to 0xc4000000
   Booting using the fdt blob at 0xc4000000
   Loading Kernel Image
   Loading Ramdisk to cf1b3000, end cffffe2f ... OK
   Loading Device Tree to cf19c000, end cf1b20f6 ... OK
Applying overlay: '/usr/lib/olinuxino-overlays/stm32mp1/stm32mp1-hdmi.dtbo'...
1870 bytes read in 23 ms (79.1 KiB/s)

Starting kernel ...

ninevoltz

I updated u-boot to the latest built from the Olimex github repo, and I'm still having issues with it freezing:

U-Boot SPL 2021.04-00028-g39a8846cd6 (Jan 31 2025 - 10:56:21 -0500)
Model: STM32MP1XX OLinuXino-SOM
Init AXP209 PMIC

If I turn the supply voltage down to 4.3 volts, wait about a minute, and turn it on, it will boot.

LubOlimex

Did you try preparing a card with the vanilla unmodified Olimage from here (preferably the "STM32MP1-OLinuXino-LIME-bullseye-base-20240312-135508.img"):

https://images.olimex.com/release/stm32-lime/

Please do so if you haven't and report back.
Technical support and documentation manager at Olimex

ninevoltz

I started with the vanilla image, but I recompiled the kernel to enable the second CANbus peripheral. That may have been when my problem started. That doesn't make sense to me though, because the problem appears to be with U-Boot, before the kernel has even loaded. I hadn't done any changes to U-Boot before the problem started. I will bring another SD card to work tomorrow and try a vanilla image again. I don't want to redo all the work I've done already on the current SD card.

ninevoltz

I decided to just go ahead and erase this SD card and start over. Even with the vanilla image, it still won't boot.

U-Boot SPL 2021.04+olimex-1-20240312.134658 (Mar 12 2024 - 13:48:01 +0000)
Model: STM32MP1 OLinuXino-LIME
Init AXP209 PMIC
VDD Core set to: 1350 mv

ninevoltz

I think I figured out the problem. I don't have a battery connected to the board, so the PMIC doesn't power on and doesn't respond on the I2C bus. I see a call to 0x34 with no ACK. If I jumper VBAT to the 5 volt input, it powers on every time. I soldered a 10 ohm resistor from +5VEXT to VBAT and it boots up reliably every time now.

Do you have a better recommendation to bypass the battery? I can't decipher the AXP209 datasheet well enough to determine where the PMIC gets its core logic voltage supply from.

LubOlimex

Technical support and documentation manager at Olimex

LubOlimex

Technical support and documentation manager at Olimex