public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: megous@megous.com (Ondřej Jirman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 0/7] mmc: sunxi: Add runtime PM support
Date: Mon, 23 Jul 2018 18:16:34 +0200	[thread overview]
Message-ID: <20180723161634.j7akxttoothslyhi@core> (raw)
In-Reply-To: <20180720145143.qgvlk2gbegxwwcfs@flea>

Hi Maxime,

On Fri, Jul 20, 2018 at 04:51:43PM +0200, Maxime Ripard wrote:
> Hi Ondrej,
> 
> On Mon, Jul 16, 2018 at 07:14:28PM +0200, Ond?ej Jirman wrote:
> > On Mon, Apr 16, 2018 at 04:22:58PM +0200, Maxime Ripard wrote:
> > > Hi,
> > > 
> > > Since it's introduction, our MMC controller has had its external clocks
> > > running all the time.
> > > 
> > > While that was working great, the power usage and most importantly the EMI
> > > that it generated was pretty bad.
> > > 
> > > Let's implement some runtime_pm hooks with an autosuspend to shut down the
> > > whole block when the MMC is not active.
> > > 
> > > However, some SDIO devices will not probe properly if we keep shutting down
> > > the controller, so the autosuspend is disabled for the SDIO devices.
> > 
> > I've tested your patches on TBS A711 tablet (A83T). I get this in the log:
> > 
> >   sunxi-mmc 1c10000.mmc: fatal err update clk timeout
> > 
> > Interestingly, this only happens after the first boot. If I hard power cycle the
> > tablet (removing/reinserting the battery) the first boot after that, there's no
> > timeout, and WiFi chip connected to the mmc controller works.
> > 
> > Any other reboot (even power cycling via PMIC), it fails with the above error.
> > Maybe there's some unforeseen interaction of runtime PM with mmc-powerseq used
> > for the wifi chip power seuencing? Do you know what's the above error about?
> > I don't know anything about mmc subsystem.
> 
> It's kind of weird. Do you have an oscilloscope available to look at
> the clock signal (and the reset gpio) and see if there's any
> difference of behaviour?

No, I don't. I can try some printks on the kernel side if it toggles the WiFi
reset/power enable gpios differntly.

It looks like something's different on initialization when booting the kernel.
WiFi works fine for extended periods of time after the hard power cycle. But
when rebooting, it fails.

Adding to the weirdness factor may be the fact that WiFi is not connected via
PMIC, so it gets power almost directly from the battery. So kernel may not be
doing the WiFi reset properly on boot (which is fine right after the hard power
cycle, but leaves the WiFi in unknown state on subsequent reboots).

Thank you and regards,
  o.

> Thanks!
> Maxime
> 
> -- 
> Maxime Ripard, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> https://bootlin.com

      reply	other threads:[~2018-07-23 16:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16 14:22 [PATCH v3 0/7] mmc: sunxi: Add runtime PM support Maxime Ripard
2018-04-16 14:22 ` [PATCH v3 1/7] mmc: sunxi: Reorder the headers Maxime Ripard
2018-04-16 14:23 ` [PATCH v3 2/7] mmc: sunxi: Change sunxi_mmc_init_host argument type Maxime Ripard
2018-04-16 14:23 ` [PATCH v3 3/7] mmc: sunxi: Move bus width configuration to a function Maxime Ripard
2018-04-16 14:23 ` [PATCH v3 4/7] mmc: sunxi: Move clock " Maxime Ripard
2018-04-16 14:23 ` [PATCH v3 5/7] mmc: sunxi: Move the card power " Maxime Ripard
2018-04-16 14:23 ` [PATCH v3 6/7] mmc: sunxi: Add runtime_pm support Maxime Ripard
2018-06-14 14:11   ` Marc Zyngier
2018-06-14 18:57     ` Kevin Hilman
2018-06-15  8:55     ` Ulf Hansson
2018-06-15 14:45       ` Kevin Hilman
2018-06-15 15:12         ` Maxime Ripard
2018-06-26  9:09         ` Maxime Ripard
2018-04-16 14:23 ` [PATCH v3 7/7] mmc: sunxi: Drop the init / reset of the controller from set_ios Maxime Ripard
2018-04-19 13:17 ` [PATCH v3 0/7] mmc: sunxi: Add runtime PM support Ulf Hansson
2018-07-16 17:14 ` Ondřej Jirman
2018-07-20 14:51   ` Maxime Ripard
2018-07-23 16:16     ` Ondřej Jirman [this message]

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=20180723161634.j7akxttoothslyhi@core \
    --to=megous@megous.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox