cancel
Showing results for 
Search instead for 
Did you mean: 

USART6 (PF13/PF14) on STM32MP257-DK - /dev/ttySTM6 never appears; SSH broke

jumman_JHINGA
Senior III

Hello ST community,

I’m an embedded software beginner working with the STM32MP257-DK board and OpenSTLinux (Yocto). I need help getting USART6 working on the external GPIO connector (PF13 = TX, PF14 = RX — CN5 pins). I have rebuilt device trees and copied DTBs to the board, but the USART6 device never appears in the running system (/dev/ttySTM6), and at one point my Ethernet/SSH stopped working after applying a DTB change.

I will be blunt: I have spent many hours following suggestions, debugging, and fixing syntax errors in DTS files. I may be missing one critical detail about how ST maps peripherals on the DK board or about kernel bindings. I have documented exactly what I tried and the exact outputs — please read fully before replying. I am a beginner; please do not assume I know advanced DT or U-Boot internals.


Environment / versions

  • Board: STMicroelectronics STM32MP257F-DK (discovery/“DK” board)

  • Host SDK: SDK-x86_64-stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11

  • Kernel source / sources used: linux-stm32mp-6.6.78-stm32mp-r2-r0 (from provided sources set)

  • Yocto/OpenSTLinux release: 5.0.8-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11 (as shown at boot)

  • Toolchain: aarch64-linux-gnu- (CROSS_COMPILE used when building dtbs)


Goal

Enable UART6 on PF13 / PF14 (the CN5 GPIO connector) so the kernel instantiates ttySTM6 (device node /dev/ttySTM6) and make it usable from Linux (minicom / echo test).


What I changed and why

  1. I added pinmux entries for USART6 (PF13, PF14) into the pinctrl include arch/arm64/boot/dts/st/stm32mp25xxai-pinctrl.dtsi because I could not find existing usart6_pins_a labels there.

    The block I added (conceptually — exact content below) defines:

    • usart6_pins_a (pins1: PF13 AF7 TX, pins2: PF14 AF7 RX)

    • usart6_idle_pins_a and usart6_sleep_pins_a set to ANALOG for low-power states

  2. I edited the board DTS to enable USART6. Important files edited:

    • arch/arm64/boot/dts/st/stm32mp257f-ev1.dts (I tried EV1 earlier)

    • Realized board boots DK DTB (st,stm32mp257f-dk), so I also applied the same changes to arch/arm64/boot/dts/st/stm32mp257f-dk.dts.

    • In board DTS I added:

&usart6 {
    pinctrl-names = "default", "idle", "sleep";
    pinctrl-0 = <&usart6_pins_a>;
    pinctrl-1 = <&usart6_idle_pins_a>;
    pinctrl-2 = <&usart6_sleep_pins_a>;
    uart-has-rtscts;
    status = "okay";
};
  • I tried a more invasive approach earlier where I attempted to declare the serial@40380000 node under &soc (to create the peripheral node), but this caused parsing errors and I reverted to just overriding &usart6 in the board DTS.
  • I rebuilt device trees:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs​

— verified DTC arch/arm64/boot/dts/st/stm32mp257f-dk.dtb finished.

  • I copied the new DTB to the board with scp into /boot/ (I also checked /boot/extlinux/extlinux.conf when advised).

  • I rebooted the board after copying DTB.

Things I fixed while debugging (common gotchas I ran into)

  • Fixed many dtc syntax issues:

    • Trimmed BOMs (sed -i '1s/^\xEF\xBB\xBF//' file),

    • Converted CRLF to LF (dos2unix),

    • Removed an extra stray } that caused dtc to fail,

    • Fixed node scoping: learned that label: node { ... }; defines a node and &label { ... }; is a reference — you cannot define &label inside the same scope as the label definition.

  • Validated device tree compile with:

dtc -I dts -O dtb -o /dev/null arch/arm64/boot/dts/st/stm32mp257f-dk.dts
  • Verified which DTB is actually used by bootloader by checking:
strings /proc/device-tree/compatible
cat /proc/device-tree/model​

Output shows st,stm32mp257f-dk (so the DK DTS is the important one).

Exact commands I ran (representative)

On host (kernel tree top):

# check and edit the DK DTS
sudo nano arch/arm64/boot/dts/st/stm32mp257f-dk.dts

