[PATCH v3 3/4] dt-bindings: mux: gpio-mux: add adi,adg2404 support

Antoniu Miclaus posted 4 patches 3 weeks, 4 days ago
[PATCH v3 3/4] dt-bindings: mux: gpio-mux: add adi,adg2404 support
Posted by Antoniu Miclaus 3 weeks, 4 days ago
Add adi,adg2404 as a compatible string. The ADG2404 is a 4:1 analog
multiplexer that uses the enable-gpios feature.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
changes in v3:
 * integrate with gpio-mux bindings instead of separate adi,adg2404.yaml
---
 .../devicetree/bindings/mux/gpio-mux.yaml     | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mux/gpio-mux.yaml b/Documentation/devicetree/bindings/mux/gpio-mux.yaml
index 199792d42323..f5866b9f46dd 100644
--- a/Documentation/devicetree/bindings/mux/gpio-mux.yaml
+++ b/Documentation/devicetree/bindings/mux/gpio-mux.yaml
@@ -19,7 +19,9 @@ description: |+
 
 properties:
   compatible:
-    const: gpio-mux
+    enum:
+      - gpio-mux
+      - adi,adg2404
 
   mux-gpios:
     description:
@@ -107,4 +109,19 @@ examples:
             };
         };
     };
+
+  - |
+    /* ADG2404 4:1 multiplexer with enable GPIO */
+    #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
Re: [PATCH v3 3/4] dt-bindings: mux: gpio-mux: add adi,adg2404 support
Posted by Krzysztof Kozlowski 3 weeks, 3 days ago
On Thu, Jan 15, 2026 at 02:18:21PM +0200, Antoniu Miclaus wrote:
> Add adi,adg2404 as a compatible string. The ADG2404 is a 4:1 analog
> multiplexer that uses the enable-gpios feature.
> 
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> ---
> changes in v3:
>  * integrate with gpio-mux bindings instead of separate adi,adg2404.yaml
> ---
>  .../devicetree/bindings/mux/gpio-mux.yaml     | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mux/gpio-mux.yaml b/Documentation/devicetree/bindings/mux/gpio-mux.yaml
> index 199792d42323..f5866b9f46dd 100644
> --- a/Documentation/devicetree/bindings/mux/gpio-mux.yaml
> +++ b/Documentation/devicetree/bindings/mux/gpio-mux.yaml
> @@ -19,7 +19,9 @@ description: |+
>  
>  properties:
>    compatible:
> -    const: gpio-mux
> +    enum:
> +      - gpio-mux
> +      - adi,adg2404

I do not understand why this was placed in gpio-mux. You have a strictly
defined hardware, with known muxes, not a flexible semi-software
binding.

Otherwise please explain: why do you have both 0 and 1 cells?

This is supposed to be in its own binding.

Best regards,
Krzysztof
Re: [PATCH v3 3/4] dt-bindings: mux: gpio-mux: add adi,adg2404 support
Posted by Krzysztof Kozlowski 3 weeks, 3 days ago
On 16/01/2026 09:29, Krzysztof Kozlowski wrote:
> On Thu, Jan 15, 2026 at 02:18:21PM +0200, Antoniu Miclaus wrote:
>> Add adi,adg2404 as a compatible string. The ADG2404 is a 4:1 analog
>> multiplexer that uses the enable-gpios feature.
>>
>> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
>> ---
>> changes in v3:
>>  * integrate with gpio-mux bindings instead of separate adi,adg2404.yaml
>> ---
>>  .../devicetree/bindings/mux/gpio-mux.yaml     | 19 ++++++++++++++++++-
>>  1 file changed, 18 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/mux/gpio-mux.yaml b/Documentation/devicetree/bindings/mux/gpio-mux.yaml
>> index 199792d42323..f5866b9f46dd 100644
>> --- a/Documentation/devicetree/bindings/mux/gpio-mux.yaml
>> +++ b/Documentation/devicetree/bindings/mux/gpio-mux.yaml
>> @@ -19,7 +19,9 @@ description: |+
>>  
>>  properties:
>>    compatible:
>> -    const: gpio-mux
>> +    enum:
>> +      - gpio-mux
>> +      - adi,adg2404
> 
> I do not understand why this was placed in gpio-mux. You have a strictly
> defined hardware, with known muxes, not a flexible semi-software
> binding.
> 
> Otherwise please explain: why do you have both 0 and 1 cells?
> 
> This is supposed to be in its own binding.

After reading further patches - this patch does not make sense, but it
should not be its own binding. Rob at v2 gave you advice what should be
done.

Best regards,
Krzysztof