]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
dt-bindings: mfd: Convert fsl-imx25-tsadc.txt to yaml format
authorFrank Li <Frank.Li@nxp.com>
Wed, 11 Feb 2026 21:41:05 +0000 (16:41 -0500)
committerLee Jones <lee@kernel.org>
Wed, 25 Mar 2026 12:45:21 +0000 (12:45 +0000)
Convert fsl-imx25-tsadc.txt to yaml format.

Additional changes:

- Add ranges.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20260211-yaml_mfd-v1-2-05cb48bc6f09@nxp.com
Signed-off-by: Lee Jones <lee@kernel.org>
Documentation/devicetree/bindings/mfd/fsl,imx25-tsadc.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt [deleted file]

diff --git a/Documentation/devicetree/bindings/mfd/fsl,imx25-tsadc.yaml b/Documentation/devicetree/bindings/mfd/fsl,imx25-tsadc.yaml
new file mode 100644 (file)
index 0000000..b5c6a2d
--- /dev/null
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/fsl,imx25-tsadc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale MX25 ADC/TSC MultiFunction Device (MFD)
+
+maintainers:
+  - Frank Li <Frank.Li@nxp.com>
+
+description:
+  This device combines two general purpose conversion queues one used for general
+  ADC and the other used for touchscreens.
+
+properties:
+  compatible:
+    const: fsl,imx25-tsadc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: ipg
+
+  interrupt-controller: true
+
+  '#interrupt-cells':
+    const: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 1
+
+  ranges: true
+
+patternProperties:
+  '^touchscreen@[0-9a-f]+$':
+    type: object
+    $ref: /schemas/input/touchscreen/fsl,imx25-tcq.yaml
+    unevaluatedProperties: false
+
+  '^adc@[0-9a-f]+$':
+    type: object
+    $ref: /schemas/iio/adc/fsl,imx25-gcq.yaml
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - '#interrupt-cells'
+  - '#address-cells'
+  - '#size-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    tscadc@50030000 {
+        compatible = "fsl,imx25-tsadc";
+        reg = <0x50030000 0xc>;
+        interrupts = <46>;
+        clocks = <&clks 119>;
+        clock-names = "ipg";
+        interrupt-controller;
+        #interrupt-cells = <1>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges;
+
+        touchscreen@50030400 {
+            compatible = "fsl,imx25-tcq";
+            reg = <0x50030400 0x60>;
+            interrupts = <0>;
+            fsl,wires = <4>;
+        };
+
+        adc@50030800 {
+            compatible = "fsl,imx25-gcq";
+            reg = <0x50030800 0x60>;
+            interrupts = <1>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+        };
+    };
diff --git a/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt b/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt
deleted file mode 100644 (file)
index b035052..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-Freescale MX25 ADC/TSC MultiFunction Device (MFD)
-
-This device combines two general purpose conversion queues one used for general
-ADC and the other used for touchscreens.
-
-Required properties:
- - compatible:                 Should be "fsl,imx25-tsadc".
- - reg:                                Start address and size of the memory area of
-                                       the device
- - interrupts:                 Interrupt for this device
-                                       (See: ../interrupt-controller/interrupts.txt)
- - clocks:                     An 'ipg' clock (See: ../clock/clock-bindings.txt)
- - interrupt-controller:       This device is an interrupt controller. It
-                                       controls the interrupts of both
-                                       conversion queues.
- - #interrupt-cells:           Should be '<1>'.
- - #address-cells:             Should be '<1>'.
- - #size-cells:                        Should be '<1>'.
-
-This device includes two conversion queues which can be added as subnodes.
-The first queue is for the touchscreen, the second for general purpose ADC.
-
-Example:
-       tscadc: tscadc@50030000 {
-               compatible = "fsl,imx25-tsadc";
-               reg = <0x50030000 0xc>;
-               interrupts = <46>;
-               clocks = <&clks 119>;
-               clock-names = "ipg";
-               interrupt-controller;
-               #interrupt-cells = <1>;
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               tsc: tcq@50030400 {
-                       compatible = "fsl,imx25-tcq";
-                       reg = <0x50030400 0x60>;
-                       ...
-               };
-
-               adc: gcq@50030800 {
-                       compatible = "fsl,imx25-gcq";
-                       reg = <0x50030800 0x60>;
-                       ...
-               };
-       };