2018-05-08 13:21:19

by Peter Ujfalusi

[permalink] [raw]
Subject: [PATCH 0/4] ARM: dts: am437x boards: Correct (again) tps65218 irq type

Hi,

While based on the datasheet of tps65218 the INT is low active, the GIC_SPI
does not support anythin but IRQ_TYPE_LEVEL_HIGH or IRQ_TYPE_EDGE_RISING:

[ 2.761814] genirq: Setting trigger mode 8 for irq 102 failed (irq_chip_set_type_parent+0x0/0x30)
[ 2.770913] tps65218 0-0024: Failed to request IRQ 102 for tps65218: -22
[ 2.777854] tps65218: probe of 0-0024 failed with error -22

Use LEVEL_HIGH for the interrupt as it looks to be the correct setting:
INTn of tps65218 is connected to NMIn of the SoC.

The offending patches are only in linux-next.

Regards,
Peter
---
Peter Ujfalusi (4):
ARM: dts: am437x-gp-evm: Fixup (again) tps65218 irq type
ARM: dts: am437x-cm-t43: Fixup (again) tps65218 irq type
ARM: dts: am437x-epos-evm: Fixup (again) tps65218 irq type
Revert "ARM: dts: am437x-sk-evm: Correct tps65218 irq type"

arch/arm/boot/dts/am437x-cm-t43.dts | 2 +-
arch/arm/boot/dts/am437x-gp-evm.dts | 2 +-
arch/arm/boot/dts/am437x-sk-evm.dts | 2 +-
arch/arm/boot/dts/am43x-epos-evm.dts | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

--
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki



2018-05-08 13:21:11

by Peter Ujfalusi

[permalink] [raw]
Subject: [PATCH 4/4] Revert "ARM: dts: am437x-sk-evm: Correct tps65218 irq type"

This reverts commit 561f9bcf268422ebe78a1739d86a255fd481c71c.

While the correct IRQ level fixed the WARN_ON(), but prevented the probe
of tps65218 as GIC_SPI does not support LEVEL_LOW (?)

Use LEVEL_HIGH as it looks to be the accurate one since the INTn of TPS is
connected to NMIn of the SoC.

