Skip to contentSkip to conversation

dt-bindings: timer: Convert Allwinner A10 Timer to a schema

PATCH In review Maxime Ripard 3 participants 23 messages Jul 22, 2019 – Aug 19, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/11 dt-bindings: timer: Convert Allwinner A10 Timer to a schema

The older Allwinner SoCs have a Timer supported in Linux, with a matching Device Tree binding.

While the original binding only mentions one interrupt, the timer actually has 6 of them.

Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas.

---
 .../timer/allwinner,sun4i-a10-timer.yaml      | 76 +++++++++++++++++++
 .../bindings/timer/allwinner,sun4i-timer.txt  | 19 -----
 2 files changed, 76 insertions(+), 19 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml
 delete mode 100644 Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml new file +76 -0
new file mode 100644
index 000000000000..7292a424092c
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/allwinner,sun4i-a10-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner A10 Timer Device Tree Bindings
+
+maintainers:
+  - Chen-Yu Tsai <[email protected]>
+  - Maxime Ripard <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - allwinner,sun4i-a10-timer
+      - allwinner,suniv-f1c100s-timer
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description:
+      List of timers interrupts
+
+  clocks:
+    maxItems: 1
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          items:
+            const: allwinner,sun4i-a10-timer
+
+    then:
+      properties:
+        interrupts:
+          minItems: 6
+          maxItems: 6
+
+  - if:
+      properties:
+        compatible:
+          items:
+            const: allwinner,suniv-f1c100s-timer
+
+    then:
+      properties:
+        interrupts:
+          minItems: 3
+          maxItems: 3
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    timer {
+        compatible = "allwinner,sun4i-a10-timer";
+        reg = <0x01c20c00 0x400>;
+        interrupts = <22>,
+                     <23>,
+                     <24>,
+                     <25>,
+                     <67>,
+                     <68>;
+        clocks = <&osc>;
+    };
+
+...
Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt deleted +0 -19
deleted file mode 100644
index 3da9d515c03a..000000000000
@@ -1,19 +0,0 @@
-Allwinner A1X SoCs Timer Controller
-
-Required properties:
-
-- compatible : should be one of the following:
-              "allwinner,sun4i-a10-timer"
-              "allwinner,suniv-f1c100s-timer"
-- reg : Specifies base physical address and size of the registers.
-- interrupts : The interrupt of the first timer
-- clocks: phandle to the source clock (usually a 24 MHz fixed clock)
-
-Example:
-
-timer {
-	compatible = "allwinner,sun4i-a10-timer";
-	reg = <0x01c20c00 0x400>;
-	interrupts = <22>;
-	clocks = <&osc>;
-};
Signature · 1 line
2.21.0
#1 lore raw

PATCH 2/11 dt-bindings: timer: Add missing compatibles

Newer Allwinner SoCs have different number of interrupts, let's add different compatibles for all of them to deal with this properly.

---
 .../timer/allwinner,sun4i-a10-timer.yaml      | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml +26 -0
index 7292a424092c..20adc1c8e9cc 100644
@@ -14,6 +14,8 @@ properties:
   compatible:
     enum:
       - allwinner,sun4i-a10-timer
+      - allwinner,sun8i-a23-timer
+      - allwinner,sun8i-v3s-timer
       - allwinner,suniv-f1c100s-timer
 
   reg:
@@ -39,6 +41,30 @@ allOf:
           minItems: 6
           maxItems: 6
 
+  - if:
+      properties:
+        compatible:
+          items:
+            const: allwinner,sun8i-a23-timer
+
+    then:
+      properties:
+        interrupts:
+          minItems: 2
+          maxItems: 2
+
+  - if:
+      properties:
+        compatible:
+          items:
+            const: allwinner,sun8i-v3s-timer
+
+    then:
+      properties:
+        interrupts:
+          minItems: 3
+          maxItems: 3
+
   - if:
       properties:
         compatible:
Signature · 1 line
2.21.0
Reviewed-by on v1 2/11
#2 lore raw

Re: [PATCH 02/11] dt-bindings: timer: Add missing compatibles

Quoted 8 lines · Maxime Ripard

Newer Allwinner SoCs have different number of interrupts, let's add different compatibles for all of them to deal with this properly.

---
 .../timer/allwinner,sun4i-a10-timer.yaml      | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
#3 lore raw

PATCH 3/11 clocksource: sun4i: Add missing compatibles

In reply to Maxime Ripard

Newer Allwinner SoCs have different number of interrupts, let's add different compatibles for all of them to deal with this properly.

---
 drivers/clocksource/timer-sun4i.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/clocksource/timer-sun4i.c +4 -0
index 65f38f6ca714..0ba8155b8287 100644
@@ -219,5 +219,9 @@ static int __init sun4i_timer_init(struct device_node *node)
 }
 TIMER_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
 		       sun4i_timer_init);
