2025-08-14 11:23 AM
I have a custom board based on the STM32mp157f and have been battling getting a custom build to boot on it.
It is fairly similar the to DK2 so I've been looking a lot at the stm32mp15xx-dkx.dtsi files as reference.
I've been able to get it to get past TF-A and OPTEE but in U-Boot it gets stuck and reboots. STM32_Programmer_CLI just loops between the first and seconds lines in my .tsv file. I assume this is because the board isn't showing up correctly over USB.
I attached my full device tree files.
Here's the boot logs
NOTICE: CPU: STM32MP157FAA Rev.Z
NOTICE: Model: STMicroelectronics custom STM32CubeMX board - openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11
ERROR: nvmem node board_id not found
INFO: PMIC version = 0x21
NOTICE: Reset reason (0x54):
INFO: System reset generated by MPU (MPSYSRST)
INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO: FCONF: Reading firmware configuration information for: stm32mp_fuse
INFO: FCONF: Reading firmware configuration information for: stm32mp_io
INFO: Using USB
INFO: Instance 2
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.10-stm32mp1-r2.0(debug):lts-v2.10.13-dirty(b1f57509)
NOTICE: BL2: Built : 17:10:59, Feb 14 2025
INFO: BL2: Doing platform setup
INFO: RAM: DDR3-DDR3L 16bits 420000kHz
INFO: Memory size = 0x20000000 (512 MB)
INFO: DFU USB START...
INFO: phase ID :3, Manifestation 3 at c71aef2e
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 0x2ffc0000
INFO: Image id=4 loaded: 0x2ffc0000 - 0x2ffc002c
INFO: OPTEE ep=0x2ffc0000
INFO: OPTEE header info:
INFO: magic=0x4554504f
INFO: version=0x2
INFO: arch=0x0
INFO: flags=0x0
INFO: nb_images=0x2
INFO: BL2: Loading image id 8
INFO: Loading image id=8 at address 0x2ffc0000
INFO: Image id=8 loaded: 0x2ffc0000 - 0x2ffd2a80
INFO: BL2: Loading image id 9
INFO: Loading image id=9 at address 0xde000000
INFO: Image id=9 loaded: 0xde000000 - 0xde06a000
INFO: BL2: Loading image id 2
INFO: Loading image id=2 at address 0xc0500000
INFO: Image id=2 loaded: 0xc0500000 - 0xc0513c00
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 - 0xc021e570
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0x2ffc0000
INFO: SPSR = 0x1d3
I/TC: Early console on UART#4
I/TC:
I/TC: Pager is enabled. Hashes: 3488 bytes
I/TC: Pager pool size: 96kB
I/TC: Embedded DTB found
I/TC: OP-TEE version: 4.0.0-dev (gcc version 13.3.0 (GCC)) #1 Fri Oct 20 18:29:31 UTC 2023 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
I/TC: WARNING: RCC tzen:1 mckprot:0, insecure ETZPC hardening 89:ETZPC_DECPROT_MCU_ISOLATION
I/TC: WARNING: RCC tzen:1 mckprot:0, insecure ETZPC hardening 74:ETZPC_DECPROT_MCU_ISOLATION
I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp157f-serverlift_io_linux-mx.dts
I/TC: OP-TEE ST profile: secure_and_system_services
I/TC: HUK unlocked
I/TC: Primary CPU switching to normal world boot
I/TC: Reserved shared memory is disabled
I/TC: Dynamic shared memory is enabled
I/TC: Normal World virtualization support is disabled
I/TC: Asynchronous notifications are disabled
optee optee: OP-TEE: revision 4.0 (2a5b1d12)
serial_stm32 serial@40010000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
U-Boot 2023.10-stm32mp-r2 (Oct 02 2023 - 14:39:59 +0000)
CPU: STM32MP157FAA Rev.Z
Model: STMicroelectronics custom STM32CubeMX board - openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11
Board: stm32mp1 in trusted mode (st,stm32mp157f-serverlift_io_linux-mx)
DRAM: no /fwu-mdata node ?
512 MiB
Clocks:
- MPU : 650 MHz
- MCU : 100 MHz
- AXI : 105 MHz
- PER : 24 MHz
- DDR : 420 MHz
optee optee: OP-TEE: revision 4.0 (2a5b1d12)
I/TC: Reserved shared memory is disabled
I/TC: Dynamic shared memory is enabled
I/TC: Normal World virtualization support is disabled
I/TC: Asynchronous notifications are disabled
Core: 84 devices, 33 uclasses, devicetree: board
smcwd watchdog: Init failed -5
NAND: 0 MiB
MMC: STM32 SD/MMC: 0
Loading Environment from nowhere... OK
In: serial
Out: serial
Err: serial
invalid MAC address 0 in OTP 00:00:00:00:00:00
Net: No ethernet found.
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Hit any key to stop autoboot: 0
Boot over usb0!
DFU alt info setting: done
stm32-usbphyc usbphyc@5a006000: Can't get phy-supply regulator
stm32-usbphyc usbphyc@5a006000: Can't get phy-supply regulator
No USB device found
usb_gadget_initialize failed
Download done
Reset...
resetting ...
I/TC: Forced system reset PSCI
I'm not sure what's going on with the usbphyc errors about the phy-supply as I have them defined.
&usbphyc {
status = "okay";
/* USER CODE BEGIN usbphyc */
/* USER CODE END usbphyc */
};
&usbphyc_port0 {
status = "disabled";
/* USER CODE BEGIN usbphyc_port1 */
phy-supply = <&vdd_usb>;
/* USER CODE END usbphyc_port1 */
};
&usbphyc_port1 {
status = "okay";
/* USER CODE BEGIN usbphyc_port1 */
phy-supply = <&vdd_usb>;
st,tune-hs-dc-level = <2>;
st,enable-fs-rftime-tuning;
st,enable-hs-rftime-reduction;
st,trim-hs-current = <15>;
st,trim-hs-impedance = <1>;
st,tune-squelch-level = <3>;
st,tune-hs-rx-offset = <2>;
st,no-lsfs-sc;
/* USER CODE END usbphyc_port1 */
};
And vdd_usb is defined in my PMIC section.
I'm not really sure where to go from here. I'm sure it is something stupidly small I'm missing that is causing this issue.
The USB port on our board is just a peripheral port (standard mini B).
I'd really appreciate any help with this. Are there any examples of what the full boot logs should look like? Should it even be trying to "boot" from usb0 at this time?
Thanks,
Justin