Discussion:
gpio pins -> tty/cua device
(too old to reply)
Bjoern A. Zeeb
2024-09-20 21:48:09 UTC
Permalink
Hi.

I have one/two GPIO pins for RX/TX (possibly on two controllers) which
on the other end have a serial console which I would love to read/wwrite to.

Do we have any glue which takes two GPIO pins and present them as tty/cua device?

/bz
--
Bjoern A. Zeeb r15:7


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Warner Losh
2024-09-20 21:54:30 UTC
Permalink
On Fri, Sep 20, 2024, 10:49 PM Bjoern A. Zeeb <
Post by Bjoern A. Zeeb
Hi.
I have one/two GPIO pins for RX/TX (possibly on two controllers) which
on the other end have a serial console which I would love to read/wwrite to.
Do we have any glue which takes two GPIO pins and present them as tty/cua device?
No. We don't do serial emulation through software. You need high precision
timers paired with it to even start. And input bytes are way harder to get
right. Likely need a dedicated thread for any decent data rates. What speed
were you hoping for?

Warner

/bz
Post by Bjoern A. Zeeb
--
Bjoern A. Zeeb r15:7
Warner Losh
2024-09-20 23:10:14 UTC
Permalink
On Fri, Sep 20, 2024, 11:07 PM Bjoern A. Zeeb <
Post by Bjoern A. Zeeb
Post by Warner Losh
On Fri, Sep 20, 2024, 10:49 PM Bjoern A. Zeeb <
Post by Bjoern A. Zeeb
Hi.
I have one/two GPIO pins for RX/TX (possibly on two controllers) which
on the other end have a serial console which I would love to read/wwrite to.
Do we have any glue which takes two GPIO pins and present them as
tty/cua
Post by Warner Losh
Post by Bjoern A. Zeeb
device?
No. We don't do serial emulation through software. You need high
precision
Post by Warner Losh
timers paired with it to even start. And input bytes are way harder to
get
Post by Warner Losh
right. Likely need a dedicated thread for any decent data rates. What
speed
Post by Warner Losh
were you hoping for?
Default of this thing is 115200 ; in theory it can be changed but
probably not initially in my case today.
Background is that some SFPs expose their (embedded u-boot/Linux) serial
console on two PINs (which may be overlayed with other SFF functionality
which makes this all tricky).
I am just trying to find a way for remote debugging without hands on
given one of the SFPs went haywire.
So more helpful if future HW revisions would have these pins on a header
and a USB adapter could be attached or if they were alternatively routed
to an intenral UART of the SoC and one could switch them back and forth
or something?
Many SoCs have pinmux. Maybe you're lucky and the pins you want to use can
be muxed via FDT changes to a UART, which makes things suddenly easy.

Warner

/bz
Post by Bjoern A. Zeeb
--
Bjoern A. Zeeb r15:7
Loading...