[Letux-kernel] omap_hsmmc + gta04 + sdio irq + runtime_suspend + 4 bit = trouble

Andreas Kemnade andreas at kemnade.info
Fri Sep 7 18:48:16 CEST 2018


Hi,

On Fri, 7 Sep 2018 09:19:06 -0700
Tony Lindgren <tony at atomide.com> wrote:

> * Andreas Kemnade <andreas at kemnade.info> [180904 20:57]:
> > Ok, what fixes the problem:
> > use above mentioned devicetree, reverting 5b83b2234be6 and
> > applying this patch:  
> 
> Hmm well the Linux generic wakeirqs are known to work, so
> if there's a bug lurking around somewhere we should fix it
> naturally :)
> 
> But I'm wondering if you have some SDIO pins floating type
> issue when your device enters deeper idle states? And maybe
> your patches actually end up blocking the deeper idle states
> hiding the issue?
> 
I guess you have read my mails a bit too fast and overread many
details, so I try to sumarize
Summary:
sdio irq + blocked runtime suspend = works

sdio irq + pinctl wakeirq + 1 bit = works

sdio irq + pinctl wakeirq + 4 bit = does not work

sdio irq + wakeirq via remapped dat1 as gpio + 4 bit= works but too many
interrupts if wlan is down (*)

sdio irq + wakeirq via remapped dat1 as gpio + 4 bit -(=reverted)
generic_wakeirq_patch = does not work

sdio irq + wakeirq via remapped dat1 as gpio + 1 bit -(=reverted)
generic_wakeirq_patch + reordering some things = works

Note: works means: sane number of wake interrupts seen in a low-traffic
wlan, network traffic works reliable and performant.

And there are some interesting sections in the sdio simplificated spec
regarding 4 bit mode and irqs missing...

> If that's the case, you could define separate pinctrl
> idle and default states. You can grep for something like
> pinctrl-names = "default", "idle" for some examples.
> 
> I fairly regularly test the mainline kernel with omap3
> hitting off mode during idle with wlan connected and
> things are working for me with no issues and the device
> wakes to a ping over wlan just fine.

What sdio device are you testing 1bit or 4bit? with or without
level shifter in between?

At least I now have a working not-so-clean solution, so I have a base to
experiment and analyze to get a better solution.

(*) here probably comes into account that the wlan chip is powered of
and as a side effect dat1 gets low (through a level shifter).
As the generic wakeup irq is not turned off (contrary to the older
solution) when sdio irq is disabled, it will always runtime resume
quickly. 

Regards,
Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20180907/50a420a4/attachment.asc>


More information about the Letux-kernel mailing list