]> www.infradead.org Git - linux.git/commitdiff
dt-bindings: ata: qcom,ipq806x-ahci: use dtschema
authorRayyan Ansari <rayyan.ansari@linaro.org>
Wed, 17 Jul 2024 10:03:06 +0000 (11:03 +0100)
committerDamien Le Moal <dlemoal@kernel.org>
Mon, 29 Jul 2024 00:02:44 +0000 (09:02 +0900)
Remove old text bindings and add ipq806x AHCI compatible to
ahci-common.yaml, as well as its required properties.

Signed-off-by: Rayyan Ansari <rayyan.ansari@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Documentation/devicetree/bindings/ata/ahci-platform.yaml
Documentation/devicetree/bindings/ata/qcom-sata.txt [deleted file]

index 358617115bb8ecebdf15ca6d806d0b10956ce190..2c8fdfc3df9be2597428b4044e30aecfe3135f6a 100644 (file)
@@ -30,6 +30,7 @@ select:
           - marvell,armada-3700-ahci
           - marvell,armada-8k-ahci
           - marvell,berlin2q-ahci
+          - qcom,ipq806x-ahci
           - socionext,uniphier-pro4-ahci
           - socionext,uniphier-pxs2-ahci
           - socionext,uniphier-pxs3-ahci
@@ -45,6 +46,7 @@ properties:
               - marvell,armada-8k-ahci
               - marvell,berlin2-ahci
               - marvell,berlin2q-ahci
+              - qcom,ipq806x-ahci
               - socionext,uniphier-pro4-ahci
               - socionext,uniphier-pxs2-ahci
               - socionext,uniphier-pxs3-ahci
@@ -64,11 +66,11 @@ properties:
 
   clocks:
     minItems: 1
-    maxItems: 3
+    maxItems: 5
 
   clock-names:
     minItems: 1
-    maxItems: 3
+    maxItems: 5
 
   interrupts:
     maxItems: 1
@@ -97,6 +99,30 @@ required:
 
 allOf:
   - $ref: ahci-common.yaml#
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,ipq806x-ahci
+    then:
+      properties:
+        clocks:
+          minItems: 5
+        clock-names:
+          items:
+            - const: slave_iface
+            - const: iface
+            - const: core
+            - const: rxoob
+            - const: pmalive
+      required:
+        - phys
+        - phy-names
+        - clocks
+        - clock-names
+
   - if:
       properties:
         compatible:
diff --git a/Documentation/devicetree/bindings/ata/qcom-sata.txt b/Documentation/devicetree/bindings/ata/qcom-sata.txt
deleted file mode 100644 (file)
index 094de91..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-* Qualcomm AHCI SATA Controller
-
-SATA nodes are defined to describe on-chip Serial ATA controllers.
-Each SATA controller should have its own node.
-
-Required properties:
-- compatible           : compatible list, must contain "generic-ahci"
-- interrupts           : <interrupt mapping for SATA IRQ>
-- reg                  : <registers mapping>
-- phys                 : Must contain exactly one entry as specified
-                         in phy-bindings.txt
-- phy-names            : Must be "sata-phy"
-
-Required properties for "qcom,ipq806x-ahci" compatible:
-- clocks               : Must contain an entry for each entry in clock-names.
-- clock-names          : Shall be:
-                               "slave_iface" - Fabric port AHB clock for SATA
-                               "iface" - AHB clock
-                               "core" - core clock
-                               "rxoob" - RX out-of-band clock
-                               "pmalive" - Power Module Alive clock
-- assigned-clocks      : Shall be:
-                               SATA_RXOOB_CLK
-                               SATA_PMALIVE_CLK
-- assigned-clock-rates : Shall be:
-                               100Mhz (100000000) for SATA_RXOOB_CLK
-                               100Mhz (100000000) for SATA_PMALIVE_CLK
-
-Example:
-       sata@29000000 {
-               compatible = "qcom,ipq806x-ahci", "generic-ahci";
-               reg = <0x29000000 0x180>;
-
-               interrupts = <0 209 0x0>;
-
-               clocks = <&gcc SFAB_SATA_S_H_CLK>,
-                        <&gcc SATA_H_CLK>,
-                        <&gcc SATA_A_CLK>,
-                        <&gcc SATA_RXOOB_CLK>,
-                        <&gcc SATA_PMALIVE_CLK>;
-               clock-names = "slave_iface", "iface", "core",
-                               "rxoob", "pmalive";
-               assigned-clocks = <&gcc SATA_RXOOB_CLK>, <&gcc SATA_PMALIVE_CLK>;
-               assigned-clock-rates = <100000000>, <100000000>;
-
-               phys = <&sata_phy>;
-               phy-names = "sata-phy";
-       };