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.

Compiler/BEAGLEBK: Changing U-Boot console from UART0 to UART2

Part Number: BEAGLEBK


Tool/software: TI C/C++ Compiler

I would like to change the debug console from UART0 to UART2 on Beaglebone Black.

SDK version is PROCESSOR-SDK-LINUX-AM335X  06_01_00_08.

First, I tried to change CONS_INDEX=1 to CONS_INDEX=3.

SPL and LINUX kernel console messages are coming but u-boot console messages are missing.

These message are as follows,

>U-Boot SPL 2019.01-g029e4c009a-dirty (May 15 2020 - 08:05:12 +0000)

>Trying to boot from MMC1

>[ 0.000000] Booting Linux on physical CPU 0x0.

So I referred and tried to the below e2e threads:

https://e2e.ti.com/support/processors/f/791/t/754906

https://e2e.ti.com/support/processors/f/791/t/536830

https://e2e.ti.com/support/processors/f/791/t/706153

But nothing changed. Would you please advise me about something?

Thanks!

  • Okamoto-san,

    Can you try to update yourarch/arm/dts/<boardname>.dts device tree file as follows and report back if that solves the issue:

    • Update stdout-path property with new phandle to new UART
    • Overlay the respective UART’s device tree node with the correct pinmux reference and ensure it is set to status = "okay";

    Regards, Andreas

  • Hi Andreas,

    Thanks for the reply. I tried but same phenomenon happened. 

    Below are the changes done in kernel for uart2,

    - a/arch/arm/dts/am335x-evm.dts
    +++ b/arch/arm/dts/am335x-evm.dts
    @@ -15,7 +15,7 @@
    compatible = "ti,am335x-evm", "ti,am33xx";

    chosen {
    - stdout-path = &uart0;
    + stdout-path = &uart2;
    tick-timer = &timer2;
    };

    @@ -203,6 +203,13 @@
    >;
    };

    + uart2_pins: pinmux_uart2_pins {
    + pinctrl-single,pins = <
    + 0x150 (PIN_INPUT | MUX_MODE1) /* spi0_sclk.uart2_rxd */

    + 0x154 (PIN_OUTPUT | MUX_MODE1) /* spi0_sclk.uart2_txd */
    + >;
    + };
    +
    clkout2_pin: pinmux_clkout2_pin {
    pinctrl-single,pins = <
    0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
    @@ -376,6 +383,15 @@
    status = "okay";
    };

    +&uart2 {
    + pinctrl-names = "default";
    + pinctrl-0 = <&uart2_pins>;
    +
    +
    +
    + status = "okay";
    +};
    +
    &i2c0 {
    pinctrl-names = "default";
    pinctrl-0 = <&i2c0_pins>;

    Regards,
    Okamoto

  • Hi Okamoto-san,

    Takayuki Okamoto said:
    - a/arch/arm/dts/am335x-evm.dts
    +++ b/arch/arm/dts/am335x-evm.dts

    I'm not sure why you are changing the EVM's DTS file, and not the one for the BeagleBone Black, if that is the board you have?

    Also you still seem to be missing the prints generated by U-Boot (proper), which points to issues with your U-Boot DTS file for the BeagleBone Black.

    I just tried out the port myself to give you a working example by switching the BBB from UART0 to UART4 (that was easily accessible on my board), and was able to see all of SPL, U-Boot, and Kernel prints on UART4 - with no prints emitted to UART0. Please use as a reference and update as needed for UART2.

    Attached one patch for U-Boot, and one for the Linux Kernel.

    Regards, Andreas

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0001_2D00_beagleboneblack_2D00_Use_2D00_UART4_2D00_instead_2D00_of_2D00_UART0.patch

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0001_2D00_ARM_2D00_dts_2D00_am335x_2D00_boneblack_2D00_Use_2D00_UART4_2D00_instead_2D00_of_2D00_UART0.patch

  • Hi Andreas,

    I was editing the wrong DTS file. With your patch as a reference, I was able to see that it works.

    I solved my problem! Thank you so much.

    Regards,

    Okamoto