cancel
Showing results for 
Search instead for 
Did you mean: 

migrating from krikstone to mickledore unable to flash via DFU panic halt

iheb
Associate III

Dear STM comunity, 
i am currently trying migrate my solution from the kirkstone to  mickledore because it offers more software functions that i need and cant properly use on the kirkstone, 

i have spent alot of time trying to port the configurations from OSD32MP1F to mickledore via cube mx, here are the device tree, there are alot of differences between versions but overall nothing too diffrent, i managed to compile the image and started flashing , however i don't know what are the issues but i am not able to flash the image due to a panic error leading to flashing halt as shown in the LOG 1 and LOG2 

 

USB speed   : High Speed (480MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN          : 004400453230510532393433
DFU protocol: 1.1
Board       : --
Device ID   : 0x0500
Device name : 
Device type : MPU
Device CPU  : Cortex-A7
Start operation done successfully at partition 0x03


Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-osd32-mx-usb.stm32
  File          : tf-a-stm32mp157c-osd32-mx-usb.stm32
  Size          : 220,41 KB 
  Partition ID  : 0x01 

Download in Progress:
[==================================================] 100% 

File download complete
Time elapsed during download operation: 00:00:01.646

RUNNING Program ... 
  PartID:      :0x01 
Start operation done successfully at partition 0x01


Memory Programming ...
Opening and parsing file: fip-stm32mp157c-osd32-mx-optee-sdcard.bin
  File          : fip-stm32mp157c-osd32-mx-optee-sdcard.bin
  Size          : 1,39 MB 
  Partition ID  : 0x03 

Download in Progress:
[==================================================] 100% 

File download complete
Time elapsed during download operation: 00:00:01.673

RUNNING Program ... 
  PartID:      :0x03 

Reconnecting the device ...

 

 LOG 1 : DFU flashing sequance 

 

the LOG 1 show the flashing halted and asking to connect after further inspection on the UART communication as shown on LOG2

 

NOTICE:  CPU: STM32MP157F?? Rev.Z
NOTICE:  Model: STMicroelectronics custom STM32CubeMX board - openstlinux-6.1-yocto-mickledore-mpu-v24.06.26
INFO:    PMIC version = 0x21
INFO:    Reset reason (0x214):
INFO:      IWDG2 Reset (rst_iwdg2)
INFO:    FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO:    FCONF: Reading firmware configuration information for: stm32mp_io
INFO:    FCONF: Reading firmware configuration information for: stm32mp_fuse
INFO:    Using USB
INFO:      Instance 2
INFO:    Boot used partition fsbl1
NOTICE:  BL2: v2.8-stm32mp1-r2.0(debug):lts-v2.8.15-dirty(567af710)
NOTICE:  BL2: Built : 00:51:33, Jan 26 2024
INFO:    BL2: Doing platform setup
INFO:    RAM: DDR3-DDR3L 16bits 400000kHz
INFO:    Memory size = 0x20000000 (512 MB)
INFO:    DFU USB START...
INFO:    phase ID :3, Manifestation 3 at c716499a
INFO:    Send detach request
INFO:    Receive DFU Detach
INFO:    DFU USB STOP...
INFO:    BL2: Loading image id 1
INFO:    Loading image id=1 at address 0x2ffff000
INFO:    Image id=1 loaded: 0x2ffff000 - 0x2ffff1ea
INFO:    FCONF: Reading FW_CONFIG firmware configuration file from: 0x2ffff000
INFO:    FCONF: Reading firmware configuration information for: dyn_cfg
INFO:    FCONF: Reading firmware configuration information for: stm32mp1_firewall
INFO:    BL2: Loading image id 4
INFO:    Loading image id=4 at address 0xde000000
INFO:    Image id=4 loaded: 0xde000000 - 0xde00001c
INFO:    OPTEE ep=0xde000000
INFO:    OPTEE header info:
INFO:          magic=0x4554504f
INFO:          version=0x2
INFO:          arch=0x0
INFO:          flags=0x0
INFO:          nb_images=0x1
INFO:    BL2: Loading image id 8
INFO:    Loading image id=8 at address 0xde000000
INFO:    Image id=8 loaded: 0xde000000 - 0xde02ee08
INFO:    BL2: Skip loading image id 9
INFO:    BL2: Loading image id 2
INFO:    Loading image id=2 at address 0xc0500000
INFO:    Image id=2 loaded: 0xc0500000 - 0xc0520bd0
INFO:    BL2: Skip loading image id 16
INFO:    BL2: Loading image id 5
INFO:    Loading image id=5 at address 0xc0100000
INFO:    Image id=5 loaded: 0xc0100000 - 0xc0214c94
NOTICE:  BL2: Booting BL32
INFO:    Entry point address = 0xde000000
INFO:    SPSR = 0x1d3
I/TC: Early console on UART#4
I/TC: 
I/TC: Embedded DTB found
I/TC: OP-TEE version: 3.19.0-dev (gcc version 12.3.0 (GCC)) #1 Fri Oct 14 19:00:05 UTC 2022 arm
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
E/TC:0 0 Panic

 

LOG2 : Print of uart 4 connected via serial coomunication using cutecom during flashing 
as seen in LOG2 there is a panic during the flashing process, i was trying to blindly modfiy the device tree on the optee half and tfa while following the examples on the EV1 DT board and while adding my rcc and source code from the Cubemx generated code but no luck. i dont know why its paniking , i can not use GDB to further debug. 
here is my board config text as seen in scrc1 and src2 . 

 

 

#@TYPE: Machine
#@NAME: stm32mp15-mx
#@DESCRIPTION: Configuration for STM32CubeMX generated project
#@NEEDED_BSPLAYERS: layers/meta-openembedded/meta-oe layers/meta-openembedded/meta-python

###########################################################################
#
# Default machine configuration sections
#
###########################################################################

include conf/machine/include/st-machine-common-stm32mp.inc
include conf/machine/include/st-machine-providers-stm32mp.inc

# Define specific common machine name
MACHINEOVERRIDES .= ":stm32mp1common:stm32mp15common"
MACHINEOVERRIDES .= ":stm32mpcommonmx:stm32mp15commonmx"

# =========================================================================
# Chip architecture
# =========================================================================
DEFAULTTUNE = "cortexa7thf-neon-vfpv4"
include conf/machine/include/arm/armv7a/tune-cortexa7.inc

# =========================================================================
# boot scheme
# =========================================================================
BOOTSCHEME_LABELS += "optee"
#BOOTSCHEME_LABELS += "fastboot"
# Default optee profile use by all soc, (if exception see if there is a specific
# profile for a soc)
ST_OPTEE_PROFILE ?= "secure_and_system_services"
# For stm32mp15 force "system_services"
ST_OPTEE_PROFILE:stm32mp15 ?= "system_services"

# =========================================================================
# boot device
# =========================================================================
BOOTDEVICE_LABELS += "sdcard"

# =========================================================================
# Machine settings
# =========================================================================
# Enable the board device storage support with CUBEMX_DTB
#STM32MP_DT_FILES_NAND    += "${CUBEMX_DTB}"
#STM32MP_DT_FILES_NOR     += "${CUBEMX_DTB}"
#STM32MP_DT_FILES_EMMC    += "${CUBEMX_DTB}"
STM32MP_DT_FILES_SDCARD  += "${CUBEMX_DTB}"
#STM32MP_DT_FILES_SPINAND += "${CUBEMX_DTB}"

# =========================================================================
# Machine features (default for stm32mp1 like)
# =========================================================================
MACHINE_FEATURES += "splashscreen"
MACHINE_FEATURES += "watchdog"
MACHINE_FEATURES += "bluetooth"
MACHINE_FEATURES += "wifi"
MACHINE_FEATURES += "${@'gpu' if d.getVar('ACCEPT_EULA_'+d.getVar('MACHINE')) == '1' else ''}"
MACHINE_FEATURES += "m4copro"
MACHINE_FEATURES += "usbg0"

# Bluetooth
BLUETOOTH_LIST += "linux-firmware-bluetooth-bcm4343"
# Wifi
WIFI_LIST += "linux-firmware-bcm43430"

# =========================================================================
# Flashlayout
# =========================================================================
# Set the FLASHLAYOUT_TYPE_LABELS for 'extensible' to CUBEMX_DTB
FLASHLAYOUT_TYPE_LABELS:extensible = "${CUBEMX_DTB}"
# =========================================================================
# U-Boot configuration
# =========================================================================
#UBOOT_CONFIG = "stm32mp157c-osd32mp157c-512m-baa_minimalconfig-mx_defconfig,,${BINARY_NAME}"
#UBOOT_CONFIG[optee] = "osd32mp1_brk_trusted_defconfig,,${BINARY_NAME}"
#UBOOT_DEVICETREE[optee]= "stm32mp157c-osd32mp1-brk"
# U-Boot config
#UBOOT_CONFIG = "viper_butcombe_beta"
#UBOOT_CONFIG[viper_butcombe_beta] = "viper-innovations_butcombe-beta_defconfig,,u-boot.dtb"
# =========================================================================
# CubeMX extra config
# =========================================================================
ENABLE_CUBEMX_DTB ?= "1"

# =========================================================================
# OPTEE profile
# =========================================================================
# Optee profile, permit to activate or desactvate a list of service on optee.
# There is two configuration available:
#  - secure_and_system_services aka optee boot scheme
#  - system_services aka opteemin boot scheme

# Default optee profile use by all soc, (if exception see if there is a specific
# profile for a soc)
ST_OPTEE_PROFILE ?= "system_services"

###########################################################################
#
# User machine customization sections
#
###########################################################################
LINUX_A7_EXAMPLES_DT += "stm32mp157c-dk2-a7-examples"
CUBE_M4_EXAMPLES_DT += "stm32mp157c-dk2-m4-examples"
M4_BOARDS = "STM32MP157C-EV1"
# Boot Scheme
# =========================================================================
#BOOTSCHEME_LABELS += "optee"

# Boot Device Choice
# =========================================================================
# Define the boot device supported
#BOOTDEVICE_LABELS += "sdcard"
#BOOTDEVICE_LABELS += "emmc"
#BOOTDEVICE_LABELS += "nand-4-256-1024"
#BOOTDEVICE_LABELS += "nor-sdcard"

# Support Feature Choice
# =========================================================================
# Define the features to enable on board
#MACHINE_FEATURES += "bluetooth"
#MACHINE_FEATURES += "wifi"

# Specific firmwares and kernel modules configuration
# =========================================================================
# Set the list of kernel module to be auto-loaded during boot
#KERNEL_MODULE_AUTOLOAD += ""

# Set Bluetooth related package list needed when 'bluetooth' feature is enabled
#BLUETOOTH_LIST += ""

# Set Wifi related package list needed when 'wifi' feature is enabled
#WIFI_LIST += ""

# CubeMX Project Config
# =========================================================================
# Assign CubeMX Board devicetree and project path name
CUBEMX_DTB = "stm32mp157c-osd32-mx"
CUBEMX_PROJECT = "mx/stm32mp157c-osd32/"

# Indicate which STM32MP package are used: 'A', 'C', 'D' or 'F'
CUBEMX_SOC_PACKAGE = "C"

# Indicate the size of DDR available on BOARD: 512 or 1024 (size in MB unit)
CUBEMX_BOARD_DDR_SIZE = "512"

# Indicate if you like to disable the DVFS which are activated by default
CUBEMX_SOC_DVFS_OFF = "0"

#------------------------ 

# =========================================================================
# WIC for sdcard raw image
# =========================================================================
WIC_CREATE_EXTRA_ARGS = "--no-fstab-update"
WKS_FILE_DEPENDS ?= " \
    virtual/bootloader \
    virtual/trusted-firmware-a \
    ${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'virtual/optee-os', '', d)} \
    st-image-bootfs \
    ${@bb.utils.contains('ST_VENDORFS','1','st-image-vendorfs', '', d)} \
    st-image-userfs \
"
OPTEE_WIC_FILE = "${@bb.utils.contains('ST_VENDORFS','1','sdcard-stm32mp157f-ev1-optee-vendorfs-1GB.wks.in','sdcard-stm32mp157f-ev1-optee-1GB.wks.in',d)}"

# for generated a WIC file, please uncomment the 2 following lines or add them to local.conf
#WKS_IMAGE_FSTYPES += "wic wic.bz2 wic.bmap"
#WKS_FILE += "${OPTEE_WIC_FILE}"

# ---------------------------------
#  Usage of FIT Image signed
# ---------------------------------
# Need to have MACHINE_FEATURES += "fit"
# Need to uncomment the follwing variable
# NOTE: you can specify another directlry to keep same key at each new compilation (UBOOT_SIGN_KEYDIR)

# keys name in keydir (eg. "ubootfit.crt", "ubootfit.key")
#UBOOT_SIGN_KEYNAME = "ubootfit"
#UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000"
#UBOOT_SIGN_ENABLE = "1"
#UBOOT_SIGN_KEYDIR = "${DEPLOY_DIR_IMAGE}"

#FIT_GENERATE_KEYS = "1"
EXTRA_OEMAKE += "CFG_TEE_CORE_LOG_LEVEL=4"

 

SRC1 : costum machine config
SRC1 showes the costum machine config to generate the right image for the osd32mp1-brk board

 

# Provides CubeMX device tree file management:
# User can configure recipe file so that extra device tree files provided by
# CubeMX can be integrated in original source code (and so get compiled)

# Configure generation of device tree binary with CubeMX output files
ENABLE_CUBEMX_DTB ??= "1"

# CubeMX device tree file name
CUBEMX_DTB ??= "stm32mp157c-osd32-mx"
# Path to CubeMX project generated device tree files
CUBEMX_PROJECT ??= "mx/stm32mp157c-osd32"

# Internal class variable to manage CubeMX file location:
#   CUBEMX_PROJECT_ABS
#       Absolute path to CubeMX project generated device tree files, initialized
#       thanks to BBPATH
CUBEMX_PROJECT_ABS = "mx/stm32mp157c-osd32"

# M33 co-processor is used with Trustzone enabled or not
CUBEMX_M33_TZ ??= "1"

# internal, for M33_TZ, we need to update the dependency variable
M33PROJECT_TF_M_TRUSTZONE = "${CUBEMX_M33_TZ}"

# CubeMX use external_dt class
inherit external-dt

EXTERNAL_DT_ENABLED:stm32mpcommonmx = "${@bb.utils.contains('ENABLE_CUBEMX_DTB', '1', '1', '0', d)}"

STAGING_EXTDT_DIR:stm32mpcommonmx = "${CUBEMX_PROJECT_ABS}"

EXTDT_DIR_TF_A:stm32mpcommonmx  = "tf-a"
EXTDT_DIR_UBOOT:stm32mpcommonmx = "u-boot"
EXTDT_DIR_TF_M:stm32mpcommonmx  = "tf-m"
EXTDT_DIR_OPTEE:stm32mpcommonmx = "optee-os"
EXTDT_DIR_LINUX:stm32mpcommonmx = "kernel"

# Do not force make file generation on recipe side when file already available
CUBEMX_EXTDT_FORCE_MK ??= "1"

def cubemx_search(dirs, d):
    search_path = d.getVar("BBPATH").split(":")
    for dir in dirs.split():
        for p in search_path:
            dir_path = os.path.join(p, dir)
            if os.path.isdir(dir_path):
                return (True, dir_path)
    return (False, "")

python __anonymous() {
    if d.getVar('ENABLE_CUBEMX_DTB') == "0":
        return

    # Check that user has configured CubeMX machine properly
    cubemx_project = d.getVar('CUBEMX_PROJECT')
    if cubemx_project == "":
        raise bb.parse.SkipRecipe('\n[cubemx-stm32mp] CUBEMX_PROJECT var is empty. Please initalize it on your %s CubeMX machine configuration.\n' % d.getVar("MACHINE"))
    cubemx_dtb = d.getVar('CUBEMX_DTB')
    if cubemx_dtb == "":
        raise bb.parse.SkipRecipe('\n[cubemx-stm32mp] CUBEMX_DTB var is empty. Please initalize it on your %s CubeMX machine configuration.\n' % d.getVar("MACHINE"))

    # Set CUBEMX_PROJECT_ABS according to CubeMX machine configuration
    found, cubemx_project_dir = cubemx_search(cubemx_project, d)
    if found:
        bb.debug(1, "Set CUBEMX_PROJECT_ABS to '%s' path." % cubemx_project_dir)
        d.setVar('CUBEMX_PROJECT_ABS', cubemx_project_dir)
    else:
        bbpaths = d.getVar('BBPATH').replace(':','\n\t')
        bb.fatal('\n[cubemx-stm32mp] Not able to find "%s" path from current BBPATH var:\n\t%s.' % (cubemx_project, bbpaths))

    # Append function to check before 'do_compile' that device tree file is available
    d.prependVarFlag('do_compile', 'prefuncs', "check_cubemx_extdt ")

    # Make sure to init CONFIGURE_FILES with proper STAGING_EXTDT_DIR
    for extdt_conf in d.getVar('EXTDT_DIR_CONFIG').split():
        provider = extdt_conf.split(':')[0]
        sub_path = extdt_conf.split(':')[1]
        if provider in d.getVar('PROVIDES').split():
            extdt_dir = os.path.join(d.getVar('STAGING_EXTDT_DIR'), sub_path)
            extdt_src_configure(d, extdt_dir)
            break
}

python check_cubemx_extdt() {
    for extdt_conf in d.getVar('EXTDT_DIR_CONFIG').split():
        provider = extdt_conf.split(':')[0]
        sub_path = extdt_conf.split(':')[1]
        if provider in d.getVar('PROVIDES').split():
            cubemx_dts_file = os.path.join(d.getVar('STAGING_EXTDT_DIR'), sub_path, d.getVar('CUBEMX_DTB') + '.dts')
            if os.path.exists(cubemx_dts_file):
                break
            else:
                bb.fatal('File %s not found: compilation aborted for %s device tree.' % (cubemx_dts_file, d.getVar('BPN')))
}

 

SRC2: cubemx-stm32mp .bbclass configuration 
could you please dear ST comunity help me figure this thing out i am really out of leads , i don't know if i need to share the device treers ? or maybe help me get the location where there is an issue

Thank you 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello MScor.1, indeed your thoughts are correct its not a regulator issue , i have managed to get everything working after extensive research and understanding to every single device tree node, and the working of the boot chain .... 
for my case it was an issue of etzpc and memory , i was relying on the files generated with the cubemx however some key changes are crusial to get this working, increasing the debug level indeed contrebuted greatly to find the issue. 
for my case , it was not an uboot problem , it was an optee device tree configuration as i said. this exact bug i had to make sure to specify the "secure-status = "okay"; " on the nodes that they are going to use an unlcok through the trustzone firewall. 

View solution in original post

10 REPLIES 10
DMårt
Lead

@iheb 

Try to enable debug level = 4 and set DEBUG=y on Optee first. Do that in the Makefile of Optee.

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer
iheb
Associate III

thank you for the reply , after seting the optee debug level to 4 

here iis the resulting log , i have meraculasly found out that the first log is a watchdog issue , the error changed when i changed to watchdog1 like the examples. 

 

NOTICE:  CPU: STM32MP157F?? Rev.Z
....
F/TC:0 0 parse_dt:613 reg11: min_mv=1100
F/TC:0 0 parse_dt:627 reg11: max_mv=1100
F/TC:0 0 regulator_list_voltages:435 min_mv=1100 max_mv=1100
F/TC:0 0 get_supply_phandle:104 vdd: supplied by 26
F/TC:0 0 regulator_register:672 register reg18
F/TC:0 0 parse_dt:600 reg18: parse embedded DTB
F/TC:0 0 parse_dt:613 reg18: min_mv=1800
F/TC:0 0 parse_dt:627 reg18: max_mv=1800
F/TC:0 0 regulator_list_voltages:435 min_mv=1800 max_mv=1800
F/TC:0 0 get_supply_phandle:104 vdd: supplied by 26
F/TC:0 0 regulator_register:672 register usb33
F/TC:0 0 parse_dt:600 usb33: parse embedded DTB
F/TC:0 0 parse_dt:613 usb33: min_mv=3300
F/TC:0 0 parse_dt:627 usb33: max_mv=3300
F/TC:0 0 regulator_list_voltages:435 min_mv=3300 max_mv=3300
F/TC:0 0 get_supply_phandle:104 vdd_3v3_usbfs: supplied by 27
D/TC:0 0 probe_driver_node:443 element: stm32mp1-pwr-regu on node pwr@50001000 initialized
F/TC:0 0 probe_driver_node:436 Probing stm32mp15_rstctrl on node rcc@50000000
D/TC:0 0 probe_driver_node:443 element: stm32mp15_rstctrl on node rcc@50000000 initialized
F/TC:0 0 process_probe_list:550 Probe loop 3 after 2 for deferral(s)
D/TC:0 0 print_probe_list:397 Probe list: 3 elements
D/TC:0 0 print_probe_list:399 |- Driver stm32-cpu-opp probes on node cpu0-opp-table
D/TC:0 0 print_probe_list:399 |- Driver stm32-iwdg probes on node watchdog@5c003000
D/TC:0 0 print_probe_list:399 |- Driver stm32-tamp probes on node tamp@5c00a000
D/TC:0 0 print_probe_list:403 `- Probe list end
D/TC:0 0 print_probe_list:409 Failed list: 0 elements
D/TC:0 0 print_probe_list:414 `- Failed list end
F/TC:0 0 probe_driver_node:436 Probing stm32-tamp on node tamp@5c00a000
D/TC:0 0 probe_driver_node:449 element: stm32-tamp on node tamp@5c00a000 deferred 2 time(s)
F/TC:0 0 probe_driver_node:436 Probing stm32-iwdg on node watchdog@5c003000
F/TC:0 0 __clk_enable:1174 Clock 68 has been enabled
D/TC:0 0 iwdg_wdt_get_version_and_status:433 Watchdog is enabled
D/TC:0 0 gic_it_set_cpu_mask:350 cpu_mask: writing 0xff0000 to 0xd86218b4
D/TC:0 0 gic_it_set_cpu_mask:352 cpu_mask: 0x30000
D/TC:0 0 gic_it_set_prio:361 prio: writing 0x1 to 0xd86214b6
D/TC:0 0 register_periph:104 Register IWDG1 as secure
D/TC:0 0 probe_driver_node:443 element: stm32-iwdg on node watchdog@5c003000 initialized
F/TC:0 0 probe_driver_node:436 Probing stm32-cpu-opp on node cpu0-opp-table
F/TC:0 0 get_supply_phandle:104 cpu: supplied by 4
D/TC:0 0 regulator_get_by_phandle:44 phandle 4 not found
D/TC:0 0 probe_driver_node:449 element: stm32-cpu-opp on node cpu0-opp-table deferred 3 time(s)
F/TC:0 0 process_probe_list:550 Probe loop 4 after 3 for deferral(s)
D/TC:0 0 print_probe_list:397 Probe list: 2 elements
D/TC:0 0 print_probe_list:399 |- Driver stm32-tamp probes on node tamp@5c00a000
D/TC:0 0 print_probe_list:399 |- Driver stm32-cpu-opp probes on node cpu0-opp-table
D/TC:0 0 print_probe_list:403 `- Probe list end
D/TC:0 0 print_probe_list:409 Failed list: 0 elements
D/TC:0 0 print_probe_list:414 `- Failed list end
F/TC:0 0 probe_driver_node:436 Probing stm32-cpu-opp on node cpu0-opp-table
F/TC:0 0 get_supply_phandle:104 cpu: supplied by 4
D/TC:0 0 regulator_get_by_phandle:44 phandle 4 not found
D/TC:0 0 probe_driver_node:449 element: stm32-cpu-opp on node cpu0-opp-table deferred 4 time(s)
F/TC:0 0 probe_driver_node:436 Probing stm32-tamp on node tamp@5c00a000
D/TC:0 0 probe_driver_node:449 element: stm32-tamp on node tamp@5c00a000 deferred 3 time(s)
D/TC:0 0 process_probe_list:590 Unresolved dependencies after 4 rounds, 4 deferred
D/TC:0 0 probe_dt_drivers_early:774 Deferred drivers probing
D/TC:0 0 print_probe_list:397 Probe list: 2 elements
D/TC:0 0 print_probe_list:399 |- Driver stm32-cpu-opp probes on node cpu0-opp-table
D/TC:0 0 print_probe_list:399 |- Driver stm32-tamp probes on node tamp@5c00a000
D/TC:0 0 print_probe_list:403 `- Probe list end
D/TC:0 0 print_probe_list:409 Failed list: 0 elements
D/TC:0 0 print_probe_list:414 `- Failed list end
D/TC:0 0 call_initcalls:40 level 3 platform_banner()
I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp157c-osd32-mx.dts
I/TC: OP-TEE ST profile: system_services
D/TC:0 0 call_initcalls:40 level 3 init_stm32mp1_calib()
D/TC:0 0 stm32mp_start_clock_calib:406 HSI clock calibration not supported
D/TC:0 0 stm32mp_start_clock_calib:408 CSI clock calibration not supported
D/TC:0 0 call_initcalls:40 level 3 verify_pseudo_tas_conformance()
D/TC:0 0 call_initcalls:40 level 3 mobj_init()
D/TC:0 0 call_initcalls:40 level 3 default_mobj_init()
D/TC:0 0 call_initcalls:40 level 3 tee_cryp_init()
D/TC:0 0 call_initcalls:40 level 4 init_console_from_dt()
D/TC:0 0 get_console_node_from_dt:72 No console directive from DTB
D/TC:0 0 get_console_node_from_dt:72 No console directive from DTB
D/TC:0 0 call_initcalls:40 level 5 stm32mp_syscfg_enable_io_compensation()
F/TC:0 0 __clk_enable:1174 Clock 51 has been enabled
D/TC:0 0 call_initcalls:40 level 5 init_pm_support()
F/TC:0 0 __clk_enable:1174 Clock 99 has been enabled
F/TC:0 0 __clk_disable:1187 Clock 99 has been disabled
F/TC:0 0 __clk_enable:1174 Clock 99 has been enabled
F/TC:0 0 __clk_disable:1187 Clock 99 has been disabled
D/TC:0 0 call_initcalls:40 level 5 probe_dt_drivers()
F/TC:0 0 process_probe_list:550 Probe loop 5 after 4 for deferral(s)
D/TC:0 0 print_probe_list:397 Probe list: 2 elements
D/TC:0 0 print_probe_list:399 |- Driver stm32-cpu-opp probes on node cpu0-opp-table
D/TC:0 0 print_probe_list:399 |- Driver stm32-tamp probes on node tamp@5c00a000
D/TC:0 0 print_probe_list:403 `- Probe list end
D/TC:0 0 print_probe_list:409 Failed list: 0 elements
D/TC:0 0 print_probe_list:414 `- Failed list end
F/TC:0 0 probe_driver_node:436 Probing stm32-tamp on node tamp@5c00a000
D/TC:0 0 stm32_tamp_parse_passive_conf:1608 Passive conf from dt: precharge=0, nb_sample=0, clk_div=32768
D/TC:0 0 stm32_tamp_parse_active_conf:1823 Active conf from dt: no filter clk_div=1
F/TC:0 0 stm32_tamp_probe:2007 STM32 TAMPER V1.2
D/TC:0 0 gic_it_set_cpu_mask:350 cpu_mask: writing 0xff00 to 0xd86218e4
D/TC:0 0 gic_it_set_cpu_mask:352 cpu_mask: 0x300
D/TC:0 0 gic_it_set_prio:361 prio: writing 0x1 to 0xd86214e5
F/TC:0 0 stm32_tamp_set_int_config:730 INT_TAMP1 disabled
F/TC:0 0 stm32_tamp_set_int_config:730 INT_TAMP2 disabled
F/TC:0 0 stm32_tamp_set_int_config:730 INT_TAMP3 disabled
F/TC:0 0 stm32_tamp_set_int_config:730 INT_TAMP4 disabled
F/TC:0 0 stm32_tamp_set_int_config:730 INT_TAMP5 disabled
F/TC:0 0 stm32_tamp_set_int_config:730 INT_TAMP8 disabled
F/TC:0 0 stm32_tamp_set_ext_config:780 EXT_TAMP1 disabled
F/TC:0 0 stm32_tamp_set_ext_config:780 EXT_TAMP2 disabled
F/TC:0 0 stm32_tamp_set_ext_config:780 EXT_TAMP3 disabled
F/TC:0 0 stm32_tamp_set_config:1104 Set passive conf 00000080
F/TC:0 0 stm32_tamp_set_config:1109 Set active conf1 00000000
D/TC:0 0 add_node_to_probe:641 element: stm32_tamp_nvram on node nvram@5c00a100
D/TC:0 0 print_probe_list:397 Probe list: 2 elements
D/TC:0 0 print_probe_list:399 |- Driver stm32-cpu-opp probes on node cpu0-opp-table
D/TC:0 0 print_probe_list:399 |- Driver stm32_tamp_nvram probes on node nvram@5c00a100
D/TC:0 0 print_probe_list:403 `- Probe list end
D/TC:0 0 print_probe_list:409 Failed list: 0 elements
D/TC:0 0 print_probe_list:414 `- Failed list end
D/TC:0 0 probe_driver_node:443 element: stm32-tamp on node tamp@5c00a000 initialized
F/TC:0 0 probe_driver_node:436 Probing stm32-cpu-opp on node cpu0-opp-table
F/TC:0 0 get_supply_phandle:104 cpu: supplied by 4
D/TC:0 0 regulator_get_by_phandle:44 phandle 4 not found
D/TC:0 0 probe_driver_node:449 element: stm32-cpu-opp on node cpu0-opp-table deferred 5 time(s)
F/TC:0 0 process_probe_list:550 Probe loop 6 after 5 for deferral(s)
D/TC:0 0 print_probe_list:397 Probe list: 2 elements
D/TC:0 0 print_probe_list:399 |- Driver stm32_tamp_nvram probes on node nvram@5c00a100
D/TC:0 0 print_probe_list:399 |- Driver stm32-cpu-opp probes on node cpu0-opp-table
D/TC:0 0 print_probe_list:403 `- Probe list end
D/TC:0 0 print_probe_list:409 Failed list: 0 elements
D/TC:0 0 print_probe_list:414 `- Failed list end
F/TC:0 0 probe_driver_node:436 Probing stm32-cpu-opp on node cpu0-opp-table
F/TC:0 0 get_supply_phandle:104 cpu: supplied by 4
D/TC:0 0 regulator_get_by_phandle:44 phandle 4 not found
D/TC:0 0 probe_driver_node:449 element: stm32-cpu-opp on node cpu0-opp-table deferred 6 time(s)
F/TC:0 0 probe_driver_node:436 Probing stm32_tamp_nvram on node nvram@5c00a100
D/TC:0 0 probe_driver_node:443 element: stm32_tamp_nvram on node nvram@5c00a100 initialized
F/TC:0 0 process_probe_list:550 Probe loop 7 after 6 for deferral(s)
D/TC:0 0 print_probe_list:397 Probe list: 1 elements
D/TC:0 0 print_probe_list:399 |- Driver stm32-cpu-opp probes on node cpu0-opp-table
D/TC:0 0 print_probe_list:403 `- Probe list end
D/TC:0 0 print_probe_list:409 Failed list: 0 elements
D/TC:0 0 print_probe_list:414 `- Failed list end
F/TC:0 0 probe_driver_node:436 Probing stm32-cpu-opp on node cpu0-opp-table
F/TC:0 0 get_supply_phandle:104 cpu: supplied by 4
D/TC:0 0 regulator_get_by_phandle:44 phandle 4 not found
D/TC:0 0 probe_driver_node:449 element: stm32-cpu-opp on node cpu0-opp-table deferred 7 time(s)
D/TC:0 0 process_probe_list:590 Unresolved dependencies after 7 rounds, 7 deferred
E/TC:0 0 probe_dt_drivers:795 Probe sequence result: 0x80000000
D/TC:0 0 print_probe_list:397 Probe list: 1 elements
D/TC:0 0 print_probe_list:399 |- Driver stm32-cpu-opp probes on node cpu0-opp-table
D/TC:0 0 print_probe_list:403 `- Probe list end
D/TC:0 0 print_probe_list:409 Failed list: 0 elements
D/TC:0 0 print_probe_list:414 `- Failed list end
E/TC:0 0 Panic
D/TC:0 0 stm32_bsec_find_otp_in_nvmem_layout:644 nvmem part_number_otp = 1: 1 bit offset: 0, length: 8
M/TC: CPU : 0
M/TC:     usr_sp : 0x00000000
M/TC:     usr_lr : 0x00000000
M/TC:   irq_spsr : 0x00000000
M/TC:     irq_sp : 0x00000000
M/TC:     irq_lr : 0x00000000
M/TC:   fiq_spsr : 0x00000000
M/TC:     fiq_sp : 0x00000000
M/TC:     fiq_lr : 0x00000000
M/TC:   svc_spsr : 0x00000000
M/TC:     svc_sp : 0x00000000
M/TC:     svc_lr : 0x00000000
M/TC:   abt_spsr : 0x00000000
M/TC:     abt_sp : 0x00000000
M/TC:     abt_lr : 0x00000000
M/TC:   und_spsr : 0x00000000
M/TC:     und_sp : 0x00000000
M/TC:     und_lr : 0x00000000
M/TC:       pmcr : 0x00000000

 

at this point i have no idea what could be wrong with the device tree as the error points out that there is somehting in the device tree drivers in line 147 to 153

1. You're missing regulators

2. You don't specify the voltage for the processor.

 

Here copy these instead.

https://github.com/DanielMartensson/STM32-Computer/blob/main/Firmware/STM32-Computer-Firmware/CA7/DeviceTree/STM32-Computer-Firmware/u-boot/stm32mp151a-stm32-computer-firmware-mx.dts

 

This will solve your problem @iheb 

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer

I am not sure missing regulators are the issue.

I have the same problem on mickledore, using the DK1 and I have the PMIC regulators in place for vddcore and vdd, with voltages specified.

The person in this post seems to have the same symptom, and they also seem to have regulators in place: they are on a custom board without PMIC, but they have fixed-regulator nodes that make sense.

I also tried the `reserve-memory` change from this post, with no change.

I have been struggling with this for a couple of days and at this point I am running out of options, so an ST employee chiming in might help, @Amel NASRI @Olivier GALLIEN (sorry for the direct mention, you seem to be the ST employees that interact with MPU forums and have the most posts).

I have attached my latest u-boot dts that shows the error even with the reserve-memory change. 

EDIT: I have now also attached an optee log with debug level=3. Note that in this optee.log file I had replaced the PMIC config with fixed regulators, following advice from Lab-MP15_FromPartNumber_To_BasicDeviceTree_with_CubeMx.pdf available here)

