2023-02-21 10:25:59

by Keguang Zhang

[permalink] [raw]
Subject: [PATCH v3] dt-bindings: interrupt-controller: convert loongson,ls1x-intc.txt to json-schema

Convert the Loongson1 interrupt controller dt-bindings to json-schema.

Signed-off-by: Keguang Zhang <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
V2 -> V3: Fix the description
V1 -> V2: Drop the description part
---
.../loongson,ls1x-intc.txt | 24 ---------
.../loongson,ls1x-intc.yaml | 51 +++++++++++++++++++
2 files changed, 51 insertions(+), 24 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,ls1x-intc.txt
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,ls1x-intc.yaml

diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,ls1x-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/loongson,ls1x-intc.txt
deleted file mode 100644
index a63ed9fcb535..000000000000
--- a/Documentation/devicetree/bindings/interrupt-controller/loongson,ls1x-intc.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Loongson ls1x Interrupt Controller
-
-Required properties:
-
-- compatible : should be "loongson,ls1x-intc". Valid strings are:
-
-- reg : Specifies base physical address and size of the registers.
-- interrupt-controller : Identifies the node as an interrupt controller
-- #interrupt-cells : Specifies the number of cells needed to encode an
- interrupt source. The value shall be 2.
-- interrupts : Specifies the CPU interrupt the controller is connected to.
-
-Example:
-
-intc: interrupt-controller@1fd01040 {
- compatible = "loongson,ls1x-intc";
- reg = <0x1fd01040 0x18>;
-
- interrupt-controller;
- #interrupt-cells = <2>;
-
- interrupt-parent = <&cpu_intc>;
- interrupts = <2>;
-};
diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,ls1x-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,ls1x-intc.yaml
new file mode 100644
index 000000000000..c60125fb1cbf
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,ls1x-intc.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/loongson,ls1x-intc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Loongson-1 Interrupt Controller
+
+maintainers:
+ - Keguang Zhang <[email protected]>
+
+description:
+ Loongson-1 interrupt controller is connected to the MIPS core interrupt
+ controller, which controls several groups of interrupts.
+
+properties:
+ compatible:
+ const: loongson,ls1x-intc
+
+ reg:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ '#interrupt-cells':
+ const: 2
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupt-controller
+ - '#interrupt-cells'
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ intc0: interrupt-controller@1fd01040 {
+ compatible = "loongson,ls1x-intc";
+ reg = <0x1fd01040 0x18>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ interrupt-parent = <&cpu_intc>;
+ interrupts = <2>;
+ };

base-commit: 39459ce717b863556d7d75466fcbd904a6fbbbd8
--
2.34.1



2023-02-21 15:34:44

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v3] dt-bindings: interrupt-controller: convert loongson,ls1x-intc.txt to json-schema


On Tue, 21 Feb 2023 18:25:45 +0800, Keguang Zhang wrote:
> Convert the Loongson1 interrupt controller dt-bindings to json-schema.
>
> Signed-off-by: Keguang Zhang <[email protected]>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> ---
> V2 -> V3: Fix the description
> V1 -> V2: Drop the description part
> ---
> .../loongson,ls1x-intc.txt | 24 ---------
> .../loongson,ls1x-intc.yaml | 51 +++++++++++++++++++
> 2 files changed, 51 insertions(+), 24 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,ls1x-intc.txt
> create mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,ls1x-intc.yaml
>

Applied, thanks!