[PATCH 2/6] dt-bindings: mfd: brcm,bcm59056: Add compatible for BCM59054

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The BCM59054 MFD is fairly similar to the BCM59056, and will use
the same driver. Add compatible and specify the allowed regulator
nodes.

Signed-off-by: Artur Weber <aweber.kernel@xxxxxxxxx>
---
 .../devicetree/bindings/mfd/brcm,bcm59056.yaml     | 125 +++++++++++++++------
 1 file changed, 88 insertions(+), 37 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/brcm,bcm59056.yaml b/Documentation/devicetree/bindings/mfd/brcm,bcm59056.yaml
index 6d6acc9fd312..5b5044867eca 100644
--- a/Documentation/devicetree/bindings/mfd/brcm,bcm59056.yaml
+++ b/Documentation/devicetree/bindings/mfd/brcm,bcm59056.yaml
@@ -12,6 +12,7 @@ maintainers:
 properties:
   compatible:
     enum:
+      - "brcm,bcm59054"
       - "brcm,bcm59056"
 
   reg:
@@ -24,43 +25,93 @@ properties:
     type: object
     description: Container node for regulators.
 
-    # The valid regulator node names for BCM59056 are:
-    #   rfldo, camldo1, camldo2, simldo1, simldo2, sdldo, sdxldo,
-    #   mmcldo1, mmcldo2, audldo, micldo, usbldo, vibldo,
-    #   csr, iosr1, iosr2, msr, sdsr1, sdsr2, vsr,
-    #   gpldo1, gpldo2, gpldo3, gpldo4, gpldo5, gpldo6,
-    #   vbus
-    patternProperties:
-      "^(cam|sim|mmc)ldo[1-2]$":
-        type: object
-        $ref: /schemas/regulator/regulator.yaml#
-        unevaluatedProperties: false
-
-      "^(rf|sd|sdx|aud|mic|usb|vib)ldo$":
-        type: object
-        $ref: /schemas/regulator/regulator.yaml#
-        unevaluatedProperties: false
-
-      "^(c|m|v)sr$":
-        type: object
-        $ref: /schemas/regulator/regulator.yaml#
-        unevaluatedProperties: false
-
-      "^(io|sd)sr[1-2]$":
-        type: object
-        $ref: /schemas/regulator/regulator.yaml#
-        unevaluatedProperties: false
-
-      "^gpldo[1-6]$":
-        type: object
-        $ref: /schemas/regulator/regulator.yaml#
-        unevaluatedProperties: false
-
-    properties:
-      "vbus":
-        type: object
-        $ref: /schemas/regulator/regulator.yaml#
-        unevaluatedProperties: false
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: "brcm,bcm59056"
+    then:
+      properties:
+        regulators:
+          # The valid regulator node names for BCM59056 are:
+          #   rfldo, camldo1, camldo2, simldo1, simldo2, sdldo, sdxldo,
+          #   mmcldo1, mmcldo2, audldo, micldo, usbldo, vibldo,
+          #   csr, iosr1, iosr2, msr, sdsr1, sdsr2, vsr,
+          #   gpldo1, gpldo2, gpldo3, gpldo4, gpldo5, gpldo6,
+          #   vbus
+          patternProperties:
+            "^(cam|sim|mmc)ldo[1-2]$":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+            "^(rf|sd|sdx|aud|mic|usb|vib)ldo$":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+            "^(c|m|v)sr$":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+            "^(io|sd)sr[1-2]$":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+            "^gpldo[1-6]$":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+          properties:
+            "vbus":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+          additionalProperties: false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: "brcm,bcm59054"
+    then:
+      properties:
+        regulators:
+          # The valid regulator node names for BCM59054 are:
+          #   rfldo, camldo1, camldo2, simldo1, simldo2, sdldo, sdxldo,
+          #   mmcldo1, mmcldo2, audldo, micldo, usbldo, vibldo,
+          #   csr, iosr1, iosr2, mmsr, sdsr1, sdsr2, vsr,
+          #   gpldo1, gpldo2, gpldo3, tcxldo, lvldo1, lvldo2
+          patternProperties:
+            "^(cam|sim|mmc)ldo[1-2]$":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+            "^(rf|sd|sdx|aud|mic|usb|vib|tcx)ldo$":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+            "^(c|mm|v)sr$":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+            "^(io|sd)sr[1-2]$":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+            "^gpldo[1-3]$":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+            "^lvldo[1-2]$":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+          properties:
+            "vbus":
+              type: object
+              $ref: /schemas/regulator/regulator.yaml#
+
+          additionalProperties: false
 
 required:
   - compatible

-- 
2.42.0





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux