@PatrickF
I found the solution! The solution is this.
Add this to your stm32mp15xx-<project name->-mx.dts inside the tf-a device tree.
/* USER CODE BEGIN includes */
#include "stm32mp15xx-dkx.dtsi"
#include "stm32mp15-pinctrl.dtsi"
/* USER CODE END includes */
and this
/* USER CODE BEGIN root */
aliases {
serial0 = &uart4;
};
chosen {
stdout-path = "serial0:115200n8";
};
/* USER CODE END root */
clocks {
/* USER CODE BEGIN clocks */
clk_hsi: clk-hsi {
clock-frequency = <64000000>;
/* USER CODE BEGIN clk_hsi */
/* USER CODE END clk_hsi */
};
clk_lse: clk-lse {
clock-frequency = <32768>;
st,drive = < LSEDRV_MEDIUM_HIGH >;
/* USER CODE BEGIN clk_lse */
/* USER CODE END clk_lse */
};
clk_hse: clk-hse {
clock-frequency = <24000000>;
st,digbypass;
/* USER CODE BEGIN clk_hse */
/* USER CODE END clk_hse */
};
/* USER CODE END clocks */
};
Last thing is to add cpu1 inside the stm32mp151.dtsi file in the fdts folder inside tf-a folder. Or else, you get one error when you're compiling.
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu0: cpu@0 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <0>;
nvmem-cells = <&part_number_otp>;
nvmem-cell-names = "part_number";
};
cpu1: cpu@1 {
/* EMPTY */
};
};
Anyway!
With my FlashLayout, I only run to Id = 0x8 because I haven't done any more.
#Opt Id Name Type IP Offset Binary
- 0x01 fsbl-boot Binary none 0x0 arm-trusted-firmware/debug/debug-tf-a-stm32mp151a-stm32-computer-firmware-mx-usb.stm32
- 0x03 fip-boot FIP none 0x0 fip/fip-stm32mp151a-stm32-computer-firmware-mx-optee-emmc.bin
P 0x04 fsbl1 Binary mmc2 boot1 arm-trusted-firmware/tf-a-stm32mp151a-stm32-computer-firmware-mx-optee-emmc.stm32
P 0x05 fsbl2 Binary mmc2 boot2 arm-trusted-firmware/tf-a-stm32mp151a-stm32-computer-firmware-mx-optee-emmc.stm32
P 0x06 metadata1 FWU_MDATA mmc1 0x00080000 arm-trusted-firmware/metadata.bin
P 0x07 metadata2 FWU_MDATA mmc1 0x00100000 arm-trusted-firmware/metadata.bin
P 0x08 fip-a FIP mmc2 0x00180000 fip/fip-stm32mp151a-stm32-computer-firmware-mx-optee-emmc.bin
PED 0x09 fip-b FIP mmc2 0x00580000 none
PED 0x0A u-boot-env ENV mmc1 0x00980000 none
P 0x10 bootfs System mmc1 0x00A00000 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
P 0x11 vendorfs FileSystem mmc1 0x04A00000 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
P 0x12 rootfs FileSystem mmc1 0x05A00000 st-image-weston-openstlinux-weston-stm32mp1.ext4
P 0x13 userfs FileSystem mmc1 0xC5A00000 st-image-userfs-openstlinux-weston-stm32mp1.ext4
This is the UART output. It seems that
- I started the SYSRAM
- My STM32MP151AAC3 can communicate with my PMIC.
I think that the memory configuration is not correct, because I have 4GB RAM.
NOTICE: CPU: STM32MP151AAC Rev.Z
NOTICE: Model: STMicroelectronics custom STM32CubeMX board - openstlinux-6.1-yocto-mickledore-mpu-v24.06.26
INFO: PMIC version = 0x21
INFO: Reset reason (0x15):
INFO: Power-on Reset (rst_por)
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):9b8d7c5be-dirty(9b8d7c5b)
NOTICE: BL2: Built : 20:53:22, Aug 3 2024
INFO: BL2: Doing platform setup
INFO: RAM: DDR3-DDR3L 16bits 533000kHz
INFO: Memory size = 0x20000000 (512 MB)
INFO: DFU USB START...
INFO: phase ID :3, Manifestation 3 at c714f9a2
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 - 0xde028e08
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 - 0xc0511bd8
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: f8cb4e8d8-dev (gcc version 12.3.0 (GCC)) #5 Sat Aug 3 23:25:35 UTC 2024 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: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp151a-stm32-computer-firmware-mx.dts
I/TC: OP-TEE ST profile: system_services
E/TC:0 0 probe_dt_drivers:795 Probe sequence result: 0x80000000
E/TC:0 0 Panic
Conclusion:
I think I have answered my own question.
The problem was that SYSRAM did not start. But now it seems that I have made progress.