[Letux-kernel] musb otg/y-cable regressions, OTG support removal

H. Nikolaus Schaller hns at goldelico.com
Mon Feb 18 13:27:35 CET 2019


Hi,

> Am 18.02.2019 um 12:52 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> On Mon, 18 Feb 2019 08:53:20 +0100
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> 
>> Hi,
>> 
>>> Am 18.02.2019 um 07:58 schrieb Andreas Kemnade <andreas at kemnade.info>:
>>> 
>>> Hi,
>>> 
>>> after quite some searching why b_host mode only works very randomly, I found
>>> out that
>>> - musb: disable b_host wait timeout for y-cable usage
>>> is missing in >= letux-4.18. Seems to be forgotten in a conflict resolution.  
>> 
>> Ok. Do you have a reference to the original patch?
>> 
>>> - and them we have this one
>>> commit 0a9134bd733bbb99bd18f5520a488960170271f2
>>> Author: Bin Liu <b-liu at ti.com>
>>> Date:   Mon May 21 08:42:19 2018 -0500
>>> 
>>>   usb: musb: disable otg protocol support
>>> 
>>>   As decided in the discussion [1] we are deleting the otg protocol
>>>   support from the musb drivers.
>>> 
>>>   First this patch disables the flags for enabling the otg protocols. We
>>>   will later gradually delete the otg protocol code from the musb drivers.
>>> 
>>>   [1] https://www.spinics.net/lists/linux-usb/msg167003.html
>>> 
>>>   Signed-off-by: Bin Liu <b-liu at ti.com>
>>>   Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
>>> 
>>> that seems also to influence things.  
>> 
>> Hm. What are the effects of this? Does it influcence OTG operation on GTA04?
>> 
> well, it influences operation if something tries to do hnp.
> So it about letting the device say:"hey, I would rather be a usb host".
> So then you might have a_peripherals and b_hosts.

Ah, ok that is role switching after initial role defined by the ID pin

https://en.wikipedia.org/wiki/USB_On-The-Go

Is this widely used?

> 
> Well, there are rare devices which actually use that feature. 

Well, I can't imagine that I have one that does... Either there are computers
and chargers which connect to the GTA04 in client mode. And I have an
OTG cable to connect e.g. an USB memory stick in host mode.

> But my b_host hacks actually depend on that logic in the kernel.

Ok, that is understandable. You need to connect something in client
mode and then somehow tell (in this case by user-space) that you want
to have host-mode.

> 
> 
>> Well, we never had a really OTG compatible socket, just the OTG mode.
>> 
> Well, the socket on gta04 is a usb-miniab socket, isn't it? So it is
> a usb-otg socket.  

Yes, you are right. We even have the grey color code which is required for OTG.
And the ID pin is connected.

Hm. So we probably should ask that they either keep it in kernel.org or provide
an alternative for what we need (user-space triggered role switch).

As usual they do not remember the gta04 even if it is in arch/arm/boot/dts.

BR,
Nikolaus



More information about the Letux-kernel mailing list