AM67A: How to change console to wkup_uart in UBOOT

Part Number: AM67A

Tool/software:

As title, how to change console to wkup_uart in uboot. customer board designed wukup_uart as console.

latest Linux SDK11.x

  • Hi Tony,

    I don't have AM67A EVM to test, but can you please try with the following U-Boot patch for switching console to wkup_uart?

    diff --git a/dts/upstream/src/arm64/ti/k3-j722s-evm.dts b/dts/upstream/src/arm64/ti/k3-j722s-evm.dts
    index e362bfbb6556..67348a0ab9c0 100644
    --- a/dts/upstream/src/arm64/ti/k3-j722s-evm.dts
    +++ b/dts/upstream/src/arm64/ti/k3-j722s-evm.dts
    @@ -26,7 +26,7 @@
            };
     
            chosen {
    -               stdout-path = &main_uart0;
    +               stdout-path = &wkup_uart0;
            };
     
            memory@80000000 {
    @@ -539,7 +539,7 @@
            /* WKUP UART0 is used by Device Manager firmware */
            pinctrl-names = "default";
            pinctrl-0 = <&wkup_uart0_pins_default>;
    -       status = "reserved";
    +       status = "okay";
            bootph-all;
     };

  • Hi Bin,

    Seems these changes for Linux console, Customer made same change in Linux and there is Linux log output from wkup_uart already.

    Made below change to UBOOT, there is no output during UBOOT stage from wkup_uart.

    diff --git a/arch/arm/dts/k3-j722s-evm-u-boot.dtsi b/arch/arm/dts/k3-j722s-evm-u-boot.dtsi
    index b18240eb..8eee890c 100644
    --- a/arch/arm/dts/k3-j722s-evm-u-boot.dtsi
    +++ b/arch/arm/dts/k3-j722s-evm-u-boot.dtsi
    @@ -8,7 +8,7 @@
     
     / {
     	chosen {
    -		stdout-path = "serial2:115200n8";
    +		stdout-path = "serial0:115200n8";
     		tick-timer = &main_timer0;
     	};
     };
    diff --git a/board/ti/j722s/j722s.env b/board/ti/j722s/j722s.env
    index 4cc66e8d..5456f9f3 100644
    --- a/board/ti/j722s/j722s.env
    +++ b/board/ti/j722s/j722s.env
    @@ -7,8 +7,8 @@
     #endif
     
     name_kern=Image
    -console=ttyS2,115200n8
    -args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000
    +console=ttyS0,115200n8
    +args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x2b300000
     	${mtdparts}
     run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}

  • Hi Tony,

    Made below change to UBOOT, there is no output during UBOOT stage from wkup_uart.

    Do you have AM67A EVM to test? Do you see the U-Boot log still on main_uart2 or nothing printed on main_uart2 either?

  • Hi Bin,

    I did comparison test summary:

    #1. default image boot log:

    #2. Change UBOOT dts only: No any log from either UART.

    #4. Change UBOOT dts and j722s.env together: no any log from either UART. 

    #3. Change j722s.env file only: main_uart0 output log untill starting kernel, rest log output from wkup_uart as below:

    //WKUP_UART0:
    Sciserver Testapp Built On: Mar 19 2025 10:50:19
    Sciserver Version: 11.0.0-REL.MCUSDK.11.00.00.05+
    RM_PM_HAL Version: v11.00.09
    Starting Sciserver..... PASSED
    [IPC RPMSG ECHO] Version: REL.MCUSDK.09.00.00.16 (Mar 19 2025 10:50:35):
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    [    0.000000] Linux version 6.12.17-ti-00773-gcdcaeac783e3-dirty (oe-user@oe-host) (aarch64-oe-linux-gcc (GCC) 13.3.0, GNU ld (GNU Binutils) 2.42.0.20240723) #1 SMP PREEMPT Thu Apr  3 17:42:36 UTC 2025
    [    0.000000] KASLR disabled due to lack of seed
    [    0.000000] Machine model: Texas Instruments J722S EVM
    [    0.000000] earlycon: ns16550a0 at MMIO32 0x000000002b300000 (options '')
    [    0.000000] printk: legacy bootconsole [ns16550a0] enabled
    [    0.000000] efi: UEFI not found.
    [    0.000000] OF: reserved mem: 0x000000009e800000..0x000000009fffffff (24576 KiB) nomap non-reusable optee@9e800000
    [    0.000000] OF: reserved mem: 0x0000000080000000..0x000000008007ffff (512 KiB) nomap non-reusable tfa@80000000

    //MAIN_UART0:
    lure. This will fail on Security Enforcing(HS-SE) devices
    Load Remote Processor 4 with data@addr=0x82000000 11804840 bytes: Success!
    22256128 bytes read in 229 ms (92.7 MiB/s)
    79529 bytes read in 4 ms (19 MiB/s)
    Working FDT set to 88000000
    6490 bytes read in 3 ms (2.1 MiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
    Working FDT set to 88000000
       Loading Device Tree to 000000008fee9000, end 000000008fffffff ... OK
    Working FDT set to 8fee9000
     
    Starting kernel ...

    Since there is dm log output to wkup_uart, wkup_uart should be enabled in firmware in default, should it be disabled in firmware and update firmware(tidm)?

    From the user guide of TDA4VEN/J722S/AM67A MCU SDK, told how to enable trace:

    software-dl.ti.com/.../ENABLE_DM_DEBUG_APPLICATION.html

    But there is something wrong in the user guide: 

    With CCS it use : examples/drivers/sciclient/sciclient_get_version/j722s-evm/wkup-r5fss0-0_freertos/ti-arm-clang/

    With Linux it use: examples/drivers/ipc/ipc_rpmsg_echo_linux/j722s-evm/wkup-r5fss0-0_freertos/ti-arm-clang/

    The dm project should this one:

    C:\ti\ti-processor-sdk-rtos-j722s-evm-11_01_00_04\mcu_plus_sdk_j722s_11_01_00_15\examples\drivers\ipc\ipc_rpmsg_echo_linux