Add dt bindings for adg2404.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
changes in v2:
* rename addr-gpios to mux-gpios
* rename en-gpios to enable-gpios
* use items format for mux-gpios description
* simplify property descriptions
---
.../devicetree/bindings/mux/adi,adg2404.yaml | 66 +++++++++++++++++++
1 file changed, 66 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mux/adi,adg2404.yaml
diff --git a/Documentation/devicetree/bindings/mux/adi,adg2404.yaml b/Documentation/devicetree/bindings/mux/adi,adg2404.yaml
new file mode 100644
index 000000000000..d5a7c205d579
--- /dev/null
+++ b/Documentation/devicetree/bindings/mux/adi,adg2404.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mux/adi,adg2404.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices ADG2404 4:1 multiplexer
+
+maintainers:
+ - Antoniu Miclaus <antoniu.miclaus@analog.com>
+
+description: |
+ Bindings for Analog Devices ADG2404 4:1 single-ended analog multiplexer
+
+ The multiplexer state corresponds to the selected input channel:
+ * 0: Channel S1 selected
+ * 1: Channel S2 selected
+ * 2: Channel S3 selected
+ * 3: Channel S4 selected
+
+allOf:
+ - $ref: mux-controller.yaml#
+
+properties:
+ compatible:
+ const: adi,adg2404
+
+ mux-gpios:
+ description:
+ GPIO pins connected to the address inputs.
+ items:
+ - description: A0 address pin
+ - description: A1 address pin
+
+ enable-gpios:
+ description:
+ GPIO connected to the EN (enable) pin. Active high.
+ maxItems: 1
+
+ '#mux-control-cells':
+ const: 0
+
+required:
+ - compatible
+ - mux-gpios
+ - enable-gpios
+ - '#mux-control-cells'
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ mux-controller {
+ compatible = "adi,adg2404";
+ #mux-control-cells = <0>;
+
+ mux-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>,
+ <&gpio 2 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
+
+ idle-state = <0>; /* Select channel S1 when idle */
+ };
+
+...
--
2.43.0