[1/4] arm64: dts: exynos: Add PWM interrupts on Exynos7
diff mbox series

Message ID 20200629204442.17336-1-krzk@kernel.org
State Superseded
Headers show
Series
  • [1/4] arm64: dts: exynos: Add PWM interrupts on Exynos7
Related show

Commit Message

Krzysztof Kozlowski June 29, 2020, 8:44 p.m. UTC
Add required interrupts to PWM node on Exynos7.  This fixes DT schema
warning:

    pwm@136c0000: 'interrupts' is a required property

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Not tested
---
 arch/arm64/boot/dts/exynos/exynos7.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Alim Akhtar June 30, 2020, 3:24 p.m. UTC | #1
Hi Krzysztof,

> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 30 June 2020 02:15
> To: Rob Herring <robh+dt@kernel.org>; Kukjin Kim <kgene@kernel.org>;
> Krzysztof Kozlowski <krzk@kernel.org>; devicetree@vger.kernel.org;
linux-arm-
> kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>; Bartlomiej Zolnierkiewicz
> <b.zolnierkie@samsung.com>; Sylwester Nawrocki <snawrocki@kernel.org>;
> Alim Akhtar <alim.akhtar@samsung.com>; Chanwoo Choi
> <cw00.choi@samsung.com>; Pankaj Dubey <pankaj.dubey@samsung.com>
> Subject: [PATCH 1/4] arm64: dts: exynos: Add PWM interrupts on Exynos7
> 
> Add required interrupts to PWM node on Exynos7.  This fixes DT schema
> warning:
> 
>     pwm@136c0000: 'interrupts' is a required property
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> Not tested
> ---
>  arch/arm64/boot/dts/exynos/exynos7.dtsi | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi
> b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> index f590891efe25..523547b3d539 100644
> --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> @@ -581,6 +581,11 @@
>  		pwm: pwm@136c0000 {
>  			compatible = "samsung,exynos4210-pwm";
>  			reg = <0x136c0000 0x100>;
> +			interrupts = <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 445 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 446 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 447 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 448 IRQ_TYPE_LEVEL_HIGH>;
PWM IRQs are from 449 ~ 453 for PWM[0] ~ PWM[4] on this SoC.
444 ~ 447 are for HSI2C and 448 is for ADC.
Please see the exynos7.dtsi
Also drivers/pwm/pwm-samsung.c does not uses interrupt at all, still we need
interrupts property to be added here?

>  			samsung,pwm-outputs = <0>, <1>, <2>, <3>;
>  			#pwm-cells = <3>;
>  			clocks = <&clock_peric0 PCLK_PWM>;
> --
> 2.17.1
Krzysztof Kozlowski July 2, 2020, 6 a.m. UTC | #2
On Tue, Jun 30, 2020 at 08:54:28PM +0530, Alim Akhtar wrote:
> Hi Krzysztof,
> 
> > -----Original Message-----
> > From: Krzysztof Kozlowski <krzk@kernel.org>
> > Sent: 30 June 2020 02:15
> > To: Rob Herring <robh+dt@kernel.org>; Kukjin Kim <kgene@kernel.org>;
> > Krzysztof Kozlowski <krzk@kernel.org>; devicetree@vger.kernel.org;
> linux-arm-
> > kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-
> > kernel@vger.kernel.org
> > Cc: Marek Szyprowski <m.szyprowski@samsung.com>; Bartlomiej Zolnierkiewicz
> > <b.zolnierkie@samsung.com>; Sylwester Nawrocki <snawrocki@kernel.org>;
> > Alim Akhtar <alim.akhtar@samsung.com>; Chanwoo Choi
> > <cw00.choi@samsung.com>; Pankaj Dubey <pankaj.dubey@samsung.com>
> > Subject: [PATCH 1/4] arm64: dts: exynos: Add PWM interrupts on Exynos7
> > 
> > Add required interrupts to PWM node on Exynos7.  This fixes DT schema
> > warning:
> > 
> >     pwm@136c0000: 'interrupts' is a required property
> > 
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > 
> > ---
> > 
> > Not tested
> > ---
> >  arch/arm64/boot/dts/exynos/exynos7.dtsi | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi
> > b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> > index f590891efe25..523547b3d539 100644
> > --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
> > +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> > @@ -581,6 +581,11 @@
> >  		pwm: pwm@136c0000 {
> >  			compatible = "samsung,exynos4210-pwm";
> >  			reg = <0x136c0000 0x100>;
> > +			interrupts = <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>,
> > +				     <GIC_SPI 445 IRQ_TYPE_LEVEL_HIGH>,
> > +				     <GIC_SPI 446 IRQ_TYPE_LEVEL_HIGH>,
> > +				     <GIC_SPI 447 IRQ_TYPE_LEVEL_HIGH>,
> > +				     <GIC_SPI 448 IRQ_TYPE_LEVEL_HIGH>;
> PWM IRQs are from 449 ~ 453 for PWM[0] ~ PWM[4] on this SoC.
> 444 ~ 447 are for HSI2C and 448 is for ADC.

Ah, indeed.

> Please see the exynos7.dtsi
> Also drivers/pwm/pwm-samsung.c does not uses interrupt at all, still we need
> interrupts property to be added here?

That's a good point. For S3C SoCs the PWM timer was used also as a
clocksource so it required interrupts. But since Exynos this is not
used.  I don't know why the bindings introduced required interrupts...
It seems it would be better just to remove them from bindings and DTS.

Best regards,
Krzysztof

Patch
diff mbox series

diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
index f590891efe25..523547b3d539 100644
--- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -581,6 +581,11 @@ 
 		pwm: pwm@136c0000 {
 			compatible = "samsung,exynos4210-pwm";
 			reg = <0x136c0000 0x100>;
+			interrupts = <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 445 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 446 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 447 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 448 IRQ_TYPE_LEVEL_HIGH>;
 			samsung,pwm-outputs = <0>, <1>, <2>, <3>;
 			#pwm-cells = <3>;
 			clocks = <&clock_peric0 PCLK_PWM>;