# add pinctrl to pinctrl dtsi
sudo nano arch/arm64/boot/dts/st/stm32mp25xxai-pinctrl.dtsi

# syntax check and compile dtb
dtc -I dts -O dtb -o /dev/null arch/arm64/boot/dts/st/stm32mp257f-dk.dts
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs

# copy dtb to board
scp arch/arm64/boot/dts/st/stm32mp257f-dk.dtb root@192.168.7.1:/boot/

# reboot board
ssh root@192.168.7.1 'sync; reboot'

On target (after reboot):

strings /proc/device-tree/compatible
dmesg | grep -i usart
dmesg | grep -i uart
ls /dev/ttySTM*
grep -R "40380000" /sys/firmware/devicetree/base/ 2>/dev/null
cat /sys/firmware/devicetree/base/soc/serial@40380000/status 2>/dev/null || true

What I observed (actual output excerpts)

  • Boot banner via minicom shows:

ST OpenSTLinux - Weston - (A Yocto Project Based Distro) 5.0.8-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11 stm32mp2-e3-cc-dd ttySTM0
  • Running strings /proc/device-tree/compatible:
st,stm32mp257f-dk
st,stm32mp257
  • dmesg | grep -i usart shows several usart lines but no USART6:
STM32 USART driver initialized
stm32-usart 40220000.serial: ttySTM1 at MMIO 0x40220000 ...
stm32-usart 40330000.serial: ttySTM2 at MMIO 0x40330000 ...
stm32-usart 400e0000.serial: ttySTM0 at MMIO 0x400e0000 ...​
  • ls /dev/ttySTM* shows:
/dev/ttySTM0  /dev/ttySTM1  (sometimes /dev/ttySTM2)​
  • but NOT /dev/ttySTM6.

  • At one point, after I deployed a modified EV1 DTB, SSH stopped working (no network), but serial console still worked. That told me the DTB I made must have broken Ethernet pinmux/regulator or that I deployed the wrong DTB to the boot partition path.

Exact DTS / pinctrl changes I made (copyable)

pinctrl (added to stm32mp25xxai-pinctrl.dtsi)

 

/* USART6 PF13 (TX) PF14 (RX) */
usart6_pins_a: usart6-0 {
    pins1 {
        pinmux = <STM32_PINMUX('F', 13, AF7)>; /* TX */
        bias-disable;
        drive-push-pull;
        slew-rate = <1>;
    };
    pins2 {
        pinmux = <STM32_PINMUX('F', 14, AF7)>; /* RX */
        bias-disable;
    };
};

usart6_idle_pins_a: usart6-idle-0 {
    pins {
        pinmux = <STM32_PINMUX('F', 13, ANALOG)>,
                 <STM32_PINMUX('F', 14, ANALOG)>;
    };
};

usart6_sleep_pins_a: usart6-sleep-0 {
    pins {
        pinmux = <STM32_PINMUX('F', 13, ANALOG)>,
                 <STM32_PINMUX('F', 14, ANALOG)>;
    };
};

board DTS (added to stm32mp257f-dk.dts)

&usart6 {
    pinctrl-names = "default", "idle", "sleep";
    pinctrl-0 = <&usart6_pins_a>;
    pinctrl-1 = <&usart6_idle_pins_a>;
    pinctrl-2 = <&usart6_sleep_pins_a>;
    uart-has-rtscts;
    status = "okay";
};

Expected behavior vs actual behavior

  • Expected: After replacing DTB and rebooting, kernel binds driver to USART6, creates /dev/ttySTM6, and I am able to stty -F /dev/ttySTM6 115200 and send/receive data with minicom or simple echo tests.

  • Actual: /dev/ttySTM6 not created; kernel enumerates other UARTs (ttySTM0, ttySTM1, ttySTM2) only. When I deployed an edited EV1 DTB previously, Ethernet stopped coming up and SSH failed though serial console remained alive. After restoring working DTB the board network worked again.

What I tried to debug (commands & checks)

  • dmesg | grep -i usart

  • ls /dev/ttySTM*

  • strings /proc/device-tree/compatible

  • grep -R usart6 arch/arm64/boot/dts/st/

  • dtc -I dts -O dtb -o /dev/null ... (checked syntax)

  • sed -n '837,857p' ... | cat -A to find stray braces and CR characters

  • dos2unix, sed to remove BOM

  • Rebuilt dtbs and copied stm32mp257f-dk.dtb to /boot/ and rebooted

  • Created (but not successfully applied) a small overlay suggestion — looking for guidance on best practice

