All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Baldyga <r.baldyga@samsung.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: balbi@ti.com, gregkh@linuxfoundation.org,
	myungjoo.ham@samsung.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, m.szyprowski@samsung.com
Subject: Re: [RFC 00/19] dwc3: add USB OTG role switch support
Date: Thu, 19 Mar 2015 09:27:25 +0100	[thread overview]
Message-ID: <550A886D.8080609@samsung.com> (raw)
In-Reply-To: <550A3595.6090009@samsung.com>

Hi Chanwoo,

On 03/19/2015 03:33 AM, Chanwoo Choi wrote:
> Hi Robert,
> 
> Did you test the extcon-odroid-otg driver on Odroid-U3?

Yes, I tested it with Odroid U3, U3+, X2, XU3 and it works well.

Best regards,
Robert

> 
> Thanks,
> Chanwoo Choi
> 
> On 03/18/2015 11:04 PM, Robert Baldyga wrote:
>> Hello,
>>
>> This patchset introduces OTG feature in DWC3 DRD driver. This allows
>> to change dynamically between host and peripheral mode depending on
>> detected USB cable type.
>>
>> DWC3 driver behaviour is changed only in situation when selected operation
>> mode (dr_mode) is "otg", and hardware OTG support is available or extended
>> OTG operations are supplied for given platform.
>>
>> It such conditions are fulfilled, none of modes is enabled by default
>> and dwc3 core Best regards,
>> Robert Baldygais being uninitialized. After USB cable detection relevant
>> mode is selected and dwc3 core is initialized. Cable disconnection causes
>> deinitialization of dwc3 core.
>>
>> File otg.c is inspired by code of DWC3 driver from Hardkernel linux
>> sources [1]. I have never tested it on DWC3 version equipped with hardware
>> OTG support, but I belive that this code have chance to work or at least
>> it's easy to fix. I have tested this on OdroidXU3 board which has USB
>> cable detection mechanism based on two gpio pins. I used extcon driver
>> for those feature, which is also attached to following patchset.
>>
>> I consider if ext_otg_ops it the right solution. Current solution is
>> based on Hardkernel sources, but it's very likely that adding extcon
>> support directly to otg.c would be generic enough, as most of cable
>> detection mechanisms can be simply represented by extcon devices.
>>
>> Thanks in advance for your comments.
>>
>> Best regards,
>> Robert Baldyga
>>
>> [1] https://github.com/hardkernel/linux
>>
>> Robert Baldyga (19):
>>   extcon: add extcon-odroid-usbotg driver
>>   dt-bindings: extcon: Add doc for extcon-odroid-usbotg
>>   ARM: dts: exynos5422-odroidxu3: add odroid-usbotg extcon support
>>   dwc3: gadget: add VBUS session handling
>>   dwc3: gadget: enable/disable ep0 in dwc3_gadget_run_stop()
>>   dwc3: gadget: check returned value in suspend/resume
>>   dwc3: core: cleanup suspend/resume code
>>   dwc3: core: handle event buffers in core_init/exit
>>   dwc3: core: make dwc3_core_init/exit non-static
>>   dwc3: add missing OTG register definitions
>>   dwc3: add OTG handling code
>>   dwc3: otg: add ext_otg_ops support
>>   dwc3: gadget: register gadget in OTG core
>>   dwc3: host: don't add XHCI device only if in OTG mode
>>   dwc3: core: initialize OTG in DWC3 core
>>   dwc3: exynos: add software role switching code
>>   ARM: dts: exynos5420: set usb3_lpm_capable in dwc3 controllers
>>   ARM: dts: exynos5420: add snps,dis_u3_susphy_quirk to dwc3 controllers
>>   ARM: dts: exynos5422-odroidxu3: make usbdrd3 extcon client
>>
>>  .../bindings/extcon/extcon-odroid-usbotg.txt       |  16 +
>>  .../devicetree/bindings/usb/exynos-usb.txt         |   4 +
>>  arch/arm/boot/dts/exynos5420.dtsi                  |   6 +
>>  arch/arm/boot/dts/exynos5422-odroidxu3.dts         |  24 +
>>  drivers/extcon/Kconfig                             |   4 +
>>  drivers/extcon/Makefile                            |   1 +
>>  drivers/extcon/extcon-odroid-usbotg.c              | 257 +++++++++
>>  drivers/usb/dwc3/Kconfig                           |   1 +
>>  drivers/usb/dwc3/Makefile                          |   4 +
>>  drivers/usb/dwc3/core.c                            |  66 ++-
>>  drivers/usb/dwc3/core.h                            |  22 +
>>  drivers/usb/dwc3/dwc3-exynos.c                     | 162 ++++++
>>  drivers/usb/dwc3/gadget.c                          | 106 ++--
>>  drivers/usb/dwc3/host.c                            |  10 +-
>>  drivers/usb/dwc3/otg.c                             | 577 +++++++++++++++++++++
>>  drivers/usb/dwc3/otg.h                             | 113 ++++
>>  16 files changed, 1320 insertions(+), 53 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/extcon/extcon-odroid-usbotg.txt
>>  create mode 100644 drivers/extcon/extcon-odroid-usbotg.c
>>  create mode 100644 drivers/usb/dwc3/otg.c
>>  create mode 100644 drivers/usb/dwc3/otg.h
>>
> 
> 


      reply	other threads:[~2015-03-19  8:27 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 14:04 [RFC 00/19] dwc3: add USB OTG role switch support Robert Baldyga
2015-03-18 14:04 ` [RFC 01/19] extcon: add extcon-odroid-usbotg driver Robert Baldyga
2015-03-19  8:50   ` George Cherian
2015-03-19 12:07     ` Robert Baldyga
2015-03-19 12:19       ` George Cherian
2015-03-19 14:45         ` Roger Quadros
2015-03-19 20:50           ` Chanwoo Choi
2015-03-20  7:25             ` Robert Baldyga
2015-03-20  7:45               ` Chanwoo Choi
2015-03-20  8:51                 ` Roger Quadros
2015-03-18 14:04 ` [RFC 02/19] dt-bindings: extcon: Add doc for extcon-odroid-usbotg Robert Baldyga
2015-03-18 14:04 ` [RFC 03/19] ARM: dts: exynos5422-odroidxu3: add odroid-usbotg extcon support Robert Baldyga
2015-03-18 14:04 ` [RFC 04/19] dwc3: gadget: add VBUS session handling Robert Baldyga
2015-03-18 14:04 ` [RFC 05/19] dwc3: gadget: enable/disable ep0 in dwc3_gadget_run_stop() Robert Baldyga
2015-03-18 14:04 ` [RFC 06/19] dwc3: gadget: check returned value in suspend/resume Robert Baldyga
2015-03-18 14:04 ` [RFC 07/19] dwc3: core: cleanup suspend/resume code Robert Baldyga
2015-03-18 15:00   ` Sergei Shtylyov
2015-03-18 14:04 ` [RFC 08/19] dwc3: core: handle event buffers in core_init/exit Robert Baldyga
2015-03-18 14:04 ` [RFC 09/19] dwc3: core: make dwc3_core_init/exit non-static Robert Baldyga
2015-03-18 14:04 ` [RFC 10/19] dwc3: add missing OTG register definitions Robert Baldyga
2015-03-18 14:04 ` [RFC 11/19] dwc3: add OTG handling code Robert Baldyga
2015-03-19  7:38   ` George Cherian
2015-03-18 14:04 ` [RFC 12/19] dwc3: otg: add ext_otg_ops support Robert Baldyga
2015-03-18 14:04 ` [RFC 13/19] dwc3: gadget: register gadget in OTG core Robert Baldyga
2015-03-18 14:04 ` [RFC 14/19] dwc3: host: don't add XHCI device only if in OTG mode Robert Baldyga
2015-03-18 14:04 ` [RFC 15/19] dwc3: core: initialize OTG in DWC3 core Robert Baldyga
2015-03-18 14:04 ` [RFC 16/19] dwc3: exynos: add software role switching code Robert Baldyga
2015-03-18 14:04 ` [RFC 17/19] ARM: dts: exynos5420: set usb3_lpm_capable in dwc3 controllers Robert Baldyga
2015-03-18 14:04 ` [RFC 18/19] ARM: dts: exynos5420: add snps,dis_u3_susphy_quirk to " Robert Baldyga
2015-03-18 14:04 ` [RFC 19/19] ARM: dts: exynos5422-odroidxu3: make usbdrd3 extcon client Robert Baldyga
2015-03-19  2:33 ` [RFC 00/19] dwc3: add USB OTG role switch support Chanwoo Choi
2015-03-19  8:27   ` Robert Baldyga [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=550A886D.8080609@samsung.com \
    --to=r.baldyga@samsung.com \
    --cc=balbi@ti.com \
    --cc=cw00.choi@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=myungjoo.ham@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.