aboutsummaryrefslogtreecommitdiff
path: root/target/linux/d1/patches-6.1/0045-dt-bindings-hwlock-sun6i-Add-interrupts-property.patch
blob: d2c61a54ddb12b8615639708f13dd1a3ab4a1340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From f0c29c5d370507ca2106689e7e17b81e8b58f236 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 14 Nov 2021 11:37:34 -0600
Subject: [PATCH 045/117] dt-bindings: hwlock: sun6i: Add interrupts property

While it was not officially documented until recently (e.g. A50), the
hwspinlock block can trigger an interrupt when a lock is unlocked. This
capability is used by Allwinner's ARISC firmware, it has been verified
to work on A64, and the IRQ numbers are reserved as far back as A31.
So most likely this feature has always been available.

Even though the Linux hwspinlock framework cannot make use of the IRQ,
the capability should still be documented in the device tree.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 .../bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml     | 6 ++++++
 1 file changed, 6 insertions(+)

--- a/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
+++ b/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
@@ -26,17 +26,22 @@ properties:
   resets:
     maxItems: 1
 
+  interrupts:
+    maxItems: 1
+
 required:
   - compatible
   - reg
   - clocks
   - resets
+  - interrupts
 
 additionalProperties: false
 
 examples:
   - |
     #include <dt-bindings/clock/sun8i-a23-a33-ccu.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/reset/sun8i-a23-a33-ccu.h>
 
     hwlock@1c18000 {
@@ -44,5 +49,6 @@ examples:
         reg = <0x01c18000 0x1000>;
         clocks = <&ccu CLK_BUS_SPINLOCK>;
         resets = <&ccu RST_BUS_SPINLOCK>;
+        interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
     };
 ...