PXA: Handling of UDC with no VBUS pins

6 messages, 3 authors, 2011-05-22 · open the first message on its own page

PXA: Handling of UDC with no VBUS pins

From: Dmitry Eremin-Solenikov <hidden>
Date: 2011-05-18 12:06:33

Hello, colleagues,

There are several PXA platforms which on the UDC tranceiver part have
a pullup pin to support connect/disconnect but no VBUS pin to detect
host presense. Currently such platforms are supported through udc driver
itself. I'd like to clean that part of pxa25x_udc/pxa27x_udc drivers and
to move gpio pullup handling to tranceiver.

My question is what would be better: to extend gpio-vbus to work w/o
VBUS pin or to write new transceiver driver only handling gpio-pullup?

-- 
With best wishes
Dmitry

PXA: Handling of UDC with no VBUS pins

From: robert.jarzmik@free.fr (Robert Jarzmik)
Date: 2011-05-20 18:12:23

On 05/18/2011 02:06 PM, Dmitry Eremin-Solenikov wrote:
Hello, colleagues,

There are several PXA platforms which on the UDC tranceiver part have
a pullup pin to support connect/disconnect but no VBUS pin to detect
host presense. Currently such platforms are supported through udc driver
itself. I'd like to clean that part of pxa25x_udc/pxa27x_udc drivers and
to move gpio pullup handling to tranceiver.
So, you want to concentrate USB pullup handling, right ?
My question is what would be better: to extend gpio-vbus to work w/o
VBUS pin or to write new transceiver driver only handling gpio-pullup?
My personnal feeling is neither, let them be. The generic pullup would 
have to ask itself :
   - should the pullup be applied on D+ (on USB 2.0 and 3.0 devices) ?
   - should the pullup be applied on D- (on USB 1.1 devices) ?
The common driver will have to handle the suspend/resume in an 
homogenous way.
If the gadget driver is removed, the pullup should be pulled low.

All of this work for only 2 drivers looks overkill to me.

And if you want to gather it in a driver, "gpio-vbus" purpose was to 
handle VBUS sensing, ie. power presence on +5V/Gnd lines. The D+ 
handling was not part of its duties, and you'll probably end up with a 
new driver, which is ... overkill IMHO.

Cheers.

--
Robert

PXA: Handling of UDC with no VBUS pins

From: Dmitry Eremin-Solenikov <hidden>
Date: 2011-05-21 18:35:12

On 5/20/11, Robert Jarzmik [off-list ref] wrote:
On 05/18/2011 02:06 PM, Dmitry Eremin-Solenikov wrote:
quoted
Hello, colleagues,

There are several PXA platforms which on the UDC tranceiver part have
a pullup pin to support connect/disconnect but no VBUS pin to detect
host presense. Currently such platforms are supported through udc driver
itself. I'd like to clean that part of pxa25x_udc/pxa27x_udc drivers and
to move gpio pullup handling to tranceiver.
So, you want to concentrate USB pullup handling, right ?
Basically I'd like to cleanup this part of pxa udc drivers.
quoted
My question is what would be better: to extend gpio-vbus to work w/o
VBUS pin or to write new transceiver driver only handling gpio-pullup?
My personnal feeling is neither, let them be. The generic pullup would
have to ask itself :
   - should the pullup be applied on D+ (on USB 2.0 and 3.0 devices) ?
   - should the pullup be applied on D- (on USB 1.1 devices) ?
gpio-vbus driver doesn't do this. It simply handles D+ pullup. I think I'd
start with simple D+ pullup driver and the one may add D- functionality
if required.
The common driver will have to handle the suspend/resume in an
homogenous way.
Do pxa25x_udc/pxa27x_udc handle pullup during suspend/resume?
If the gadget driver is removed, the pullup should be pulled low.

All of this work for only 2 drivers looks overkill to me.
3 boards only from PXA. I don't know about other platforms/soc-families.
And if you want to gather it in a driver, "gpio-vbus" purpose was to
handle VBUS sensing, ie. power presence on +5V/Gnd lines. The D+
handling was not part of its duties, and you'll probably end up with a
new driver, which is ... overkill IMHO.
gpio-vbus handles D+ already (except suspend/resume).

-- 
With best wishes
Dmitry

PXA: Handling of UDC with no VBUS pins

From: robert.jarzmik@free.fr (Robert Jarzmik)
Date: 2011-05-22 08:51:54

On 05/21/2011 08:35 PM, Dmitry Eremin-Solenikov wrote:
My question is what would be better: to extend gpio-vbus to work w/o
quoted
quoted
VBUS pin or to write new transceiver driver only handling gpio-pullup?
My personnal feeling is neither, let them be. The generic pullup would
have to ask itself :
    - should the pullup be applied on D+ (on USB 2.0 and 3.0 devices) ?
    - should the pullup be applied on D- (on USB 1.1 devices) ?