Specific request to ST staff / community experts

Please explain — in the simplest possible terms for a beginner — the minimal set of changes I must make so that the kernel recognizes USART6 on the DK board and creates /dev/ttySTM6. If possible, please:

  • Confirm whether USART6 is physically available on the DK revision (and confirm the connector/pins),

  • Provide the correct pinctrl and clock symbols and a minimal delta patch or overlay that will definitely work on this board and kernel version,

  • If there is any kernel config, u-boot, or OP-TEE/TFA constraint that may prevent enabling that UART, point it out.


I want to be explicit: I don’t just want theory — I want a tested, minimal patch or overlay and exact commands to deploy it safely (without breaking Ethernet), plus a short checklist to verify that the new DTB is used by the board after reboot.

Thank you. I’m available to attach the two DTBs and the dmesg output. I appreciate concise, explicit instructions — the more stepwise, the better for someone who is still learning.

 

— Jumman

14 REPLIES 14

  • What is TIF? Do you mean TF-A?

Sorry its spelling mistake i meant  RIF(Resource Isolation Framework).

  • Do you mind if you could share your device tree of TF-a, u-boot, op-tee and kernel? :)

im using default DTS.. just changed alias name and and enabled UART6, thats it.

So when you're booting your board, then you could see USART6 as early boot (debug console)? Can you post a dump of your debug console?


i didnt observed this but ill check again and update you about this
  

@jumman_JHINGA 

Thank you! Looking forward for your console output of USART6 if it's available. 

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

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

Hi @jumman_JHINGA 

Did your console output from usart6 work at early boot?

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

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

here is my early boot + U boot console output

root@stm32mp2-e3-cb-bc:~#          Stopping Session c2 of User root...
         Stopping Session c3 of User weston...
[  OK  ] Removed slice Slice /system/modprobe.
[  OK  ] Stopped target Bluetooth Support.
[  OK  ] Stopped target Multi-User System.
[  OK  ] Stopped target Login Prompts.
[  OK  ] Stopped target Host and Network Name Lookups.
[  OK  ] Stopped target RPC Port Mapper.
[  OK  ] Stopped target Sound Card.
[  OK  ] Stopped target Timer Units.
[  OK  ] Stopped Serves stm32mp clocks calibration..
[  OK  ] Stopped Daily Cleanup of Temporary Directories.
[  OK  ] Stopped target System Time Set.
[  OK  ] Stopped target Hardware activated USB gadget.
[  OK  ] Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
         Stopping Save/Restore Sound Card State...
         Stopping Avahi mDNS/DNS-SD Stack...
         Stopping Bluetooth service...
         Stopping Kernel Logging Service...
         Stopping System Logging Service...
         Stopping Getty on tty1...
         Stopping IIO Daemon...
         Stopping Real time performance monitoring...
         Stopping Serial Getty on ttySTM0...
         Stopping ST Load M33 firmware via remoteproc...
[  OK  ] Stopped Resets System Activity Logs.
         Stopping Load/Save OS Random Seed...
         Stopping Target Communication Framework agent...
         Stopping TEE Supplicant...
         Stopping Weston graphical session...
[  OK  ] Stopped Avahi mDNS/DNS-SD Stack.
[  OK  ] Stopped Bluetooth service.
[  OK  ] Stopped Kernel Logging Service.
[  OK  ] Stopped System Logging Service.
[  OK  ] Stopped TEE Supplicant.
[  OK  ] Stopped Target Communication Framework agent.
[  OK  ] Stopped Getty on tty1.
[  OK  ] Stopped Serial Getty on ttySTM0.
[   70.165919] remoteproc remoteproc0: stopped remote processor m33
[   70.172356] Stopping fw image stm32mp257f-dk
[  OK  ] Stopped Save/Restore Sound Card State.
[  OK  ] Stopped ST Load M33 firmware via remoteproc.
[  OK  ] Stopped Load/Save OS Random Seed.
[  OK  ] Stopped Session c3 of User weston.
[  OK  ] Stopped Session c2 of User root.
[  OK  ] Removed slice Slice /system/getty.
[  OK  ] Removed slice Slice /system/serial-getty.
[  OK  ] Stopped ST set alsa state configuration.
         Stopping User Login Management...
         Stopping User Manager for UID 0...
         Stopping User Manager for UID 1000...
