Re: [PATCH v4 04/13] otg-fsm: move usb_bus_start_enum into otg-fsm->ops

2015-09-07 Thread Roger Quadros
On 07/09/15 04:24, Peter Chen wrote: > On Mon, Aug 24, 2015 at 04:21:15PM +0300, Roger Quadros wrote: >> This is to prevent missing symbol build error if OTG is >> enabled (built-in) and HCD core (CONFIG_USB) is module. >> >> Signed-off-by: Roger Quadros <rog...@t

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-07 Thread Roger Quadros
On 07/09/15 04:23, Peter Chen wrote: > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: >> + * This is used by the USB Host stack to register the Host controller >> + * to the OTG core. Host controller must not be started by the >> + * caller as it is left upto

Re: [PATCH v4 4/9] usb: dwc3: core: Adapt to named interrupts

2015-09-04 Thread Roger Quadros
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi, On 03/09/15 18:48, Felipe Balbi wrote: > Hi, > > On Thu, Sep 03, 2015 at 03:46:43PM +0300, Roger Quadros wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA256 >> >> On 02/09/15 17:34, Felipe Balbi wrot

Re: [PATCH v4 1/9] usb: dwc3: add dual-role support

2015-09-04 Thread Roger Quadros
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Felipe, On 03/09/15 18:44, Felipe Balbi wrote: > Hi, > > On Thu, Sep 03, 2015 at 03:21:48PM +0300, Roger Quadros wrote: >>>> + dwc->fsm->id = id; >>>> + dwc->fsm->b_sess_vld

