[U-Boot] [PATCH 17/17] sunxi: Hookup OTG USB controller support

Hans de Goede hdegoede at redhat.com
Tue Feb 10 09:24:47 CET 2015


Hi,

On 09-02-15 23:10, Michal Suchanek wrote:
> On 9 February 2015 at 04:54, Siarhei Siamashka
> <siarhei.siamashka at gmail.com> wrote:
>> On Sat, 31 Jan 2015 04:54:47 +0200
>> Siarhei Siamashka <siarhei.siamashka at gmail.com> wrote:
>>
>>> On Sun, 11 Jan 2015 20:34:55 +0100
>>> Hans de Goede <hdegoede at redhat.com> wrote:
>>>
>>>> Hookup OTG USB controller support and enable the otg controller + USB-keyb
>>>> on various tablets.
>>>>
>>>> This allows tablet owners to interact with u-boot without needing to solder
>>>> a serial console onto their tablet PCB.
>>>
>>> Thanks. Works great on my Primo73 and Primo81 tablets. However I have
>>> just one naive question before happily taking it into use by default.
>>>
>>> Is the hardcoded otg host mode (without checking the id pin) always
>>> safe? For example, what happens if somebody connects a charger instead
>>> of a usb keyboard to the tablet?
>>
>> So, does anyone have any idea if it is theoretically safe to have two
>> USB hosts connected to each other and both driving VBUS at +5V?
>>
>> A somewhat realistic scenario is booting an Allwinner tablet over
>> USB using the FEL mode. Is it a good idea for such tablet to have
>> CONFIG_USB_MUSB_SUNXI=y and CONFIG_USB0_VBUS_PIN="axp_drivebus"
>> in defconfig?
>>
>
>  From my past experiments with some non-standard-compliant cables which
> allow connecting a tablet with a PC without telling the tablet to go
> OTG mode it seems the tablet battery is drained really quick in this
> case.
>
> There is a protocol for telling the tablet not to power the bus (or
> telling the PC not to power it for that matter) but both sides have to
> support matching part of the protocol. Either way, ideal case is that
> tablet gets power form PC or powered hub even in host mode which is
> not standards-compliant and obviously does not work with stuff like
> keyboards.
>
> However, it should be possible to detect that there is bus power at
> the moment a device is connected and not power the device in that case
> regardless of usb mode negotiated after the connection.

Right, I've fixing this on my todo list, the plan is to add vbus_det
support, and first check if there is an external vbus before enabling
vbus.

Regards,

Hans


More information about the U-Boot mailing list