mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Antoniu Miclaus <antoniu.miclaus@analog.com>
To: Peter Rosin <peda@axentia.se>, Rob Herring <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
	Arnd Bergmann <arnd@arndb.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] dt-bindings: mux: adg1736: add support
Date: Fri, 19 Dec 2025 16:35:26 +0200	[thread overview]
Message-ID: <20251219143554.22793-2-antoniu.miclaus@analog.com> (raw)
In-Reply-To: <20251219143554.22793-1-antoniu.miclaus@analog.com>

Add device tree bindings for ADG1736 analog multiplerer.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
 .../devicetree/bindings/mux/adi,adg1736.yaml  | 77 +++++++++++++++++++
 1 file changed, 77 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mux/adi,adg1736.yaml

diff --git a/Documentation/devicetree/bindings/mux/adi,adg1736.yaml b/Documentation/devicetree/bindings/mux/adi,adg1736.yaml
new file mode 100644
index 000000000000..0ba662ffc9cc
--- /dev/null
+++ b/Documentation/devicetree/bindings/mux/adi,adg1736.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mux/adi,adg1736.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices ADG1736 Dual SPDT Switch Multiplexer
+
+maintainers:
+  - Antoniu Miclaus <antoniu.miclaus@analog.com>
+
+description: |
+  Bindings for Analog Devices ADG1736 dual single-pole, double-throw (SPDT)
+  switch. The device features two independent SPDT switches, each functioning
+  as a 2:1 multiplexer. Each switch can connect its common drain terminal (D)
+  to one of two source terminals (SA or SB).
+
+  The device has two independent mux controllers (mux 0 and mux 1), each with
+  two states:
+    * 0: SxB to Dx (control GPIO low)
+    * 1: SxA to Dx (control GPIO high)
+
+  The EN pin is shared between both switches and can disable all channels when
+  set low (inactive).
+
+allOf:
+  - $ref: mux-controller.yaml#
+
+properties:
+  compatible:
+    const: adi,adg1736
+
+  ctrl-gpios:
+    description: |
+      GPIO pins connected to the control inputs IN1 and IN2. Index 0 controls
+      switch 1 (S1A/S1B to D1) and index 1 controls switch 2 (S2A/S2B to D2).
+    minItems: 2
+    maxItems: 2
+
+  en-gpios:
+    description: |
+      GPIO connected to the EN (enable) pin. When low, all switches are
+      disabled (high-impedance). When high, switches are controlled by
+      their respective ctrl-gpios.
+    maxItems: 1
+
+  '#mux-control-cells':
+    const: 1
+    description: |
+      Mux controller index (0 or 1) to select which SPDT switch to control.
+
+required:
+  - compatible
+  - ctrl-gpios
+  - en-gpios
+  - '#mux-control-cells'
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/mux/mux.h>
+
+    mux-controller {
+        compatible = "adi,adg1736";
+        #mux-control-cells = <1>;
+
+        ctrl-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>,
+                     <&gpio 11 GPIO_ACTIVE_HIGH>;
+        en-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+
+        /* Disconnect both switches when idle */
+        idle-states = <MUX_IDLE_DISCONNECT MUX_IDLE_DISCONNECT>;
+    };
+
+...
-- 
2.43.0


  reply	other threads:[~2025-12-19 14:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19 14:35 [PATCH 0/2] Add support for ADG1736 Dual 2:1 Multiplexer Antoniu Miclaus
2025-12-19 14:35 ` Antoniu Miclaus [this message]
2025-12-19 17:52   ` [PATCH 1/2] dt-bindings: mux: adg1736: add support Krzysztof Kozlowski
2025-12-19 14:35 ` [PATCH 2/2] mux: adg1736: add driver support Antoniu Miclaus
2025-12-19 17:57   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251219143554.22793-2-antoniu.miclaus@analog.com \
    --to=antoniu.miclaus@analog.com \
    --cc=arnd@arndb.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®