[  OK  ] Stopped IIO Daemon.
[  OK  ] Stopped User Manager for UID 0.
[  OK  ] Stopped User Login Management.
         Stopping User Runtime Directory /run/user/0...
[  OK  ] Unmounted /run/user/0.
[  OK  ] Stopped User Runtime Directory /run/user/0.
[  OK  ] Stopped Weston graphical session.
[  OK  ] Removed slice User Slice of UID 0.
         Stopping Seat for Weston user...
[  OK  ] Stopped Check if the gpu are prese…t the correct weston configuration.
[  OK  ] Stopped User Manager for UID 1000.
[  OK  ] Stopped Seat for Weston user.
         Stopping Permit User Sessions...
         Stopping User Runtime Directory /run/user/1000...
[  OK  ] Stopped Permit User Sessions.
[  OK  ] Stopped target Remote File Systems.
[  OK  ] Unmounted /run/user/1000.
[  OK  ] Stopped User Runtime Directory /run/user/1000.
[  OK  ] Removed slice User Slice of UID 1000.
         Stopping D-Bus System Message Bus...
[  OK  ] Stopped D-Bus System Message Bus.
[  OK  ] Stopped Real time performance monitoring.
[  OK  ] Stopped target Network.
         Stopping Network Configuration...
[  OK  ] Stopped Network Configuration.
[  OK  ] Stopped target Preparation for Network.
[  OK  ] Stopped IPv6 Packet Filtering Framework.
[  OK  ] Stopped IPv4 Packet Filtering Framework.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Path Units.
[  OK  ] Stopped Dispatch Password Requests to Console Directory Watch.
[  OK  ] Stopped Forward Password Requests to Wall Directory Watch.
[  OK  ] Stopped target Slice Units.
[  OK  ] Removed slice User and Session Slice.
[  OK  ] Stopped target Socket Units.
[  OK  ] Closed Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Closed D-Bus System Message Bus Socket.
[  OK  ] Closed dropbear.socket.
[  OK  ] Stopped target System Initialization.
[  OK  ] Closed Syslog Socket.
[  OK  ] Closed Network Service Netlink Socket.
         Stopping Hardware RNG Entropy Gatherer Daemon...
[  OK  ] Stopped Automatic Boot Loader Update.
[  OK  ] Stopped Generate network units from Kernel command line.
         Stopping Network Name Resolution...
         Stopping Network Time Synchronization...
         Stopping Record System Boot/Shutdown in UTMP...
[  OK  ] Stopped Network Name Resolution.
[  OK  ] Stopped Network Time Synchronization.
[  OK  ] Stopped Hardware RNG Entropy Gatherer Daemon.
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Closed Process Core Dump Socket.
[  OK  ] Stopped Record System Boot/Shutdown in UTMP.
[  OK  ] Stopped Create Volatile Files and Directories.
[  OK  ] Stopped target Local File Systems.
         Unmounting /boot...
[   73.133554] EXT4-fs (mmcblk0p8): unmounting filesystem 576415a9-899b-4b81-8ef2-4f17641bebab.
         Unmounting Temporary Directory /tmp...
         Unmounting /usr/local...
         Unmounting /var/volatile...
[   73.185994] EXT4-fs (mmcblk0p11): unmounting filesystem b3d9e52a-add5-455f-8536-b362b4813f8c.
         Unmounting /vendor...
