Re: gpio pins -> tty/cua device
- In reply to: Bjoern A. Zeeb: "Re: gpio pins -> tty/cua device"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Sep 2024 23:10:14 UTC
On Fri, Sep 20, 2024, 11:07 PM Bjoern A. Zeeb < bzeeb-lists@lists.zabbadoz.net> wrote: > 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? > 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 > > -- > Bjoern A. Zeeb r15:7