Re: [PATCH 1/2] dt-bindings: mux-controller: ti: add binding for event mux router

From
Alvin Šipraga <alvin.sipraga@analog.com>
Date
2026-08-28 11:51:32
Also in
lkml
Reply to
Rahul Sharma, 2026-08-28
Hi Rahul,

On Fri, Aug 28, 2026 at 03:36:14PM +0530, Rahul Sharma wrote:
Add binding for the event mux router of TI's K3 based SoC AM62L.
[...]
quoted hunk ↗ jump to hunk
+  ti,reg-mask-val:
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    items:
+      items:
+        - description: Register offset (relative to reg base)
+        - description: Bit mask for the mux control bits
+        - description: Value to write when mux is active (state 1)
+    minItems: 1
+    description: |
+      Array of triplets specifying register offset, mask, and value for each
+      mux control. Each triplet contains:
+      - register offset (relative to reg base)
+      - bit mask for the mux control bits
+      - value to write when mux is active (state 1)
As I understand it, you are creating a binary (0=off / 1=on) mux control
for each reg-mask-val triplet. But couldn't you just use the mmio-mux
binding/driver for this, delegating the value setting to the consumer?

[...]
quoted hunk ↗ jump to hunk
+examples:
+  - |
+    #include <dt-bindings/mux/mux.h>
+
+    // Example 1: TI AM62L GPIO Mux Router
+    mux-controller@a00000 {
+        compatible = "ti,am62l-event-mux-router";
+        reg = <0xa00000 0x400>;
+        #mux-control-cells = <1>;
+
+        /* Mux Register addresses: 0xa00004 + (J × 4) */
+        /* GPIO0_40 -> BCDMA trigger 15 */
+        ti,reg-mask-val = <0x40 0x000ff 0x00028>;
+        idle-states = <0>;
+    };
Alternatively,

 foo_mux: mux-controller {
   compatible = "mmio-mux";
   reg = <...>;
   #mux-control-cells = <1>;
   mux-reg-masks = <0x40 0x000ff>;
   idle-states = <0>;
 };

 toto-consumer {
   compatible = "toto";
   mux-states = <&foo_mux 0 0x00028>;
   mux-state-names = "gpio-trigger";
 };

What's wrong with that?

Kind regards,
Alvin
Thread (18 messages) 18 messages, 6 authors, last reply 2026-09-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help