[PATCH v3 1/6] dt-bindings: mfd: add bindings for QIXIS CPLD

Ioana Ciornei posted 6 patches 7 months ago
[PATCH v3 1/6] dt-bindings: mfd: add bindings for QIXIS CPLD
Posted by Ioana Ciornei 7 months ago
Add device tree bindings for the board management controller - QIXIS
CPLD - found on some Layerscape based boards such as LX2162A-QDS,
LX2160AQDS, LS1028AQDS etc.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
Changes in v3:
- reworded the commit message, updated the regex to only accept
  children with bus addressing, removed unnecessary '|'

Changes in v2:
- renamed the compatible strings so that it does not mention the i2c
  part, which is redundant
- remove the description from the reg property
- reordered the properties when mentioned in the required section
- updated the example so that it actually reflects the expected DT

 .../mfd/fsl,ls1028a-qds-qixis-cpld.yaml       | 65 +++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/fsl,ls1028a-qds-qixis-cpld.yaml

diff --git a/Documentation/devicetree/bindings/mfd/fsl,ls1028a-qds-qixis-cpld.yaml b/Documentation/devicetree/bindings/mfd/fsl,ls1028a-qds-qixis-cpld.yaml
new file mode 100644
index 000000000000..e54aee572092
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/fsl,ls1028a-qds-qixis-cpld.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/fsl,ls1028a-qds-qixis-cpld.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP's QIXIS CPLD board management controller
+
+maintainers:
+  - Ioana Ciornei <ioana.ciornei@nxp.com>
+
+description:
+  The board management controller found on some Layerscape boards contains
+  different IP blocks like GPIO controllers, interrupt controllers, reg-muxes
+  etc. The QIXIS CPLD on these boards presents itself as an I2C device.
+
+properties:
+  compatible:
+    enum:
+      - fsl,ls1028a-qds-qixis-cpld
+      - fsl,lx2160a-qds-qixis-cpld
+      - fsl,lx2162a-qds-qixis-cpld
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  '^mux-controller(@[a-f0-9]+)$':
+    $ref: /schemas/mux/reg-mux.yaml#
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        cpld@66 {
+            compatible = "fsl,lx2160a-qds-qixis-cpld";
+            reg = <0x66>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            mux: mux-controller@54 {
+                compatible = "reg-mux";
+                reg = <0x54>;
+                #mux-control-cells = <1>;
+                mux-reg-masks = <0x54 0xf8>, /* 0: reg 0x54, bits 7:3 */
+                                <0x54 0x07>; /* 1: reg 0x54, bit 2:0 */
+            };
+        };
+    };
-- 
2.25.1
Re: [PATCH v3 1/6] dt-bindings: mfd: add bindings for QIXIS CPLD
Posted by Krzysztof Kozlowski 7 months ago
On 15/05/2025 17:56, Ioana Ciornei wrote:
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +patternProperties:
> +  '^mux-controller(@[a-f0-9]+)$':

Drop ()

> +    $ref: /schemas/mux/reg-mux.yaml#
> +
> +required
> +  - compatible
> +  - reg
> +  - "#address-cells"

Keep consistent quotes, either ' or "

> +  - "#size-cells"
> +
> +additionalProperties: false
> +


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

Best regards,
Krzysztof