[U-Boot] how to support usbtty
mike zheng
mail4mz at gmail.com
Sun Aug 31 17:59:49 CEST 2008
On 8/30/08, Bryan O'Donoghue <bodonoghue at codehermit.ie> wrote:
> On Fri, 29 Aug 2008 11:53:45 -0400
> "mike zheng" <mail4mz at gmail.com> wrote:
>
> > Hi Bryan,
> >
> > The USB/RS232 cable is a USB device, it shall has firmware in it,
> > which works as a USB slave. What I need to do is have some code talk
> > to this device via the Host controller - ISP1561. So, I need some code
> > as usb-storage.c, maybe called usb-serial.c.
>
> Almost certainly.
>
> > I am not sure how "usbtty" being used. Is it used when there is a
> > USB/USB cable connected between the target and PC?
>
> Yes. Think of usbtty being equivalent to the firmware that runs inside of that
> USB/RS232 cable you have.
>
> It allows u-boot to be a USB slave and provide a console interface over the
> USB, to a USB host somewhere.
>
> > Both ends of the
> > cable are USB port, the PC end is a master, the target end is the
> > slave. So usbtty running on the target is acting as the USB device.
> > However it is not my case. The cable I have has one USB end, and one
> > RS232 end.
>
> Understood.
>
> > The USB end is connected to the target. I assume there is
> > something in the chip within the cable acts as a USB slave device
> > already.
>
> A bit of firmware implementing either some FDTI-specific USB protocol stuff to
> emulate UART over the USB, or just simply following the USB standard for this
> => cdc-acm.
>
> And again you're right - you'll need to be implementing a host side USB serial
> driver for u-boot.
>
> Alternatively if the ISP1561 can do device mode - you could have your PC be
> master and just implement the usbdcore_isp1561.c for u-boot and then use either
> the usbserial or cdc-acm USB protocol to talk to the USB host. In this case you
> could use the code in usbtty to plug into the u-boot console system - and just
> implement whatever is required to make the isp1561 be a well behaved u-boot USB
> slave.
>
> Most embedded USB transceivers these days to both host and slave - so it'd
> probably be worth looking into this option ?
>
> In either case it might be interesting to plug your host-side stuff into
> usbtty.c in u-boot - though it's unclear to me if there'd be more or less pain
> for you in the long run !
>
> --
> Bryan
>
I will try a standalone host side USB serial driver for u-boot at first.
For the alternatively solution, it is very interesting. Then we don't
need the USB/RS232 convertor at all. Just a USB/USB cable connect PC
and target with Uboot. I just wonder anyone tried the usbtty.c on a
target with MPC85xx processor? What OS on PC has been verified,
Windows or Linux? Is there any document on it?
Cheers,
Mike
More information about the U-Boot
mailing list