+TIMER_OF_DECLARE(sun8i_a23, "allwinner,sun8i-a23-timer",
+		 sun4i_timer_init);
+TIMER_OF_DECLARE(sun8i_v3s, "allwinner,sun8i-v3s-timer",
+		 sun4i_timer_init);
 TIMER_OF_DECLARE(suniv, "allwinner,suniv-f1c100s-timer",
 		       sun4i_timer_init);
Signature · 1 line
2.21.0
#4 lore raw

Re: [PATCH 03/11] clocksource: sun4i: Add missing compatibles

Hi Daniel, Thomas,

Quoted 4 lines · Maxime Ripard

Newer Allwinner SoCs have different number of interrupts, let's add different compatibles for all of them to deal with this properly.

Ping?

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Acked-by on v1 3/11
#5 lore raw

Re: [PATCH 03/11] clocksource: sun4i: Add missing compatibles

In reply to Maxime Ripard
Quoted 4 lines · Maxime Ripard

Newer Allwinner SoCs have different number of interrupts, let's add different compatibles for all of them to deal with this properly.

Quoted 19 lines
---
 drivers/clocksource/timer-sun4i.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/clocksource/timer-sun4i.c +4 -0
index 65f38f6ca714..0ba8155b8287 100644
@@ -219,5 +219,9 @@ static int __init sun4i_timer_init(struct device_node *node)
 }
 TIMER_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
 		       sun4i_timer_init);
+TIMER_OF_DECLARE(sun8i_a23, "allwinner,sun8i-a23-timer",
+		 sun4i_timer_init);
+TIMER_OF_DECLARE(sun8i_v3s, "allwinner,sun8i-v3s-timer",
+		 sun4i_timer_init);
 TIMER_OF_DECLARE(suniv, "allwinner,suniv-f1c100s-timer",
 		       sun4i_timer_init);
Signature · 11 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#6 lore raw

Re: [PATCH 03/11] clocksource: sun4i: Add missing compatibles

Hi,

Quoted 7 lines · Daniel Lezcano
Quoted 4 lines · Maxime Ripard

Newer Allwinner SoCs have different number of interrupts, let's add different compatibles for all of them to deal with this properly.

Thanks!

Can you merge this through your tree (along with the bindings)? I'll merge the DT patches

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#7 lore raw

Re: [PATCH 03/11] clocksource: sun4i: Add missing compatibles

Quoted 7 lines · Maxime Ripard

Hi,

Quoted 4 lines · Daniel Lezcano
Quoted 3 lines · Maxime Ripard

Newer Allwinner SoCs have different number of interrupts, let's add different compatibles for all of them to deal with this properly.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Thanks!

Can you merge this through your tree (along with the bindings)? I'll merge the DT patches

patches 1-4 then ?

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#8 lore raw

Re: [PATCH 03/11] clocksource: sun4i: Add missing compatibles

Quoted 10 lines · Daniel Lezcano
Quoted 9 lines · Maxime Ripard

Hi,

Quoted 6 lines · Daniel Lezcano
Quoted 4 lines · Maxime Ripard

Newer Allwinner SoCs have different number of interrupts, let's add different compatibles for all of them to deal with this properly.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Thanks!

Can you merge this through your tree (along with the bindings)? I'll merge the DT patches

patches 1-4 then ?

Yep, thanks!
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#9 lore raw

Re: [PATCH 03/11] clocksource: sun4i: Add missing compatibles

Quoted 13 lines · Maxime Ripard
Quoted 12 lines · Daniel Lezcano
Quoted 11 lines · Maxime Ripard

Hi,

Quoted 7 lines · Daniel Lezcano
Quoted 4 lines · Maxime Ripard

Newer Allwinner SoCs have different number of interrupts, let's add different compatibles for all of them to deal with this properly.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Thanks!

Can you merge this through your tree (along with the bindings)? I'll merge the DT patches

patches 1-4 then ?

Yep, thanks!

Ping?

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#10 lore raw

Re: [PATCH 03/11] clocksource: sun4i: Add missing compatibles

Quoted 16 lines · Maxime Ripard
Quoted 15 lines · Maxime Ripard
Quoted 14 lines · Daniel Lezcano
Quoted 13 lines · Maxime Ripard

Hi,

Quoted 7 lines · Daniel Lezcano
Quoted 4 lines · Maxime Ripard

Newer Allwinner SoCs have different number of interrupts, let's add different compatibles for all of them to deal with this properly.

Thanks!

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Can you merge this through your tree (along with the bindings)? I'll merge the DT patches

patches 1-4 then ?

Yep, thanks!

Ping?

They are applied :)

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#11 lore raw

Re: [PATCH 03/11] clocksource: sun4i: Add missing compatibles