[  OK  ] Unmounted /boot.
[   73.253072] EXT4-fs (mmcblk0p9): unmounting filesystem 00192d35-a0bd-4708-8a72-ae4bcca31f68.
[  OK  ] Unmounted Temporary Directory /tmp.
[  OK  ] Unmounted /usr/local.
[  OK  ] Unmounted /var/volatile.
[  OK  ] Unmounted /vendor.
[  OK  ] Stopped target Preparation for Local File Systems.
[  OK  ] Stopped target Swaps.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped Create Static Device Nodes in /dev gracefully.
[  OK  ] Reached target System Shutdown.
[  OK  ] Reached target Late Shutdown Services.
[  OK  ] Finished System Reboot.
[  OK  ] Reached target System Reboot.
[   73.546958] watchdog: watchdog0: watchdog did not stop!
[   73.566248] systemd-shutdown[1]: Using hardware watchdog 'arm_smc_wdt', version 0, device /dev/watchdog0
[   73.570656] systemd-shutdown[1]: Watchdog running with a timeout of 32s.
[   73.622509] systemd-shutdown[1]: Syncing filesystems and block devices.
[   73.824279] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[   73.847804] systemd-journald[280]: Received SIGTERM from PID 1 (systemd-shutdow).
[   73.854071] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[   73.877547] systemd-shutdown[1]: Unmounting file systems.
[   73.880159] (sd-remount)[1513]: Remounting '/' read-only with options ''.
[   73.937418] EXT4-fs (mmcblk0p10): re-mounted 8444874b-855b-477e-8381-a7baca01e769 ro. Quota mode: none.
[   73.954440] systemd-shutdown[1]: All filesystems unmounted.
[   73.954494] systemd-shutdown[1]: Deactivating swaps.
[   73.959527] systemd-shutdown[1]: All swaps deactivated.
[   73.964585] systemd-shutdown[1]: Detaching loop devices.
[   73.977511] systemd-shutdown[1]: All loop devices detached.
[   73.977559] systemd-shutdown[1]: Stopping MD devices.
[   73.982997] systemd-shutdown[1]: All MD devices stopped.
[   73.987857] systemd-shutdown[1]: Detaching DM devices.
[   73.993310] systemd-shutdown[1]: All DM devices detached.
[   73.998391] systemd-shutdown[1]: All filesystems, swaps, loop devices, MD devices and DM devices detached.
[   74.040508] systemd-shutdown[1]: Syncing filesystems and block devices.
[   74.042490] systemd-shutdown[1]: Rebooting.
[   74.130284] reboot: Restarting system
INFO:    PSCI Power Domain Map:
INFO:      Domain Node : Level 4, parent_node 4294967295, State ON (0x0)
INFO:      Domain Node : Level 3, parent_node 0, State ON (0x0)
INFO:      Domain Node : Level 2, parent_node 1, State ON (0x0)
INFO:      Domain Node : Level 1, parent_node 2, State ON (0x0)
INFO:      CPU Node : MPID 0x0, parent_node 3, State ON (0x0)
INFO:      CPU Node : MPID 0x1, parent_node 3, State ON (0x0)
NOTICE:  CPU: STM32MP257FAK Rev.Y
NOTICE:  Model: STMicroelectronics STM32MP257F-DK Discovery Board
NOTICE:  Board: MB1605 Var1.0 Rev.C-01
INFO:    Reset reason (0x2074):
INFO:      System reset (SYSRST) by A35
INFO:    PMIC2 version = 0x11
INFO:    PMIC2 product ID = 0x20
INFO:    FCONF: Reading TB_FW firmware configuration file from: 0xe011000
INFO:    FCONF: Reading firmware configuration information for: stm32mp_fuse
INFO:    FCONF: Reading firmware configuration information for: stm32mp_io
INFO:    Using SDMMC
INFO:      Instance 1
INFO:    Boot used partition fsbl1
NOTICE:  BL2: v2.10-stm32mp2-r1.0(debug):lts-v2.10.5-dirty(7c229848)
NOTICE:  BL2: Built : 16:19:31, Jun 28 2024
INFO:    BL2: Loading image id 26
INFO:    Loading image id=26 at address 0xe041000
INFO:    Image id=26 loaded: 0xe041000 - 0xe049650
INFO:    BL2: Doing platform setup
INFO:    RAM: LPDDR4 1x32Gbits 1x32bits 1200MHz
INFO:    Memory size = 0x100000000 (4096 MB)
INFO:    BL2: Loading image id 1
INFO:    Loading image id=1 at address 0xe000000
INFO:    Image id=1 loaded: 0xe000000 - 0xe000326
INFO:    FCONF: Reading FW_CONFIG firmware configuration file from: 0xe000000
INFO:    FCONF: Reading firmware configuration information for: risaf_config
INFO:    RISAF2: No configuration in DT, use default
INFO:    FCONF: Reading firmware configuration information for: dyn_cfg
INFO:    BL31 max size = 0x17000 (94208B)
INFO:    BL2: Loading image id 3
INFO:    Loading image id=3 at address 0xe000000
INFO:    Image id=3 loaded: 0xe000000 - 0xe0167c0
INFO:    BL2: Loading image id 19
INFO:    Loading image id=19 at address 0x81fc0000
INFO:    Image id=19 loaded: 0x81fc0000 - 0x81fc391a
INFO:    BL2: Loading image id 4
INFO:    Loading image id=4 at address 0x82000000
INFO:    Image id=4 loaded: 0x82000000 - 0x8200001c
INFO:    OPTEE ep=0x82000000
INFO:    OPTEE header info:
INFO:          magic=0x4554504f
INFO:          version=0x2
INFO:          arch=0x1
INFO:          flags=0x0
INFO:          nb_images=0x1
INFO:    BL2: Loading image id 8
INFO:    Loading image id=8 at address 0x82000000
INFO:    Image id=8 loaded: 0x82000000 - 0x820fd628
INFO:    BL2: Loading image id 2
INFO:    Loading image id=2 at address 0x84400000
INFO:    Image id=2 loaded: 0x84400000 - 0x8441c5d0
INFO:    BL2: Loading image id 5
INFO:    Loading image id=5 at address 0x84000000
INFO:    Image id=5 loaded: 0x84000000 - 0x841c49b8
NOTICE:  BL2: Booting BL31
INFO:    Entry point address = 0xe000000
INFO:    SPSR = 0x3cd
INFO:    ARM GICv2 driver initialized
NOTICE:  BL31: v2.10-stm32mp2-r1.0(debug):lts-v2.10.5-dirty(7c229848)
NOTICE:  BL31: Built : 16:19:31, Jun 28 2024
INFO:    BL31: Initializing runtime services
INFO:    BL31: Initializing BL32
I/TC: Early console on UART#2
I/TC: 
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 aarch64
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: All debug access are allowed
I/TC: Override the OTP 124: 0 to 0x18db6
I/TC: WARNING: Embeds insecure stm32mp_provisioning driver
I/TC: UART console (non-secure)
I/TC: PMIC STPMIC REFID:2.@ V1.1
I/TC: Platform stm32mp2: flavor PLATFORM_FLAVOR - DT stm32mp257f-dk.dts
I/TC: OP-TEE ST profile: secure_and_system_services
[    0.000000] SCP-firmware 2.13.0-intree-optee-os-4.0.0-dev
[    0.000000] 
[    0.000000] [FWK] Module initialization complete!
I/TC: Primary CPU switching to normal world boot
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x84000000
INFO:    SPSR = 0x3c5
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 enabled


