Re: gpio pins -> tty/cua device

From: Bjoern A. Zeeb <bzeeb-lists_at_lists.zabbadoz.net>
Date: Fri, 20 Sep 2024 22:07:54 UTC
On Fri, 20 Sep 2024, Warner Losh wrote:

> On Fri, Sep 20, 2024, 10:49 PM Bjoern A. Zeeb <
> bzeeb-lists@lists.zabbadoz.net> wrote:
>
>> 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?

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?

/bz

-- 
Bjoern A. Zeeb                                                     r15:7