lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 22 Jan 2015 16:57:56 +0200
From:	Roger Quadros <rogerq@...com>
To:	<balbi@...com>
CC:	<tony@...mide.com>, <myungjoo.ham@...sung.com>,
	<cw00.choi@...sung.com>, <george.cherian@...com>, <nsekhar@...com>,
	<devicetree@...r.kernel.org>, <linux-usb@...r.kernel.org>,
	<linux-omap@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/5] extcon: usb: Introduce USB GPIO extcon driver. Fix
 DRA7 USB.


On 22/01/15 15:32, Roger Quadros wrote:
> Felipe,
> 
> On 20/01/15 21:02, Felipe Balbi wrote:
>> On Mon, Jan 19, 2015 at 07:52:17PM +0200, Roger Quadros wrote:
>>> Hi,
>>>
>>> On DRA7 EVMs the USB ID pin is connected to a GPIO line. The USB drivers
>>> (dwc3 + dwc3-omap) depend on extcon framework to get the USB cable state
>>> (USB or USB-Host) to put the controller in the right mode.
>>>
>>> There were earlier attempts [1] to get this working by trying to patch up
>>> the existing GPIO extcon driver.
>>>
>>> This series attemts to take a different approach by introducing a new
>>> USB specific extcon driver to handle the USB ID GPIO pin and
>>> interpret a right USB cable state.
>>>
>>> The reasoning to introduce this new driver is:
>>> 1) The existing GPIO extcon driver doesn't understand USB cable states
>>> and it can't handle more than one cable per instance.
>>>    
>>> For the USB case we need to handle at least 2 cable states.
>>>     a) USB (attach/detach)
>>>     b) USB-Host (attach/detach)
>>> and could possible include more states like
>>>     c) Fast-charger (attach/detach)
>>>     d) Slow-charger (attach/detach)
>>>     
>>> 2) This USB specific driver can be easily updated in the future to
>>> handle VBUS events, or charger detect events, in case it happens
>>> to be available on GPIO for any platform.
>>>
>>> 3) The DT implementation is very easy. You just need one extcon node per USB
>>> instead of one extcon node per cable state as in case of [1].
>>>
>>> 4) The cable state string doesn't need to be encoded in the device tree
>>> as in case of [1].
>>>
>>> 5) With only ID event available, you can simulate a USB-peripheral attach
>>> when USB-Host is detacted instead of hacking the USB driver to do the same.
>>>
>>> Tested on DRA7-evm and DRA72-evm.
>>
>> while at that, you might want to patch X15 too.
>>
> USB2 port is meant for peripheral use only. ID pin from USB port is not connected to GPIO.
> 

OK answering myself here :).
Peripheral mode doesn't work on x15-bb as the USB driver (dwc3-omap)
doesn't set the mailbox correctly even when dwc3 node is set as otg = "peripheral".

Looks like we need to implement usb-gpio-extcon for x15 even though ID is hard coded.

cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