Home Forums Software discussion OS – ubuntu UART tty serial access – UART: unknown

Tagged: ,

This topic contains 9 replies, has 5 voices, and was last updated by  lphillips 6 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1405

    landon
    Participant

    I have successfully built and am running an Ubuntu 16.04 instance and have the bridge functionality running, etc. All that is good, but the problem I’m having is that the image doesn’t work with UARTs.

    I’ve been trying to open the serial ports /dev/ttyS0 through /dev/ttyS3 and all fail to open.

    Below is some of the diagnostic work I’ve done to attempt to figure this problem out. I would appreciate suggestions from anyone who has gotten the UARTs to work with a 16.04 kernel. I’m stuck looking for a new direction of inquiry to find the problem.

    root@moonlight:/dev# cat ttyS0
    cat: ttyS0: Input/output error

    Running ‘screen’ against /dev/ttyS0 through S4 immediately exits.

    I installed setserial and run:

    root@moonlight:/dev# setserial -g ttyS*
    ttyS0, UART: unknown, Port: 0x0000, IRQ: 0
    ttyS1, UART: unknown, Port: 0x0000, IRQ: 0
    ttyS2, UART: unknown, Port: 0x0000, IRQ: 0
    ttyS3, UART: unknown, Port: 0x0000, IRQ: 0
    root@moonlight:/dev#

    So, it seems that the devices are “there”, but the ttys are not set up. If I grep for ‘uart’ or ‘serial’ in dmesg, I get:

    root@moonlight:/dev# dmesg | egrep -i 'serial|ttys|uart'
    [    4.946619] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
    [    8.766334] systemd[1]: Created slice system-serial\x2dgetty.slice.
    root@moonlight:/dev# 

    So, it looks like it should already know that the uart driver is an 8250 or 16550, but setserial doesn’t report it as such.

    I should be able to set it manually also, but cannot:

    root@moonlight:/dev# setserial /dev/ttyS3 uart 16550
    Cannot set serial info: Invalid argument
    root@moonlight:/dev# setserial /dev/ttyS3 uart 8250 
    Cannot set serial info: Invalid argument
    root@moonlight:/dev# 

    I went back to my kernel config – while I didn’t change anything related to serial or UART from the default settings, they are:

    
    #
    # Serial drivers
    #
    CONFIG_SERIAL_EARLYCON=y
    CONFIG_SERIAL_8250=y
    CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
    CONFIG_SERIAL_8250_CONSOLE=y
    CONFIG_SERIAL_8250_DMA=y
    CONFIG_SERIAL_8250_PCI=y
    CONFIG_SERIAL_8250_NR_UARTS=4
    CONFIG_SERIAL_8250_RUNTIME_UARTS=4
    # CONFIG_SERIAL_8250_EXTENDED is not set
    CONFIG_SERIAL_8250_FSL=y
    CONFIG_SERIAL_8250_DW=y
    # CONFIG_SERIAL_8250_RT288X is not set
    # CONFIG_SERIAL_8250_INGENIC is not set
    # CONFIG_SERIAL_8250_MID is not set
    
    #
    # Non-8250 serial port support
    #
    # CONFIG_SERIAL_AMBA_PL010 is not set
    CONFIG_SERIAL_AMBA_PL011=y
    CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
    # CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set
    # CONFIG_SERIAL_MAX3100 is not set
    # CONFIG_SERIAL_MAX310X is not set
    # CONFIG_SERIAL_UARTLITE is not set
    CONFIG_SERIAL_CORE=y
    CONFIG_SERIAL_CORE_CONSOLE=y
    # CONFIG_SERIAL_JSM is not set
    CONFIG_SERIAL_OF_PLATFORM=y
    # CONFIG_SERIAL_SCCNXP is not set
    # CONFIG_SERIAL_SC16IS7XX is not set
    # CONFIG_SERIAL_ALTERA_JTAGUART is not set
    # CONFIG_SERIAL_ALTERA_UART is not set
    # CONFIG_SERIAL_IFX6X60 is not set
    CONFIG_SERIAL_XILINX_PS_UART=y
    CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
    # CONFIG_SERIAL_ARC is not set
    # CONFIG_SERIAL_RP2 is not set
    # CONFIG_SERIAL_FSL_LPUART is not set
    # CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set
    CONFIG_SERIAL_MVEBU_UART=y
    CONFIG_SERIAL_MVEBU_CONSOLE=y
    
    #1406

    tekrantz
    Participant

    Have you tried ttyMV0?

    #1407

    armbian
    Participant

    After a quick scan of Espressobin DTS file (arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts), there is only one UART enabled and …

    /* Exported on the micro USB connector J5 through an FTDI */
    &uart0 {
    	status = "okay";
    }; 

    There are defined pins for uart1 and uart2 and that’s about all. Check the documentation for this if any.

    #1408

    landon
    Participant

    Thank you for your replies.

    @tekrantz, I can open ttyMV0 with screen, but I’m unsure of which pins it may map to. How would I find that out?

    I’m going off the header pinout found here:

    http://wiki.espressobin.net/tiki-index.php?page=ESPRESSObin+GPIO+LED+blinking

    I’ve tried both UART4 (P9 header, pins 11 and 13) and UART2 (P9 header, pins 24, 26).

    Using a screen to /dev/ttyMV0 (115200), I attached an FTDI cable to those two pins (P9: p11/13, P9: p24/26, alternately each UART). Of course, connected the common ground. I have swapped rx/tx just in case I had those reversed.

    With a screen session to my FTDI cable (115200) and one to /dev/ttyMV0, I could not get the two to talk. So, again, I’m not sure what /dev/ttyMV0 maps to. Generally, I’ve only see ttySx type ports enumerated for Serial/UART.

    @armbian, I’ll take a look through the DTS and see if I can tease anything out that might work.

    Again, suggestions or comments on the latest info is welcome. Have any of you got UART 2 or 4 to work?

    Landon

    #1409

    tekrantz
    Participant

    I believe ttyMV0 is mapped to the micro usb connection. There is a built in usb/serial conversion so just connect a usb cable between your 2 computers and the “non espressobin” will see the espressobin on a com port.

    #1411

    landon
    Participant

    @tekrantz thank you for the hint. There is a lot of odd behavior with these ports. Here’s the test I ran:

    I reset (unplugged) the micro-USB cable to the Esspressobin and plugged it back in. It enumerates on my OS X machine as:

    /dev/tty.NoZAP-PL2303-000014FD
    
    #screen session 1 (host computer originates)
    screen /dev/tty.NoZAP-PL2303-000014FD 115200

    This screen gave me a login prompt, and I logged in to the espresso bin.

    I ssh into the espressobin and start a screen session on /dev/ttyMVO:

    
    #screen session 2 started on the espressobin
    screen /dev/ttyMV0 115200

    After that, I was able to type commands on session 2 which would show up on screen session 1 (though end of lines must be being eaten or something, because hitting return would do nothing.)

    After logging in on the session 1 screen and starting session 2, I could not type any more commands or input on screen session 1. I got out of both screen sessions and attempted to start them again. Both connected, but neither could pass any data at that point.

    Anyway, this particular thing is a little wonky, so I’m not very worried about getting this scenario to work.

    I need to connect a serial based device to a UART on the system, so I still need to get the ttySx ports up and running.

    #1412

    landon
    Participant

    @armbian I’m building the 4.4.52 kernel using mostly instructions from:

    http://wiki.espressobin.net/tiki-index.php?page=Build+From+Source+-+Kernel#Kernel_version_4.4.52

    After the build is complete, it’s leaving a armada-3720-community.dtb in the boot directory so I’ve been looking at the corresponding armada-3720-community.dts. The only reference to any uart is this which is similar but different to what you posted.

    
      uart0: serial@12000 {
                                    status = "okay";
                            };

    This is almost certainly the built-in USB serial for the console.

    I seems that the UART support /dev/ttyS0 through /dev/ttyS3 is completely missing. I’m unsure without a lot more hardware and dts knowledge how to proceed to add support for the other UARTs.

    I also find it odd that the /dev/ttyS0 through /dev/ttyS3 show up at all in /dev given the .dts. I don’t know how it’s even figuring out to create those devices in the /dev directory.

    Any suggestions for next steps to get proper UART support?

    Thank you

    #5900

    engelhardtw
    Participant

    Could we please get some direction about enabling UART2 and UART4? Does this need to be done during the OS build?

    Thank you

    #7758

    lphillips
    Participant

    dev/ttyMV0 is made for the microUSB Console.

    I’ve asked support how to setup UART on the header pins, and all they gave me was a schematic that is already available.
    I’m also having the same problems where an FTDI cable won’t enumerate on USB2.0 and won’t let me connect on USB3.0.

    I think there may be some changes to the kernel config that are needed. It seems like you have to rebuild kernel to use any feature besides Ethernet and console.

    I’m really just here for emails about follow up replies.

    #7837

    lphillips
    Participant

    This link seems like it has some good information.

    https://patchwork.ozlabs.org/patch/822320/

    If this works for anyone, please let us know.
    Unfortunately, I’ve run out of time on trying to get this board fully working.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

Signup to our newsletter

Technical specification tables can not be displayed on mobile. Please view on desktop