This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62P: Can I use main_uart1 as the debug console on AM62P?

Part Number: AM62P

Tool/software:

Hi TI experts,

I know the TI EVM is using main_uart0 as debug console. But we plan use main_uart1 (B24 / C24) as the debug console

So I would like to ask the following questions:

1. Is it possible to switch the debug console to main_uart1?

2. If so, what are the required changes in the device tree and bootloader configuration?

3. Is there any dependency or limitation with using main_uart1 for this purpose?

  • Hi YuYuan,

    The following U-Boot patch changes the U-Boot console from UART0 to UART1. I tested it with SDK10.0 on AM62x. Please do the similar change for AM62P U-Boot.

    diff --git a/arch/arm/dts/k3-am62x-sk-common.dtsi b/arch/arm/dts/k3-am62x-sk-common.dtsi
    index 59ee49616505..5e8276ced9ca 100644
    --- a/arch/arm/dts/k3-am62x-sk-common.dtsi
    +++ b/arch/arm/dts/k3-am62x-sk-common.dtsi
    @@ -12,7 +12,7 @@
     
     / {
            aliases {
    -               serial2 = &main_uart0;
    +               serial2 = &main_uart1;
                    mmc0 = &sdhci0;
                    mmc1 = &sdhci1;
                    mmc2 = &sdhci2;
    @@ -355,9 +355,10 @@
     &main_uart1 {
            /* Main UART1 is used by TIFS firmware */
            bootph-pre-ram;
    -       status = "reserved";
    +       status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&main_uart1_pins_default>;
    +       clock-frequency = <48000000>;
     };
     
     &main_i2c0 {
    diff --git a/arch/arm/mach-k3/r5/am62x/dev-data.c b/arch/arm/mach-k3/r5/am62x/dev-data.c
    index 59c95df2a887..808a07eb5533 100644
    --- a/arch/arm/mach-k3/r5/am62x/dev-data.c
    +++ b/arch/arm/mach-k3/r5/am62x/dev-data.c
    @@ -60,7 +60,7 @@ static struct ti_dev soc_dev_list[] = {
            PSC_DEV(75, &soc_lpsc_list[10]),
            PSC_DEV(36, &soc_lpsc_list[11]),
            PSC_DEV(102, &soc_lpsc_list[11]),
    -       PSC_DEV(146, &soc_lpsc_list[11]),
    +       PSC_DEV(152, &soc_lpsc_list[11]),
            PSC_DEV(13, &soc_lpsc_list[12]),
            PSC_DEV(166, &soc_lpsc_list[13]),
            PSC_DEV(135, &soc_lpsc_list[14]),

  • Hi Bin,

    Thanks for your reply. But my defconfig is "CONFIG_SOC_K3_AM62P5=y".
    My project should be using the dev-data.c under arch/arm/mach-k3/r5/am62px/ not am62x.

  • The patch is for your reference. You would need to adjust it accordingly for AM62Px devices.

  • Hi Bin,

    I'm not quite sure what the number after PSCDEV represents. What should I refer to?

    Or should I simply change 146 to 152?

    diff --git a/arch/arm/mach-k3/r5/am62px/dev-data.c b/arch/arm/mach-k3/r5/am62px/dev-data.c
    index dc7d092fdb0..c4fa7712e5a 100644
    --- a/arch/arm/mach-k3/r5/am62px/dev-data.c
    +++ b/arch/arm/mach-k3/r5/am62px/dev-data.c
    @@ -52,7 +52,7 @@ static struct ti_dev soc_dev_list[] = {
            PSC_DEV(75, &soc_lpsc_list[7]),
            PSC_DEV(36, &soc_lpsc_list[8]),
            PSC_DEV(102, &soc_lpsc_list[8]),
    -       PSC_DEV(146, &soc_lpsc_list[8]),
    +       PSC_DEV(152, &soc_lpsc_list[8]),
            PSC_DEV(13, &soc_lpsc_list[9]),
            PSC_DEV(166, &soc_lpsc_list[10]),
            PSC_DEV(135, &soc_lpsc_list[11]),

  • Hi Yuyuan,

    Please use the following patch for AM62Px:

    diff --git a/arch/arm/mach-k3/r5/am62px/dev-data.c b/arch/arm/mach-k3/r5/am62px/dev-data.c
    index dc7d092fdb0e..c4fa7712e5aa 100644
    --- a/arch/arm/mach-k3/r5/am62px/dev-data.c
    +++ b/arch/arm/mach-k3/r5/am62px/dev-data.c
    @@ -52,7 +52,7 @@ static struct ti_dev soc_dev_list[] = {
            PSC_DEV(75, &soc_lpsc_list[7]),
            PSC_DEV(36, &soc_lpsc_list[8]),
            PSC_DEV(102, &soc_lpsc_list[8]),
    -       PSC_DEV(146, &soc_lpsc_list[8]),
    +       PSC_DEV(152, &soc_lpsc_list[8]),
            PSC_DEV(13, &soc_lpsc_list[9]),
            PSC_DEV(166, &soc_lpsc_list[10]),
            PSC_DEV(135, &soc_lpsc_list[11]),

    The number is the device ID documented in the link below. 146 is uart0, and 152 is uart1.

    https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am62px/devices.html