Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-29 Thread Bin Liu
Sebastian, On Mon, Jul 29, 2013 at 12:51 PM, Sebastian Andrzej Siewior wrote: > On 07/29/2013 07:26 PM, Bin Liu wrote: >> Sebastian, > > Hi Bin, > >> I did not say AM335xEVM is not able to run OTG mode. The problem is in >> OTG mode the SESSION bit will be cleared once the device is unplugged,

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-29 Thread Sebastian Andrzej Siewior
On 07/29/2013 07:26 PM, Bin Liu wrote: > Sebastian, Hi Bin, > I did not say AM335xEVM is not able to run OTG mode. The problem is in > OTG mode the SESSION bit will be cleared once the device is unplugged, > then there is no way the SESSION bit will come back in the current > mainline kernel.

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-29 Thread Bin Liu
Sebastian, On Mon, Jul 29, 2013 at 11:53 AM, Sebastian Andrzej Siewior wrote: > So you say, am335x-evm is not able to run OTG mode and may only run in > host mode and as a consequence it must not call musb_platform_try_idle() > because it throws that one bit away and there is no way to bring it

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-29 Thread Sebastian Andrzej Siewior
* Bin Liu | 2013-07-26 22:07:14 [-0500]: >Sebastian, Hi Bin, >I have not tested it yet, but I believe I found why host mode works on >TI 3.2 kernel but not on mainline. Please look at Line 786 in 3.2 >kernel musb_core.c [1]. > >773 if ((int_usb & MUSB_INTR_DISCONNECT) &&

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-29 Thread Sebastian Andrzej Siewior
* Bin Liu | 2013-07-26 22:07:14 [-0500]: Sebastian, Hi Bin, I have not tested it yet, but I believe I found why host mode works on TI 3.2 kernel but not on mainline. Please look at Line 786 in 3.2 kernel musb_core.c [1]. 773 if ((int_usb MUSB_INTR_DISCONNECT) !musb-ignore_disconnect)

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-29 Thread Bin Liu
Sebastian, On Mon, Jul 29, 2013 at 11:53 AM, Sebastian Andrzej Siewior bige...@linutronix.de wrote: So you say, am335x-evm is not able to run OTG mode and may only run in host mode and as a consequence it must not call musb_platform_try_idle() because it throws that one bit away and there is

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-29 Thread Sebastian Andrzej Siewior
On 07/29/2013 07:26 PM, Bin Liu wrote: Sebastian, Hi Bin, I did not say AM335xEVM is not able to run OTG mode. The problem is in OTG mode the SESSION bit will be cleared once the device is unplugged, then there is no way the SESSION bit will come back in the current mainline kernel. Yes,

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-29 Thread Bin Liu
Sebastian, On Mon, Jul 29, 2013 at 12:51 PM, Sebastian Andrzej Siewior bige...@linutronix.de wrote: On 07/29/2013 07:26 PM, Bin Liu wrote: Sebastian, Hi Bin, I did not say AM335xEVM is not able to run OTG mode. The problem is in OTG mode the SESSION bit will be cleared once the device is

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
Sebastian, On Fri, Jul 26, 2013 at 3:35 PM, Sebastian Andrzej Siewior wrote: >> My build server is down this afternoon. Once it comes back next week, >> I will try 3.8 again, to see how I can help on this USB1 host mode >> issue. its devctl register should stay on 0x19 even nothing is >>

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Sebastian Andrzej Siewior
On 07/26/2013 10:15 PM, Bin Liu wrote: > Sebastian, Hi Bin, > I started thinking when I tried this git.ti.com 3.8 kernel, I might > have done 'devmem2 0x47401c60 b 0x81' to manually set the SESSION bit > after plugged a device. It was months ago, I don't quite remember what > I tested. Ah. You

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
Sebastian, On Fri, Jul 26, 2013 at 2:55 PM, Sebastian Andrzej Siewior wrote: > The bit is removed in otg_timer() because the phy gets into > OTG_STATE_A_WAIT_BCON. > > Now, this is current HEAD + my stuff to get second port working. I > downloaded v3.2 and browsed as I was looking for the

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Sebastian Andrzej Siewior
On 07/26/2013 08:29 PM, Bin Liu wrote: Hi Bin, >> [ 97.570852] musb-hdrc musb-hdrc.1.auto: Poll devctl 19 (a_wait_bcon) > I don't think you are testing with the 3.2 kernel you referred from > the ti.com link you mentioned above. > 3.2 kernel should have no '.auto' at the end of the device

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
Sebastian, On Fri, Jul 26, 2013 at 1:22 PM, Sebastian Andrzej Siewior wrote: > On 07/26/2013 08:17 PM, Bin Liu wrote: > > Hi Bin. > >>> In TI 3.2 kernel, the otg_timer() toggles the SESSION bit in >>> OTG_STATE_B_IDLE state. So whenever the ID pin is grounded by >>> connecting a device, the

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Sebastian Andrzej Siewior
On 07/26/2013 08:17 PM, Bin Liu wrote: Hi Bin. >> In TI 3.2 kernel, the otg_timer() toggles the SESSION bit in >> OTG_STATE_B_IDLE state. So whenever the ID pin is grounded by >> connecting a device, the controller will try go into host mode. >> But I have no idea why your board is in a_idle not

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
On Fri, Jul 26, 2013 at 12:53 PM, Bin Liu wrote: > Sebastian, > > On Fri, Jul 26, 2013 at 11:31 AM, Sebastian Andrzej Siewior > wrote: >> * Bin Liu | 2013-07-23 13:55:27 [-0500]: >> >>>Hi Sebastian, >> Hi Bin, >> >>>either by SRP or HNP, or something else. In TI 3.2 kernel, there is

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
Sebastian, On Fri, Jul 26, 2013 at 11:31 AM, Sebastian Andrzej Siewior wrote: > * Bin Liu | 2013-07-23 13:55:27 [-0500]: > >>Hi Sebastian, > Hi Bin, > >>either by SRP or HNP, or something else. In TI 3.2 kernel, there is >>workaround in otg_timer() to _toggle_ the SESSION bit to detect if ID

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Sebastian Andrzej Siewior
* Bin Liu | 2013-07-23 13:55:27 [-0500]: >Hi Sebastian, Hi Bin, >either by SRP or HNP, or something else. In TI 3.2 kernel, there is >workaround in otg_timer() to _toggle_ the SESSION bit to detect if ID >pin is grounded, which means a USB device is connected. I've been looking at

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Sebastian Andrzej Siewior
* Bin Liu | 2013-07-23 13:55:27 [-0500]: >Hi Sebastian, Hi Bin, >> In my testing the bit remains set. How is the bit supposed to come back >> after I connect a host device? >The bit remains even when no device is plugged and ID ping is float? After I set it, it remains set yes. >what platform

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Sebastian Andrzej Siewior
* Bin Liu | 2013-07-23 13:55:27 [-0500]: Hi Sebastian, Hi Bin, In my testing the bit remains set. How is the bit supposed to come back after I connect a host device? The bit remains even when no device is plugged and ID ping is float? After I set it, it remains set yes. what platform do you

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Sebastian Andrzej Siewior
* Bin Liu | 2013-07-23 13:55:27 [-0500]: Hi Sebastian, Hi Bin, either by SRP or HNP, or something else. In TI 3.2 kernel, there is workaround in otg_timer() to _toggle_ the SESSION bit to detect if ID pin is grounded, which means a USB device is connected. I've been looking at

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
Sebastian, On Fri, Jul 26, 2013 at 11:31 AM, Sebastian Andrzej Siewior bige...@linutronix.de wrote: * Bin Liu | 2013-07-23 13:55:27 [-0500]: Hi Sebastian, Hi Bin, either by SRP or HNP, or something else. In TI 3.2 kernel, there is workaround in otg_timer() to _toggle_ the SESSION bit to

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
On Fri, Jul 26, 2013 at 12:53 PM, Bin Liu binml...@gmail.com wrote: Sebastian, On Fri, Jul 26, 2013 at 11:31 AM, Sebastian Andrzej Siewior bige...@linutronix.de wrote: * Bin Liu | 2013-07-23 13:55:27 [-0500]: Hi Sebastian, Hi Bin, either by SRP or HNP, or something else. In TI 3.2 kernel,

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Sebastian Andrzej Siewior
On 07/26/2013 08:17 PM, Bin Liu wrote: Hi Bin. In TI 3.2 kernel, the otg_timer() toggles the SESSION bit in OTG_STATE_B_IDLE state. So whenever the ID pin is grounded by connecting a device, the controller will try go into host mode. But I have no idea why your board is in a_idle not b_idle.

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
Sebastian, On Fri, Jul 26, 2013 at 1:22 PM, Sebastian Andrzej Siewior bige...@linutronix.de wrote: On 07/26/2013 08:17 PM, Bin Liu wrote: Hi Bin. In TI 3.2 kernel, the otg_timer() toggles the SESSION bit in OTG_STATE_B_IDLE state. So whenever the ID pin is grounded by connecting a device,

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Sebastian Andrzej Siewior
On 07/26/2013 08:29 PM, Bin Liu wrote: Hi Bin, [ 97.570852] musb-hdrc musb-hdrc.1.auto: Poll devctl 19 (a_wait_bcon) I don't think you are testing with the 3.2 kernel you referred from the ti.com link you mentioned above. 3.2 kernel should have no '.auto' at the end of the device name.

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
Sebastian, On Fri, Jul 26, 2013 at 2:55 PM, Sebastian Andrzej Siewior bige...@linutronix.de wrote: The bit is removed in otg_timer() because the phy gets into OTG_STATE_A_WAIT_BCON. Now, this is current HEAD + my stuff to get second port working. I downloaded v3.2 and browsed as I was

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Sebastian Andrzej Siewior
On 07/26/2013 10:15 PM, Bin Liu wrote: Sebastian, Hi Bin, I started thinking when I tried this git.ti.com 3.8 kernel, I might have done 'devmem2 0x47401c60 b 0x81' to manually set the SESSION bit after plugged a device. It was months ago, I don't quite remember what I tested. Ah. You

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
Sebastian, On Fri, Jul 26, 2013 at 3:35 PM, Sebastian Andrzej Siewior bige...@linutronix.de wrote: My build server is down this afternoon. Once it comes back next week, I will try 3.8 again, to see how I can help on this USB1 host mode issue. its devctl register should stay on 0x19 even

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-23 Thread Bin Liu
Hi Sebastian, On Tue, Jul 23, 2013 at 12:31 PM, Sebastian Andrzej Siewior wrote: > > On 07/23/2013 07:28 PM, Bin Liu wrote: > > Hi, > > Hi, > > > > > On Mon, Jul 22, 2013 at 1:10 PM, Sebastian Andrzej Siewior > > mailto:bige...@linutronix.de>> wrote: > > > > This patch adds the

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-23 Thread Sebastian Andrzej Siewior
On 07/23/2013 07:28 PM, Bin Liu wrote: > Hi, Hi, > > On Mon, Jul 22, 2013 at 1:10 PM, Sebastian Andrzej Siewior > mailto:bige...@linutronix.de>> wrote: > > This patch adds the MUSB_DEVCTL_SESSION back after it has been removed. > If it is missing then the host session is not

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-23 Thread Sebastian Andrzej Siewior
On 07/23/2013 07:28 PM, Bin Liu wrote: Hi, Hi, On Mon, Jul 22, 2013 at 1:10 PM, Sebastian Andrzej Siewior bige...@linutronix.de mailto:bige...@linutronix.de wrote: This patch adds the MUSB_DEVCTL_SESSION back after it has been removed. If it is missing then the host session is

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-23 Thread Bin Liu
Hi Sebastian, On Tue, Jul 23, 2013 at 12:31 PM, Sebastian Andrzej Siewior bige...@linutronix.de wrote: On 07/23/2013 07:28 PM, Bin Liu wrote: Hi, Hi, On Mon, Jul 22, 2013 at 1:10 PM, Sebastian Andrzej Siewior bige...@linutronix.de mailto:bige...@linutronix.de wrote: This

[PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-22 Thread Sebastian Andrzej Siewior
This patch adds the MUSB_DEVCTL_SESSION back after it has been removed. If it is missing then the host session is not recognized. This bit is added initially added in musb_start() and removed after the first device disconnect. Signed-off-by: Sebastian Andrzej Siewior ---

[PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-22 Thread Sebastian Andrzej Siewior
This patch adds the MUSB_DEVCTL_SESSION back after it has been removed. If it is missing then the host session is not recognized. This bit is added initially added in musb_start() and removed after the first device disconnect. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de ---