lkml.org 
[lkml]   [2013]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal
    From
    Sebastian,

    On Mon, Jul 29, 2013 at 12:51 PM, Sebastian Andrzej Siewior
    <bigeasy@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 unplugged,
    >> then there is no way the SESSION bit will come back in the current
    >> mainline kernel.
    >
    > Yes, you did.

    If I did, that was wrong statement.

    >
    >>
    >> The TI 3.2 kernel works around this OTG issue by toggling the SESSION
    >> bit in b_idle handling in otg_timer(). The workaround makes most users
    >> happy but it causes VBUS voltage pulsing. That is why I said I don't
    >> know an ideal solution without a ID pin interrupt support.
    >
    > Now I understand more pieces of the puzzle. And the missing ID pin
    > support is Am335x-evm specific since other am335x board may wire up
    > that pin.

    No, it is not board wiring issue. The AM335x EVM DOES have ID pin
    wired to the ID pin of the micro-AB receptacle. I said AM335x does not
    have IP pin INTERRUPT support, by which the kernel does not know when
    a device is plugged in without setting the SESSION bit.

    > But you say there is no way that the phy or anything else could help to
    > avoid that pulsing.
    >
    >> I think you looked at a wrong file, maybe a wrong branch. Please check
    >> [1], which defines
    >>
    >> 2644 * mode[0:3] = USB0PORT's mode
    >> 2645 * mode[4:7] = USB1PORT's mode
    >> 2646 * AM335X beta EVM has USB0 in OTG mode and USB1 in host mode.
    >> 2647 */
    >> 2648 .mode = (MUSB_HOST << 4) | MUSB_OTG,
    >
    > Oh it is a long way. So looked into the wrong branch.
    >
    >>> I agree that without that try_idle part things keep working but it
    >>> seems, that it is also called in the other tree.
    >>>
    >>
    >> Then because AM335xEVM USB1 port does not call *try_idle() in this 3.2
    >> kernel, its SESSION bit is always set.
    >>
    >> But I don't have a clear idea how to solve this in the mainline kernel
    >> since is_otg_enabled() has been cleaned.
    >
    > So now I think this is a board problem. What about switching port 1
    > from OTG to HOST only and avoiding kicking the timer in
    > dsps_musb_try_idle() in such a case? It seems we only need to do this
    > in OTG mode.

    I have not read the MUSB driver in the mainline kernel yet. If somehow
    port 1 can could be set to HOST mode then the SESSION bit would stay,
    then that should solve the issue.

    >
    >> Regards,
    >> -Bin.
    >
    > Sebastian


    \
     
     \ /
      Last update: 2013-07-29 21:21    [W:2.914 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site