Re: [PATCH v2 1/1] tty: i3c: add TTY over I3C master support

Frank Li
2023-10-24T16:00:10Z

On Tue, Oct 24, 2023 at 05:05:47PM +0200, Greg KH wrote:
> On Tue, Oct 24, 2023 at 10:31:51AM -0400, Frank Li wrote:
> > On Tue, Oct 24, 2023 at 11:30:33AM +0200, Greg KH wrote:
> > > On Mon, Oct 23, 2023 at 12:26:42PM -0400, Frank Li wrote:
> > > > On Sat, Oct 21, 2023 at 07:02:40PM +0200, Greg KH wrote:
> > > > > Note, your subject line needs to change.
> > > > >
> > > > > On Fri, Oct 20, 2023 at 12:00:27PM -0400, Frank Li wrote:
> > > > > > In typical embedded Linux systems, UART consoles require at least two pins,
> > > > > > TX and RX. In scenarios where I2C/I3C devices like sensors or PMICs are
> > > > > > present, we can save these two pins by using this driver. Pins is crucial
> > > > >
> > > > > "Pins are crucial"
> > > > >
> > > > > > resources, especially in small chip packages.
> > > > > >
> > > > > > This introduces support for using the I3C bus to transfer console tty data,
> > > > > > effectively replacing the need for dedicated UART pins. This not only
> > > > > > conserves valuable pin resources but also facilitates testing of I3C's
> > > > > > advanced features, including early termination, in-band interrupt (IBI)
> > > > > > support, and the creation of more complex data patterns. Additionally,
> > > > > > it aids in identifying and addressing issues within the I3C controller
> > > > > > driver.
> > > > >
> > > > > But where is the serial data ending up at? Not a normal uart, what is
> > > > > on the other end? And do line settings mean anything here?
> > > >
> > > > Currently, it use slave i3c code.
> > > > https://lore.kernel.org/imx/20231018215809.3477437-1-Frank.Li@nxp.com/T/#t
> > > >
> > > > idealy build an i3c->usb dongle to bride it to usb acm.
> > >
> > > So no one has built such a thing yet to determine if any of this works?
> >
> > It is easy to proof concept by I3C slave code and USB gadget ACM, then pipe
> > two tty (ttyACM0 and ttySI3C0 together).
>
> So you have not actually tested this? why write a driver that no one is
> using?

I3c slave side tty at
https://lore.kernel.org/imx/20231018215809.3477437-1-Frank.Li@nxp.com/T/#t

I just have not tested tty to USB part. This patch is major for tty -> i3c
master -> i3c taret -> tty now.

As my previous said, two major purpose now.
1. Save two pads.
2. Test i3c master and i3c target driver. I3C target driver frame was
written by me and posted. It needs a driver to verify it works. In stead of
write a test driver (such as i2c slave, pci-endpoint), it is better to
write an actual function driver, such as tty. It can exchange message
between two boards, which connected by SDA/SCL.

Frank
>
> > Of we also can implement a USB to I3C class standard, base on this, reuse
> > this tty driver at host side.
>
> Is there a USB I3C standard? I see i3c descriptors assigned by the
> USB-IF, but haven't dug to see if there's more than that anywhere...
>
> thanks,
>
> greg k-h