Quoted 20 lines · Daniel Lezcano
Quoted 19 lines · Maxime Ripard
Quoted 18 lines · Maxime Ripard
Quoted 17 lines · Daniel Lezcano
Quoted 15 lines · Maxime Ripard

Hi,

Quoted 7 lines · Daniel Lezcano
Quoted 4 lines · Maxime Ripard

Newer Allwinner SoCs have different number of interrupts, let's add different compatibles for all of them to deal with this properly.

Thanks!

Can you merge this through your tree (along with the bindings)? I'll merge the DT patches

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

patches 1-4 then ?

Yep, thanks!

Ping?

They are applied :)

Oh, my bad :)

Where is your tree these days? I couldn't find it in linux-next either :/

Thanks!
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#12 lore raw

Re: [PATCH 03/11] clocksource: sun4i: Add missing compatibles

Quoted 23 lines · Maxime Ripard
Quoted 22 lines · Daniel Lezcano
Quoted 21 lines · Maxime Ripard
Quoted 20 lines · Maxime Ripard
Quoted 18 lines · Daniel Lezcano
Quoted 7 lines · Maxime Ripard

Hi,

Quoted 4 lines · Daniel Lezcano
Quoted 3 lines · Maxime Ripard

Newer Allwinner SoCs have different number of interrupts, let's add different compatibles for all of them to deal with this properly.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Thanks!

Can you merge this through your tree (along with the bindings)? I'll merge the DT patches

patches 1-4 then ?

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Yep, thanks!

Ping?

They are applied :)

Oh, my bad :)

Actually, I should have tell you they were applied.

Quoted 1 line

Where is your tree these days? I couldn't find it in linux-next either

https://git.linaro.org/people/daniel.lezcano/linux.git/log/?h=clockevents/next

Signature · 11 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#13 lore raw

PATCH 4/11 dt-bindings: timer: Convert Allwinner A13 HSTimer to a schema

In reply to Maxime Ripard

The newer Allwinner SoCs have a High Speed Timer supported in Linux, with a matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas.

---
 .../timer/allwinner,sun5i-a13-hstimer.txt     | 26 ------
 .../timer/allwinner,sun5i-a13-hstimer.yaml    | 79 +++++++++++++++++++
 2 files changed, 79 insertions(+), 26 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.yaml
Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt deleted +0 -26
deleted file mode 100644
index 2c5c1be78360..000000000000
@@ -1,26 +0,0 @@
-Allwinner SoCs High Speed Timer Controller
-
-Required properties:
-
-- compatible :	should be "allwinner,sun5i-a13-hstimer" or
-		"allwinner,sun7i-a20-hstimer"
-- reg : Specifies base physical address and size of the registers.
-- interrupts :	The interrupts of these timers (2 for the sun5i IP, 4 for the sun7i
-		one)
-- clocks: phandle to the source clock (usually the AHB clock)
-
-Optional properties:
-- resets: phandle to a reset controller asserting the timer
-
-Example:
-
-timer@1c60000 {
-	compatible = "allwinner,sun7i-a20-hstimer";
-	reg = <0x01c60000 0x1000>;
-	interrupts = <0 51 1>,
-		     <0 52 1>,
-		     <0 53 1>,
-		     <0 54 1>;
-	clocks = <&ahb1_gates 19>;
-	resets = <&ahb1rst 19>;
-};
Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.yaml new file +79 -0

79 lines not on this page · raw message

Signature · 1 line
2.21.0
Reviewed-by on v1 4/11
#14 lore raw

Re: [PATCH 04/11] dt-bindings: timer: Convert Allwinner A13 HSTimer to a schema

Quoted 7 lines · Maxime Ripard

The newer Allwinner SoCs have a High Speed Timer supported in Linux, with a matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas.

Quoted 7 lines
---
 .../timer/allwinner,sun5i-a13-hstimer.txt     | 26 ------
 .../timer/allwinner,sun5i-a13-hstimer.yaml    | 79 +++++++++++++++++++
 2 files changed, 79 insertions(+), 26 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.yaml
#15 lore raw

PATCH 5/11 ARM: dts: sun4i: Add missing timers interrupts

In reply to Maxime Ripard

The timer unit in the A10 has 6 interrupts available. List all of them.

---
 arch/arm/boot/dts/sun4i-a10.dtsi | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm/boot/dts/sun4i-a10.dtsi +6 -1
index e88daa4ef1af..077d45c7db6f 100644
@@ -803,7 +803,12 @@
 		timer@1c20c00 {
 			compatible = "allwinner,sun4i-a10-timer";
 			reg = <0x01c20c00 0x90>;
-			interrupts = <22>;
+			interrupts = <22>,
+				     <23>,
+				     <24>,
+				     <25>,
+				     <67>,
+				     <68>;
 			clocks = <&osc24M>;
 		};
 
Signature · 1 line
2.21.0
#16 lore raw

