media: dt-bindings: st,stih-cec: convert to DT schema
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 8 Dec 2022 10:31:15 +0000 (11:31 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 8 Feb 2023 06:44:24 +0000 (07:44 +0100)
Convert ST STIH4xx HDMI CEC bindings to DT schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Documentation/devicetree/bindings/media/cec/st,stih-cec.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/media/stih-cec.txt [deleted file]
MAINTAINERS

diff --git a/Documentation/devicetree/bindings/media/cec/st,stih-cec.yaml b/Documentation/devicetree/bindings/media/cec/st,stih-cec.yaml
new file mode 100644 (file)
index 0000000..aeddf16
--- /dev/null
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/cec/st,stih-cec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STIH4xx HDMI CEC
+
+maintainers:
+  - Alain Volmat <alain.volmat@foss.st.com>
+
+allOf:
+  - $ref: cec-common.yaml#
+
+properties:
+  compatible:
+    const: st,stih-cec
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: cec-clk
+
+  interrupts:
+    maxItems: 1
+
+  interrupt-names:
+    items:
+      - const: cec-irq
+
+  resets:
+    maxItems: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - clocks
+  - hdmi-phandle
+  - interrupts
+  - resets
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/reset/stih407-resets.h>
+
+    cec@94a087c {
+        compatible = "st,stih-cec";
+        reg = <0x94a087c 0x64>;
+
+        clocks = <&clk_sysin>;
+        clock-names = "cec-clk";
+        hdmi-phandle = <&sti_hdmi>;
+        interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
+        interrupt-names = "cec-irq";
+        pinctrl-names = "default";
+        pinctrl-0 = <&pinctrl_cec0_default>;
+        resets = <&softreset STIH407_LPM_SOFTRESET>;
+    };
diff --git a/Documentation/devicetree/bindings/media/stih-cec.txt b/Documentation/devicetree/bindings/media/stih-cec.txt
deleted file mode 100644 (file)
index ece0832..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-STMicroelectronics STIH4xx HDMI CEC driver
-
-Required properties:
- - compatible : value should be "st,stih-cec"
- - reg : Physical base address of the IP registers and length of memory
-        mapped region.
- - clocks : from common clock binding: handle to HDMI CEC clock
- - interrupts : HDMI CEC interrupt number to the CPU.
- - pinctrl-names: Contains only one value - "default"
- - pinctrl-0: Specifies the pin control groups used for CEC hardware.
- - resets: Reference to a reset controller
- - hdmi-phandle: Phandle to the HDMI controller, see also cec.txt.
-
-Example for STIH407:
-
-sti-cec@94a087c {
-       compatible = "st,stih-cec";
-       reg = <0x94a087c 0x64>;
-       clocks = <&clk_sysin>;
-       clock-names = "cec-clk";
-       interrupts = <GIC_SPI 140 IRQ_TYPE_NONE>;
-       interrupt-names = "cec-irq";
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_cec0_default>;
-       resets = <&softreset STIH407_LPM_SOFTRESET>;
-       hdmi-phandle = <&hdmi>;
-};
index 7765944ecca9594a3cb834c69a71caad1a9200cb..b8a4b52db8ca8dbfac84dbe7502e9e3140325775 100644 (file)
@@ -19951,7 +19951,7 @@ F:      sound/soc/sti/
 STI CEC DRIVER
 M:     Alain Volmat <alain.volmat@foss.st.com>
 S:     Maintained
-F:     Documentation/devicetree/bindings/media/stih-cec.txt
+F:     Documentation/devicetree/bindings/media/cec/st,stih-cec.yaml
 F:     drivers/media/cec/platform/sti/
 
 STK1160 USB VIDEO CAPTURE DRIVER