Re: [PATCH] ftdi_sio: add support for FT-X series devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Uwe Bonnes wrote:
> >>>>> "Jim" == Jim Paris <jim@xxxxxxxx> writes:
> 
> ...
>     >> But how do you keep e.g. a FT20x from being handled as USART? I added
>     >> a quirk in my approach, looking for the string "FT23" in the device
>     >> product description . More explanations in the code...
> 
>     Jim> That part was intentional -- I think _all_ the FT-X chips should be
>     Jim> handled as a USART.  What else would they be treated as?  They're
>     Jim> not capable of being an I2C or SPI master, and no I2C or SPI
>     Jim> details are ever exposed to the USB host -- they are only slave
>     Jim> interfaces, and allow some other device to read and write into
>     Jim> their FIFO using a protocol other than RS-232.  The host side
>     Jim> interface looks the same regardless of which chip you're using.
>     Jim> They're essentially like the FT245BM in that regard.
> 
> For none of the FTDI chips the kernel handles the special modes for now. For
> programming you send control messages not handled by the kernel and e.g. for
> MPSSE mode  some other control message to initiate a mode switch needs to be
> send. Later on bytes sent to the (former) UART interface are handled
> different.
> You have to use libftd2xx, libftdi or pure libusb commands to access the
> special functions. So I think the new chips are more like the FTx232(H)
> chips. But while the FTx232(H) always expose a uart interface after reset, I
> think the non-UART parts switch to their special mode direct after reset.

These parts are _not_ like the FTx232(H) chips.  They don't have
MPSSE, they don't expose any I2C or SPI details to the host, they
don't have any additional control messages versus the FT230XQ.  They
simply don't have a "special mode".  There is a FIFO that sends and
receives a stream of bytes to the host.

I think you are misunderstanding how the FT-X devices work -- I did
too, the first few times I looked at them.  With the FT230X, your
microcontroller transfers bytes into and out of the serial FIFO using
RS232 signaling.  With the FT201X, your microcontroller transfers
bytes into and out of the serial FIFO using a specific I2C read/write
command.  That's all, from the USB side they're identical.

Thanks,
-jim

> So I think exposing the non UART FT-X chips as UART is no good idea!
> 
>     >> Signed-off-by: Jim Paris <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
> 
>     Jim> Not sure what happened with the name there.
> 
> Adding the signed-off line was the last thing I did before sending the mail
> and going to bed. Argh!
> 
> Bye
> -- 
> Uwe Bonnes                bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> 
> Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
> --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux