[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220530084039.7rjjbm4gkplg5747@maple.lan>
Date: Mon, 30 May 2022 09:40:39 +0100
From: Daniel Thompson <daniel.thompson@...aro.org>
To: richard clark <richard.xnu.clark@...il.com>
Cc: Marc Zyngier <maz@...nel.org>, Robin Murphy <robin.murphy@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
s32@....com, leoyang.li@....com, catalin-dan.udma@....com,
bogdan.hamciuc@....com, bogdan.folea@....com,
ciprianmarian.costea@....com, radu-nicolae.pirea@....com,
ghennadi.procopciuc@....com
Subject: Re: Question about SPIs' interrupt trigger type restrictions
On Thu, May 26, 2022 at 08:09:32PM +0800, richard clark wrote:
> CC'ing some nxp guys for the S32G274A SOC...
>
> On Thu, May 26, 2022 at 2:54 PM Marc Zyngier <maz@...nel.org> wrote:
> > richard clark <richard.xnu.clark@...il.com> wrote:
> > > On Thu, May 26, 2022 at 3:14 AM Robin Murphy <robin.murphy@....com> wrote:
> > > > On 2022-05-25 11:01, richard clark wrote:
> > From the GIC500 r1p1 TRM, page 2-8:
> >
> > <quote>
> > SPIs are generated either by wire inputs or by writes to the AXI4
> > slave programming interface. The GIC-500 can support up to 960 SPIs
> > corresponding to the external spi[991:32] signal. The number of SPIs
> > available depends on the implemented configuration. The permitted
> > values are 32-960, in steps of 32. The first SPI has an ID number of
> > 32. You can configure whether each SPI is triggered on a rising edge
> > or is active-HIGH level-sensitive.
> > </quote>
> >
> > So I have no idea what you are talking about, but you definitely have
> > the wrong end of the stick. Both the architecture and the
> > implementations are aligned with what the GIC drivers do.
>
> What I am talking about is - The SPI is triggered on a rising edge
> only, while the falling edge is not as the document says. But I've
> observed the falling edge does trigger the SPI interrupt on my
> platform (the SOC is NXP S32G274A, an external wakeup signal with high
> to low transition to wake up the SOC - 'Wakeup/Interrupt Rising-Edge
> Event Enable Register (WIREER)' and 'Wakeup/Interrupt Falling-Edge
> Event Enable Register (WIFEER)', WIFEER set 1 and WIREER set 0
> works).
>
> I don't know why the GIC has such a behavior and what the subtle
> rationale is behind this, so just mark this as a record...
Are you really describing the GIC behaviour here? It sounds like you are
describing the behaviour of the Wakeup Unit.
The SPI that goes to the GIC is the *output* of the WKPU. However the
registers you mention above all control edge detection at the input to
the WKPU. If so, the kernel would need an WKPU irqchip driver in order
to manage the trigger mode registers above (and to clear them).
Daniel.
PS I can't find any sign of a WKPU driver in the mainline kernel and
AFAICT this would make wake up sources unusable. What kernel have
you been running your experiments on?
Powered by blists - more mailing lists