From: Igor Grinberg <grinberg@compulab.co.il>
To: Pavan Kondeti <pkondeti@codeaurora.org>
Cc: Matthieu CASTET <matthieu.castet@parrot.com>,
"greg@kroah.com" <greg@kroah.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
Mike Lockwood <lockwood@android.com>,
Brian Swetland <swetland@google.com>
Subject: Re: [PATCH v2] USB: Add MSM USB Device Controller driver
Date: Sun, 21 Nov 2010 10:09:18 +0200 [thread overview]
Message-ID: <4CE8D3AE.9090904@compulab.co.il> (raw)
In-Reply-To: <20101119055057.GF11700@codeaurora.org>
On 11/19/10 07:50, Pavan Kondeti wrote:
> Hi Igor,
>
> On Thu, Nov 11, 2010 at 07:40:28AM +0530, Pavan Kondeti wrote:
>> Hi Igor,
>>
>> On Wed, Nov 10, 2010 at 08:47:16AM +0200, Igor Grinberg wrote:
>>> On 11/10/10 04:19, Pavan Kondeti wrote:
>>>> On Tue, Nov 09, 2010 at 05:36:28PM +0200, Igor Grinberg wrote:
>>>>> On 11/09/10 15:52, Matthieu CASTET wrote:
>>>>>> +static void ulpi_init(struct msm_otg *motg)
>>>>>> +{
>>>>>> + struct msm_otg_platform_data *pdata = motg->pdata;
>>>>>> + int *seq = pdata->phy_init_seq;
>>>>>> +
>>>>>> + if (!seq)
>>>>>> + return;
>>>>>> +
>>>>>> + while (seq[0] >= 0) {
>>>>>> + dev_vdbg(motg->otg.dev, "ulpi: write 0x%02x to 0x%02x\n",
>>>>>> + seq[0], seq[1]);
>>>>>> + ulpi_write(&motg->otg, seq[0], seq[1]);
>>>>>> + seq += 2;
>>>>>> + }
>>>>>> +}
>>>>>>
>>>>>>
>>>>>> can't you share the ulpi fonctions from udc and otg ?
>>>>> The best would be to use the usb/otg/ulpi.c driver for the ulpi access.
>>>> This driver will eventually use msm72k_otg.c transceiver.
>>> Well, I mean, in addition to defining the struct otg_io_access_ops in some place,
>>> where both device and host drivers can share the same ops code, you can also
>>> use the ulpi generic driver as the protocol driver, instead of writing private code.
>> I have not looked at generic ULPI driver. I will see if we can re-use it in
>> our msm72k_otg.c.
> The generic ULPI driver seems to be supporting initializing the PHY,
> configuring the PHY in Host mode and driving VBUS.
Currently, yes, it is correct.
The reason I haven't added some more functionality
(e.g. set_peripheral()) is because I don't have a h/w that supports it.
> The PHY we have in our MSM chips does not have an integrated charge pump. So we
> depend on external voltage regulators driver VBUS. So can not use ulpi_set_vbus
> method.
You don't have to...
ulpi driver relies on otg_transceiver, so if you don't call otg_set_vbus(),
ulpi_set_vbus() will not be called and instead you can do your own set_vbus().
> IMO, ulpi_set_host is useful for only Hosts but not OTG (i.e support both gadget
> and host). We kick OTG state machine only after both gadget and host are
> registered. So we use our own set_host method and can not use ulpi_set_host.
IMHO, ULPI driver is not meant to somehow affect the OTG state machine.
I think the initial design of the ULPI driver was a mistake.
It should not have implemented the OTG transceiver, but only the communication
with the ULPI transceiver and implementation of the ULPI standard.
It should be used only for setting up/changing modes of ULPI transceivers.
It already has the ability to detect/check reliability of view port of the ULPI transceiver,
supply the wiring information to the ULPI transceiver.
I thought also of giving it the ability to reset the ULPI transceiver, and also add
set_peripheral() routine, but the h/w I have does not support peripheral mode
and does not need to reset the transceiver.
I can work on adding those, if someone find it useful.
Bottom line, I'd expect the communication with the ULPI transceiver handled by the
ULPI driver and the rest by the OTG implementation (core or platform).
--
Regards,
Igor.
next prev parent reply other threads:[~2010-11-21 8:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-09 11:18 [PATCH v2] Add MSM USB Device Controller support Pavankumar Kondeti
2010-11-09 11:18 ` [PATCH v2] USB: Add MSM USB Device Controller driver Pavankumar Kondeti
2010-11-09 11:40 ` Matthieu CASTET
2010-11-09 12:16 ` Pavan Kondeti
2010-11-09 13:36 ` Matthieu CASTET
2010-11-10 2:12 ` Pavan Kondeti
2010-11-10 2:54 ` David Brownell
2010-11-10 6:22 ` Brian Swetland
2010-11-19 17:16 ` Matthieu CASTET
2010-11-27 14:00 ` Pavan Kondeti
2010-11-28 6:30 ` David Brownell
2010-11-28 12:09 ` Pavan Kondeti
2010-12-07 12:44 ` Pavan Kondeti
2010-11-09 13:25 ` Heikki Krogerus
2010-11-09 13:52 ` Matthieu CASTET
2010-11-09 15:36 ` Igor Grinberg
2010-11-10 2:19 ` Pavan Kondeti
2010-11-10 6:47 ` Igor Grinberg
2010-11-11 2:10 ` Pavan Kondeti
2010-11-19 5:50 ` Pavan Kondeti
2010-11-21 8:09 ` Igor Grinberg [this message]
2010-11-10 2:17 ` Pavan Kondeti
2010-11-09 11:18 ` [PATCH v2] USB: msm72k_udc: Add debugfs support Pavankumar Kondeti
2010-11-09 11:18 ` [PATCH v2] USB: msm72k_udc: Add Remote wakeup support Pavankumar Kondeti
2010-11-09 11:18 ` [PATCH v2] USB: msm72k_udc: Add Test Mode support Pavankumar Kondeti
2010-11-09 11:18 ` [PATCH] USB: msm72k_udc: Add charging notification support Pavankumar Kondeti
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=4CE8D3AE.9090904@compulab.co.il \
--to=grinberg@compulab.co.il \
--cc=greg@kroah.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lockwood@android.com \
--cc=matthieu.castet@parrot.com \
--cc=pkondeti@codeaurora.org \
--cc=swetland@google.com \
/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.