From: rahul sharma <r-sharma3@ti.com>
To: "Alvin Šipraga" <alvin.sipraga@analog.com>
Cc: <peda@lysator.liu.se>, <robh@kernel.org>, <krzk+dt@kernel.org>,
<conor+dt@kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <vigneshr@ti.com>
Subject: Re: [EXTERNAL] Re: [PATCH 1/2] dt-bindings: mux-controller: ti: add binding for event mux router
Date: Wed, 2 Sep 2026 17:55:40 +0530 [thread overview]
Message-ID: <ca616c2e-8a90-423b-8b99-1c5d030c9e71@ti.com> (raw)
In-Reply-To: <apFyu65OOQF1XF2o@analog.com>
Hi Alvin,
On 28/08/26 17:20, Alvin Šipraga wrote:
> 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. [. . . ] > + ti,reg-mask-val: > + $ref: /schemas/types. yaml#/
> definitions/uint32-matrix > + items:
>
>
> 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.
>
> [...]
>
>> + 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?
>
> [...]
>
>> +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?
We wanted to go with this approach initially, but we had trouble
assigning consumer node(s) because of lot of modifications will be
needed in already existing consumer nodes.
So, we came up with another plan of not using a consumer node at all to
enable this. Now in this approach you can see, the mux-controller itself
assigns that value to mux register and takes care of routing.
Also If you look at the driver, to establish a mux route path we need to
2 things to be done 1. Set the mux register value, this comes from DT
property 2. Enable the mux route by setting 16th bit in mux register.
And this cannot be accommodated in current mmio-mux driver.
BR,
Rahul
>
> Kind regards,
> Alvin
>
next prev parent reply other threads:[~2026-09-02 12:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 10:06 [PATCH 0/2] Add TI's event mux router driver and build Rahul Sharma
2026-08-28 10:06 ` [PATCH 1/2] dt-bindings: mux-controller: ti: add binding for event mux router Rahul Sharma
2026-08-28 11:50 ` Alvin Šipraga
2026-09-02 12:25 ` rahul sharma [this message]
2026-08-28 16:27 ` Conor Dooley
2026-08-28 10:06 ` [PATCH 2/2] mux-controller: ti: add driver " Rahul Sharma
2026-08-29 15:14 ` Peter Rosin
2026-09-03 19:16 ` [EXTERNAL] " Sharma, Rahul
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=ca616c2e-8a90-423b-8b99-1c5d030c9e71@ti.com \
--to=r-sharma3@ti.com \
--cc=alvin.sipraga@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@lysator.liu.se \
--cc=robh@kernel.org \
--cc=vigneshr@ti.com \
/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®