linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bin Liu <b-liu@ti.com>
To: "Felipe Balbi" <balbi@kernel.org>, "Pali Rohár" <pali.rohar@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>,
	joerg Reisenweber <joerg@openmoko.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org,
	Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>,
	Sebastian Reichel <sre@kernel.org>,
	Aaro Koskinen <aaro.koskinen@iki.fi>, Pavel Machek <pavel@ucw.cz>,
	Nishanth Menon <nm@ti.com>
Subject: Re: Nokia N900: musb is in wrong state after boot
Date: Mon, 22 Feb 2016 09:36:13 -0600	[thread overview]
Message-ID: <20160222153613.GA12995@uda0271908> (raw)
In-Reply-To: <87oab9nn0i.fsf@ti.com>

Hi,

On Mon, Feb 22, 2016 at 10:54:21AM +0200, Felipe Balbi wrote:
> 
> 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!

softconnet bit is only valid for *peripheral* mode, but the bit is not
set in this case, so the host will not be able to detect the device.

Pali,

Is this never worked or just broken recently? If latter, possible to
git-bisect to find out which patch causes softconnect bit not set?

Regards,
-Bin.

> 
> 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

  reply	other threads:[~2016-02-22 15:36 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-09 15:16 Nokia N900: musb is in wrong state after boot Pali Rohár
2016-01-19 20:33 ` Tony Lindgren
2016-01-21  8:40   ` Pali Rohár
2016-01-21  9:57     ` Ivaylo Dimitrov
2016-01-21 10:23       ` Pali Rohár
2016-01-21 10:27         ` Ivaylo Dimitrov
2016-01-21 10:29     ` joerg Reisenweber
2016-01-21 17:41       ` Tony Lindgren
2016-01-21 18:44         ` joerg Reisenweber
2016-01-21 19:21           ` Tony Lindgren
2016-01-21 19:34             ` joerg Reisenweber
2016-01-21 20:30               ` Tony Lindgren
2016-01-26 14:34                 ` Pali Rohár
2016-01-26 17:26                   ` Tony Lindgren
2016-02-21 11:12                     ` Pali Rohár
2016-02-22  7:31                       ` Felipe Balbi
2016-02-22  8:34                         ` Pali Rohár
2016-02-22  8:54                           ` Felipe Balbi
2016-02-22  8:54                           ` Felipe Balbi
2016-02-22 15:36                             ` Bin Liu [this message]
2016-02-22 15:49                               ` Adam Ford
2016-01-23 12:57             ` Pali Rohár
2016-05-29 10:38               ` Pali Rohár
2016-06-07 12:50                 ` Pali Rohár
2016-06-08  9:53                   ` Tony Lindgren
2016-06-08 10:02                     ` Felipe Balbi
2016-06-08 10:19                       ` Pali Rohár
     [not found]                       ` <87h9d49exz.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-06-08 10:20                         ` joerg Reisenweber
2016-06-08 12:04                         ` Sergei Shtylyov
     [not found]                           ` <71cb45ec-a269-d510-df34-eb6eaa781da8-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-06-08 12:18                             ` joerg Reisenweber
2016-06-08 12:32                               ` Sergei Shtylyov
2016-06-09 21:09                       ` Bin Liu
2016-06-09 20:58                 ` Bin Liu
2016-06-09 21:25                   ` joerg Reisenweber
2016-06-10 15:08                     ` Bin Liu
2016-06-10 15:23                       ` joerg Reisenweber
2016-06-10 15:59                         ` Bin Liu
2016-06-10 16:15                           ` joerg Reisenweber
2016-06-10 17:04                             ` Nishanth Menon
     [not found]                               ` <575AF32B.2090705-l0cyMroinI0@public.gmane.org>
2016-06-10 17:21                                 ` joerg Reisenweber
2016-06-10 17:37                             ` Bin Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160222153613.GA12995@uda0271908 \
    --to=b-liu@ti.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=joerg@openmoko.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=sre@kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).