gpio-vbus driver doesn't do this. It simply handles D+ pullup. I think I'd
start with simple D+ pullup driver and the one may add D- functionality
if required.
OK, as long as you don't touch the code in pxa27x_udc.c.
quoted
The common driver will have to handle the suspend/resume in an
homogenous way.
Do pxa25x_udc/pxa27x_udc handle pullup during suspend/resume?
At least pxa27x_udc does, on suspend to RAM (you should look at 
pxa_udc_suspend()).
quoted
If the gadget driver is removed, the pullup should be pulled low.

All of this work for only 2 drivers looks overkill to me.
3 boards only from PXA. I don't know about other platforms/soc-families.
One other point I've forgotten is that pxa27x_udc in its current state 
only supports gpio pullup/pulldown (ie. an external transciever handles 
D+ stimulation). But the PXA sillicon has an internal transciever which 
can be handled directly by pxa27x_udc (register UP2OCR).

Now, nobody uses it. If a board manufacturer is crazy enough to use it, 
the pullup can only be done from inside the pxa27x_udc driver (IO 
mappings driving).


I still think this driver is a bad idea. But if you wish to do it, go 
ahead. The only thing I'll block is removing the existing pullup code 
from pxa27x_udc.c.

Cheers.

--
Robert

PXA: Handling of UDC with no VBUS pins

From: Dmitry Eremin-Solenikov <hidden>
Date: 2011-05-22 09:20:14

On Sun, May 22, 2011 at 12:51 PM, Robert Jarzmik [off-list ref] wrote:
On 05/21/2011 08:35 PM, Dmitry Eremin-Solenikov wrote:
quoted
My question is what would be better: to extend gpio-vbus to work w/o
quoted
quoted
VBUS pin or to write new transceiver driver only handling gpio-pullup?
My personnal feeling is neither, let them be. The generic pullup would
have to ask itself :
? ?- should the pullup be applied on D+ (on USB 2.0 and 3.0 devices) ?
? ?- should the pullup be applied on D- (on USB 1.1 devices) ?
gpio-vbus driver doesn't do this. It simply handles D+ pullup. I think I'd
start with simple D+ pullup driver and the one may add D- functionality
if required.
OK, as long as you don't touch the code in pxa27x_udc.c.
Let's do it step by step. My plan would be to drop all non-tranceiver code
for handling pullup and VBUS from both pxa25x_udc and pxa27x_udc.
quoted
quoted
The common driver will have to handle the suspend/resume in an
homogenous way.
Do pxa25x_udc/pxa27x_udc handle pullup during suspend/resume?
At least pxa27x_udc does, on suspend to RAM (you should look at
pxa_udc_suspend()).
I see... Thanks for pointing to it.
quoted
quoted
If the gadget driver is removed, the pullup should be pulled low.

All of this work for only 2 drivers looks overkill to me.
3 boards only from PXA. I don't know about other platforms/soc-families.
One other point I've forgotten is that pxa27x_udc in its current state only
supports gpio pullup/pulldown (ie. an external transciever handles D+
stimulation). But the PXA sillicon has an internal transciever which can be
handled directly by pxa27x_udc (register UP2OCR).

Now, nobody uses it. If a board manufacturer is crazy enough to use it, the
pullup can only be done from inside the pxa27x_udc driver (IO mappings
driving).
Actually I've thought about this. At least several boards use UP2OCR
handling (balloon3, collibri, cm-x300, em-x270, spitz, stargate, voipac, zeus).
I still think this driver is a bad idea. But if you wish to do it, go ahead.
The only thing I'll block is removing the existing pullup code from
pxa27x_udc.c.
Even if I provide full replacement (from the pulldown-on-suspend POV)?

-- 
With best wishes
Dmitry

PXA: Handling of UDC with no VBUS pins

From: Sergei Shtylyov <hidden>
Date: 2011-05-22 12:32:06

Hello.

On 20-05-2011 22:12, Robert Jarzmik wrote:
quoted
There are several PXA platforms which on the UDC tranceiver part have
a pullup pin to support connect/disconnect but no VBUS pin to detect
host presense. Currently such platforms are supported through udc driver
itself. I'd like to clean that part of pxa25x_udc/pxa27x_udc drivers and
to move gpio pullup handling to tranceiver.
So, you want to concentrate USB pullup handling, right ?
quoted
My question is what would be better: to extend gpio-vbus to work w/o
VBUS pin or to write new transceiver driver only handling gpio-pullup?
My personnal feeling is neither, let them be. The generic pullup would have to
ask itself :
- should the pullup be applied on D+ (on USB 2.0 and 3.0 devices) ?
- should the pullup be applied on D- (on USB 1.1 devices) ?
    Pullup on D- is only used on low speed devices, not all USB 1.1 devices. 
That's how they get detected.

WBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help