From: Bryan O'Donoghue <bodonoghue@codehermit.ie>
To: u-boot@lists.denx.de
Subject: [U-Boot] how to support usbtty
Date: Sun, 31 Aug 2008 00:24:30 +0100 [thread overview]
Message-ID: <20080831002430.052de407@neuromancer.mindspace> (raw)
In-Reply-To: <5c9cd53b0808290853s62f2b51cg5e3e7659cbd5e2d2@mail.gmail.com>
On Fri, 29 Aug 2008 11:53:45 -0400
"mike zheng" <mail4mz@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
next prev parent reply other threads:[~2008-08-30 23:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-23 3:26 [U-Boot-Users] how to support usbtty zhuzhenhua
2005-09-23 6:11 ` Wolfgang Denk
2008-08-26 18:37 ` [U-Boot] " mikezh
2008-08-26 18:56 ` Wolfgang Denk
2008-08-27 14:20 ` mike zheng
2008-08-27 17:09 ` Bryan O'Donoghue
2008-08-27 17:11 ` Bryan O'Donoghue
2008-08-29 15:53 ` mike zheng
2008-08-30 23:24 ` Bryan O'Donoghue [this message]
2008-08-31 15:59 ` mike zheng
2008-08-31 17:13 ` Bryan O'Donoghue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080831002430.052de407@neuromancer.mindspace \
--to=bodonoghue@codehermit.ie \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.