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.

TMDSICE3359: UART4 transmit issue

Part Number: TMDSICE3359

Hi TI,

I have enabled the UART4 from "dts" files. Rebuild the kernel and install the modules in SD card. The "dmesg | grep serial" command is showing the uart 4 as "ttyS4", also "/proc/tty/driver/serial" show UART4.

But when I echo something on ttyS4, the tx counter increases but no signal of "UART 4 TXD" pin connected at "J3-PIN 8". Also no data received when RXD and TXD are shorted.

proc output:

root@am335x-evm:/proc/tty/driver# cat serial
serinfo:1.0 driver revision:
0: uart:unknown port:00000000 irq:0
1: uart:unknown port:00000000 irq:0
2: uart:unknown port:00000000 irq:0
3: uart:8250 mmio:0x481A6000 irq:30 tx:35016 rx:680 RTS|CTS|DTR|DSR
4: uart:8250 mmio:0x481A8000 irq:31 tx:321 rx:1 brk:1 RTS|CTS|DTR|DSR
5: uart:unknown port:00000000 irq:0
6: uart:unknown port:00000000 irq:0
7: uart:unknown port:00000000 irq:0
8: uart:unknown port:00000000 irq:0
9: uart:unknown port:00000000 irq:0

root@am335x-evm:~# dmesg | grep serial
[    0.376969] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 30, base_baud = 3000000) is a 8250
[    1.031642] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 31, base_baud = 3000000) is a 8250

am335x-icev2-common.dtsi file contents

---------------------------------------------------------------------------

      uart3_pins_default: uart3_pins_default {
                pinctrl-single,pins = <
                        AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE1) /* (L17) gmii1_rxd3.uart3_rxd */
                        AM33XX_IOPAD(0x938, PIN_OUTPUT_PULLUP | MUX_MODE1) /* (L16) gmii1_rxd2.uart3_txd */
                >;
        };

        uart4_pins_default: uart4_pins_default {
                pinctrl-single,pins = <
                        AM33XX_IOPAD(0x168, PIN_INPUT_PULLUP | MUX_MODE1) /* (E18) uart0_ctsn.uart4_rxd */
                        AM33XX_IOPAD(0x16c, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (E17) uart0_rtsn.uart4_txd */
                >;
        };

----------------------------------------------

&uart3 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart3_pins_default>;
        status = "okay";
};

&uart4 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart4_pins_default>;
        status = "okay";
};

-----------------------------------------------------------------

am335x-icev2.dts file contents

---------------------------------------


&uart3 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart3_pins_default>;
        status = "okay";
};

&uart4 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart4_pins_default>;
        status = "okay";
};

  • Please post what Linux version you are using.

  • Hi TI,

    I have checked the interrupts. Below is my commands and corresponding outputs.

    root@am335x-evm:/proc# cat interrupts 
               CPU0       
     16:      22421      INTC  68 Level     gp_timer
     18:          0      INTC   3 Level     arm-pmu
     19:          1      INTC  78 Level     wkup_m3_txev
     20:       2403      INTC  12 Level     49000000.edma_ccint
     22:          4      INTC  14 Level     49000000.edma_ccerrint
     26:          0      INTC  96 Level     44e07000.gpio
     27:          0      INTC  98 Level     4804c000.gpio
     28:          0      INTC  32 Level     481ac000.gpio
     29:          0      INTC  62 Level     481ae000.gpio
     30:        791      INTC  44 Level     481a6000.serial
     32:      56911      INTC  70 Level     44e0b000.i2c
     33:       7127      INTC  64 Level     mmc0
     35:          0      INTC  77 Level     wkup_m3
     41:          0      INTC  75 Level     rtc0
     42:          0      INTC  76 Level     rtc0
     43:          0      INTC  65 Level     48030000.spi
     45:        420      INTC  41 Level     4a100000.ethernet
     46:         72      INTC  42 Level     4a100000.ethernet
     48:          0      INTC  16 Level     TI-am335x-adc.0.auto
     50:          0      INTC 109 Level     53100000.sham
     52:          2      INTC 111 Level     48310000.rng
    Err:          0
    root@am335x-evm:/proc# stty -F /dev/ttyS4 9600
    root@am335x-evm:/proc# cat interrupts 
               CPU0       
     16:      23828      INTC  68 Level     gp_timer
     18:          0      INTC   3 Level     arm-pmu
     19:          1      INTC  78 Level     wkup_m3_txev
     20:       2404      INTC  12 Level     49000000.edma_ccint
     22:          4      INTC  14 Level     49000000.edma_ccerrint
     26:          0      INTC  96 Level     44e07000.gpio
     27:          0      INTC  98 Level     4804c000.gpio
     28:          0      INTC  32 Level     481ac000.gpio
     29:          0      INTC  62 Level     481ae000.gpio
     30:        926      INTC  44 Level     481a6000.serial
     31:          3      INTC  45 Level   
     32:      59305      INTC  70 Level     44e0b000.i2c
     33:       7131      INTC  64 Level     mmc0
     35:          0      INTC  77 Level     wkup_m3
     41:          0      INTC  75 Level     rtc0
     42:          0      INTC  76 Level     rtc0
     43:          0      INTC  65 Level     48030000.spi
     45:        450      INTC  41 Level     4a100000.ethernet
     46:         75      INTC  42 Level     4a100000.ethernet
     48:          0      INTC  16 Level     TI-am335x-adc.0.auto
     50:          0      INTC 109 Level     53100000.sham
     52:          2      INTC 111 Level     48310000.rng
    Err:          0
    root@am335x-evm:/proc# 
    

    As we can see, after boot there is no irq:31 but after stty command we got irq:31. But there is no entry like irq:30 (which is 481a6000.serial).

    Please help I am too new to this system.

    Thanks in advance

  • Hello Biser,

    root@am335x-evm:~# uname -a
    Linux am335x-evm 4.19.38-g4dae378bbe #1 PREEMPT Thu Sep 19 15:04:35 IST 2019 armv7l GNU/Linux
    

    Thanks of reply.

  • Hi,

    Is this on your custom board or any TI EVM?

  • Hello Bin,

    This is TI board AM3359-ICEV2 purchased from digikey.

    Thanks for reply.

  • Hello TI,

    I have figured out the problem. The IOPAD numbers are wrong as shown below.

    uart4_pins_default: uart4_pins_default {
                    pinctrl-single,pins = <
                            AM33XX_IOPAD(0x168, PIN_INPUT_PULLUP | MUX_MODE1) /* (E18) uart0_ctsn.uart4_rxd */
                            AM33XX_IOPAD(0x16c, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (E17) uart0_rtsn.uart4_txd */
                    >;
            };

    I have search the net and found

    I used the tool and used the pins shown in the pinmux. Now new values are as shown

    uart4_pins_default: uart4_pins_default {
                    pinctrl-single,pins = <
                            AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE1) /* (E18) uart0_ctsn.uart4_rxd */
                            AM33XX_IOPAD(0x96c, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (E17) uart0_rtsn.uart4_txd */
                    >;
            };

    I request TI, please add this link also the getting started documents. I take 8 days to find out that the pins are wrong.

    Any ways the UART4 is now working.

    Thanks a lot for helping me.

    Have a nice day.