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.

AM6548: AM65x industrial development kit UART 1 enable

Part Number: AM6548

Hi TI team,

I try to enable uart 1 on AM65x industrial development kit.

The SDK version I use is ti-processor-sdk-linux-rt-am65xx-evm-06.02.00.81.

I modify dts file base on schematic. However, uart 1 still can't work.

The device tree code I patch as below. 

&main_pmx0 {

main_uart1_pins_default: main_uart1_pins_default {
pinctrl-single,pins = <
AM65X_IOPAD(0x0174, PIN_INPUT, 6) /* (AE23) PRG1_PRU1_GPO17.UART1_RXD */
AM65X_IOPAD(0x014c, PIN_OUTPUT, 6) /* (AD23) PRG1_PRU1_GPO7.UART1_TXD */
AM65X_IOPAD(0x0178, PIN_INPUT, 6) /* (AD22) PRG1_PRU1_GPO18.UART1_CTSn */
AM65X_IOPAD(0x017c, PIN_OUTPUT, 6) /* (AC21) PRG1_PRU1_GPO19.UART1_RTSn */
>;
};

}

&main_uart0 {

pinctrl-names = "default"?
pinctrl-0 = <&main_uart0_pins_default>;

};

I don't have any idea about it.

Could you provide a patch file to enable uart 1 on AM65x industrial development kit?

Thanks

  • Hi,

    I have a question on what you mean by enabling uart1? 
    Do you want to get the console to uart1 instead of uart0?

    Also did you use pinmux tool to generate the

    main_uart1_pins_default node?


    - Keerthy

  • Hi, Keerthy

    I want to enable uart1 then I can echo & cat message from ttyS3.

    I will use it to do some serial test.

    Yes, main_uart1_pins_default node already be generated.

    My dts file as below.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/k3_2D00_am654_2D00_base_2D00_board.7z

    Thanks

  • Hi,

    I believe you are okay with main_uart2 enabled in kernel. could you please attach your kernel dtb as well so that i can look at the missing
    things?

    - Keerthy

  • Hi,

    No, I didn't enable main_uart2.

    Currently, I just use main_uart0 for debug consle.

    I also want to enable main_uart1 but fail.

    I don't know what you mean of kernel dtb.

    Can you provide the dts name you need?

    Thanks

  • Hi,

    I have it working. There was a board mux to be selected for enabling the main_uart1.
    The I2C expander gpio13 had to be pulled low to select the mcu_uart1.

    Please try the below patch:

    diff --git a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
    index 2ebb59fa73..5c952a7682 100644
    --- a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
    +++ b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
    @@ -218,6 +218,15 @@
             >;
         };
     
    +    main_uart1_pins_default: main-uart1-pins-default {
    +        pinctrl-single,pins = <
    +            AM65X_IOPAD(0x0174, PIN_INPUT, 6)    /* (AE23) */
    +            AM65X_IOPAD(0x014c, PIN_OUTPUT, 6)    /* (AD23) */
    +            AM65X_IOPAD(0x0178, PIN_INPUT, 6)    /* (AD22) */
    +            AM65X_IOPAD(0x017c, PIN_OUTPUT, 6)    /* (AC21) */
    +        >;
    +    };
    +
         main_i2c2_pins_default: main-i2c2-pins-default {
             pinctrl-single,pins = <
                 AM65X_IOPAD(0x0074, PIN_INPUT, 5) /* (T27) GPMC0_CSn3.I2C2_SCL */
    @@ -340,6 +349,12 @@
         pinctrl-0 = <&main_uart0_pins_default>;
     };
     
    +&main_uart1 {
    +    status = "okay";
    +    pinctrl-names = "default";
    +    pinctrl-0 = <&main_uart1_pins_default>;
    +};
    +
     &wkup_i2c0 {
         pinctrl-names = "default";
         pinctrl-0 = <&wkup_i2c0_pins_default>;
    @@ -369,6 +384,12 @@
             reg = <0x21>;
             gpio-controller;
             #gpio-cells = <2>;
    +        p1 {
    +            gpio-hog;
    +            gpios = <13 GPIO_ACTIVE_HIGH>;
    +            output-low;
    +            line-name = "main_uart1_sel";
    +        };
         };
     };
     

    This should get uart1 working with the right Baud.

    Regards,
    Keerthy