PATCH 6/11 ARM: dts: sun5i: Add missing timers interrupts

In reply to Maxime Ripard

The timer unit in the sun5i die has 6 interrupts available. List all of them.

---
 arch/arm/boot/dts/sun5i.dtsi | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm/boot/dts/sun5i.dtsi +6 -1
index 2fb438c4fe9d..4e725afe7203 100644
@@ -588,7 +588,12 @@
 		timer@1c20c00 {
 			compatible = "allwinner,sun4i-a10-timer";
 			reg = <0x01c20c00 0x90>;
-			interrupts = <22>;
+			interrupts = <22>,
+				     <23>,
+				     <24>,
+				     <25>,
+				     <67>,
+				     <68>;
 			clocks = <&ccu CLK_HOSC>;
 		};
 
Signature · 1 line
2.21.0
#17 lore raw

PATCH 7/11 ARM: dts: sun6i: Add missing timers interrupts

In reply to Maxime Ripard

The timer unit in the A31 has 6 interrupts available. List all of them.

---
 arch/arm/boot/dts/sun6i-a31.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/sun6i-a31.dtsi +2 -1
index dcddc3392460..4c1ac7e58ae3 100644
@@ -736,7 +736,8 @@
 				     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+				     <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&osc24M>;
 		};
 
Signature · 1 line
2.21.0
#18 lore raw

PATCH 8/11 ARM: dts: a23/a33: Change the timers compatible

In reply to Maxime Ripard

Unlike the A10 that has 6 timers available, the A23 and A33 has only two, with only two interrupts. Let's change the compatible to reflect that.

---
 arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-a23-a33.dtsi +1 -1
index af2fa694a467..954489b4ec66 100644
@@ -441,7 +441,7 @@
 		};
 
 		timer@1c20c00 {
-			compatible = "allwinner,sun4i-a10-timer";
+			compatible = "allwinner,sun8i-a23-timer";
 			reg = <0x01c20c00 0xa0>;
 			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.21.0
#19 lore raw

PATCH 9/11 ARM: dts: a83t: Change the timers compatible

In reply to Maxime Ripard

Unlike the A10 that has 6 timers available, the A83t has only two, with only two interrupts, just like the A23. Let's change the compatible to reflect that.

---
 arch/arm/boot/dts/sun8i-a83t.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-a83t.dtsi +1 -1
index ada6d08bc540..b849fbfd3cbf 100644
@@ -806,7 +806,7 @@
 		};
 
 		timer@1c20c00 {
-			compatible = "allwinner,sun4i-a10-timer";
+			compatible = "allwinner,sun8i-a23-timer";
 			reg = <0x01c20c00 0xa0>;
 			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.21.0
#20 lore raw

PATCH 10/11 ARM: dts: h3: Change the timers compatible

In reply to Maxime Ripard

Unlike the A10 that has 6 timers available, the H3 has only two, with only two interrupts, just like the A23. Let's change the compatible to reflect that.

---
 arch/arm/boot/dts/sunxi-h3-h5.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sunxi-h3-h5.dtsi +1 -1
index 84977d4eb97a..fa8bac5aa3ce 100644
@@ -484,7 +484,7 @@
 		};
 
 		timer@1c20c00 {
-			compatible = "allwinner,sun4i-a10-timer";
+			compatible = "allwinner,sun8i-a23-timer";
 			reg = <0x01c20c00 0xa0>;
 			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.21.0
#21 lore raw

PATCH 11/11 ARM: dts: v3s: Change the timers compatible

In reply to Maxime Ripard

Unlike the A10 that has 6 timers available, the v3s has only three, with only three interrupts. Let's change the compatible to reflect that, and add the missing interrupts.

---
 arch/arm/boot/dts/sun8i-v3s.dtsi | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/boot/dts/sun8i-v3s.dtsi +3 -2
index d7aef128acb3..1fce5b07c65c 100644
@@ -327,10 +327,11 @@
 		};
 
 		timer@1c20c00 {
-			compatible = "allwinner,sun4i-a10-timer";
+			compatible = "allwinner,sun8i-v3s-timer";
 			reg = <0x01c20c00 0xa0>;
 			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+				     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&osc24M>;
 		};
 
Signature · 1 line
2.21.0
Reviewed-by on v1 1/11
#22 lore raw
In reply to Maxime Ripard
Quoted 10 lines · Maxime Ripard

The older Allwinner SoCs have a Timer supported in Linux, with a matching Device Tree binding.

While the original binding only mentions one interrupt, the timer actually has 6 of them.

Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas.

Quoted 7 lines
---
 .../timer/allwinner,sun4i-a10-timer.yaml      | 76 +++++++++++++++++++
 .../bindings/timer/allwinner,sun4i-timer.txt  | 19 -----
 2 files changed, 76 insertions(+), 19 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml
 delete mode 100644 Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt