RE: PPS functionality for Intel Timed I/O

From: N, Pandith
Date: Mon Jan 30 2023 - 09:11:35 EST


Hi,

> -----Original Message-----
> From: Rodolfo Giometti <giometti@xxxxxxxxxxxx>
> Sent: Monday, January 30, 2023 7:15 PM
> To: N, Pandith <pandith.n@xxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx; Sangannavar, Mallikarjunappa
> <mallikarjunappa.sangannavar@xxxxxxxxx>; D, Lakshmi Sowjanya
> <lakshmi.sowjanya.d@xxxxxxxxx>; T R, Thejesh Reddy
> <thejesh.reddy.t.r@xxxxxxxxx>; Hall, Christopher S
> <christopher.s.hall@xxxxxxxxx>
> Subject: Re: PPS functionality for Intel Timed I/O
>
> On 30/01/23 13:55, N, Pandith wrote:
> > Hi Rodolfo Giometti,
>
> Hello.
>
> > This is regarding Intel Timed I/O device as PPS.
> >
> > Intel Timed I/O is a precise device (10s of nanoseconds), that can send out
> pulses.
> > This is needed in IoT and server applications to measure offset
> > between system clocks on multiple devices
>
> Can you please provide some URLs where to get further info from about this
> device? I'd like to know how this device works and its interfaces towards the
> CPU.
>
Here is a presentation link for Timed I/O device
https://lpc.events/event/16/contributions/1387/attachments/1051/2010/Timed_IO_LPC.pdf

> > We are planning to implement a driver, for PPS output functionality using
> Timed I/O device.
>
> Great! :)
>
> > 1. Is there any support from PPS framework to start/stop pulse
> generation.
> > If yes, can we get the Pin number, offset(start time) from user space
> ?
>
> Nope, PPS signals are supposed to be always on. However you can start/stop
> pulses generation within the main driver of your device.
>
OK. Wanted to check from PPS framework if can provide any user control for start/stop.

> > 2. Further, this device has the capability to capture the input events
> (pulses, nanosecond precision).
> > The same PIN can work in either input or output mode.
> > Can there be an PPS client driver supporting both modes ?
>
> I'm not sure to well understand what you mean, however a PPS client is a
> piece of code that captures PPS pulses and add a timestamp to them, while a
> PPS generator is a piece of code that (precisely) generates a PPS source
> according to the system's main clock (and not according to a peripheral's
> clock). Hope I've answered to your questions, if not feel free to ask more.
>
Intel Timed I/O PIN has both generator functionality and input capability.
Wanted to ask if it’s better to have two separate drivers, one under client
for input and other as generator driver for PPS output.
OR
Have a single client driver and user can choose the functionality (either
PPS output or as PPS source to capture pulses with timestamps).

> Ciao,
>
> Rodolfo
>
> --
> GNU/Linux Solutions e-mail: giometti@xxxxxxxxxxxx
> Linux Device Driver giometti@xxxxxxxx
> Embedded Systems phone: +39 349 2432127
> UNIX programming skype: rodolfo.giometti