Re: [PATCH] usb: phy: twl4030-usb: Fix lost interrupts after ID pin goes down

2014-08-22 Thread Grazvydas Ignotas
Hi, On Thu, Aug 21, 2014 at 7:48 PM, Tony Lindgren wrote: > Commit 249751f22380 ("usb: phy: twl4030-usb: poll for ID disconnect") > added twl4030_id_workaround_work() to deal with lost interrupts > after ID pin goes down. However, this currently only works for the > insertion. The PHY interrupts

Re: [PATCH V3] usb: musb: Fix unstable init of OTG_INTERFSEL.

2013-12-18 Thread Grazvydas Ignotas
On Wed, Dec 18, 2013 at 5:35 PM, Felipe Balbi wrote: > Hi, > > On Tue, Dec 17, 2013 at 05:48:33PM +0100, anaum...@ultratronik.de wrote: >> From: Andreas Naumann >> >> This is a hard to reproduce problem which leads to non-functional >> USB-OTG port in 0.1%-1% of all boots. Tracked it down to comm

Re: [PATCH V3] usb: musb: Fix unstable init of OTG_INTERFSEL.

2013-12-18 Thread Grazvydas Ignotas
On Wed, Dec 18, 2013 at 9:41 AM, Andreas Naumann wrote: > Am 17.12.2013 18:22, schrieb David Cohen: > >> On Tue, Dec 17, 2013 at 05:48:33PM +0100, anaum...@ultratronik.de wrote: >>> >>> From: Andreas Naumann >>> >>> This is a hard to reproduce problem which leads to non-functional >>> USB-OTG por

Re: WG: [PATCH] usb: musb: omap2430: fix occasional musb breakage on boot

2013-12-16 Thread Grazvydas Ignotas
On Fri, Dec 13, 2013 at 6:27 PM, Andreas Naumann wrote: > On 13.12.2013 13:34, Grazvydas Ignotas wrote: >> >> Hmm I don't know about that, this would be inconsistent with what all >> other OMAP drivers do. Maybe we should do what musb_core.c does just > > Ok, thats

Re: WG: [PATCH] usb: musb: omap2430: fix occasional musb breakage on boot

2013-12-13 Thread Grazvydas Ignotas
On Thu, Dec 12, 2013 at 11:29 PM, Andreas Naumann wrote: > Hi Grazvydas, > >> Von: Grazvydas Ignotas [mailto:nota...@gmail.com] >> Gesendet: Donnerstag, 12. Dezember 2013 01:21 >> An: linux-usb@vger.kernel.org >> Cc: Felipe Balbi; linux-o...@vger.kernel.org; Naumann

[PATCH] usb: musb: omap2430: fix occasional musb breakage on boot

2013-12-11 Thread Grazvydas Ignotas
ved in the context as it's invalid value, so we use it as an indicator that context hasn't been saved yet). This issue was originally found by Andreas Naumann: http://marc.info/?l=linux-usb&m=138562574719654&w=2 Reported-and-bisected-by: Andreas Naumann Signed-off-by: Grazvydas

Re: [PATCH V2] usb: musb: Fix unstable init of OTG_INTERFSEL.

2013-11-28 Thread Grazvydas Ignotas
On Thu, Nov 28, 2013 at 9:51 AM, wrote: > From: Andreas Naumann > > This is a hard to reproduce problem which leads to non-functional > USB-OTG port in 0.1%-1% of all boots. Tracked it down to commit > e25bec160158abe86c276d7d206264afc3646281, which introduces save/restore > of OTG_INTERFSEL ove

Re: USB ehci suspend/resume on beagleboard

2013-04-05 Thread Grazvydas Ignotas
On Thu, Apr 4, 2013 at 2:50 PM, Roger Quadros wrote: > correcting misleading subject line. > was (Re: MUSB regression in linux next at least for pandboard) > > On 04/04/2013 02:36 PM, Roger Quadros wrote: >> Hi, >> >> On 02/07/2013 04:10 PM, Grazvydas Ignotas wrote:

[PATCHv3 3/3] usb: musb: gadget: use platform callback to enable vbus

2013-03-24 Thread Grazvydas Ignotas
after that. Signed-off-by: Grazvydas Ignotas --- drivers/usb/musb/musb_gadget.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index ff6ba3a..4be4865 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/driver

[PATCHv3 2/3] usb: musb: omap2430: turn off vbus on cable disconnect

2013-03-24 Thread Grazvydas Ignotas
-off-by: Grazvydas Ignotas --- drivers/usb/musb/omap2430.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 798e029..3551f1a 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -291,6 +291,7 @@ static

[PATCHv3 1/3] usb: phy: twl4030-usb: check if vbus is driven by twl itself

2013-03-24 Thread Grazvydas Ignotas
At least on pandora, STS_VBUS gets set even when VBUS is driven by twl itself. Reporting VBUS in this case confuses OMAP musb glue and charger driver, so check if OTG VBUS charge pump is on before reporting VBUS event to avoid this problem. Signed-off-by: Grazvydas Ignotas --- drivers/usb/phy

[PATCHv3 0/3] usb: phy: remaining twl4030-usb/omap fixes

2013-03-24 Thread Grazvydas Ignotas
en when ID is grounded at the same time (like it was before the patch). Grazvydas Ignotas (3): usb: phy: twl4030-usb: check if vbus is driven by twl itself usb: musb: omap2430: turn off vbus on cable disconnect usb: musb: gadget: use platform callback to enable vbus drivers/usb/musb/musb_gadge

Re: [PATCHv2 5/7] usb: phy: twl4030-usb: check if vbus is driven by twl itself

2013-03-21 Thread Grazvydas Ignotas
On Wed, Mar 20, 2013 at 3:07 PM, Felipe Balbi wrote: > On Sun, Mar 17, 2013 at 08:23:25PM +0200, Grazvydas Ignotas wrote: >> At least on pandora, STS_VBUS gets set even when VBUS is driven by twl >> itself. Reporting VBUS in this case confuses OMAP musb glue and charger >> dr

[PATCHv2 5/7] usb: phy: twl4030-usb: check if vbus is driven by twl itself

2013-03-17 Thread Grazvydas Ignotas
At least on pandora, STS_VBUS gets set even when VBUS is driven by twl itself. Reporting VBUS in this case confuses OMAP musb glue and charger driver, so check if OTG VBUS charge pump is on before reporting VBUS event to avoid this problem. Signed-off-by: Grazvydas Ignotas --- drivers/usb/phy

[PATCHv2 7/7] usb: musb: gadget: use platform callback to enable vbus

2013-03-17 Thread Grazvydas Ignotas
after that. Signed-off-by: Grazvydas Ignotas --- drivers/usb/musb/musb_gadget.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index ae59ee6..60eef20 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/driver

[PATCHv2 6/7] usb: musb: omap2430: turn off vbus on cable disconnect

2013-03-17 Thread Grazvydas Ignotas
-off-by: Grazvydas Ignotas --- drivers/usb/musb/omap2430.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index ec460ea..780a750 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -291,6 +291,7 @@ static

[PATCHv2 3/7] usb: phy: twl4030-usb: don't switch the phy on/off needlessly

2013-03-17 Thread Grazvydas Ignotas
ut no gadget driver is loaded. This will also have side effect of automatic USB charging no longer working without twl4030_charger driver, because a regulator needed for charging will no longer be enabled, so be sure to enable charger driver if charging is needed. Signed-off-by: Grazvydas Ig

[PATCHv2 4/7] usb: phy: twl4030-usb: poll for ID disconnect

2013-03-17 Thread Grazvydas Ignotas
linkstat update code to callers so that changes can be handled in thread safe way (as polling work can trigger at the same time as real irq now). TI PSP kernels have similar workarounds, so (many?) more boards are likely affected. Signed-off-by: Grazvydas Ignotas --- drivers/usb/phy/phy-twl4030-usb.

[PATCHv2 2/7] usb: phy: twl4030-usb: ignore duplicate events

2013-03-17 Thread Grazvydas Ignotas
defaults to "no cable" state, so only bother it if we have VBUS or ID. Signed-off-by: Grazvydas Ignotas Reviewed-by: Kishon Vijay Abraham I --- drivers/usb/phy/phy-twl4030-usb.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-twl4030-usb.c b/d

[PATCHv2 1/7] usb: phy: twl4030-usb: don't enable PHY during init

2013-03-17 Thread Grazvydas Ignotas
There is no need to do it, otg.set_suspend(false) (which itself comes from runtime_pm OMAP glue calls) will enable it later anyway. This used to be the place where things were enabled if booted with cable connected before runtime_pm conversion, but now can be dropped. Signed-off-by: Grazvydas

[PATCHv2 0/7] usb: phy: twl4030-usb fixes

