TDA4AL-Q1: How to modify the debug serial port

Part Number: TDA4AL-Q1

Tool/software:

Hi all

we use tda4al with custom baord.

If the debug UART is changed from ​UART8 to UART5​ on a custom board, which files need to be modified?

BR

liupt

  • hello all

    We use sdk 11.

    Additional question: The EVM board has 16GB DDR, but the custom board only has 8GB (same DDR model). Where do I need to make modifications?

    BR
    liupt

  • Hi Peitao,

    Are you using linux or RTOS?

    Which is the SDK version you are using?

    Regards

    Gokul

  • HI GoKul

    We use sdk11 & SPL linux&rtos

    I had modify those files.

    psdkla/board-support/ti-u-boot-2025.01+git/dts/upstream/src/arm64/ti/k3-j721s2-common-proc-board.dts

    serial2 = &main_uart5;

    &main_uart5 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&uart5_pins_default>;
        /* Shared with TFA on this platform */
        power-domains = <&k3_pds 354 TI_SCI_PD_EXCLUSIVE>;
        bootph-all;
    };
        uart5_pins_default: uart5-default-pins {
            pinctrl-single,pins = <
                J721S2_IOPAD(0x008, PIN_INPUT, 11) /* (AC24) MCAN12_RX.UART5_RXD */
                J721S2_IOPAD(0x004, PIN_INPUT, 11) /* (W25) MCAN12_TX.UART5_TXD */
            >;
        };

    psdkla/board-support/ti-u-boot-2025.01+git/arch/arm/dts/k3-j721s2-common-proc-board-u-boot.dtsi

    -&main_uart8_pins_default {
    - bootph-all;
    -&main_uart8 {
    - bootph-all;
    -};

    +&uart5_pins_default {
    + bootph-all;
    +
    +&main_uart5 {
    + bootph-all;
    +};

    psdkra/app_utils/utils/misc/src/app_pinmux_j721s2.c
    add
    static pinmuxPerCfg_t gUart5PinCfg[] =
    {
        /* UART5 -> UART5_RXD -> AC24 */
        {
            PIN_MCAN12_RX, PIN_MODE(11) | \
            ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
        },
        /* UART5 -> UART5_TXD -> W25 */
        {
            PIN_MCAN12_TX, PIN_MODE(11) | \
            ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
        {PINMUX_END}
    };
    

    psdkla/board-support/ti-u-boot-2025.01+git/doc/board/ti/j721s2_evm.rst

    export TFA_EXTRA_ARGS="K3_USART=0x8"---》export TFA_EXTRA_ARGS="K3_USART=0x5"

    export OPTEE_EXTRA_ARGS="CFG_CONSOLE_UART=0x8" ---》export OPTEE_EXTRA_ARGS="CFG_CONSOLE_UART=0x5"

    Previously, when there was a DDR issue, logs would be output(

    Timeout during frequency handshake ### ERROR ### Please RESET the board ###

    ).

    However, after modifying the DDR configuration, there are no logs at all.

    thank you

    BR

    liupt

  • Hi Peitao,

    I will look into this and get back to you.

    Regards

    Gokul

  • Hi  

    I made the following modification:

    +++ b/psdkla/board-support/trusted-firmware-a-2.12+git/plat/ti/k3/include/platform_def.h
    @@ -90,7 +90,7 @@

    /* Platform default console definitions */
    #ifndef K3_USART_BASE
    -#define K3_USART_BASE (0x02800000 + 0x10000 * K3_USART)
    +#define K3_USART_BASE (0x28850000 + 0x10000 * K3_USART)

    Now the serial port outputs logs  after power-on:

    U-Boot SPL 2025.01-ti (Aug 20 2025 - 17:09:45 +0800)
    SYSFW ABI: 4.0 (firmware rev 0x000b '11.0.9--v11.00.09+ (Fancy Rat)')
    SPL initial stack usage: 13456 bytes
    Trying to boot from MMC2
    Skipping authentication on GP device
    Skipping authentication on GP device
    Skipping authentication on GP device
    Skipping authentication on GP device
    Skipping authentication on GP device
    Loading Environment from nowhere... OK
    Starting ATF on ARM64 core...

    Then  got stuck, what else do I need to change?

    BR

    liupt

  • Hi Peitao,

    I will look into this and get back to you.

    Regards

    Gokul