Re: USB Battery Charging Specification

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

 



Hi,

On Tue, Dec 08, 2009 at 06:31:56PM +0100, ext Greg KH wrote:
	with e.g. RX-51 board, which uses a ulpi-connected transceiver
	(no i2c control bus) and no irq line to cpu, we don't have
	information on when to kick the charger detection. Moreover, we
	have to keep e.g. musb (in RX-51) alive because it's the only
	way to have access to the ulpi bus. Kicking the charger
	detection also breaks usb communication during the time the
	detection is ongoing.

	How to tackle those problems ? Should we leave that to userland ?
	Should we implement a "musb_power_supply.c" driver ?

How does the hardware designers of the latter issue expect it to work?
I can't imagine that loosing communication is a correct thing to have
happen here, can't they fix their design?

that's in usb battery charging spec [1]

when detecting charger, a small voltage is sourced on d- (or d+, can't remember and out of office now). If it's a usb dedicated charger or host/hub charger, the voltage sourced on data line is looped back on the other data line.

It seems like a driver is going to be needed, as either way you need to
detect it from within the kernel, right?

the problem is when you have transceivers without a control bus other than ulpi. You have to keep the link powered, which means the link will see vbus and try to connect to the bus. But that shouldn't happen right now because we are still trying to detect the charger. On RX-51 case, we get vbus irq from twl4030-usb but the actual usb communication (data) is routed through isp1707 connected to musb via ulpi. I know, it's a horrible hw design but we couldn't get that changed because we needed usb charger detection which isn't support by twl4030 or twl5030. Only now in twl5031 we have support for usb bc 1.0 (only) on the usb transceiver available on that pmic.

2. Preventing usb gadget controller from connecting to the usb bus while
usb charger detection is ongoing.

Just do the detection first before binding the driver to the device?

I wish it was that simple. And maybe it is, I'll try tomorrow and see what happens if I disable data pullups and try to detect charger...
Hopefully all will work, but then we still have one problem:

on RX-51, we get vbus irq from pmic which doesn't reach musb driver at all, so we wouldn't have information about when to kick the charger detection unless we export some symbol from musb to twl4030-usb to be called when vbus irq comes. That doesn't sound good, right ? Any ideas for this case ?

[1] http://www.usb.org/developers/devclass_docs/batt_charging_1_1.zip
--
balbi
--
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