Skip to contentSkip to conversation

arm64: dts: exynos: Add PWM interrupts on Exynos7

PATCH In review Krzysztof Kozlowski 3 participants 8 messages Jun 29, 2020 – Jul 2, 2020

Subsystems (2)
lore
Share & tools
lore

Krzysztof Kozlowski

author maintainer
#0 lore raw

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

---

Not tested

---
 arch/arm64/boot/dts/exynos/exynos7.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/exynos/exynos7.dtsi +5 -0
index f590891efe25..523547b3d539 100644
@@ -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>;
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

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

---

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(-)
arch/arm64/boot/dts/exynos/exynos5433.dtsi +2 -2
index ebe089469b5f..57b433a1c900 100644
@@ -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>,
arch/arm64/boot/dts/exynos/exynos7.dtsi +1 -1
index 523547b3d539..96ed93a21e40 100644
@@ -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>,
Signature · 1 line
2.17.1
author maintainer
#2 lore raw

PATCH 3/4 arm64: dts: exynos: Align DMA controller bus node name with dtschema

In reply to Krzysztof Kozlowski

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]+)?$'

---

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(-)
arch/arm64/boot/dts/exynos/exynos5433.dtsi +1 -1
index 57b433a1c900..98e907115599 100644
@@ -1756,7 +1756,7 @@
 			status = "disabled";
 		};
 
-		amba {
+		bus {
 			compatible = "simple-bus";
 			#address-cells = <1>;
 			#size-cells = <1>;
arch/arm64/boot/dts/exynos/exynos7.dtsi +1 -1
index 96ed93a21e40..1e0acf6e17e2 100644
@@ -105,7 +105,7 @@
 				<0x11006000 0x2000>;
 		};
 
-		amba {
+		bus {
 			compatible = "simple-bus";
 			#address-cells = <1>;
 			#size-cells = <1>;
Signature · 1 line
2.17.1
author maintainer
#5 lore raw

PATCH 4/4 ARM: dts: exynos: Align DMA controller bus node name with dtschema

In reply to Krzysztof Kozlowski

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]+)?$'
---
 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(-)
arch/arm/boot/dts/exynos3250.dtsi +1 -1
index 044e5da64a76..71010417b16f 100644
@@ -418,7 +418,7 @@
 			status = "disabled";
 		};
 
-		amba {
+		bus {
 			compatible = "simple-bus";
 			#address-cells = <1>;
 			#size-cells = <1>;
arch/arm/boot/dts/exynos4.dtsi +1 -1
index d2779a790ce3..ed22d60570a7 100644
@@ -669,7 +669,7 @@
 			status = "disabled";
 		};
 
-		amba: amba {
+		amba: bus {
 			#address-cells = <1>;
 			#size-cells = <1>;
 			compatible = "simple-bus";
arch/arm/boot/dts/exynos5250.dtsi +1 -1
index b6135af7ef39..98299ed38b7c 100644
@@ -679,7 +679,7 @@
 			samsung,pmureg-phandle = <&pmu_system_controller>;
 		};
 
-		amba {
+		bus {
 			#address-cells = <1>;
 			#size-cells = <1>;
 			compatible = "simple-bus";
arch/arm/boot/dts/exynos5410.dtsi +1 -1
index 2eab80bf5f3a..a55b1a5f1a1c 100644
@@ -189,7 +189,7 @@
 			interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
-		amba {
+		bus {
 			#address-cells = <1>;
 			#size-cells = <1>;
 			compatible = "simple-bus";
arch/arm/boot/dts/exynos5420.dtsi +1 -1
index b672080e7469..c3de26ac79dd 100644
@@ -433,7 +433,7 @@
 			power-domains = <&mau_pd>;
 		};
 
-		amba {
+		bus {
 			#address-cells = <1>;
 			#size-cells = <1>;
 			compatible = "simple-bus";
Signature · 1 line
2.17.1
#3 lore raw

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

In reply to Krzysztof Kozlowski

Hi Krzysztof,

Quoted 6 lines · Krzysztof Kozlowski

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]+)?$'

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

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
reviewer
#6 lore raw
In reply to Krzysztof Kozlowski

Hi Krzysztof,

Quoted 5 lines

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

Quoted 28 lines

[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

---

Not tested

---
 arch/arm64/boot/dts/exynos/exynos7.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/exynos/exynos7.dtsi +0 -0
index f590891efe25..523547b3d539 100644

arch/arm64/boot/dts/exynos/exynos7.dtsi line 588

Quoted 8 lines
arch/arm64/boot/dts/exynos/exynos7.dtsi +5 -0
@@ -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?

Quoted 5 lines
arch/arm64/boot/dts/exynos/exynos7.dtsi +0 -1
 			samsung,pwm-outputs = <0>, <1>, <2>, <3>;
 			#pwm-cells = <3>;
 			clocks = <&clock_peric0 PCLK_PWM>;
--

2.17.1

author maintainer
#7 lore raw
Quoted 30 lines · Alim Akhtar

Hi Krzysztof,

Quoted 5 lines

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

Quoted 22 lines

[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

---

Not tested

---
 arch/arm64/boot/dts/exynos/exynos7.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
Quoted 16 lines
Quoted 6 lines
arch/arm64/boot/dts/exynos/exynos7.dtsi +0 -0
index f590891efe25..523547b3d539 100644

arch/arm64/boot/dts/exynos/exynos7.dtsi line 588

Quoted 8 lines
arch/arm64/boot/dts/exynos/exynos7.dtsi +5 -0
@@ -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.

Quoted 3 lines

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

author maintainer
#4 lore raw

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

In reply to Marek Szyprowski
Quoted 10 lines · Marek Szyprowski

Hi Krzysztof,

Quoted 6 lines · Krzysztof Kozlowski

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]+)?$'
Quoted 7 lines

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