devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: rockchip: Change RK809 PMIC interrupt polarity
@ 2019-12-06 15:42 Miquel Raynal
  2019-12-06 15:48 ` Heiko Stuebner
  0 siblings, 1 reply; 7+ messages in thread
From: Miquel Raynal @ 2019-12-06 15:42 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree, Heiko Stuebner, linux-rockchip
  Cc: Paul Kocialkowski, Maxime Chevallier, Thomas Petazzoni, Miquel Raynal

PMIC interrupt can be active high or active low depending on BIT(1) of
the GPIO_INT_CFG pin. The default is 0x1, which means active
high. Change the polarity in the device tree to reflect the default
state.

Without this and with the current code base, the interrupt never stops
triggering while the MFD driver does not see anything to
check/clear/mask so after 100000 spurious IRQs, the kernel simply
desactivates the interrupt:

        irq 36: nobody cared (try booting with the "irqpoll" option)
        [...]
        handlers:
        [<(____ptrval____)>] irq_default_primary_handler threaded
	[<(____ptrval____)>] regmap_irq_thread
        Disabling IRQ #36

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 arch/arm64/boot/dts/rockchip/px30-evb.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/px30-evb.dts b/arch/arm64/boot/dts/rockchip/px30-evb.dts
index 869f90cbf0da..a922ea75639d 100644
--- a/arch/arm64/boot/dts/rockchip/px30-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/px30-evb.dts
@@ -138,7 +138,7 @@
 		compatible = "rockchip,rk809";
 		reg = <0x20>;
 		interrupt-parent = <&gpio0>;
-		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+		interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pmic_int>;
 		rockchip,system-power-controller;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Change RK809 PMIC interrupt polarity
  2019-12-06 15:42 [PATCH] arm64: dts: rockchip: Change RK809 PMIC interrupt polarity Miquel Raynal
@ 2019-12-06 15:48 ` Heiko Stuebner
  2019-12-06 15:52   ` Miquel Raynal
  0 siblings, 1 reply; 7+ messages in thread
From: Heiko Stuebner @ 2019-12-06 15:48 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Rob Herring, Mark Rutland, devicetree, linux-rockchip,
	Paul Kocialkowski, Maxime Chevallier, Thomas Petazzoni

Hi Miquel,

Am Freitag, 6. Dezember 2019, 16:42:47 CET schrieb Miquel Raynal:
> PMIC interrupt can be active high or active low depending on BIT(1) of
> the GPIO_INT_CFG pin. The default is 0x1, which means active
> high. Change the polarity in the device tree to reflect the default
> state.
> 
> Without this and with the current code base, the interrupt never stops
> triggering while the MFD driver does not see anything to
> check/clear/mask so after 100000 spurious IRQs, the kernel simply
> desactivates the interrupt:
> 
>         irq 36: nobody cared (try booting with the "irqpoll" option)
>         [...]
>         handlers:
>         [<(____ptrval____)>] irq_default_primary_handler threaded
> 	[<(____ptrval____)>] regmap_irq_thread
>         Disabling IRQ #36
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

*coughs slightly*

mfd: rk808: Set RK817 interrupt polarity to low
https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/drivers/mfd/rk808.c?h=for-mfd-next&id=dbd16ef53487084816a20f662423ab543a75fc83

Should be in the current merge window already I guess ;-)

Having this consistent over all rk8xx seemed nicer.


Heiko


> ---
>  arch/arm64/boot/dts/rockchip/px30-evb.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/px30-evb.dts b/arch/arm64/boot/dts/rockchip/px30-evb.dts
> index 869f90cbf0da..a922ea75639d 100644
> --- a/arch/arm64/boot/dts/rockchip/px30-evb.dts
> +++ b/arch/arm64/boot/dts/rockchip/px30-evb.dts
> @@ -138,7 +138,7 @@
>  		compatible = "rockchip,rk809";
>  		reg = <0x20>;
>  		interrupt-parent = <&gpio0>;
> -		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
> +		interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&pmic_int>;
>  		rockchip,system-power-controller;
> 





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Change RK809 PMIC interrupt polarity
  2019-12-06 15:48 ` Heiko Stuebner
