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.

SK-AM62: Enabling MCU UART or SOC UART1 via FTDI

Part Number: SK-AM62

Hello

I am a AM62 starter kit and I am able to run Debian GNU/Linux image (provided by TI) on it. The login console is tied to /dev/ttyUSB0 (which is tied to ttyS2 via bootargs). I would like to open up another UART either via expansion pins 8,10 on the 40-pin expansion connector or via any MCU expansion port.

I tried cloning the TI kernel sources from git tag 09.00.00.006 and enabled MCU UART0 on the k3-am62-mcu.dtsi file.

$ git diff
diff --git a/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi
index 460b0e5218aad..3f1299d4a9a62 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi
@@ -72,7 +72,7 @@ mcu_uart0: serial@4a00000 {
                power-domains = <&k3_pds 149 TI_SCI_PD_EXCLUSIVE>;
                clocks = <&k3_clks 149 0>;
                clock-names = "fclk";
-               status = "disabled";
+               status = "okay";
        };
 
        mcu_i2c0: i2c@4900000 {

However, it looks like this change is not enough to enable it? If I look at the /proc file system, it still seem to be disabled.

root@am62xx:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:unknown port:00000000 irq:0
1: uart:unknown port:00000000 irq:0
2: uart:8250 mmio:0x02800000 irq:239 tx:11350 rx:0 RTS|DTR|DSR
3: uart:unknown port:00000000 irq:0

The SoC UART1 seem to be reserved in the dtsi file k3-am62x-sk-common.dtsi (with a comment "Main UART1 is used by TIFS firmware"). In the schematic, I see that SoC UART0, SoC UART1, MCU UART0 (and wkup UART0) are going into the FTDI chip. 

What changes can I do to open up another UART that I can talk to from the linux side?

Thanks in advance

Ram

  • Ram,

    The expansion connector pin 8/10 are routed to UART5 TXD/RXD, so you need to set the corresponding pinmux and enable main_uart5 DT node. Please see the following example:

    diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    index 2b29aa6c039e..f6e67dbd19c3 100644
    --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    @@ -9,6 +9,8 @@ / {
            aliases {
                    serial0 = &wkup_uart0;
                    serial2 = &main_uart0;
    +               serial5 = &main_uart5;
                    mmc0 = &sdhci0;
                    mmc1 = &sdhci1;
                    mmc2 = &sdhci2;
    @@ -425,6 +429,14 @@ AM62X_IOPAD(0x0084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */
                    >;
            };
     
    +       main_uart5_pins_default: main_uart5-pins-default {
    +               pinctrl-single,pins = <
    +                       AM62X_IOPAD(0x01dc, PIN_OUTPUT, 1) /* (E15) MCAN0_RX.uart5.tx */
    +                       AM62X_IOPAD(0x01d8, PIN_INPUT, 1) /* (C15) MCAN0_TX.uart5.rx */
    +               >;
    +       };
    +
    +
            main_mcan0_pins_default: main_mcan0-pins-default {
                    pinctrl-single,pins = <
                            AM62X_IOPAD(0x01dc, PIN_INPUT, 0) /* (E15) MCAN0_RX */
    @@ -464,7 +476,9 @@ &main_uart4 {
     };
     
     &main_uart5 {
    -       status = "disabled";
    +       pinctrl-names = "default";
    +       pinctrl-0 = <&main_uart5_pins_default>;
    +       status = "okay";
     };
     
     &main_uart6 {
    @@ -750,9 +764,7 @@ &wkup_r5fss0_core0 {
     };
     
     &main_mcan0 {
    -       pinctrl-names = "default";
    -       pinctrl-0 = <&main_mcan0_pins_default>;
    -       status = "okay";
    +       status = "disabled";
     };
     
     &mcu_rti0 {

  • Thanks Bin. That works.