[U-Boot] [PATCH] musb: set MUSB speed based on CONFIG

Heiko Schocher hs at denx.de
Fri Jul 10 17:12:15 CEST 2015


Hello Samuel,

Am 10.07.2015 um 16:50 schrieb Egli, Samuel:
> Hi Hans,
>
>> -----Original Message-----
>> From: Hans de Goede [mailto:hdegoede at redhat.com]
>> Sent: Freitag, 10. Juli 2015 16:37
>> To: Egli, Samuel; marex at denx.de
>> Cc: u-boot at lists.denx.de; trini at konsulko.com; Bin Liu; Meier, Roger;
>> Daniel Mack
>> Subject: Re: [U-Boot] [PATCH] musb: set MUSB speed based on CONFIG
>>
>> Hi,
>>
>> On 10-07-15 16:30, Hans de Goede wrote:
>>> Hi,
>>>
>>> On 10-07-15 15:16, Samuel Egli wrote:
>>>> From: Bin Liu <b-liu at ti.com>
>>>>
>>>> Do not config MUSB to highspeed mode if CONFIG_USB_GADGET_DUALSPEED
>>>> is not set, in which case Ether gadget only operates in fullspeed.
>>>>
>>>> Note:
>>>> This patch is necessary for devices like some siemens boards that
>>>> allow only FULL SPEED USB 1.1, e.g. DFU download.
>>>>
>>>> Signed-off-by: Bin Liu <b-liu at ti.com>
>>>> Reviewed-by: Tom Rini <trini at konsulko.com>
>>>> Tested-by: Samuel Egli <samuel.egli at siemens.com>
>>>> CC: Marek Vasut <marex at denx.de>
>>>> CC: Heiko Schocher <hs at denx.de>
>>>> CC: Daniel Mack <zonque at gmail.com>
>>>> CC: Roger Meier <r.meier at siemens.com>
>>>
>>> Nack this breaks highspeed mode on boards which use the musb in host
>>> mode, and thus do not set CONFIG_USB_GADGET_DUALSPEED.
>>
>> p.s.
>>
>> Given that you want to use this as a hack to work around the broken pcb
>> design of your board I suggest adding a new option for this
>
> Well, lets not discuss the "broken" pcb design. It seems that wiring protection
> is not that common. Unfortunately, such a protection is too expensive for
> USB High speed :-(.
>
>> titled: CONFIG_USB_MUSB_NO_HIGHSPEED and then do:
>>
>> +#ifndef CONFIG_USB_MUSB_NO_HIGHSPEED
>>                             | MUSB_POWER_HSENAB
>> +#endif
>>
> This would be good enough. The point is indeed to limit it to full speed.
>
>> Using CONFIG_USB_GADGET_DUALSPEED for this seems wrong, since this has
>> nothing to do with enabling dualspeed mode for the gadget code really.
>
> I agree that the name is confusing.

Yes, I vote for Hans suggestion.

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list