@ 2019-12-06 15:52   ` Miquel Raynal
  2019-12-06 16:01     ` Heiko Stuebner
  0 siblings, 1 reply; 7+ messages in thread
From: Miquel Raynal @ 2019-12-06 15:52 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Rob Herring, Mark Rutland, devicetree, linux-rockchip,
	Paul Kocialkowski, Maxime Chevallier, Thomas Petazzoni

Hi Heiko,

Heiko Stuebner <heiko@sntech.de> wrote on Fri, 06 Dec 2019 16:48:00
+0100:

> Hi Miquel,
> 
> Am Freitag, 6. Dezember 2019, 16:42:47 CET schrieb Miquel Raynal:
> > PMIC interrupt can be active high or active low depending on BIT(1) of
> > the GPIO_INT_CFG pin. The default is 0x1, which means active
> > high. Change the polarity in the device tree to reflect the default
> > state.
> > 
> > Without this and with the current code base, the interrupt never stops
> > triggering while the MFD driver does not see anything to
> > check/clear/mask so after 100000 spurious IRQs, the kernel simply
> > desactivates the interrupt:
> > 
> >         irq 36: nobody cared (try booting with the "irqpoll" option)
> >         [...]
> >         handlers:
> >         [<(____ptrval____)>] irq_default_primary_handler threaded
> > 	[<(____ptrval____)>] regmap_irq_thread
> >         Disabling IRQ #36
> > 
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>  
> 
> *coughs slightly*
> 
> mfd: rk808: Set RK817 interrupt polarity to low
> https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/drivers/mfd/rk808.c?h=for-mfd-next&id=dbd16ef53487084816a20f662423ab543a75fc83
> 
> Should be in the current merge window already I guess ;-)

This time I swear I checked your tree. But this time we did not ended
with the same fix so I missed this one *again* :)

> 
> Having this consistent over all rk8xx seemed nicer.

I'm fine with this approach too.

Thanks,
Miquèl

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Change RK809 PMIC interrupt polarity
  2019-12-06 15:52   ` Miquel Raynal
@ 2019-12-06 16:01     ` Heiko Stuebner
  2019-12-06 16:34       ` Miquel Raynal
  0 siblings, 1 reply; 7+ messages in thread
From: Heiko Stuebner @ 2019-12-06 16:01 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Rob Herring, Mark Rutland, devicetree, linux-rockchip,
	Paul Kocialkowski, Maxime Chevallier, Thomas Petazzoni

Am Freitag, 6. Dezember 2019, 16:52:50 CET schrieb Miquel Raynal:
> Hi Heiko,
> 
> Heiko Stuebner <heiko@sntech.de> wrote on Fri, 06 Dec 2019 16:48:00
> +0100:
> 
> > Hi Miquel,
> > 
> > Am Freitag, 6. Dezember 2019, 16:42:47 CET schrieb Miquel Raynal:
> > > PMIC interrupt can be active high or active low depending on BIT(1) of
> > > the GPIO_INT_CFG pin. The default is 0x1, which means active
> > > high. Change the polarity in the device tree to reflect the default
> > > state.
> > > 
> > > Without this and with the current code base, the interrupt never stops
> > > triggering while the MFD driver does not see anything to
> > > check/clear/mask so after 100000 spurious IRQs, the kernel simply
> > > desactivates the interrupt:
> > > 
> > >         irq 36: nobody cared (try booting with the "irqpoll" option)
> > >         [...]
> > >         handlers:
> > >         [<(____ptrval____)>] irq_default_primary_handler threaded
> > > 	[<(____ptrval____)>] regmap_irq_thread
> > >         Disabling IRQ #36
> > > 
> > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>  
> > 
> > *coughs slightly*
> > 
> > mfd: rk808: Set RK817 interrupt polarity to low
> > https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/drivers/mfd/rk808.c?h=for-mfd-next&id=dbd16ef53487084816a20f662423ab543a75fc83
> > 
> > Should be in the current merge window already I guess ;-)
> 
> This time I swear I checked your tree. But this time we did not ended
> with the same fix so I missed this one *again* :)

No worries ... I guess I should check where I hid additional patches ;-)

So right now px30 stuff is in the trees:
- mine
- mfd
- phy (first round of dsi phy, refinement pending on the list)
- nvmem (for the otp controller)
- drm (drm/rockchip: vop: add the definition of dclk_pol)
- clk

and pending on lists:
- drm (dsi support + timings)
- phy (refinement as mentioned above)

not submitted yet but planning to get this done this weekend:
- panel driver for px30-evb
- dsi devicetree stuff


Hope this helps a bit to prevent more double work ;-)
Heiko

> 
> > 
> > Having this consistent over all rk8xx seemed nicer.
> 
> I'm fine with this approach too.
> 
> Thanks,
> Miquèl





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Change RK809 PMIC interrupt polarity
  2019-12-06 16:01     ` Heiko Stuebner