U-Boot 2023.10-stm32mp-r1 (Oct 02 2023 - 14:39:59 +0000)

CPU: STM32MP257FAK Rev.Y
Model: STMicroelectronics STM32MP257F-DK Discovery Board
Board: stm32mp2 (st,stm32mp257f-dk)
Board: MB1605 Var1.0 Rev.C-01
DRAM:  4 GiB
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 enabled
Core:  432 devices, 41 uclasses, devicetree: board
WDT:   Started watchdog with servicing every 1000ms (32s timeout)
NAND:  0 MiB
MMC:   STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Net:   eth0: eth1@482c0000
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Hit any key to stop autoboot:  0 
Boot over mmc0!
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:8...
Found /mmc0_extlinux/extlinux.conf
Retrieving file: /mmc0_extlinux/extlinux.conf
Retrieving file: /splash_landscape.bmp
1:      OpenSTLinux
Enter choice: 1:        OpenSTLinux
Retrieving file: /Image.gz
Retrieving file: /st-image-resize-initrd
append: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw   earlycon console=ttySTM0,115200
Retrieving file: /stm32mp257f-dk.dtb
   Uncompressing Kernel Image
## Flattened Device Tree blob at 90000000
   Booting using the fdt blob at 0x90000000
Working FDT set to 90000000
   Loading Ramdisk to 8f802000, end 8ffff09d ... OK
   Loading Device Tree to 000000008f7e9000, end 000000008f801697 ... OK
Working FDT set to 8f7e9000

@jumman_JHINGA 

Thanks! Did you change the TF-A early boot as well?

How to debug TF-A BL2 - stm32mpu

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

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