Well, ST is famous for not bug testing their code, @MScor.1 

I think the best option is to compile everything from pure source code. I mean, clone the repositories from GitHub and compile them with make.

Then you will not having these mysterious behavior.

 

 

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer

Hello MScor.1, indeed your thoughts are correct its not a regulator issue , i have managed to get everything working after extensive research and understanding to every single device tree node, and the working of the boot chain .... 
for my case it was an issue of etzpc and memory , i was relying on the files generated with the cubemx however some key changes are crusial to get this working, increasing the debug level indeed contrebuted greatly to find the issue. 
for my case , it was not an uboot problem , it was an optee device tree configuration as i said. this exact bug i had to make sure to specify the "secure-status = "okay"; " on the nodes that they are going to use an unlcok through the trustzone firewall. 

from the log that you provided , i think its a watchdog device tree declaration issue, make sure to use watchdog 1 for optee and tfa , and watchdog 2 for the uboot and the linux kernel 

I see this post is marked as a solution, but... I am not sure it is. 

According to the kernel documentation, the "secure-status" property defaults to the the same value as the "status" property, i.e. if a device is enabled with "status=okay" it is already available in both the secure and non-secure domains. Of course I might be wrong, but I think that means that adding "secure-status = "okay"" should make no difference, unless you explicitly disabled a peripheral in the non-secure domain. 

Which nodes did you have to apply this to? Are you sure you didn't change something else at the same time?

unfortunately I am already using wdg1 for optee/tfa, and no wdg for u-boot and the linux kernel, so I think it's something else.

In my logs you do see the watchdog kicking in, but I think it's because it's doing its job: optee got stuck before jumping to u-boot, and after a while the wdg reset the MPU.