From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] gpio: omap: Add level wakeup handling for omap4 based SoCs
Date: Tue, 11 Sep 2018 11:24:19 -0700 [thread overview]
Message-ID: <20180911182419.GC5662@atomide.com> (raw)
In-Reply-To: <444bae18-9737-8e13-2a0f-c08863ae1336@ti.com>
* Grygorii Strashko <grygorii.strashko@ti.com> [180911 17:02]:
> I agree with patch in general as it seems will not break anything and
> change localized for omap4 only.
OK cool. I'll be posting a related patch to get rid of
the custom PM functions too.
> But I'd be very appreciated if you can provide more information about issue
> which helps better understand it, so could you, if possible, collect dump of:
> - GPIO bank regs right before entering WFI state in Idle (or as close as possible)
> I'm interesting in sysc/s, ctrl, irq's regs (+wakupen) and GPIO_DEBOUNCEN first of all
> - GPIO bank CLKCTRL registers (is it "in transition" state).
> in non working case.
The thing is there is nothing special in the GPIO registers in the
non-working vs working case. The GPIO_DEBOUNCEN was my first suspect
too, but that's not enabled.
The only difference is that the related CLKSTCTRL CLKACTIVITY bit
for the 32K_GFCLK clock stays stuck showing busy after a level interrupt
and wkup_en set. The 32K_GFCLK bit will only clear after reset of the
GPIO module in question until a new level interrupt is seen.
So with this patch we go from the following dump on omap4 gpio
bank1 running before idle:
GPIO_IRQSTATUS_RAW 0x4a310024 = 0000000000
GPIO_IRQSTATUS_RAW2 0x4a310028 = 0000000000
GPIO_IRQSTATUS_0 0x4a31002c = 0000000000
GPIO_IRQSTATUS_1 0x4a310030 = 0000000000
GPIO_IRQSTATUS_SET_0 0x4a310034 = 0x00000080
GPIO_IRQSTATUS_CLR_0 0x4a31003c = 0x00000080
GPIO_IRQWAKEN_0 0x4a310044 = 0x00000080 <- set
GPIO_LEVELDETECT0 0x4a310140 = 0000000000
GPIO_LEVELDETECT1 0x4a310144 = 0x00000080
GPIO_RISINGDETECT 0x4a310148 = 0000000000
GPIO_FALLINGDETECT 0x4a31014c = 0000000000
GPIO_DEBOUNCENABLE 0x4a310150 = 0000000000
GPIO_DEBOUNCINGTIME 0x4a310154 = 0000000000
to the following dump where GPIO_IRQWAKEN_0 is not set until
for idle:
GPIO_IRQSTATUS_RAW 0x4a310024 = 0000000000
GPIO_IRQSTATUS_RAW2 0x4a310028 = 0000000000
GPIO_IRQSTATUS_0 0x4a31002c = 0000000000
GPIO_IRQSTATUS_1 0x4a310030 = 0000000000
GPIO_IRQSTATUS_SET_0 0x4a310034 = 0x00000080
GPIO_IRQSTATUS_CLR_0 0x4a31003c = 0x00000080
GPIO_IRQWAKEN_0 0x4a310044 = 0000000000 <- cleared
GPIO_LEVELDETECT0 0x4a310140 = 0000000000
GPIO_LEVELDETECT1 0x4a310144 = 0x00000080
GPIO_RISINGDETECT 0x4a310148 = 0000000000
GPIO_FALLINGDETECT 0x4a31014c = 0000000000
GPIO_DEBOUNCENABLE 0x4a310150 = 0000000000
GPIO_DEBOUNCINGTIME 0x4a310154 = 0000000000
Regards,
Tony
next prev parent reply other threads:[~2018-09-11 18:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 20:06 [PATCH] gpio: omap: Add level wakeup handling for omap4 based SoCs Tony Lindgren
2018-09-11 16:58 ` Grygorii Strashko
2018-09-11 18:24 ` Tony Lindgren [this message]
2018-09-12 0:23 ` Grygorii Strashko
2018-09-12 0:42 ` Tony Lindgren
2018-09-12 16:08 ` Grygorii Strashko
2018-09-12 17:38 ` Tony Lindgren
2018-09-11 18:41 ` Tony Lindgren
2018-09-12 17:09 ` Tony Lindgren
2018-09-18 23:28 ` Linus Walleij
2018-09-19 0:28 ` 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=20180911182419.GC5662@atomide.com \
--to=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).