From: Diogo Ivo <diogo.ivo@siemens.com>
To: MD Danish Anwar <danishanwar@ti.com>,
Roger Quadros <rogerq@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Nishanth Menon <nm@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tero Kristo <kristo@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jan Kiszka <jan.kiszka@siemens.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Simon Horman <horms@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Diogo Ivo <diogo.ivo@siemens.com>,
Wojciech Drewek <wojciech.drewek@intel.com>
Subject: [PATCH net-next v4 0/5] Enable PTP timestamping/PPS for AM65x SR1.0 devices
Date: Mon, 17 Jun 2024 16:21:39 +0100 [thread overview]
Message-ID: <20240617-iep-v4-0-fa20ff4141a3@siemens.com> (raw)
This patch series enables support for PTP in AM65x SR1.0 devices.
This feature relies heavily on the Industrial Ethernet Peripheral
(IEP) hardware module, which implements a hardware counter through
which time is kept. This hardware block is the basis for exposing
a PTP hardware clock to userspace and for issuing timestamps for
incoming/outgoing packets, allowing for time synchronization.
The IEP also has compare registers that fire an interrupt when the
counter reaches the value stored in a compare register. This feature
allows us to support PPS events in the kernel.
The changes are separated into five patches:
- PATCH 01/05: Register SR1.0 devices with the IEP infrastructure to
expose a PHC clock to userspace, allowing time to be
adjusted using standard PTP tools. The code for issuing/
collecting packet timestamps is already present in the
current state of the driver, so only this needs to be
done.
- PATCH 02/05: Remove unnecessary spinlock synchronization.
- PATCH 03/05: Document IEP interrupt in DT binding.
- PATCH 04/05: Add support for IEP compare event/interrupt handling
to enable PPS events.
- PATCH 05/05: Add the interrupts to the IOT2050 device tree.
Currently every compare event generates two interrupts, the first
corresponding to the actual event and the second being a spurious
but otherwise harmless interrupt. The root cause of this has been
identified and has been solved in the platform's SDK. A forward port
of the SDK's patches also fixes the problem in upstream but is not
included here since it's upstreaming is out of the scope of this
series. If someone from TI would be willing to chime in and help
get the interrupt changes upstream that would be great!
Signed-off-by: Diogo Ivo <diogo.ivo@siemens.com>
---
Changes in v4:
- Remove unused 'flags' variables in patch 02/05
- Add patch 03/05 describing IEP interrupt in DT binding
- Link to v3: https://lore.kernel.org/r/20240607-iep-v3-0-4824224105bc@siemens.com
Changes in v3:
- Collect Reviewed-by tags
- Add patch 02/04 removing spinlocks from IEP driver
- Use mutex-based synchronization when accessing HW registers
- Link to v2: https://lore.kernel.org/r/20240604-iep-v2-0-ea8e1c0a5686@siemens.com
Changes in v2:
- Collect Reviewed-by tags
- PATCH 01/03: Limit line length to 80 characters
- PATCH 02/03: Proceed with limited functionality if getting IRQ fails,
limit line length to 80 characters
- Link to v1: https://lore.kernel.org/r/20240529-iep-v1-0-7273c07592d3@siemens.com
---
Diogo Ivo (5):
net: ti: icssg-prueth: Enable PTP timestamping support for SR1.0 devices
net: ti: icss-iep: Remove spinlock-based synchronization
dt-bindings: net: Add IEP interrupt
net: ti: icss-iep: Enable compare events
arm64: dts: ti: iot2050: Add IEP interrupts for SR1.0 devices
.../devicetree/bindings/net/ti,icss-iep.yaml | 9 +++
.../boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi | 12 +++
drivers/net/ethernet/ti/icssg/icss_iep.c | 88 ++++++++++++++++++----
drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c | 51 ++++++++++++-
4 files changed, 145 insertions(+), 15 deletions(-)
---
base-commit: 2f0e3f6a6824dfda2759225326d9c69203c06bc8
change-id: 20240529-iep-8bb4a3cb9068
Best regards,
--
Diogo Ivo <diogo.ivo@siemens.com>
next reply other threads:[~2024-06-17 15:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 15:21 Diogo Ivo [this message]
2024-06-17 15:21 ` [PATCH net-next v4 1/5] net: ti: icssg-prueth: Enable PTP timestamping support for SR1.0 devices Diogo Ivo
2024-06-18 16:22 ` Simon Horman
2024-06-17 15:21 ` [PATCH net-next v4 2/5] net: ti: icss-iep: Remove spinlock-based synchronization Diogo Ivo
2024-06-18 16:23 ` Simon Horman
2024-06-17 15:21 ` [PATCH net-next v4 3/5] dt-bindings: net: Add IEP interrupt Diogo Ivo
2024-06-17 15:35 ` Conor Dooley
2024-06-17 15:21 ` [PATCH net-next v4 4/5] net: ti: icss-iep: Enable compare events Diogo Ivo
2024-06-18 16:23 ` Simon Horman
2024-06-17 15:21 ` [PATCH net-next v4 5/5] arm64: dts: ti: iot2050: Add IEP interrupts for SR1.0 devices Diogo Ivo
2024-06-27 13:19 ` Anwar, Md Danish
2024-06-19 10:00 ` [PATCH net-next v4 0/5] Enable PTP timestamping/PPS for AM65x " patchwork-bot+netdevbpf
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=20240617-iep-v4-0-fa20ff4141a3@siemens.com \
--to=diogo.ivo@siemens.com \
--cc=conor+dt@kernel.org \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jan.kiszka@siemens.com \
--cc=kristo@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nm@ti.com \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
--cc=vigneshr@ti.com \
--cc=wojciech.drewek@intel.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;
as well as URLs for NNTP newsgroup(s).