2013-03-17 Thread Grazvydas Ignotas
races between work item and IRQ - changed patch 6 to only disable VBUS if not runtime suspended, otherwise we get data abort on OMAP3 Grazvydas Ignotas (7): usb: phy: twl4030-usb: don't enable PHY during init usb: phy: twl4030-usb: ignore duplicate events usb: phy: twl4030-usb: don

Re: [PATCH v2 2/4] usb: otg: twl4030: use devres API for regulator get and request irq

2013-03-15 Thread Grazvydas Ignotas
On Thu, Mar 14, 2013 at 5:48 PM, Felipe Balbi wrote: > On Thu, Mar 14, 2013 at 11:53:57AM +0530, Kishon Vijay Abraham I wrote: >> Used devres APIs devm_request_threaded_irq and devm_regulator_get for >> requesting irq and for getting regulator respectively. >> >> Signed-off-by: Kishon Vijay Abraha

Re: [PATCH 0/5] usb: musb/otg: cleanup and fixes

2013-03-13 Thread Grazvydas Ignotas
sg81563.html > (Grazvydas Ignotas patch series) > > Tested for g_zero enumeration in pandaboard and beagleboard in both > cold plug and hot plug case. Any kind of testing for this series is welcome. > > Kishon Vijay Abraham I (5): > usb: musb: omap: remove the check before c

Re: [PATCH 2/5] usb: musb: omap: always glue have the correct vbus/id status

2013-03-13 Thread Grazvydas Ignotas
On Wed, Mar 13, 2013 at 10:47 AM, Kishon Vijay Abraham I wrote: > In the case where omap glue is loaded and musb core is not, glue->status > wont have a valid status if the phy drivers call omap_musb_mailbox. So > fixed the conditions here. There already seems to be another patch named "usb: musb

Re: [PATCH 6/7] usb: musb: omap2430: turn off vbus on cable disconnect

2013-03-12 Thread Grazvydas Ignotas
On Tue, Mar 12, 2013 at 3:37 PM, kishon wrote: > Hi, > > > On Sunday 10 March 2013 06:38 AM, Grazvydas Ignotas wrote: >> >> On USB_EVENT_ID event the musb glue enables VBUS by calling >> omap2430_musb_set_vbus(musb, 1) that sets the session bit, but on >> US

Re: [PATCH 2/7] usb: otg: twl4030-usb: ignore duplicate events

2013-03-12 Thread Grazvydas Ignotas
On Tue, Mar 12, 2013 at 3:32 PM, kishon wrote: > Hi, > > > On Sunday 10 March 2013 06:37 AM, Grazvydas Ignotas wrote: >> >> In some rare cases we may get multiple interrupts that will generate >> duplicate omap_musb_mailbox() calls. This is a problem because e

Re: [PATCH] usb: musb: log VBUS error

2013-03-11 Thread Grazvydas Ignotas
On Mon, Mar 11, 2013 at 6:24 PM, Tony Lindgren wrote: > * Grazvydas Ignotas [130309 16:53]: >> VBUS_ERROR is a serious error that the driver often doesn't recover from >> in my tests, so we should at least inform the user about it. > > Patch makes sens to me, just a rel

Re: [PATCH 4/7] usb: otg: twl4030-usb: poll for ID disconnect

2013-03-10 Thread Grazvydas Ignotas
On Sun, Mar 10, 2013 at 1:03 PM, Michael Trimarchi wrote: > Hi > > just one comment. > > On 10/03/13 02:07, Grazvydas Ignotas wrote: >> On pandora, STS_USB interrupt doesn't arrive on USB host cable disconnect >> for some reason while VBUS is driven by twl its

[PATCH 1/7] usb: otg: twl4030-usb: don't enable PHY during init

2013-03-09 Thread Grazvydas Ignotas
There is no need to do it, otg.set_suspend(false) (which itself comes from runtime_pm OMAP glue calls) will enable it later anyway. This used to be the place where things were enabled if booted with cable connected before runtime_pm conversion, but now can be dropped. Signed-off-by: Grazvydas

[PATCH 7/7] usb: musb: gadget: use platform callback to enable vbus

2013-03-09 Thread Grazvydas Ignotas
after that. Signed-off-by: Grazvydas Ignotas --- drivers/usb/musb/musb_gadget.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index be18537..19998e9 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/driver

[PATCH 5/7] usb: otg: twl4030-usb: check if vbus is driven by twl itself