Fixes: 561f9bcf2684 ("ARM: dts: am437x-sk-evm: Correct tps65218 irq type")
Signed-off-by: Peter Ujfalusi <[email protected]>
---
arch/arm/boot/dts/am437x-sk-evm.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
index ca5c9070476c..4118802b7fea 100644
--- a/arch/arm/boot/dts/am437x-sk-evm.dts
+++ b/arch/arm/boot/dts/am437x-sk-evm.dts
@@ -429,7 +429,7 @@
tps@24 {
compatible = "ti,tps65218";
reg = <0x24>;
- interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;

--
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


2018-05-08 13:21:40

by Peter Ujfalusi

[permalink] [raw]
Subject: [PATCH 2/4] ARM: dts: am437x-cm-t43: Fixup (again) tps65218 irq type

While the correct IRQ level fixed the WARN_ON(), but prevented the probe
of tps65218 as GIC_SPI does not support LEVEL_LOW (?)

Use LEVEL_HIGH as it looks to be the accurate one since the INTn of TPS is
connected to NMIn of the SoC.

Fixes: b997f534b551 ("ARM: dts: am437x-cm-t43: Correct tps65218 irq type")
Signed-off-by: Peter Ujfalusi <[email protected]>
---
arch/arm/boot/dts/am437x-cm-t43.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am437x-cm-t43.dts b/arch/arm/boot/dts/am437x-cm-t43.dts
index 54f67f98046c..bff5abe69bdb 100644
--- a/arch/arm/boot/dts/am437x-cm-t43.dts
+++ b/arch/arm/boot/dts/am437x-cm-t43.dts
@@ -203,7 +203,7 @@
tps65218: tps65218@24 {
compatible = "ti,tps65218";
reg = <0x24>;
- interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_LOW>; /* NMIn */
+ interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* NMIn */
interrupt-parent = <&gic>;
interrupt-controller;
#interrupt-cells = <2>;
--
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


2018-05-08 13:21:50

by Peter Ujfalusi

[permalink] [raw]
Subject: [PATCH 3/4] ARM: dts: am437x-epos-evm: Fixup (again) tps65218 irq type

While the correct IRQ level fixed the WARN_ON(), but prevented the probe
of tps65218 as GIC_SPI does not support LEVEL_LOW (?)

Use LEVEL_HIGH as it looks to be the accurate one since the INTn of TPS is
connected to NMIn of the SoC.

Fixes: 7a53a34622da ("ARM: dts: am437x-epos-evm: Correct tps65218 irq type")
Signed-off-by: Peter Ujfalusi <[email protected]>
---
arch/arm/boot/dts/am43x-epos-evm.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
index 7a5b06fb2cff..6502d3397653 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -595,7 +595,7 @@
tps65218: tps65218@24 {
reg = <0x24>;
compatible = "ti,tps65218";
- interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_LOW>; /* NMIn */
+ interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* NMIn */
interrupt-controller;
#interrupt-cells = <2>;

--
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


2018-05-08 13:22:14

by Peter Ujfalusi

[permalink] [raw]
Subject: [PATCH 1/4] ARM: dts: am437x-gp-evm: Fixup (again) tps65218 irq type

While the correct IRQ level fixed the WARN_ON(), but prevented the probe
of tps65218 as GIC_SPI does not support LEVEL_LOW (?)

Use LEVEL_HIGH as it looks to be the accurate one since the INTn of TPS is
connected to NMIn of the SoC.

Fixes: 5692b911c980 ("ARM: dts: am437x-gp-evm: Correct tps65218 irq type")
Signed-off-by: Peter Ujfalusi <[email protected]>
---
arch/arm/boot/dts/am437x-gp-evm.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
index d0192e07adc6..60414b1ca404 100644
--- a/arch/arm/boot/dts/am437x-gp-evm.dts
+++ b/arch/arm/boot/dts/am437x-gp-evm.dts
@@ -543,7 +543,7 @@
tps65218: tps65218@24 {
reg = <0x24>;
compatible = "ti,tps65218";
- interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_LOW>; /* NMIn */
+ interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* NMIn */
interrupt-controller;
#interrupt-cells = <2>;

--
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


2018-05-08 14:16:34

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 0/4] ARM: dts: am437x boards: Correct (again) tps65218 irq type

* Peter Ujfalusi <[email protected]> [180508 13:22]:
> Hi,
>
> While based on the datasheet of tps65218 the INT is low active, the GIC_SPI
> does not support anythin but IRQ_TYPE_LEVEL_HIGH or IRQ_TYPE_EDGE_RISING:
>
> [ 2.761814] genirq: Setting trigger mode 8 for irq 102 failed (irq_chip_set_type_parent+0x0/0x30)
> [ 2.770913] tps65218 0-0024: Failed to request IRQ 102 for tps65218: -22
> [ 2.777854] tps65218: probe of 0-0024 failed with error -22

So does the tps65218 have some register to control the interrupt
direction or is it's datasheet wrong?

BTW, ADC might be a good test case for PMIC interrupt if it has one.

> Use LEVEL_HIGH for the interrupt as it looks to be the correct setting:
> INTn of tps65218 is connected to NMIn of the SoC.
>
> The offending patches are only in linux-next.

OK

Regards,

Tony

2018-05-09 04:02:39

by Keerthy

[permalink] [raw]
Subject: Re: [PATCH 0/4] ARM: dts: am437x boards: Correct (again) tps65218 irq type



On Tuesday 08 May 2018 07:46 PM, Tony Lindgren wrote:
> * Peter Ujfalusi <[email protected]> [180508 13:22]:
>> Hi,
>>
>> While based on the datasheet of tps65218 the INT is low active, the GIC_SPI
>> does not support anythin but IRQ_TYPE_LEVEL_HIGH or IRQ_TYPE_EDGE_RISING:
>>
>> [ 2.761814] genirq: Setting trigger mode 8 for irq 102 failed (irq_chip_set_type_parent+0x0/0x30)
>> [ 2.770913] tps65218 0-0024: Failed to request IRQ 102 for tps65218: -22
>> [ 2.777854] tps65218: probe of 0-0024 failed with error -22
>
> So does the tps65218 have some register to control the interrupt
> direction or is it's datasheet wrong?
>
> BTW, ADC might be a good test case for PMIC interrupt if it has one.

There is no ADC on this PMIC.

>
>> Use LEVEL_HIGH for the interrupt as it looks to be the correct setting:
>> INTn of tps65218 is connected to NMIn of the SoC.
>>
>> The offending patches are only in linux-next.
>
> OK
>
> Regards,
>
> Tony
>

2018-05-15 18:16:56

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 0/4] ARM: dts: am437x boards: Correct (again) tps65218 irq type

* Keerthy <[email protected]> [180509 04:03]:
>
>
> On Tuesday 08 May 2018 07:46 PM, Tony Lindgren wrote:
> > * Peter Ujfalusi <[email protected]> [180508 13:22]:
> >> Hi,
> >>
> >> While based on the datasheet of tps65218 the INT is low active, the GIC_SPI
> >> does not support anythin but IRQ_TYPE_LEVEL_HIGH or IRQ_TYPE_EDGE_RISING:
> >>
> >> [ 2.761814] genirq: Setting trigger mode 8 for irq 102 failed (irq_chip_set_type_parent+0x0/0x30)
> >> [ 2.770913] tps65218 0-0024: Failed to request IRQ 102 for tps65218: -22
> >> [ 2.777854] tps65218: probe of 0-0024 failed with error -22
> >
> > So does the tps65218 have some register to control the interrupt
> > direction or is it's datasheet wrong?
> >
> > BTW, ADC might be a good test case for PMIC interrupt if it has one.
>
> There is no ADC on this PMIC.
>
> >
> >> Use LEVEL_HIGH for the interrupt as it looks to be the correct setting:
> >> INTn of tps65218 is connected to NMIn of the SoC.
> >>
> >> The offending patches are only in linux-next.
> >
> > OK

Applying these all into omap-for-v4.18/dt.

Regards,

Tony