All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: "Sebastian Andrzej Siewior" <sebastian@breakpoint.cc>,
	"Lee Jones" <lee.jones@linaro.org>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Pavel Machek" <pavel@ucw.cz>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mfd: twl4030-power: Fix PM idle pin configuration to not conflict with regulators
Date: Thu, 4 Sep 2014 09:39:01 -0700	[thread overview]
Message-ID: <20140904163900.GT11766@atomide.com> (raw)
In-Reply-To: <5408269F.7030400@linutronix.de>

* Sebastian Andrzej Siewior <bigeasy@linutronix.de> [140904 01:46]:
> On 09/03/2014 08:39 PM, Tony Lindgren wrote:
> >> good.txt and bad.txt are from the late_initcall.
> >>
> >>  $ diff -u good.txt bad.txt
> >> --- good.txt    2014-09-03 10:29:58.920317368 +0200
> >> +++ bad.txt     2014-09-03 10:28:57.064313222 +0200
> > 
> > Hmm can you check that you have good.txt and bad.txt the
> > right way? I'd assume you need VAUX2 or VAUX3 enabled
> > not disabled for the MMC to work?
> 
> No, it was correct. If you look at the complete file you will notice
> the - which removes the mmc detect/mount in the bad case and + which
> adds the -110 error
...
 
> With that patch it seems it is a little harder to trigger. It is
> usually every other boot that fails. Here a diff between two that
> worked (say good-v1 vs good-v2):
...
 
> It took mmc a little longer to detect but it worked. And the content of
> the three registers seem not to matter _or_ it was dumped before MMC
> got active.
...
 
> I didn't change a thing, I just pressed reset. As you see the content
> of the TWL registers don't seem to be that important since it was the
> same at the time of the dump. And the mmc didn't came back.

OK. I guess that means that it's most likely some timing related issue,
or an issue with some regulator not being ready by the time the MMC
probes. Or it's a bug somewhere that I'm not figuring out.

Looking at the twl-regulator.c, twl4030reg_enable just sets the group
bit and we're not checking any status and don't have startup-delay-us
for them.

At least phy-twl4030-usb.c has twl4030_i2c_write_u8_verify(), I wonder
if adding a read back of the register to twl-regulator.c would help?

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mfd: twl4030-power: Fix PM idle pin configuration to not conflict with regulators
Date: Thu, 4 Sep 2014 09:39:01 -0700	[thread overview]
Message-ID: <20140904163900.GT11766@atomide.com> (raw)
In-Reply-To: <5408269F.7030400@linutronix.de>

* Sebastian Andrzej Siewior <bigeasy@linutronix.de> [140904 01:46]:
> On 09/03/2014 08:39 PM, Tony Lindgren wrote:
> >> good.txt and bad.txt are from the late_initcall.
> >>
> >>  $ diff -u good.txt bad.txt
> >> --- good.txt    2014-09-03 10:29:58.920317368 +0200
> >> +++ bad.txt     2014-09-03 10:28:57.064313222 +0200
> > 
> > Hmm can you check that you have good.txt and bad.txt the
> > right way? I'd assume you need VAUX2 or VAUX3 enabled
> > not disabled for the MMC to work?
> 
> No, it was correct. If you look at the complete file you will notice
> the - which removes the mmc detect/mount in the bad case and + which
> adds the -110 error
...
 
> With that patch it seems it is a little harder to trigger. It is
> usually every other boot that fails. Here a diff between two that
> worked (say good-v1 vs good-v2):
...
 
> It took mmc a little longer to detect but it worked. And the content of
> the three registers seem not to matter _or_ it was dumped before MMC
> got active.
...
 
> I didn't change a thing, I just pressed reset. As you see the content
> of the TWL registers don't seem to be that important since it was the
> same at the time of the dump. And the mmc didn't came back.

OK. I guess that means that it's most likely some timing related issue,
or an issue with some regulator not being ready by the time the MMC
probes. Or it's a bug somewhere that I'm not figuring out.

Looking at the twl-regulator.c, twl4030reg_enable just sets the group
bit and we're not checking any status and don't have startup-delay-us
for them.

At least phy-twl4030-usb.c has twl4030_i2c_write_u8_verify(), I wonder
if adding a read back of the register to twl-regulator.c would help?

Regards,

Tony

  reply	other threads:[~2014-09-04 16:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 15:24 [PATCH] mfd: twl4030-power: Fix PM idle pin configuration to not conflict with regulators Tony Lindgren
2014-08-19 15:24 ` Tony Lindgren
2014-08-19 21:33 ` Aaro Koskinen
2014-08-19 21:33   ` Aaro Koskinen
2014-08-20 12:30 ` Lee Jones
2014-08-20 12:30   ` Lee Jones
2014-09-02  8:29 ` Sebastian Andrzej Siewior
2014-09-02  8:29   ` Sebastian Andrzej Siewior
2014-09-03  0:24   ` Tony Lindgren
2014-09-03  0:24     ` Tony Lindgren
2014-09-03  8:38     ` Sebastian Andrzej Siewior
2014-09-03  8:38       ` Sebastian Andrzej Siewior
2014-09-03 18:39       ` Tony Lindgren
2014-09-03 18:39         ` Tony Lindgren
2014-09-04  8:45         ` Sebastian Andrzej Siewior
2014-09-04 16:39           ` Tony Lindgren [this message]
2014-09-04 16:39             ` Tony Lindgren

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=20140904163900.GT11766@atomide.com \
    --to=tony@atomide.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=bigeasy@linutronix.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=sebastian@breakpoint.cc \
    --cc=sre@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.