[PATCH v2 1/2] dt-bindings: mux: gpio-mux: Add enable-gpios
From: Tapio Reijonen
Date: Mon Aug 31 2026 - 06:41:30 EST
Analog multiplexers have an enable input besides the address inputs. On a
74HC4051 it is the E input: with E high, all eight switches are in the
high-impedance off state, independent of S0 to S2. A 74HC4067 works the
same way with four address inputs.
Two things need that input. The mux-controller binding describes an idle
state of disconnect, which a gpio-mux cannot reach today because the
address inputs always select a channel. And the address inputs are plain
gpios that may live on different gpio controllers, so they are not
updated in one go and the mux passes through the intermediate addresses
on every channel change unless it is disabled meanwhile.
Add enable-gpios to describe the enable input, and require it for an idle
state of disconnect.
Signed-off-by: Tapio Reijonen <tapio.reijonen@xxxxxxxxxxx>
---
.../devicetree/bindings/mux/gpio-mux.yaml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/Documentation/devicetree/bindings/mux/gpio-mux.yaml b/Documentation/devicetree/bindings/mux/gpio-mux.yaml
index ef7e33ec85d479ce57c5fe4a780f81a08a6ab6ba..2dd94704fd7bde238af4e84af87c2ad8e955eb14 100644
--- a/Documentation/devicetree/bindings/mux/gpio-mux.yaml
+++ b/Documentation/devicetree/bindings/mux/gpio-mux.yaml
@@ -29,6 +29,14 @@ properties:
description:
Regulator to power on the multiplexer.
+ enable-gpios:
+ maxItems: 1
+ description:
+ Enable input of the multiplexer, which disconnects all channels when
+ deasserted, independent of mux-gpios. Deasserted while the mux-gpios
+ are updated and for an idle state of disconnect, which cannot be
+ reached with the mux-gpios alone and thus requires this gpio.
+
'#mux-control-cells':
enum: [ 0, 1 ]
@@ -47,11 +55,23 @@ anyOf:
- required:
- "#mux-state-cells"
+allOf:
+ - if:
+ properties:
+ idle-state:
+ const: -2
+ required:
+ - idle-state
+ then:
+ required:
+ - enable-gpios
+
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/mux/mux.h>
mux: mux-controller {
compatible = "gpio-mux";
@@ -59,6 +79,8 @@ examples:
mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
<&pioA 1 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&pioA 2 GPIO_ACTIVE_LOW>;
+ idle-state = <MUX_IDLE_DISCONNECT>;
};
adc-mux {
--
2.47.3