lkml.org 
[lkml]   [2016]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: Nokia N900: musb is in wrong state after boot
    Date

    Hi,

    Pali Rohár <pali.rohar@gmail.com> writes:
    > On Monday 22 February 2016 09:31:50 Felipe Balbi wrote:
    >> Pali Rohár <pali.rohar@gmail.com> writes:
    >>
    >> > On Tuesday 26 January 2016 18:26:32 Tony Lindgren wrote:
    >> >> * Pali Rohár <pali.rohar@gmail.com> [160126 06:35]:
    >> >> > On Thursday 21 January 2016 12:30:13 Tony Lindgren wrote:
    >> >> > > * joerg Reisenweber <joerg@openmoko.org> [160121 11:35]:
    >> >> > > > On Thu 21 January 2016 11:21:13 Tony Lindgren wrote:
    >> >> > > > > Do you have some pointer
    >> >> > > > > to the "certain resistor value on ID to GND" spec? Is it
    >> >> > > > > maybe part of the carkit related parts of the USB spec?
    >> >> > > >
    >> >> > > > ""Three additional ID pin states are defined[4] at the nominal
    >> >> > > > resistance values of 124 kΩ, 68 kΩ, and 36.5 kΩ, with respect
    >> >> > > > to the ground pin. These permit the device to work with USB
    >> >> > > > Accessory Charger Adapters that allows the OTG device to be
    >> >> > > > attached to both a charger and another device simultaneously.
    >> >> > > > [6]""
    >> >> > > > https://en.wikipedia.org/wiki/USB_On-The-Go#OTG_micro_plugs
    >> >> > >
    >> >> > > OK thanks. So it's the "accessory charger" part of the
    >> >> > > battery charging specification 1.1.
    >> >> >
    >> >> > So, Tony, do you have some idea what needs to be changed and how to
    >> >> > fix peripheral mode after boot on Nokia N900?
    >> >>
    >> >> No, I'm waiting to hear an educated guess from Felipe on this one.
    >>
    >> about why peripheral mode doesn't work on n900 ? No idea. that's always
    >> the default role of MUSB and last I checked, before stopping working on
    >> this, BBB was working just fine.
    >>
    >> N900 is odd in that it has two PHYs (1701 handles data lines while
    >> twl4030 handles power lines, IIRC), but peripheral should be working.
    >>
    >> The only reason for MUSB to not start would be that it's not detecting
    >> VBUS being above session valid threshold, however twl4030 should have an
    >> IRQ for that.
    >>
    >> What happens when cable is attached ? Any IRQs anywhere firing ?
    >>
    >
    > Just to note, when I call echo peripheral > mode then detecting usb
    > cable starts working and usb peripheral mode also works fine (also
    > after disconnecting and connecting usb cable again). Read my first
    > post in this thread, there are also some logs:
    > https://lkml.org/lkml/2016/1/9/69

    interesting... that softconnect interface looks odd. We _know_ the value
    of softconnect from musb->softconnect. /me reads commit which added
    it... Oh okay, that's only valid for host mode. Argh!

    Okay, the session bit is _NOT_ set when it should be. Note that DevCtl
    reads as 0x98. Bit 0 is Session bit and that's not set. MUSB _is_ in the
    device mode (bit 7 set).

    For some reason DevCtl didn't get set. Care to add a print to
    musb_gadget_pullup() to see when/if it's called ?

    BTW, Bin will be maintaining MUSB going forward.

    --
    balbi
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2016-02-22 10:21    [W:3.550 / U:0.240 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site