@ 2019-12-06 16:34       ` Miquel Raynal
  2019-12-06 17:09         ` Heiko Stuebner
  0 siblings, 1 reply; 7+ messages in thread
From: Miquel Raynal @ 2019-12-06 16:34 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Rob Herring, Mark Rutland, devicetree, linux-rockchip,
	Paul Kocialkowski, Maxime Chevallier, Thomas Petazzoni

Hi Heiko,

Heiko Stuebner <heiko@sntech.de> wrote on Fri, 06 Dec 2019 17:01:58
+0100:

> Am Freitag, 6. Dezember 2019, 16:52:50 CET schrieb Miquel Raynal:
> > Hi Heiko,
> > 
> > Heiko Stuebner <heiko@sntech.de> wrote on Fri, 06 Dec 2019 16:48:00
> > +0100:
> >   
> > > Hi Miquel,
> > > 
> > > Am Freitag, 6. Dezember 2019, 16:42:47 CET schrieb Miquel Raynal:  
> > > > PMIC interrupt can be active high or active low depending on BIT(1) of
> > > > the GPIO_INT_CFG pin. The default is 0x1, which means active
> > > > high. Change the polarity in the device tree to reflect the default
> > > > state.
> > > > 
> > > > Without this and with the current code base, the interrupt never stops
> > > > triggering while the MFD driver does not see anything to
> > > > check/clear/mask so after 100000 spurious IRQs, the kernel simply
> > > > desactivates the interrupt:
> > > > 
> > > >         irq 36: nobody cared (try booting with the "irqpoll" option)
> > > >         [...]
> > > >         handlers:
> > > >         [<(____ptrval____)>] irq_default_primary_handler threaded
> > > > 	[<(____ptrval____)>] regmap_irq_thread
> > > >         Disabling IRQ #36
> > > > 
> > > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>    
> > > 
> > > *coughs slightly*
> > > 
> > > mfd: rk808: Set RK817 interrupt polarity to low
> > > https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/drivers/mfd/rk808.c?h=for-mfd-next&id=dbd16ef53487084816a20f662423ab543a75fc83
> > > 
> > > Should be in the current merge window already I guess ;-)  
> > 
> > This time I swear I checked your tree. But this time we did not ended
> > with the same fix so I missed this one *again* :)  
> 
> No worries ... I guess I should check where I hid additional patches ;-)
> 
> So right now px30 stuff is in the trees:
> - mine
> - mfd
> - phy (first round of dsi phy, refinement pending on the list)
> - nvmem (for the otp controller)
> - drm (drm/rockchip: vop: add the definition of dclk_pol)
> - clk
> 
> and pending on lists:
> - drm (dsi support + timings)
> - phy (refinement as mentioned above)
> 
> not submitted yet but planning to get this done this weekend:
> - panel driver for px30-evb
> - dsi devicetree stuff