2013-03-09 Thread Grazvydas Ignotas
At least on pandora, STS_VBUS gets set even when VBUS is driven by twl itself. Reporting VBUS in this case confuses OMAP musb glue and charger driver, so check if OTG VBUS charge pump is on before reporting VBUS event to avoid this problem. Signed-off-by: Grazvydas Ignotas --- drivers/usb/otg

[PATCH 6/7] usb: musb: omap2430: turn off vbus on cable disconnect

2013-03-09 Thread Grazvydas Ignotas
works. Signed-off-by: Grazvydas Ignotas --- drivers/usb/musb/omap2430.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 2a39c11..d430677 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -296,6

[PATCH 3/7] usb: otg: twl4030-usb: don't switch the phy on/off needlessly

2013-03-09 Thread Grazvydas Ignotas
ut no gadget driver is loaded. This will also have side effect of automatic USB charging no longer working without twl4030_charger driver, so be sure to enable it if charging is needed. Signed-off-by: Grazvydas Ignotas --- drivers/usb/otg/twl4030-usb.c |6 -- 1 file changed, 6 dele

[PATCH 4/7] usb: otg: twl4030-usb: poll for ID disconnect

2013-03-09 Thread Grazvydas Ignotas
ounds, so (many?) more boards are likely affected. Signed-off-by: Grazvydas Ignotas --- drivers/usb/otg/twl4030-usb.c | 37 + 1 file changed, 37 insertions(+) diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 90a19ff..2c1c27e 1

[PATCH 2/7] usb: otg: twl4030-usb: ignore duplicate events

2013-03-09 Thread Grazvydas Ignotas
defaults to "no cable" state, so only bother it if we have VBUS or ID. Signed-off-by: Grazvydas Ignotas --- drivers/usb/otg/twl4030-usb.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 1515c0

[PATCH 0/7] usb: otg: twl4030-usb fixes

2013-03-09 Thread Grazvydas Ignotas
OMAP3: hwmod data: disable MIDLEMODE control for musb" is needed that was sent separately). This also fixes power drain when cable is plugged an no gadget driver is loaded. Grazvydas Ignotas (7): usb: otg: twl4030-usb: don't enable PHY during init usb: otg: twl4030-usb: ignore duplica

[PATCH] usb: musb: log VBUS error

2013-03-09 Thread Grazvydas Ignotas
VBUS_ERROR is a serious error that the driver often doesn't recover from in my tests, so we should at least inform the user about it. Signed-off-by: Grazvydas Ignotas --- drivers/usb/musb/musb_core.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb

[PATCH] usb: musb: gadget: clear gadget_driver when gadget is stopped

2013-03-09 Thread Grazvydas Ignotas
. Clear the gadget_driver pointer on remove, it's invalid after stop anyway. Signed-off-by: Grazvydas Ignotas --- drivers/usb/musb/musb_gadget.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 19998e9..1ddb889 100644

[PATCH] usb: musb: honour initial transceiver state

2013-03-09 Thread Grazvydas Ignotas
As the OTG transceiver driver usually starts first, it should already have default_a variable set according to ID pin state, so don't override it. In case default_a was not changed by trasceiver, it will default to 0 and this code will work as before. Signed-off-by: Grazvydas Ig

Re: MUSB regression in linux next at least for pandboard

2013-02-07 Thread Grazvydas Ignotas
On Thu, Feb 7, 2013 at 11:16 AM, Roger Quadros wrote: > It seems the beagleboard problem is related to OMAP silicon errata [1]. > Apparently, remote wakeup as well as host issued wakeup break omap-ehci and > have > nothing to do with the hub or it's driver. > > I'll work on this issue after I'm

Re: MUSB-HDRC Gadget driving VBUS inappropriately

2012-12-14 Thread Grazvydas Ignotas
On Fri, Dec 14, 2012 at 11:53 AM, Ian Coolidge wrote: > we find that with about a 2% chance, the gadget comes up in some kind of > firmware failed state, driving VBUS. > In this condition, we found that MUSB_DEVCTL_SESSION bit was set. > I understand this to be indicative of MUSB thinking it is i

Re: [PATCH 00/16] OMAP USB Host cleanup

2012-12-04 Thread Grazvydas Ignotas
On Tue, Nov 27, 2012 at 6:30 PM, Felipe Balbi wrote: > On Tue, Nov 27, 2012 at 04:42:47PM +0200, Roger Quadros wrote: >> Kevin, >> >> I gave a quick look at the issue. It seems that the High Speed USB Host >> module is kept in Software forced wakeup mode as a quick fix workaround >> to a bunch of