mbox series

[RFC,0/2] Add support for Timesync Interrupt Router

Message ID 20250205160119.136639-1-c-vankar@ti.com (mailing list archive)
Headers show
Series Add support for Timesync Interrupt Router | expand

Message

Chintan Vankar Feb. 5, 2025, 4:01 p.m. UTC
This series introduces the driver support for Timesync Interrupt Router,
I will appreciate feedback on the driver implementation.

Timesync Interrupt Router is an instantiation of the generic interrupt
router module. It provides a mechanism to mux M interrupt inputs to N
interrupt outputs, where all M inputs are selectable to be driven as per N
output. More details about interrupt router and timesync interrupt router
can be found in sections 9.3 and 11.3.2 of TRM:
https://www.ti.com/lit/ug/spruiu1d/spruiu1d.pdf

Timesync Interrupt Router's inputs are either from peripherals or from
Device sync events. This series adds support on how we can map output
of the Timesync Interrupt Router corresponding to the input received
from peripherals.

As an instance, one of the input for Timesync Interrupt Router is,
Generator function, which is an output from CPTS module. The CPTS hardware
doesn't support PPS signal generation. Using the GenFx (periodic signal
generator) function, it is possible to model a PPS signal followed by
routing it via the Timesync Interrupt router to the CPTS_HWy_TS_PUSH
(hardware time stamp) input, in order to generate timestamps at 1 second
intervals.

To provide PPS support to am65-cpts driver we need to configure timesync
interrupt router to route input received as GenFx output from CPTS module
back to HWy_TS_PUSH input of CPTS module.

AM62x is one of the SoCs which has Timesync Router and mapping for all its
output corresponding to its input can be found on SDK documentation of
TISCI at:
https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am62x/interrupt_cfg.html#timesync-event-router0-interrupt-router-output-destinations

This series is based on linux-next tagged next-20250205.


Chintan Vankar (2):
  irqchip: ti-tsir: Add support for Timesync Interrupt Router
  net: ethernet: ti: am65-cpts: Add support to configure GenF signal for
    CPTS

 drivers/irqchip/Kconfig             |   9 +++
 drivers/irqchip/Makefile            |   1 +
 drivers/irqchip/ti-timesync-intr.c  | 109 ++++++++++++++++++++++++++++
 drivers/net/ethernet/ti/am65-cpts.c |  21 ++++++
 4 files changed, 140 insertions(+)
 create mode 100644 drivers/irqchip/ti-timesync-intr.c