Thank you very much for the detailed list! I will soon work on the
PMIC audio support and on secure boot, do not hesitate to ping me if
you see this kind of work coming on the mailing list!

Thanks,
Miquèl

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Change RK809 PMIC interrupt polarity
  2019-12-06 16:34       ` Miquel Raynal
@ 2019-12-06 17:09         ` Heiko Stuebner
  2019-12-06 17:16           ` Miquel Raynal
  0 siblings, 1 reply; 7+ messages in thread
From: Heiko Stuebner @ 2019-12-06 17:09 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Rob Herring, Mark Rutland, devicetree, linux-rockchip,
	Paul Kocialkowski, Maxime Chevallier, Thomas Petazzoni

Hi Miquel,

Am Freitag, 6. Dezember 2019, 17:34:53 CET schrieb Miquel Raynal:
> Heiko Stuebner <heiko@sntech.de> wrote on Fri, 06 Dec 2019 17:01:58
> +0100:
> > Am Freitag, 6. Dezember 2019, 16:52:50 CET schrieb Miquel Raynal:
> > > Heiko Stuebner <heiko@sntech.de> wrote on Fri, 06 Dec 2019 16:48:00
> > > +0100:
> > > > Am Freitag, 6. Dezember 2019, 16:42:47 CET schrieb Miquel Raynal:  
> > > > > PMIC interrupt can be active high or active low depending on BIT(1) of
> > > > > the GPIO_INT_CFG pin. The default is 0x1, which means active
> > > > > high. Change the polarity in the device tree to reflect the default
> > > > > state.
> > > > > 
> > > > > Without this and with the current code base, the interrupt never stops
> > > > > triggering while the MFD driver does not see anything to
> > > > > check/clear/mask so after 100000 spurious IRQs, the kernel simply
> > > > > desactivates the interrupt:
> > > > > 
> > > > >         irq 36: nobody cared (try booting with the "irqpoll" option)
> > > > >         [...]
> > > > >         handlers:
> > > > >         [<(____ptrval____)>] irq_default_primary_handler threaded
> > > > > 	[<(____ptrval____)>] regmap_irq_thread
> > > > >         Disabling IRQ #36
> > > > > 
> > > > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>    
> > > > 
> > > > *coughs slightly*
> > > > 
> > > > mfd: rk808: Set RK817 interrupt polarity to low
> > > > https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/drivers/mfd/rk808.c?h=for-mfd-next&id=dbd16ef53487084816a20f662423ab543a75fc83
> > > > 
> > > > Should be in the current merge window already I guess ;-)  
> > > 
> > > This time I swear I checked your tree. But this time we did not ended
> > > with the same fix so I missed this one *again* :)  
> > 
> > No worries ... I guess I should check where I hid additional patches ;-)
> > 
> > So right now px30 stuff is in the trees:
> > - mine
> > - mfd
> > - phy (first round of dsi phy, refinement pending on the list)
> > - nvmem (for the otp controller)
> > - drm (drm/rockchip: vop: add the definition of dclk_pol)
> > - clk
> > 
> > and pending on lists:
> > - drm (dsi support + timings)
> > - phy (refinement as mentioned above)
> > 
> > not submitted yet but planning to get this done this weekend:
> > - panel driver for px30-evb
> > - dsi devicetree stuff
> 
> Thank you very much for the detailed list! I will soon work on the
> PMIC audio support and on secure boot, do not hesitate to ping me if
> you see this kind of work coming on the mailing list!

I think it's only us (you, Paul and me) working on px30 mainline stuff,
right now so it's only us that should probably coordinate :-)

Secureboot also is of interest to my project, so a Cc would be appreciated ;-)


Heiko



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Change RK809 PMIC interrupt polarity
  2019-12-06 17:09         ` Heiko Stuebner
