mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chintan Vankar <c-vankar@ti.com>
To: Conor Dooley <conor+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Rob Herring <robh@kernel.org>, Peter Rosin <peda@axentia.se>
Cc: <s-vadapalli@ti.com>, <danishanwar@ti.com>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	Vignesh Raghavendra <vigneshr@ti.com>, Nishanth Menon <nm@ti.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Chintan Vankar <c-vankar@ti.com>
Subject: Re: [RFC PATCH v2 0/2] Extend mmio-mux driver to configure mux with new DT property
Date: Tue, 20 May 2025 10:59:06 +0530	[thread overview]
Message-ID: <f844e44e-6b71-442a-ae3c-7bbe74a908af@ti.com> (raw)
In-Reply-To: <20250304102306.2977836-1-c-vankar@ti.com>

Hello Peter,

I am trying to implement a driver for hardware module called Timesync
Router which is present on almost all the SoCs of Texas Instruments and
I need your advise to implement it.

Timesync Router provides a mechanism to mux M input to N outputs, where
all M inputs are selectable to be driven per N output.

                          ________________________
                         |    Timesync INTR       +---->dma_local_events
                         |                        |
  Device sync events----->                        +---->pcie_cpts_hw_push
                         |                        |
           cpts_genf----->                        +---->cpts_hw_push
                         |________________________|


Diagram shows a very concise view of Timesync Router. It receives
signals from multiple modules and routes the same on the other side. To
configure the functionality, we need to program output registers of
Timesync Router to configure it with the input signal. One of the
application of Timesync Router is to generate a PPS signal for CPTS
module. Timesync Router receives periodic signals generated by CPTS
module as shown "cpts_genf" in diagram and it can be routed via Timesync
Router as a Hardware Push Events as shown "cpts_hw_push" in diagram.

The functionality of Timesync Router seems very much identical to the
mux-controller, specifically mmio driver present in the mux subsystem.
I have also posted a detailed explanation on how can we modify mmio
driver which can work as a generic driver for the hardware module
identical to Timesync Router at here:
https://lore.kernel.org/r/1ce1fc6b-fc16-4fb7-9f68-57b495aa5eae@ti.com/

I have also tried to implement this module with irq subsystem:
https://lore.kernel.org/r/20250205160119.136639-1-c-vankar@ti.com/, for
which I received a response from the Thomas Gleixner that why it cannot
be included in the irq subsystem:
https://lore.kernel.org/r/87ikp8jph9.ffs@tglx/.

After receiving feedback on the Interrupt Router implementation, I tried
to implement it as a mux-controller which seems more relevant subsystem
for Timesync Router. Can you please advise me whether it can be included
in the mux-controller subsystem or not ?

Regards,
Chintan.




On 04/03/25 15:53, Chintan Vankar wrote:
> This series extends mmio-mux driver's capability to configure driver in
> with extended property.
> 
> In current driver implementation, driver is parsing register's offset,
> mask and value from two different device tree property which makes it
> complex to specify a specific register or set of registers. Introducing
> mux-reg-masks-states will make it easier to specify the same values for
> particular register or set of registers.
> 
> This series is based on linux next tagged next-20250303.
> 
> Link to v1:
> https://lore.kernel.org/r/20250227202206.2551305-1-c-vankar@ti.com/
> 
> Changes from v1 to v2:
> - Updated dt-bindings for the required conditions as suggested by Conor
>    Dooley and Andrew Davis.
> - Modified driver changes as pointed out by Andrew Davis.
> 
> Chintan Vankar (2):
>    devicetree: bindings: mux: reg-mux: Update bindings for reg-mux for
>      new property
>    mux: mmio: Extend mmio-mux driver to configure mux with new DT
>      property
> 
>   .../devicetree/bindings/mux/reg-mux.yaml      |  28 +++-
>   drivers/mux/mmio.c                            | 144 ++++++++++++++----
>   2 files changed, 141 insertions(+), 31 deletions(-)
> 

  parent reply	other threads:[~2025-05-20  5:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04 10:23 Chintan Vankar
2025-03-04 10:23 ` [RFC PATCH v2 1/2] devicetree: bindings: mux: reg-mux: Update bindings for reg-mux for new property Chintan Vankar
2025-03-04 10:47   ` Vankar, Chintan
2025-03-04 15:39   ` Rob Herring
2025-03-04 19:03     ` Vankar, Chintan
2025-03-04 20:40       ` Rob Herring
2025-03-05 21:43         ` Vankar, Chintan
2025-03-05 22:14           ` Rob Herring
2025-03-05 22:30             ` Vankar, Chintan
2025-04-22  8:42               ` Chintan Vankar
2025-03-04 10:23 ` [RFC PATCH v2 2/2] mux: mmio: Extend mmio-mux driver to configure mux with new DT property Chintan Vankar
2025-05-20  5:29 ` Chintan Vankar [this message]
2025-05-30 17:05   ` [RFC PATCH v2 0/2] " Vankar, Chintan
2025-05-31  5:52     ` Greg Kroah-Hartman
2025-05-31  9:37       ` Vankar, Chintan
2025-05-31 12:28         ` Greg Kroah-Hartman

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=f844e44e-6b71-442a-ae3c-7bbe74a908af@ti.com \
    --to=c-vankar@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=danishanwar@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=peda@axentia.se \
    --cc=robh@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=tglx@linutronix.de \
    --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®