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.

Linux/AM3351: Changing debug UART

Part Number: AM3351

Tool/software: Linux

Hi, i am using Processor SDK 3.00.00.04.

i am trying to change debug port to UART 5 in u-boot. i modified below changes but still i am not getting debug logs.

------>.config 

CONFIG_CONS_INDEX=5

------>board/ti/am335x/mux.c

static struct module_pin_mux uart4_pin_mux[] = {
    {OFFSET(gmii1_txd3), (MODE(3) | PULLUP_EN | RXACTIVE)},    /* UART4_RXD */
   {OFFSET(gmii1_txd2), (MODE(3) | PULLUDEN)},        /* UART4_TXD */
    {-1},

};

  • Hello khageswararao,

    To change the debug console you just need to change two things: UART console in menuconfig and stdout-path in U-Boot device tree.

    $ cd <Processor SDK>/
    $ make u-boot_clean && make u-boot
    $ cd board-support/u-boot-<version>/
    $ ARCH=arm make menuconfig


    ARM architecture  ---> (5) UART used for console
    Exit
    Exit
    Do you wish to save your new configuration?
    < Yes >
    $ cp .config configs/am335x_evm_defconfig
    $ cd ../../

    Change the stdout-path = &uart0; to stdout-path = &uart5; in your U-Boot's device tree in <Processor SDK>/board-support/u-boot-<version>/arch/arm/dts/am335x-evm.dts

    $ make u-boot_clean && make u-boot

    And boot your board with the new MLO and u-boot.img

    Best regards,
    Kemal

  • i reverted all my previous changes.
    after modifying in menu config, i got CONFIG_CONS_INDEX=5 in am335x_evm_defconfig file.

    in arch/arm/dts/am335x-evm.dts i did below changes.

    1. stdout-path = &uart4;
    2. uart4_pins: pinmux_uart4_pins {
    pinctrl-single,pins = <
    0x11C (PIN_INPUT_PULLUP | MUX_MODE3) /* uart4rxd.uart0_rxd */
    0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* uart4txd.uart0_txd */
    >;
    };
    3.&uart4 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart4_pins>;

    status = "okay";
    };

    in board/ti/am335x/mux.c
    static struct module_pin_mux uart4_pin_mux[] = {
    //{OFFSET(gpmc_wait0), (MODE(6) | PULLUP_EN | RXACTIVE)}, /* UART4_RXD */
    //{OFFSET(gpmc_wpn), (MODE(6) | PULLUDEN)}, /* UART4_TXD */
    //{-1},
    {PIN_GMII1_TXD3, (MODE(3) | PULLUP_EN | RXACTIVE)}, /* UART4_RXD */
    {PIN_GMII1_TXD2, (MODE(3) | PULLUDEN)}, /* UART4_TXD */
    {-1},
    };

    after booted with the new MLO and u-boot.img

    Still i am not getting logs on uart4.
    Please
  • You are telling me that you can compile U-Boot with this pinmuxing? Why aren't you following existing pinmuxing style?
    Use this instead, and also comment out these pins from rgmii1_pin_mux and mii1_pin_mux to make sure that they will not get overwritten later.
        {OFFSET(mii1_txd3), (MODE(3) | PULLUP_EN | RXACTIVE)},    /* UART4_RXD */
        {OFFSET(mii1_txd2), (MODE(3) | PULLUDEN)},        /* UART4_TXD */
    On which reference design your board is based on? Are you sure that the <Processor SDK>/board-support/u-boot-<version>/arch/arm/dts/am335x-evm.dts is its device tree?

  • we are using evm_sk for reference design.
    in .config
    CONFIG_SYS_CONFIG_NAME="am335x_evm"

    in mux.c
    static struct module_pin_mux uart4_pin_mux[] = {
    //{OFFSET(gpmc_wait0), (MODE(6) | PULLUP_EN | RXACTIVE)}, /* UART4_RXD */
    //{OFFSET(gpmc_wpn), (MODE(6) | PULLUDEN)}, /* UART4_TXD */
    //{-1},
    {OFFSET(mii1_txd3), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* UART4_RXD */
    {OFFSET(mii1_txd2), (MODE(3) | PULLUDEN)}, /* UART4_TXD */
    {-1},
    };
  • Then change the instdout-path to &uart4 in <Processor SDK>/board-support/u-boot-<version>/arch/arm/dts/am335x-evmsk.dts

  • thanks kemal. now it's working
    changes in <Processor SDK>/board-support/u-boot-<version>/arch/arm/dts/am335x-evmsk.dts

    1.modified stdout-path = &uart0; to stdout-path = &uart4;
    2.add below pinmux for uart4

    uart4_pins: pinmux_uart4_pins {
    pinctrl-single,pins = <
    0x11C (PIN_INPUT_PULLUP | MUX_MODE3) /* uart4rxd.uart0_rxd */
    0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* uart4txd.uart0_txd */
    >;
    };
    &uart4 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart4_pins>;

    status = "okay";
    };

    3.dissable mac supportt (i am using same pins to uart4)
    #if 0
    &mac {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&cpsw_default>;
    pinctrl-1 = <&cpsw_sleep>;
    dual_emac = <1>;
    status = "okay";
    };
    #endif


    4. added support to login through uart4 in rootfs
    vi /etc/securetty
    # Standard serial ports
    ttyS0
    ttyS1
    ttyS2
    ttyS3
    ttyS4 /*added for uart4 login*/