uart problems on a pine64

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

uart problems on a pine64

Ernesto
Hi,
I’m having Problems to open the serialport on a pine64 (Rev 2). I’m using a
63 snapshot.
I want to use the UART4 because it has handshake lines I want to use for GPS
time sync.

pine# cu -l cuaU1 -s 115200
cu: open("/dev/cuaU1"): Device not configured

I also tried U1,U2,U3. Do I miss something?
thank you
E.



--
Sent from: http://openbsd-archive.7691.n7.nabble.com/openbsd-port-arm-f206279.html

Reply | Threaded
Open this post in threaded view
|

Re: uart problems on a pine64

Otto Moerbeek
On Thu, Mar 22, 2018 at 02:16:37AM -0700, Ernesto wrote:

> Hi,
> I’m having Problems to open the serialport on a pine64 (Rev 2). I’m using a
> 63 snapshot.
> I want to use the UART4 because it has handshake lines I want to use for GPS
> time sync.
>
> pine# cu -l cuaU1 -s 115200
> cu: open("/dev/cuaU1"): Device not configured
>
> I also tried U1,U2,U3. Do I miss something?
> thank you
> E.

A dmesg might help...

        -Otto

Reply | Threaded
Open this post in threaded view
|

Re: uart problems on a pine64

Mark Kettenis
In reply to this post by Ernesto
> Date: Thu, 22 Mar 2018 02:16:37 -0700 (MST)
> From: Ernesto <[hidden email]>
>
> pine# cu -l cuaU1 -s 115200
> cu: open("/dev/cuaU1"): Device not configured
>
> I also tried U1,U2,U3. Do I miss something?

Yes.  The serial port devices on the pine64 are com(4) not ucom(4).
You want to use cua00, cua01, cua02 etc.

Which one actually corresponds to UART4 on the device isn't obvious
and might need some some detective work.  In fact it looks as if it is
disabled in the device tree and won't actually show up.  So you might
need to build your own modified device tree to use UART4.  UART4 uses
the same pins as SPI1 so you can't use both devices at the same time.
That's probably why it is disabled.

Building your own device trees isn't OpenBSD-specific so you might be
better off asking on a generic/Linux Allwinner forum about doing this.