2020-06-29 20:56:46

by Krzysztof Kozlowski

[permalink] [raw]
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 <[email protected]>

---

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>;
samsung,pwm-outputs = <0>, <1>, <2>, <3>;
#pwm-cells = <3>;
clocks = <&clock_peric0 PCLK_PWM>;
--
2.17.1


2020-06-29 20:56:56

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 3/4] arm64: dts: exynos: Align DMA controller bus node name with dtschema

AMBA is a bus so name the node with DMA controllers just as "bus" to fix
dtschema warnings like:

amba: $nodename:0: 'amba' does not match '^(bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'

Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

Not tested although no effect expected.
---
arch/arm64/boot/dts/exynos/exynos5433.dtsi | 2 +-
arch/arm64/boot/dts/exynos/exynos7.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index 57b433a1c900..98e907115599 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -1756,7 +1756,7 @@
status = "disabled";
};

- amba {
+ bus {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
index 96ed93a21e40..1e0acf6e17e2 100644
--- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -105,7 +105,7 @@
<0x11006000 0x2000>;
};

- amba {
+ bus {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
--
2.17.1

2020-06-29 20:57:06

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 4/4] ARM: dts: exynos: Align DMA controller bus node name with dtschema

AMBA is a bus so name the node with DMA controllers just as "bus" to fix
dtschema warnings like:

amba: $nodename:0: 'amba' does not match '^(bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/exynos3250.dtsi | 2 +-
arch/arm/boot/dts/exynos4.dtsi | 2 +-
arch/arm/boot/dts/exynos5250.dtsi | 2 +-
arch/arm/boot/dts/exynos5410.dtsi | 2 +-
arch/arm/boot/dts/exynos5420.dtsi | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index 044e5da64a76..71010417b16f 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -418,7 +418,7 @@
status = "disabled";
};

- amba {
+ bus {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index d2779a790ce3..ed22d60570a7 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -669,7 +669,7 @@
status = "disabled";
};

- amba: amba {
+ amba: bus {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index b6135af7ef39..98299ed38b7c 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -679,7 +679,7 @@
samsung,pmureg-phandle = <&pmu_system_controller>;
};

- amba {
+ bus {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
diff --git a/arch/arm/boot/dts/exynos5410.dtsi b/arch/arm/boot/dts/exynos5410.dtsi
index 2eab80bf5f3a..a55b1a5f1a1c 100644
--- a/arch/arm/boot/dts/exynos5410.dtsi
+++ b/arch/arm/boot/dts/exynos5410.dtsi
@@ -189,7 +189,7 @@
interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
};

- amba {
+ bus {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index b672080e7469..c3de26ac79dd 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -433,7 +433,7 @@
power-domains = <&mau_pd>;
};

- amba {
+ bus {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
--
2.17.1

2020-06-29 20:58:51

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 2/4] arm64: dts: exynos: Remove generic arm,armv8-pmuv3 compatible

The ARM PMU node is described enough with first compatible so remove the
arm,armv8-pmuv3 to fix dtschema warnings like:

arm-pmu: compatible: Additional items are not allowed ('arm,armv8-pmuv3' was unexpected)
arm-pmu: compatible: ['arm,cortex-a57-pmu', 'arm,armv8-pmuv3'] is too long

Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

Not tested although no effect expected.
---
arch/arm64/boot/dts/exynos/exynos5433.dtsi | 4 ++--
arch/arm64/boot/dts/exynos/exynos7.dtsi | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index ebe089469b5f..57b433a1c900 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -24,7 +24,7 @@
interrupt-parent = <&gic>;

arm_a53_pmu {
- compatible = "arm,cortex-a53-pmu", "arm,armv8-pmuv3";
+ compatible = "arm,cortex-a53-pmu";
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
@@ -33,7 +33,7 @@
};

arm_a57_pmu {
- compatible = "arm,cortex-a57-pmu", "arm,armv8-pmuv3";
+ compatible = "arm,cortex-a57-pmu";
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
index 523547b3d539..96ed93a21e40 100644
--- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -29,7 +29,7 @@
};

arm-pmu {
- compatible = "arm,cortex-a57-pmu", "arm,armv8-pmuv3";
+ compatible = "arm,cortex-a57-pmu";
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
--
2.17.1

2020-06-30 07:36:17

by Marek Szyprowski

[permalink] [raw]
Subject: Re: [PATCH 3/4] arm64: dts: exynos: Align DMA controller bus node name with dtschema

Hi Krzysztof,

On 29.06.2020 22:44, Krzysztof Kozlowski wrote:
> AMBA is a bus so name the node with DMA controllers just as "bus" to fix
> dtschema warnings like:
>
> amba: $nodename:0: 'amba' does not match '^(bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Do we really need a separate 'bus' for those DMA controllers?

IMHO they are not different from the hw perspective from the other
devices available on the SoC. A separate bus is a historical thing, they
work fine when moved directly under the 'soc' node. The separate bus
only mimics the way Linux organizes its drivers. This comment affects
both ARM and ARM64.

Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland

2020-06-30 15:26:04

by Alim Akhtar

[permalink] [raw]
Subject: RE: [PATCH 1/4] arm64: dts: exynos: Add PWM interrupts on Exynos7

Hi Krzysztof,

> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: 30 June 2020 02:15
> To: Rob Herring <[email protected]>; Kukjin Kim <[email protected]>;
> Krzysztof Kozlowski <[email protected]>; [email protected];
linux-arm-
> [email protected]; [email protected]; linux-
> [email protected]
> Cc: Marek Szyprowski <[email protected]>; Bartlomiej Zolnierkiewicz
> <[email protected]>; Sylwester Nawrocki <[email protected]>;
> Alim Akhtar <[email protected]>; Chanwoo Choi
> <[email protected]>; Pankaj Dubey <[email protected]>
> 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 <[email protected]>
>
> ---
>
> 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


2020-07-02 06:02:44

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/4] arm64: dts: exynos: Add PWM interrupts on Exynos7

On Tue, Jun 30, 2020 at 08:54:28PM +0530, Alim Akhtar wrote:
> Hi Krzysztof,
>
> > -----Original Message-----
> > From: Krzysztof Kozlowski <[email protected]>
> > Sent: 30 June 2020 02:15
> > To: Rob Herring <[email protected]>; Kukjin Kim <[email protected]>;
> > Krzysztof Kozlowski <[email protected]>; [email protected];
> linux-arm-
> > [email protected]; [email protected]; linux-
> > [email protected]
> > Cc: Marek Szyprowski <[email protected]>; Bartlomiej Zolnierkiewicz
> > <[email protected]>; Sylwester Nawrocki <[email protected]>;
> > Alim Akhtar <[email protected]>; Chanwoo Choi
> > <[email protected]>; Pankaj Dubey <[email protected]>
> > 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 <[email protected]>
> >
> > ---
> >
> > 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

2020-07-02 06:04:20

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 3/4] arm64: dts: exynos: Align DMA controller bus node name with dtschema

On Tue, Jun 30, 2020 at 09:34:52AM +0200, Marek Szyprowski wrote:
> Hi Krzysztof,
>
> On 29.06.2020 22:44, Krzysztof Kozlowski wrote:
> > AMBA is a bus so name the node with DMA controllers just as "bus" to fix
> > dtschema warnings like:
> >
> > amba: $nodename:0: 'amba' does not match '^(bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
> >
> > Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> Do we really need a separate 'bus' for those DMA controllers?
>
> IMHO they are not different from the hw perspective from the other
> devices available on the SoC. A separate bus is a historical thing, they
> work fine when moved directly under the 'soc' node. The separate bus
> only mimics the way Linux organizes its drivers. This comment affects
> both ARM and ARM64.

Good point, other boards keep them under SoC usually. Thanks for
feedback.

Best regards,
Krzysztof