Re: [PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq

2015-09-04 Thread Roger Quadros
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 03/09/15 18:51, Felipe Balbi wrote: > Hi, > > On Thu, Sep 03, 2015 at 04:52:02PM +0300, Roger Quadros wrote: >>>>if (on) { >>>> - dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_HOST); >>>> +

Re: [PATCH v4 8/9] usb: dwc3: core: Prevent otg events from disabling themselves

2015-09-03 Thread Roger Quadros
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 02/09/15 17:47, Felipe Balbi wrote: > On Wed, Sep 02, 2015 at 05:24:23PM +0300, Roger Quadros wrote: >> There is a race happening during dwc3_drd_init() that causes >> otg events to get disabled. This is what happens. >> >

Re: [PATCH v4 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role

2015-09-03 Thread Roger Quadros
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 02/09/15 17:48, Felipe Balbi wrote: > On Wed, Sep 02, 2015 at 05:24:24PM +0300, Roger Quadros wrote: >> We can't rely just on dr_mode to decide if we're in host or gadget >> mode when we're configured as otg/dual-role. So while dr

Re: [PATCH v4 6/9] usb: dwc3: save/restore OTG registers during suspend/resume

2015-09-03 Thread Roger Quadros
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 02/09/15 17:44, Felipe Balbi wrote: > On Wed, Sep 02, 2015 at 05:24:21PM +0300, Roger Quadros wrote: >> Without this we loose OTG controller register context and malfunction >> after a system suspend-resume. >> >> S

Re: [PATCH v4 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role

2015-09-03 Thread Roger Quadros
On 03/09/15 17:05, Sergei Shtylyov wrote: > Hello. > > On 09/03/2015 05:01 PM, Roger Quadros wrote: > >>>> We can't rely just on dr_mode to decide if we're in host or gadget >>>> mode when we're configured as otg/dual-role. So while dr_mode is >>>&

Re: [PATCH v4 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role

2015-09-03 Thread Roger Quadros
On 02/09/15 20:22, Sergei Shtylyov wrote: > Hello. > > On 09/02/2015 05:24 PM, Roger Quadros wrote: > >> We can't rely just on dr_mode to decide if we're in host or gadget >> mode when we're configured as otg/dual-role. So while dr_mode is >> OTG, we find out from

Re: [PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq

2015-09-03 Thread Roger Quadros
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 02/09/15 17:43, Felipe Balbi wrote: > Hi, > > On Wed, Sep 02, 2015 at 05:24:20PM +0300, Roger Quadros wrote: >> If the ID pin event is not available over extcon >> then we rely on the OTG controller to provide us ID an

Re: [PATCH v4 1/9] usb: dwc3: add dual-role support

2015-09-03 Thread Roger Quadros
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 02/09/15 17:31, Felipe Balbi wrote: > Hi, > > On Wed, Sep 02, 2015 at 05:24:16PM +0300, Roger Quadros wrote: >> Register with the USB OTG core. Since we don't support >> OTG yet we just work as a dual-role device even >&g

Re: [PATCH v4 4/9] usb: dwc3: core: Adapt to named interrupts

2015-09-03 Thread Roger Quadros
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 02/09/15 17:34, Felipe Balbi wrote: > On Wed, Sep 02, 2015 at 05:24:19PM +0300, Roger Quadros wrote: >> From: Felipe Balbi <ba...@ti.com> >> >> Add support to use interrupt names, >> >> Following are the int

[PATCH v4 6/9] usb: dwc3: save/restore OTG registers during suspend/resume

2015-09-02 Thread Roger Quadros
Without this we loose OTG controller register context and malfunction after a system suspend-resume. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.c | 17 + drivers/usb/dwc3/core.h | 6 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff

[PATCH v4 8/9] usb: dwc3: core: Prevent otg events from disabling themselves

2015-09-02 Thread Roger Quadros
in dwc3_otg_init() but dwc3_otg_irq() has already saved OEVTEN as 0 into dwc->oevten. So finally when dwc3_irq_thread_irq() is called we save 0 into OEVTEN thus disabling OTG irqs forever. We fix this by disabling IRQs when configuring OEVTEN in dwc3_otg_init(). Signed-off-by: Roger Quadros <rog...@

[PATCH v4 7/9] usb: dwc3: gadget: Fix suspend/resume during dual-role mode

2015-09-02 Thread Roger Quadros
Gdget controller might not be always active during suspend/ resume when we are operating in dual-role/otg mode. Check if we're active and only if we are then perform necessary actions during suspend/resume. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/gadget.c | 6 +++

[PATCH v4 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role

2015-09-02 Thread Roger Quadros
irq and events during system suspend so that we don't lockup the system during system suspend/resume. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/drivers/usb/dwc3/co

[PATCH v4 3/9] usb: dwc3: dwc3-omap: Make the wrapper interrupt shared

2015-09-02 Thread Roger Quadros
The wrapper interrupt is shared with OTG core so mark it IRQF_SHARED. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/dwc3-omap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index a

[PATCH v4 0/9] usb: dwc3: add dual-role support

2015-09-02 Thread Roger Quadros
- http://thread.gmane.org/gmane.linux.kernel/2025239 [2] platform support - http://thread.gmane.org/gmane.linux.usb.general/127898 cheers, -roger Felipe Balbi (1): usb: dwc3: core: Adapt to named interrupts Roger Quadros (8): usb: dwc3: add dual-role support usb: dwc3: core.h: add some register

[PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq

2015-09-02 Thread Roger Quadros
If the ID pin event is not available over extcon then we rely on the OTG controller to provide us ID and VBUS information. We still don't support any OTG features but just dual-role operation. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.c

[PATCH v4 4/9] usb: dwc3: core: Adapt to named interrupts

2015-09-02 Thread Roger Quadros
older DTBs. - Use gadget_irq in gadget driver. Signed-off-by: Felipe Balbi <ba...@ti.com> Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.c | 12 drivers/usb/dwc3/core.h | 7 +++ drivers/usb/dwc3/gadget.c | 2 +- 3 files changed, 2

[PATCH v4 1/9] usb: dwc3: add dual-role support

2015-09-02 Thread Roger Quadros
Register with the USB OTG core. Since we don't support OTG yet we just work as a dual-role device even if device tree says "otg". Use extcon framework to get VBUS/ID cable events and kick the OTG state machine. Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers

[PATCH v4 2/9] usb: dwc3: core.h: add some register definitions

2015-09-02 Thread Roger Quadros
Add OTG and GHWPARAMS6 register definitions Signed-off-by: Roger Quadros <rog...@ti.com> --- drivers/usb/dwc3/core.h | 82 + 1 file changed, 82 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 5ca2b25..4

[PATCH v4 13/13] usb: otg: Add dual-role device (DRD) support

2015-08-24 Thread Roger Quadros
and doesn't change till the cable in unplugged and a different cable type is inserted. As we don't need most of the complex OTG states and OTG timers we implement a lean DRD state machine in usb-otg.c. The DRD state machine is only interested in 2 hardware inputs 'id' and 'b_sess_vld'. Signed-off-by: Roger

[PATCH v4 11/13] usb: core: hub: Notify OTG fsm when A device sets b_hnp_enable

2015-08-24 Thread Roger Quadros
-by: Roger Quadros rog...@ti.com --- drivers/usb/core/hub.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 431839b..3993168 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2271,6 +2271,9 @@ static int

[PATCH v4 04/13] otg-fsm: move usb_bus_start_enum into otg-fsm-ops

2015-08-24 Thread Roger Quadros
This is to prevent missing symbol build error if OTG is enabled (built-in) and HCD core (CONFIG_USB) is module. Signed-off-by: Roger Quadros rog...@ti.com Acked-by: Peter Chen peter.c...@freescale.com --- drivers/usb/common/usb-otg-fsm.c | 6 -- drivers/usb/phy/phy-fsl-usb.c| 2

[PATCH v4 02/13] usb: otg-fsm: support multiple instances

2015-08-24 Thread Roger Quadros
Move the state_changed variable into struct otg_fsm so that we can support multiple instances. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/common/usb-otg-fsm.c | 10 -- include/linux/usb/otg-fsm.h | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git

[PATCH v4 03/13] usb: otg-fsm: Prevent build warning VDBG redefined

2015-08-24 Thread Roger Quadros
, from drivers/usb/dwc3/ep0.c:33: include/linux/usb/otg-fsm.h:30:1: warning: VDBG redefined In file included from drivers/usb/dwc3/ep0.c:31: include/linux/usb/composite.h:615:1: warning: this is the location of the previous definition Signed-off-by: Roger

[PATCH v4 05/13] usb: hcd.h: Add OTG to HCD interface

2015-08-24 Thread Roger Quadros
The OTG core will use struct otg_hcd_ops to add/remove the HCD controller. The main purpose of this interface is to avoid directly calling usb_add/remove_hcd() from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB is m. Signed-off-by: Roger Quadros rog

[PATCH v4 00/13] USB: OTG/DRD Core functionality

2015-08-24 Thread Roger Quadros
driver that called usb_otg_register(). -- cheers, -roger Roger Quadros (13): usb: otg-fsm: Add documentation for struct otg_fsm usb: otg-fsm: support multiple instances usb: otg-fsm: Prevent build warning VDBG redefined otg-fsm: move usb_bus_start_enum into otg-fsm-ops usb: hcd.h: Add

[PATCH v4 01/13] usb: otg-fsm: Add documentation for struct otg_fsm

2015-08-24 Thread Roger Quadros
struct otg_fsm is the interface to the OTG state machine. Document the input, output and internal state variables. Definations are taken from Table 7-2 and Table 7-4 of the USB OTG EH Specification Rev.2.0 Re-arrange some of the members as per use case for more clarity. Signed-off-by: Roger

[PATCH v4 10/13] usb: hcd: Adapt to OTG core

2015-08-24 Thread Roger Quadros
The existing usb_add/remove_hcd() functionality remains unchanged for non-OTG devices. For OTG devices they only register the HCD with the OTG core. Introduce usb_otg_add/remove_hcd() for use by OTG core. These functions actually add/remove the HCD. Signed-off-by: Roger Quadros rog...@ti.com

[PATCH v4 08/13] usb: doc: dt-binding: Add otg-controller property

2015-08-24 Thread Roger Quadros
The otg-controller property is used to link the host/gadget controllers to the otg controller. otg-controller property must contain the phandle of the otg controller. The otg core uses this property to tie the host/gadget controllres to the correct otg controller. Signed-off-by: Roger Quadros

[PATCH v4 12/13] usb: gadget: udc: adapt to OTG core

2015-08-24 Thread Roger Quadros
usb_otg_register_gadget() in udc_bind_to_driver() and usb_gadget_remove_driver() else it will cause a circular locking dependency. Ignore softconnect sysfs control when we're in OTG mode as OTG FSM takes care of gadget softconnect using the b_bus_req mechanism. Signed-off-by: Roger Quadros rog...@ti.com

[PATCH v4 09/13] usb: chipidea: move from CONFIG_USB_OTG_FSM to CONFIG_USB_OTG

2015-08-24 Thread Roger Quadros
CONFIG_USB_OTG_FSM no longer exists and the OTG FSM is available if CONFIG_USB_OTG is defined so move to using CONFIG_USB_OTG. Signed-off-by: Roger Quadros rog...@ti.com --- Documentation/usb/chipidea.txt | 2 +- drivers/usb/chipidea/Makefile | 2 +- drivers/usb/chipidea/ci.h | 2

[PATCH v4 06/13] usb: gadget.h: Add OTG to gadget interface

2015-08-24 Thread Roger Quadros
The OTG core will use struct otg_gadget_ops to start/stop the gadget controller. The main purpose of this interface is to avoid directly calling usb_gadget_start/stop() from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB_GADGET is m. Signed-off-by: Roger

[PATCH v4 07/13] usb: otg: add OTG core

2015-08-24 Thread Roger Quadros
- Providing inputs to and kicking the OTG state machine Signed-off-by: Roger Quadros rog...@ti.com --- MAINTAINERS |4 +- drivers/usb/Kconfig |2 +- drivers/usb/Makefile |1 + drivers/usb/common/Makefile |3 +- drivers/usb/common/usb-otg.c | 1061

Re: [PATCH 0/5] usb: xhci: Fix breakage on dual-role case

2015-08-20 Thread Roger Quadros
Hi Mathias, On 18/08/15 13:39, Roger Quadros wrote: Hi, Plugging and unplugging a USB-OTG adapter with a USB device into a am437x-gp-evm dual-role port (USB1) causes XHCI to malfunction and USB device to be no longer detected after a few iterations. The triggering case is so 1) USB1

Re: [PATCH 4/5] usb: xhci: stop everything on the first call to xhci_stop

2015-08-20 Thread Roger Quadros
On 18/08/15 15:14, Mathias Nyman wrote: On 18.08.2015 13:39, Roger Quadros wrote: xhci_stop will be called twice, once for the shared hcd and again for the primary hcd. We stop the XHCI controller in any case so clean up everything on the first call else we can timeout waiting for pending

[PATCH 5/5] usb: xhci: exit early in xhci_setup_device() if we're halted or dying

2015-08-18 Thread Roger Quadros
] Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/host/xhci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 9a7f12c..accfb14 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -3783,6 +3783,9

[PATCH 3/5] usb: xhci: Clear XHCI_STATE_DYING on start

2015-08-18 Thread Roger Quadros
For whatever reason if XHCI died in the previous instant then it will never recover on the next xhci_start unless we clear the DYING flag. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/host/xhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host

[PATCH 4/5] usb: xhci: stop everything on the first call to xhci_stop

2015-08-18 Thread Roger Quadros
xhci_stop will be called twice, once for the shared hcd and again for the primary hcd. We stop the XHCI controller in any case so clean up everything on the first call else we can timeout waiting for pending requests to complete. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/host

[PATCH 0/5] usb: xhci: Fix breakage on dual-role case

2015-08-18 Thread Roger Quadros
for both Shared and Primary HCDs. This can happen asynchronously and we have to be prepared for it. -- cheers, -roger Roger Quadros (5): usb: xhci: lock mutex on xhci_stop usb: hcd: Initialize hcd-flags to 0 usb: xhci: Clear XHCI_STATE_DYING on start usb: xhci: stop everything

[PATCH 2/5] usb: hcd: Initialize hcd-flags to 0

2015-08-18 Thread Roger Quadros
[ 91.759190] [c005cb64] (kthread) from [c000fc08] (ret_from_fork+0x14/0x2c) [ 91.759206] r7: r6: r5:c005cb64 r4:ee429940 [ 91.759209] handlers: [ 91.759255] [bf211b5c] usb_hcd_irq [usbcore] [ 91.759260] Disabling IRQ #254 Signed-off-by: Roger Quadros rog...@ti.com

[PATCH 1/5] usb: xhci: lock mutex on xhci_stop

2015-08-18 Thread Roger Quadros
Else it races with xhci_setup_device Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/host/xhci.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 526ebc0..f998ddf 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host

Re: [PATCH v3 07/11] usb: otg: add OTG core

2015-08-14 Thread Roger Quadros
Hi Peter, On 13/07/15 13:20, Roger Quadros wrote: On 13/07/15 05:14, Peter Chen wrote: On Wed, Jul 08, 2015 at 01:19:33PM +0300, Roger Quadros wrote: The OTG core instantiates the OTG Finite State Machine per OTG controller and manages starting/stopping the host and gadget controllers based

[PATCH] usb: phy: phy-generic: Fix reset behaviour on legacy boot

2015-08-13 Thread Roger Quadros
: generic: migrate to gpio_desc) Cc: sta...@vger.kernel.org # 4.0+ Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/phy/phy-generic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c index deee68e..0cd85f2 100644

Re: [PATCH 6/7] phy: omap-usb2: Add a new compatible string for USB2 PHY2

2015-08-07 Thread Roger Quadros
On 05/08/15 17:18, Kishon Vijay Abraham I wrote: Hi Roger, On Wednesday 05 August 2015 01:55 PM, Roger Quadros wrote: On 05/08/15 11:23, Roger Quadros wrote: On 04/08/15 18:20, Kishon Vijay Abraham I wrote: The USB2 PHY2 has a different register map compared to USB2 PHY1 to power on/off

Re: [PATCH 02/10] ARM: dts: dra7: Use syscon-phy-power instead of ctrl-module in SATA PHY node

2015-08-05 Thread Roger Quadros
On 04/08/15 18:30, Kishon Vijay Abraham I wrote: Add syscon-phy-power property and remove the deprecated ctrl-module property from SATA PHY node. Since omap_control_sata note is no longer used, remove it. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Acked-by: Roger Quadros rog

Re: [PATCH 01/10] ARM: dts: dra7: Add dt node for PCIe registers in sysctrl space

2015-08-05 Thread Roger Quadros
On 04/08/15 18:30, Kishon Vijay Abraham I wrote: Add new device tree node for the control module register space where PCIe registers are present. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Acked-by: Roger Quadros rog...@ti.com cheers, -roger --- arch/arm/boot/dts/dra7.dtsi

Re: [PATCH 05/10] ARM: dts: dra7: Use syscon-phy-power instead of ctrl-module in USB PHY node

2015-08-05 Thread Roger Quadros
Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Acked-by: Roger Quadros rog...@ti.com cheers, -roger --- arch/arm/boot/dts/dra7.dtsi | 24 +++- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7

Re: [PATCH 06/10] ARM: dts: am4372: Use syscon-phy-power instead of ctrl-module in USB PHY node

2015-08-05 Thread Roger Quadros
Vijay Abraham I kis...@ti.com Acked-by: Roger Quadros rog...@ti.com cheers, -roger --- arch/arm/boot/dts/am4372.dtsi | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi index ade28c79..24fa073

Re: [PATCH 07/10] ARM: dts: OMAP5: Use syscon-phy-power instead of ctrl-module in USB PHY node

2015-08-05 Thread Roger Quadros
Abraham I kis...@ti.com Acked-by: Roger Quadros rog...@ti.com cheers, -roger --- arch/arm/boot/dts/omap5.dtsi | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index c8fd648..f0b6cd6 100644

Re: [PATCH 08/10] ARM: dts: OMAP5: Use syscon-phy-power instead of ctrl-module in SATA PHY node

2015-08-05 Thread Roger Quadros
On 04/08/15 18:30, Kishon Vijay Abraham I wrote: Add syscon-phy-power property and remove the deprecated ctrl-module property from SATA PHY node. Since omap_control_sata devicetree node is no longer used, remove it. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Acked-by: Roger

Re: [PATCH 09/10] ARM: dts: omap4: Use syscon-phy-power instead of ctrl-module in USB PHY node

2015-08-05 Thread Roger Quadros
On 04/08/15 18:30, Kishon Vijay Abraham I wrote: Add syscon-phy-power property and remove the deprecated ctrl-module property from USB PHY dt node. Since omap_control_usb2phy devicetree node is no longer used, remove it. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Acked-by: Roger

Re: [PATCH 10/10] ARM: dts: omap4: Use syscon-otghs instead of ctrl-module in USB node

2015-08-05 Thread Roger Quadros
= omap_control_usbotg; + syscon-otghs = scm_conf 0x33c; All other properties were of the format syscon-phy-foo. Why use a different format here? Other than that Acked-by: Roger Quadros rog...@ti.com cheers, -roger }; aes: aes@4b501000

Re: [PATCH 10/10] ARM: dts: omap4: Use syscon-otghs instead of ctrl-module in USB node

2015-08-05 Thread Roger Quadros
On 05/08/15 11:02, Roger Quadros wrote: Kishon, On 04/08/15 18:30, Kishon Vijay Abraham I wrote: Add syscon-otghs property and remove the deprecated ctrl-module property from MUSB devicetree node. Since omap_control_usbotg devicetree node is no longer used, remove it. Signed-off

Re: [PATCH 6/7] phy: omap-usb2: Add a new compatible string for USB2 PHY2

2015-08-05 Thread Roger Quadros
On 04/08/15 18:20, Kishon Vijay Abraham I wrote: The USB2 PHY2 has a different register map compared to USB2 PHY1 to power on/off the PHY. In order to handle it, add a new compatible string. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com ---

Re: [PATCH 6/7] phy: omap-usb2: Add a new compatible string for USB2 PHY2

2015-08-05 Thread Roger Quadros
On 05/08/15 11:23, Roger Quadros wrote: On 04/08/15 18:20, Kishon Vijay Abraham I wrote: The USB2 PHY2 has a different register map compared to USB2 PHY1 to power on/off the PHY. In order to handle it, add a new compatible string. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com

Re: [PATCH 7/7] phy: omap-usb2: use *syscon* framework API to power on/off the PHY

2015-08-05 Thread Roger Quadros
On 04/08/15 18:20, Kishon Vijay Abraham I wrote: Deprecate using phy-omap-control driver to power on/off the PHY, and use *syscon* framework to do the same. This handles powering on/off the PHY for the USB2 PHYs used in various TI SoCs. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com

Re: [PATCH v3 07/11] usb: otg: add OTG core

2015-07-27 Thread Roger Quadros
Hi, On 21/07/15 13:52, Li Jun wrote: Hi, [...] + otg_timer_init(A_WAIT_ENUM, otgd, set_tmout, TB_SRP_FAIL, NULL); 2 timers are missing: B_DATA_PLS, B_SSEND_SRP. Those 2 are not used by usb-otg-fsm.c. We can add it when usb-otg-fsm.c is updated. ok. +} [...] + +/** +

Re: [PATCH v2 1/2] extcon: fix hang and extcon_get/set_cable_state().

2015-07-27 Thread Roger Quadros
'enum extcon' type) Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Signed-off-by: Roger Quadros rog...@ti.com --- drivers/extcon/extcon.c | 38 +- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/drivers/extcon/extcon.c b/drivers/extcon

Re: [PATCH v3 0/5] ARM: dts: OMAP2+: Enable USB dual-role on supported boards

2015-07-27 Thread Roger Quadros
Tony, On 21/07/15 13:54, Tony Lindgren wrote: * Roger Quadros rog...@ti.com [150708 03:45]: Hi, Enables dual-role feaure on supported boards. Depends on [1] - core USB DRD support - http://thread.gmane.org/gmane.linux.kernel/1991413 [2] - dwc3 DRD support - http://thread.gmane.org

Re: [PATCH v3 10/11] usb: otg: Add dual-role device (DRD) support

2015-07-27 Thread Roger Quadros
On 20/07/15 04:23, Peter Chen wrote: On Fri, Jul 17, 2015 at 01:47:12PM +0300, Roger Quadros wrote: + * DRD mode hardware Inputs + * + * @id: TRUE for B-device, FALSE for A-device. + * @vbus: VBUS voltage in regulation. + * * OTG hardware Inputs * *Common inputs

Re: [PATCH v3 07/11] usb: otg: add OTG core

2015-07-17 Thread Roger Quadros
Hi Li, On 17/07/15 10:48, Li Jun wrote: Hi, Roger On Wed, Jul 08, 2015 at 01:19:33PM +0300, Roger Quadros wrote: The OTG core instantiates the OTG Finite State Machine per OTG controller and manages starting/stopping the host and gadget controllers based on the bus state. It provides

Re: [PATCH v3 00/11] USB: OTG/DRD Core functionality

2015-07-17 Thread Roger Quadros
On 16/07/15 21:29, Andrew Bresticker wrote: Hi Roger, On Wed, Jul 15, 2015 at 6:26 AM, Roger Quadros rog...@ti.com wrote: Hi Andrew, On 13/07/15 22:14, Andrew Bresticker wrote: Hi Roger, On Wed, Jul 8, 2015 at 3:19 AM, Roger Quadros rog...@ti.com wrote: Usage model

Re: [PATCH v3 10/11] usb: otg: Add dual-role device (DRD) support

2015-07-17 Thread Roger Quadros
On 17/07/15 12:02, Li Jun wrote: On Wed, Jul 08, 2015 at 01:19:36PM +0300, Roger Quadros wrote: [...] struct otg_fsm *usb_otg_register(struct device *parent_dev, - struct otg_fsm_ops *fsm_ops) + struct otg_fsm_ops *fsm_ops

Re: [PATCH v3 02/11] usb: otg-fsm: support multiple instances

2015-07-17 Thread Roger Quadros
On 13/07/15 04:39, Peter Chen wrote: On Fri, Jul 10, 2015 at 04:06:43PM +0800, Li Jun wrote: On Wed, Jul 08, 2015 at 01:19:28PM +0300, Roger Quadros wrote: Move the state_changed variable into struct otg_fsm so that we can support multiple instances. I am not sure if multiple instances may

Re: [PATCH v3 10/11] usb: otg: Add dual-role device (DRD) support

2015-07-17 Thread Roger Quadros
On 17/07/15 11:14, Li Jun wrote: Hi, On Wed, Jul 08, 2015 at 01:19:36PM +0300, Roger Quadros wrote: DRD mode is a reduced functionality OTG mode. In this mode we don't support SRP, HNP and dynamic role-swap. In DRD operation, the controller mode (Host or Peripheral) is decided based

Re: [PATCH 1/1] usb: gadget: composite: fix configuration NULL pointer dereference problem

2015-07-16 Thread Roger Quadros
[ 44.262092] ---[ end Kernel panic - not syncing: Fatal exception in interrupt Cc: sta...@vger.kernel.org #v3.14+ Cc: Jun Li jun...@freescale.com Cc: Roger Quadros rog...@ti.com Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/gadget/composite.c | 2 ++ 1 file changed, 2

Re: [PATCH v3 04/11] otg-fsm: move usb_bus_start_enum into otg-fsm-ops

2015-07-16 Thread Roger Quadros
On 16/07/15 03:54, Peter Chen wrote: On Wed, Jul 15, 2015 at 04:30:27PM +0300, Roger Quadros wrote: On 14/07/15 03:34, Peter Chen wrote: On Mon, Jul 13, 2015 at 01:13:54PM +0300, Roger Quadros wrote: Peter, On 13/07/15 04:58, Peter Chen wrote: On Wed, Jul 08, 2015 at 01:19:30PM +0300, Roger

Re: [PATCH 1/1] usb: gadget: composite: fix configuration NULL pointer dereference problem

2015-07-16 Thread Roger Quadros
On 16/07/15 13:31, Roger Quadros wrote: Peter, On 16/07/15 11:04, Peter Chen wrote: At some unexpected cases, the host may send the non-core control request before the configruation has been established, so the cdev-config is still NULL, then below NULL pointer dereference issue problem

Re: [PATCH v3 00/11] USB: OTG/DRD Core functionality

2015-07-15 Thread Roger Quadros
On 13/07/15 16:04, Li Jun wrote: On Mon, Jul 13, 2015 at 01:24:05PM +0300, Roger Quadros wrote: Hi, On 10/07/15 10:58, Li Jun wrote: On Wed, Jul 08, 2015 at 01:19:26PM +0300, Roger Quadros wrote: Hi, This series centralizes OTG/Dual-role functionality in the kernel. As of now I've got

Re: [PATCH v3 00/11] USB: OTG/DRD Core functionality

2015-07-15 Thread Roger Quadros
Hi Andrew, On 13/07/15 22:14, Andrew Bresticker wrote: Hi Roger, On Wed, Jul 8, 2015 at 3:19 AM, Roger Quadros rog...@ti.com wrote: Usage model: --- - The OTG controller device is assumed to be the parent of the host and gadget controller. It must call usb_otg_register() before

Re: [PATCH v3 04/11] otg-fsm: move usb_bus_start_enum into otg-fsm-ops

2015-07-15 Thread Roger Quadros
On 14/07/15 03:34, Peter Chen wrote: On Mon, Jul 13, 2015 at 01:13:54PM +0300, Roger Quadros wrote: Peter, On 13/07/15 04:58, Peter Chen wrote: On Wed, Jul 08, 2015 at 01:19:30PM +0300, Roger Quadros wrote: This is to prevent missing symbol build error if OTG is enabled (built-in) and HCD

Re: [PATCH v3 04/11] otg-fsm: move usb_bus_start_enum into otg-fsm-ops

2015-07-13 Thread Roger Quadros
Peter, On 13/07/15 04:58, Peter Chen wrote: On Wed, Jul 08, 2015 at 01:19:30PM +0300, Roger Quadros wrote: This is to prevent missing symbol build error if OTG is enabled (built-in) and HCD core (CONFIG_USB) is module. We may let the OTG-DRD/OTG-FSM depends on CONFIG_USB to fix

Re: [PATCH v3 00/11] USB: OTG/DRD Core functionality

2015-07-13 Thread Roger Quadros
Hi, On 10/07/15 10:58, Li Jun wrote: On Wed, Jul 08, 2015 at 01:19:26PM +0300, Roger Quadros wrote: Hi, This series centralizes OTG/Dual-role functionality in the kernel. As of now I've got Dual-role functionality working pretty reliably on dra7-evm and am437x-gp-evm. xhci side of things

Re: [PATCH v3 01/11] usb: otg-fsm: Add documentation for struct otg_fsm

2015-07-13 Thread Roger Quadros
On 13/07/15 04:21, Peter Chen wrote: On Wed, Jul 08, 2015 at 01:19:27PM +0300, Roger Quadros wrote: struct otg_fsm is the interface to the OTG state machine. Document the input, output and internal state variables. Definations are taken from Table 7-2 and Table 7-4 of the USB OTG EH

Re: [PATCH v3 07/11] usb: otg: add OTG core

2015-07-13 Thread Roger Quadros
On 13/07/15 05:14, Peter Chen wrote: On Wed, Jul 08, 2015 at 01:19:33PM +0300, Roger Quadros wrote: The OTG core instantiates the OTG Finite State Machine per OTG controller and manages starting/stopping the host and gadget controllers based on the bus state. It provides APIs

Re: [PATCH v2 2/5] dt-bindings: Add a binding for Mediatek xHCI host controller

2015-07-10 Thread Roger Quadros
Hi, On 08/07/15 12:41, Chunfeng Yun wrote: add a DT binding documentation of xHCI host controller for the MT8173 SoC from Mediatek. Signed-off-by: Chunfeng Yun chunfeng@mediatek.com --- .../devicetree/bindings/usb/mt8173-xhci.txt| 27 ++ 1 file changed,

Re: [PATCH v7 07/23] usb: common: add API to update usb otg capabilities by device tree

2015-07-09 Thread Roger Quadros
On 09/07/15 10:18, Li Jun wrote: Check property of usb hardware to update otg version and disable SRP, HNP and ADP if its disable flag is present. Signed-off-by: Li Jun jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com cheers, -roger --- drivers/usb/common/common.c | 56

Re: [PATCH v7 22/23] usb: gadget: serial: allocate and init otg descriptor by otg capabilities

2015-07-09 Thread Roger Quadros
On 09/07/15 10:18, Li Jun wrote: Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun jun...@freescale.com Reviewed-by: Roger

Re: [PATCH v7 21/23] usb: gadget: printer: allocate and init otg descriptor by otg capabilities

2015-07-09 Thread Roger Quadros
On 09/07/15 10:18, Li Jun wrote: Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun jun...@freescale.com Reviewed-by: Roger

Re: [PATCH v7 08/23] usb: chipidea: set usb otg capabilities

2015-07-09 Thread Roger Quadros
On 09/07/15 10:18, Li Jun wrote: Init and update otg capabilities by DT, set gadget's otg capabilities accordingly. Signed-off-by: Li Jun jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com cheers, -roger --- drivers/usb/chipidea/core.c | 15 +++ drivers/usb

Re: [PATCH v7 23/23] usb: gadget: zero: allocate and init otg descriptor by otg capabilities

2015-07-09 Thread Roger Quadros
On 09/07/15 10:19, Li Jun wrote: Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun jun...@freescale.com Reviewed-by: Roger

Re: [PATCH v7 08/23] usb: chipidea: set usb otg capabilities

2015-07-09 Thread Roger Quadros
Hi, On 09/07/15 10:18, Li Jun wrote: Init and update otg capabilities by DT, set gadget's otg capabilities accordingly. Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/chipidea/core.c | 15 +++ drivers/usb/chipidea/udc.c | 7 ++-

Re: [PATCH v6 08/23] usb: chipidea: set usb otg capabilities

2015-07-08 Thread Roger Quadros
On 08/07/15 05:20, Li Jun wrote: On Tue, Jul 07, 2015 at 04:25:44PM +0300, Roger Quadros wrote: On 29/06/15 10:47, Li Jun wrote: Init and update otg capabilities by DT, set gadget's otg capabilities accordingly. Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/chipidea/core.c

[PATCH v3 12/12] usb: chipidea: move from CONFIG_USB_OTG_FSM to CONFIG_USB_OTG

2015-07-08 Thread Roger Quadros
CONFIG_USB_OTG_FSM no longer exists and the OTG FSM is available if CONFIG_USB_OTG is defined so move to using CONFIG_USB_OTG. Signed-off-by: Roger Quadros rog...@ti.com --- Documentation/usb/chipidea.txt | 2 +- drivers/usb/chipidea/Makefile | 2 +- drivers/usb/chipidea/ci.h | 2

[PATCH v3 1/9] usb: dwc3: add dual-role support

2015-07-08 Thread Roger Quadros
Register with the USB OTG core. Since we don't support OTG yet we just work as a dual-role device even if device tree says otg. Use extcon framework to get VBUS/ID cable events and kick the OTG state machine. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/dwc3/core.c | 155

[PATCH v3 01/11] usb: otg-fsm: Add documentation for struct otg_fsm

2015-07-08 Thread Roger Quadros
struct otg_fsm is the interface to the OTG state machine. Document the input, output and internal state variables. Definations are taken from Table 7-2 and Table 7-4 of the USB OTG EH Specification Rev.2.0 Re-arrange some of the members as per use case for more clarity. Signed-off-by: Roger

[PATCH v3 05/11] usb: hcd.h: Add OTG to HCD interface

2015-07-08 Thread Roger Quadros
The OTG core will use struct otg_hcd_ops to add/remove the HCD controller. The main purpose of this interface is to avoid directly calling usb_add/remove_hcd() from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB is m. Signed-off-by: Roger Quadros rog

[PATCH v3 04/11] otg-fsm: move usb_bus_start_enum into otg-fsm-ops

2015-07-08 Thread Roger Quadros
This is to prevent missing symbol build error if OTG is enabled (built-in) and HCD core (CONFIG_USB) is module. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/common/usb-otg-fsm.c | 6 -- drivers/usb/phy/phy-fsl-usb.c| 2 ++ include/linux/usb/otg-fsm.h | 1 + 3 files

[PATCH v3 03/11] usb: otg-fsm: Prevent build warning VDBG redefined

2015-07-08 Thread Roger Quadros
, from drivers/usb/dwc3/ep0.c:33: include/linux/usb/otg-fsm.h:30:1: warning: VDBG redefined In file included from drivers/usb/dwc3/ep0.c:31: include/linux/usb/composite.h:615:1: warning: this is the location of the previous definition Signed-off-by: Roger

[PATCH v3 6/9] usb: dwc3: save/restore OTG registers during suspend/resume

2015-07-08 Thread Roger Quadros
Without this we loose OTG controller register context and malfunction after a system suspend-resume. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/dwc3/core.c | 17 + drivers/usb/dwc3/core.h | 6 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git

[PATCH v3 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role

2015-07-08 Thread Roger Quadros
irq and events during system suspend so that we don't lockup the system during system suspend/resume. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/dwc3/core.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/drivers/usb/dwc3/core.c b

[PATCH v3 7/9] usb: dwc3: gadget: Fix suspend/resume during dual-role mode

2015-07-08 Thread Roger Quadros
Gdget controller might not be always active during suspend/ resume when we are operating in dual-role/otg mode. Check if we're active and only if we are then perform necessary actions during suspend/resume. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/dwc3/gadget.c | 6 ++ 1

[PATCH v3 8/9] usb: dwc3: core: Prevent otg events from disabling themselves

2015-07-08 Thread Roger Quadros
in dwc3_otg_init() but dwc3_otg_irq() has already saved OEVTEN as 0 into dwc-oevten. So finally when dwc3_irq_thread_irq() is called we save 0 into OEVTEN thus disabling OTG irqs forever. We fix this by disabling IRQs when configuring OEVTEN in dwc3_otg_init(). Signed-off-by: Roger Quadros rog...@ti.com

[PATCH v3 5/9] usb: dwc3: core: make dual-role work with OTG irq

2015-07-08 Thread Roger Quadros
If the ID pin event is not available over extcon then we rely on the OTG controller to provide us ID and VBUS information. We still don't support any OTG features but just dual-role operation. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/dwc3/core.c | 225

[PATCH v3 4/9] usb: dwc3: core: Adapt to named interrupts

2015-07-08 Thread Roger Quadros
DTBs. - Use gadget_irq in gadget driver. Signed-off-by: Felipe Balbi ba...@ti.com Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/dwc3/core.c | 12 drivers/usb/dwc3/core.h | 7 +++ drivers/usb/dwc3/gadget.c | 2 +- 3 files changed, 20 insertions(+), 1 deletion

Re: [PATCH v6 07/23] usb: common: add API to update usb otg capabilities by device tree

2015-07-08 Thread Roger Quadros
On 08/07/15 05:05, Li Jun wrote: On Tue, Jul 07, 2015 at 04:23:14PM +0300, Roger Quadros wrote: Hi, On 29/06/15 10:47, Li Jun wrote: Check property of usb hardware to update otg version and disable SRP, HNP and ADP if its disable flag is present. Signed-off-by: Li Jun jun

<    2   3   4   5   6   7   8   9   10   11   >