Skip to contentSkip to conversation

dt-bindings: media: Convert hisilicon,hix5hd2-ir to DT schema

PATCH In review Rob Herring (Arm) 2 participants 3 messages Oct 2 – Oct 19

Subsystems (2)
lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: media: Convert hisilicon,hix5hd2-ir to DT schema

Convert the hisilicon,hix5hd2-ir binding to DT schema format. It's a straight forward conversion.

As this was the last reference to rc.txt, it can be removed.

Assisted-by LLM
---
 .../bindings/media/hisilicon,hix5hd2-ir.yaml  | 52 +++++++++++++++++++
 .../devicetree/bindings/media/hix5hd2-ir.txt  | 26 ----------
 .../devicetree/bindings/media/rc.txt          |  1 -
 3 files changed, 52 insertions(+), 27 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/hisilicon,hix5hd2-ir.yaml
 delete mode 100644 Documentation/devicetree/bindings/media/hix5hd2-ir.txt
 delete mode 100644 Documentation/devicetree/bindings/media/rc.txt
Documentation/devicetree/bindings/media/hisilicon,hix5hd2-ir.yaml new file +52 -0
new file mode 100644
index 000000000000..cd836f266e5a
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/hisilicon,hix5hd2-ir.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HiSilicon HIX5HD2 IR controller
+
+maintainers:
+  - Wei Xu <[email protected]>
+
+allOf:
+  - $ref: rc.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - hisilicon,hix5hd2-ir
+          - hisilicon,hi3796cv300-ir
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  hisilicon,power-syscon:
+    description: Provide correct clocks instead.
+    $ref: /schemas/types.yaml#/definitions/phandle
+    deprecated: true
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    ir@f8001000 {
+        compatible = "hisilicon,hix5hd2-ir";
+        reg = <0xf8001000 0x1000>;
+        interrupts = <0 47 4>;
+        clocks = <&clock 0>;
+        linux,rc-map-name = "rc-tivo";
+    };
Documentation/devicetree/bindings/media/hix5hd2-ir.txt deleted +0 -26
deleted file mode 100644
index ca4cf774662e..000000000000
@@ -1,26 +0,0 @@
-Device-Tree bindings for hix5hd2 ir IP
-
-Required properties:
-	- compatible: Should contain "hisilicon,hix5hd2-ir", or:
-		- "hisilicon,hi3796cv300-ir" for Hi3796CV300 IR device.
-	- reg: Base physical address of the controller and length of memory
-	  mapped region.
-	- interrupts: interrupt-specifier for the sole interrupt generated by
-	  the device. The interrupt specifier format depends on the interrupt
-	  controller parent.
-	- clocks: clock phandle and specifier pair.
-
-Optional properties:
-	- linux,rc-map-name: see rc.txt file in the same directory.
-	- hisilicon,power-syscon: DEPRECATED. Don't use this in new dts files.
-		Provide correct clocks instead.
-
-Example node:
-
-	ir: ir@f8001000 {
-		compatible = "hisilicon,hix5hd2-ir";
-		reg = <0xf8001000 0x1000>;
-		interrupts = <0 47 4>;
-		clocks = <&clock HIX5HD2_IR_CLOCK>;
-		linux,rc-map-name = "rc-tivo";
-	};
Documentation/devicetree/bindings/media/rc.txt deleted +0 -1
deleted file mode 100644
index be629f7fa77e..000000000000
@@ -1 +0,0 @@
-This file has been moved to rc.yaml.
Signature · 1 line
2.53.0
author maintainer
#2 lore raw
In reply to Rob Herring (Arm)
Quoted 7 lines · Rob Herring (Arm)

Convert the hisilicon,hix5hd2-ir binding to DT schema format. It's a straight forward conversion.

As this was the last reference to rc.txt, it can be removed.

Assisted-by LLM
Quoted 8 lines
---
 .../bindings/media/hisilicon,hix5hd2-ir.yaml  | 52 +++++++++++++++++++
 .../devicetree/bindings/media/hix5hd2-ir.txt  | 26 ----------
 .../devicetree/bindings/media/rc.txt          |  1 -
 3 files changed, 52 insertions(+), 27 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/hisilicon,hix5hd2-ir.yaml
 delete mode 100644 Documentation/devicetree/bindings/media/hix5hd2-ir.txt
 delete mode 100644 Documentation/devicetree/bindings/media/rc.txt

Not picked up by media tree, so applied to DT tree.

Rob