@ 2019-12-06 17:16           ` Miquel Raynal
  0 siblings, 0 replies; 7+ messages in thread
From: Miquel Raynal @ 2019-12-06 17:16 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Rob Herring, Mark Rutland, devicetree, linux-rockchip,
	Paul Kocialkowski, Maxime Chevallier, Thomas Petazzoni

Hi Heiko,

Heiko Stuebner <heiko@sntech.de> wrote on Fri, 06 Dec 2019 18:09:03
+0100:

> Hi Miquel,
> 
> Am Freitag, 6. Dezember 2019, 17:34:53 CET schrieb Miquel Raynal:
> > Heiko Stuebner <heiko@sntech.de> wrote on Fri, 06 Dec 2019 17:01:58
> > +0100:  
> > > Am Freitag, 6. Dezember 2019, 16:52:50 CET schrieb Miquel Raynal:  
> > > > Heiko Stuebner <heiko@sntech.de> wrote on Fri, 06 Dec 2019 16:48:00
> > > > +0100:  
> > > > > Am Freitag, 6. Dezember 2019, 16:42:47 CET schrieb Miquel Raynal:    
> > > > > > PMIC interrupt can be active high or active low depending on BIT(1) of
> > > > > > the GPIO_INT_CFG pin. The default is 0x1, which means active
> > > > > > high. Change the polarity in the device tree to reflect the default
> > > > > > state.
> > > > > > 
> > > > > > Without this and with the current code base, the interrupt never stops
> > > > > > triggering while the MFD driver does not see anything to
> > > > > > check/clear/mask so after 100000 spurious IRQs, the kernel simply
> > > > > > desactivates the interrupt:
> > > > > > 
> > > > > >         irq 36: nobody cared (try booting with the "irqpoll" option)
> > > > > >         [...]
> > > > > >         handlers:
> > > > > >         [<(____ptrval____)>] irq_default_primary_handler threaded
> > > > > > 	[<(____ptrval____)>] regmap_irq_thread
> > > > > >         Disabling IRQ #36
> > > > > > 
> > > > > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>      
> > > > > 
> > > > > *coughs slightly*
> > > > > 
> > > > > mfd: rk808: Set RK817 interrupt polarity to low
> > > > > https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/drivers/mfd/rk808.c?h=for-mfd-next&id=dbd16ef53487084816a20f662423ab543a75fc83
> > > > > 
> > > > > Should be in the current merge window already I guess ;-)    
> > > > 
> > > > This time I swear I checked your tree. But this time we did not ended
> > > > with the same fix so I missed this one *again* :)    
> > > 
> > > No worries ... I guess I should check where I hid additional patches ;-)
> > > 
> > > So right now px30 stuff is in the trees:
> > > - mine
> > > - mfd
> > > - phy (first round of dsi phy, refinement pending on the list)
> > > - nvmem (for the otp controller)
> > > - drm (drm/rockchip: vop: add the definition of dclk_pol)
> > > - clk
> > > 
> > > and pending on lists:
> > > - drm (dsi support + timings)
> > > - phy (refinement as mentioned above)
> > > 
> > > not submitted yet but planning to get this done this weekend:
> > > - panel driver for px30-evb
> > > - dsi devicetree stuff  
> > 
> > Thank you very much for the detailed list! I will soon work on the
> > PMIC audio support and on secure boot, do not hesitate to ping me if
> > you see this kind of work coming on the mailing list!  
> 
> I think it's only us (you, Paul and me) working on px30 mainline stuff,
> right now so it's only us that should probably coordinate :-)
> 
> Secureboot also is of interest to my project, so a Cc would be appreciated ;-)
> 

Sure! It's on my December/January task list.

BTW, thanks for all the patches you already contributed!

Cheers,
Miquèl

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-06 17:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 15:42 [PATCH] arm64: dts: rockchip: Change RK809 PMIC interrupt polarity Miquel Raynal
2019-12-06 15:48 ` Heiko Stuebner
2019-12-06 15:52   ` Miquel Raynal
2019-12-06 16:01     ` Heiko Stuebner
2019-12-06 16:34       ` Miquel Raynal
2019-12-06 17:09         ` Heiko Stuebner
2019-12-06 17:16           ` Miquel Raynal

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).