diff mbox series

[v8] dt-bindings: ata: imx-pata: Convert to dtschema

Message ID 20240320090733.96828-1-animeshagarwal28@gmail.com
State New
Headers show
Series [v8] dt-bindings: ata: imx-pata: Convert to dtschema | expand

Commit Message

Animesh Agarwal March 20, 2024, 9:07 a.m. UTC
Convert the imx-pata bindings to DT schema.
Add missing fsl,imx31-pata and fsl,imx51-pata compatibles during
conversion, because they are already being used in existing DTS.

Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>

---
Changes in v8:
- added missing space after comma in examples' compatible property

Changes in v7:
- removed blank space at the end of file.

Changes in v6:
- removed items before const due to single element.

Changes in v5:
- added oneOf in compatible property to allow the usage of imx27 alone.

Changes in v4:
- added fsl,imx31-pata in compatible property as enum.

Changes in v3:
- added fsl,imx51-pata in compatible property as enum
- fsl,imx27-pata is added as a const to ensure it is present always

Changes in v2:
- fixed style issues
- compatible property now matches the examples
- fixed yamllint warnings/errors
---
 .../devicetree/bindings/ata/fsl,imx-pata.yaml | 42 +++++++++++++++++++
 .../devicetree/bindings/ata/imx-pata.txt      | 16 -------
 2 files changed, 42 insertions(+), 16 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
 delete mode 100644 Documentation/devicetree/bindings/ata/imx-pata.txt

Comments

Krzysztof Kozlowski March 20, 2024, 9:50 a.m. UTC | #1
On 20/03/2024 10:07, Animesh Agarwal wrote:
> Convert the imx-pata bindings to DT schema.
> Add missing fsl,imx31-pata and fsl,imx51-pata compatibles during
> conversion, because they are already being used in existing DTS.
> 
> Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
> 
> ---


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Animesh Agarwal March 20, 2024, 9:59 a.m. UTC | #2
On Wed, Mar 20, 2024 at 3:20 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Hi Krzysztof,
Thanks for the review.
Damien Le Moal March 25, 2024, 9:29 a.m. UTC | #3
On 3/20/24 18:07, Animesh Agarwal wrote:
> Convert the imx-pata bindings to DT schema.
> Add missing fsl,imx31-pata and fsl,imx51-pata compatibles during
> conversion, because they are already being used in existing DTS.
> 
> Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>

Applied to for-6.10. Thanks !
Animesh Agarwal March 25, 2024, 1:14 p.m. UTC | #4
On Mon, Mar 25, 2024 at 2:59 PM Damien Le Moal <dlemoal@kernel.org> wrote:
> Applied to for-6.10. Thanks !

Thanks Damien.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml b/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
new file mode 100644
index 000000000000..324e2413bba8
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
@@ -0,0 +1,42 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ata/fsl,imx-pata.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale i.MX PATA Controller
+
+maintainers:
+  - Animesh Agarwal <animeshagarwal28@gmail.com>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - fsl,imx31-pata
+              - fsl,imx51-pata
+          - const: fsl,imx27-pata
+      - const: fsl,imx27-pata
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    items:
+      - description: PATA Controller interrupts
+
+  clocks:
+    items:
+      - description: PATA Controller clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    pata: pata@83fe0000 {
+        compatible = "fsl,imx51-pata", "fsl,imx27-pata";
+        reg = <0x83fe0000 0x4000>;
+        interrupts = <70>;
+        clocks = <&clks 161>;
+    };
diff --git a/Documentation/devicetree/bindings/ata/imx-pata.txt b/Documentation/devicetree/bindings/ata/imx-pata.txt
deleted file mode 100644
index f1172f00188a..000000000000
--- a/Documentation/devicetree/bindings/ata/imx-pata.txt
+++ /dev/null
@@ -1,16 +0,0 @@ 
-* Freescale i.MX PATA Controller
-
-Required properties:
-- compatible: "fsl,imx27-pata"
-- reg: Address range of the PATA Controller
-- interrupts: The interrupt of the PATA Controller
-- clocks: the clocks for the PATA Controller
-
-Example:
-
-	pata: pata@83fe0000 {
-		compatible = "fsl,imx51-pata", "fsl,imx27-pata";
-		reg = <0x83fe0000 0x4000>;
-		interrupts = <70>;
-		clocks = <&clks 161>;
-	};