* [PATCH] ARM: tegra: dalmore: fix irq trigger type
@ 2014-02-11 20:11 Stefan Agner
2014-02-11 20:47 ` Thierry Reding
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Agner @ 2014-02-11 20:11 UTC (permalink / raw)
To: swarren, thierry.reding, josephl
Cc: linux, devicetree, linux-tegra, linux-arm-kernel, linux-kernel,
Stefan Agner
Trigger type needs to be IRQ_TYPE_LEVEL_HIGH since the interrupt
signal gets inverted by the PMC (configured by the invert-interrupt
property).
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
I could not test that patch since I don't have such hardware.
However, I stumbled on that error while tracing a similar error
on Colibri T30.
arch/arm/boot/dts/tegra114-dalmore.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
index 73aecfb..f5025fc 100644
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -888,8 +888,9 @@
palmas: tps65913@58 {
compatible = "ti,palmas";
reg = <0x58>;
- interrupts = <0 86 IRQ_TYPE_LEVEL_LOW>;
+ /* active-low configured by PMC invert-interrupt */
+ interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
#interrupt-cells = <2>;
interrupt-controller;
--
1.8.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: tegra: dalmore: fix irq trigger type
2014-02-11 20:11 [PATCH] ARM: tegra: dalmore: fix irq trigger type Stefan Agner
@ 2014-02-11 20:47 ` Thierry Reding
2014-02-11 21:21 ` Stefan Agner
0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2014-02-11 20:47 UTC (permalink / raw)
To: Stefan Agner
Cc: swarren, josephl, linux, devicetree, linux-tegra,
linux-arm-kernel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]
On Tue, Feb 11, 2014 at 09:11:32PM +0100, Stefan Agner wrote:
> Trigger type needs to be IRQ_TYPE_LEVEL_HIGH since the interrupt
> signal gets inverted by the PMC (configured by the invert-interrupt
> property).
Isn't the reason the other way around? The PMIC generates a low-level
interrupt, but the GIC can only be configured to accept high-level (or
rising edge) and therefore the nvidia,invert-interrupt property needs to
be set in the PMC node?
One nitpick below.
> diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
[...]
> @@ -888,8 +888,9 @@
> palmas: tps65913@58 {
> compatible = "ti,palmas";
> reg = <0x58>;
> - interrupts = <0 86 IRQ_TYPE_LEVEL_LOW>;
>
> + /* active-low configured by PMC invert-interrupt */
> + interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
I'd prefer to keep the properties grouped as before. interrupts is a
"client" property, whereas #interrupt-cells and interrupt-controller
are "provider" properties.
And I think the comment would be more appropriate in the pmc node, for
the same reason that I think the commit description isn't entirely
accurate.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: tegra: dalmore: fix irq trigger type
2014-02-11 20:47 ` Thierry Reding
@ 2014-02-11 21:21 ` Stefan Agner
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Agner @ 2014-02-11 21:21 UTC (permalink / raw)
To: Thierry Reding
Cc: swarren-3lzwWm7+Weoh9ZMKESR00Q, josephl-DDmLM1+adcrQT0dZR+AlfA,
linux-lFZ/pmaqli7XmaaqVzeoHQ, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Am 2014-02-11 21:47, schrieb Thierry Reding:
> On Tue, Feb 11, 2014 at 09:11:32PM +0100, Stefan Agner wrote:
>> Trigger type needs to be IRQ_TYPE_LEVEL_HIGH since the interrupt
>> signal gets inverted by the PMC (configured by the invert-interrupt
>> property).
>
> Isn't the reason the other way around? The PMIC generates a low-level
> interrupt, but the GIC can only be configured to accept high-level (or
> rising edge) and therefore the nvidia,invert-interrupt property needs to
> be set in the PMC node?
Hm yes agreed. I should also write the whole story here, maybe this:
The GIC only support high-active interrupts. When using a PMIC with
low-active interrupt, the PMC has to be configured by using the
nvidia,invert-interrupt property in its node.
This fix sets the GIC back to high-active and reverts commit
eca8f98e404934027f84f72882c5e92ffbd9e5f5.
> One nitpick below.
>
>> diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
> [...]
>> @@ -888,8 +888,9 @@
>> palmas: tps65913@58 {
>> compatible = "ti,palmas";
>> reg = <0x58>;
>> - interrupts = <0 86 IRQ_TYPE_LEVEL_LOW>;
>>
>> + /* active-low configured by PMC invert-interrupt */
>> + interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
>
> I'd prefer to keep the properties grouped as before. interrupts is a
> "client" property, whereas #interrupt-cells and interrupt-controller
> are "provider" properties.
>
> And I think the comment would be more appropriate in the pmc node, for
> the same reason that I think the commit description isn't entirely
> accurate.
Well, its kind a question where you are coming from. I read the data
sheet/schemata, and saw that its low-active. Then I went to the PMIC
node and checked how that interrupt is configured, and what you see is
HIGH_ACTIVE. You then think you've found the bug and fix it by setting
it to IRQ_TYPE_LEVEL_LOW. What you don't know is that PMC is in between
and alters the polarity...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-11 21:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-11 20:11 [PATCH] ARM: tegra: dalmore: fix irq trigger type Stefan Agner
2014-02-11 20:47 ` Thierry Reding
2014-02-11 21:21 ` Stefan Agner
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).