Message ID | 20210824164801.28896-1-lakshmi.sowjanya.d@intel.com |
---|---|
Headers | show |
Series | Review Request: Add support for Intel PMC | expand |
Hi Sowjanya, thanks for your patches! On Tue, Aug 24, 2021 at 6:48 PM <lakshmi.sowjanya.d@intel.com> wrote: > From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com> > > Starting with Intel(R) Tiger Lake and Elkhart Lake platforms the PMC > hardware adds the Timed I/O hardware interface. > > The Timed I/O hardware implements some functionality similar to GPIO > with added timing logic that is driven by the Always Running Timer > (ART). > > The Timed I/O Hardware implement 3 basic functions: > * Input Timestamping > * Single Shot Timed Output > * Periodic Timed Output > > Please help to review the changes. This looks very similar to the usecase proposed for the HTE Hardware Timestamping Engine, proposed by Dipen Patel for the nVidia 194 and which is currently in RFC: https://lore.kernel.org/linux-gpio/20210625235532.19575-1-dipenp@nvidia.com/ Please review this new subsystem and see if you can just make a slot-in driver using Dipen's patches instead. Dipen: please have a look at Sowjanya's patches to see if this hardware is similar to yours. Sometimes several vendors come up with similar hardware around the same time, because of industry trends, so I would not be surprised if these two hardwares address the very same usecase. Yours, Linus Walleij
Thanks Linus for referring. I will take a look. @Sowjanya: I have recently sent out the RFC v2 of the HTE (https://patchwork.ozlabs.org/project/linux-tegra/list/?series=264896). Please have a look and see if you can add TIO as one of the provider. That patch has necessary GPIOLIB and GPIO-CDEV changes which can help userspace and in kernel driver retrieve GPIO realtime timestamps. Best, Dipen Patel On 9/16/21 2:21 PM, Linus Walleij wrote: > Hi Sowjanya, > > thanks for your patches! > > On Tue, Aug 24, 2021 at 6:48 PM <lakshmi.sowjanya.d@intel.com> wrote: > >> From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com> >> >> Starting with Intel(R) Tiger Lake and Elkhart Lake platforms the PMC >> hardware adds the Timed I/O hardware interface. >> >> The Timed I/O hardware implements some functionality similar to GPIO >> with added timing logic that is driven by the Always Running Timer >> (ART). >> >> The Timed I/O Hardware implement 3 basic functions: >> * Input Timestamping >> * Single Shot Timed Output >> * Periodic Timed Output >> >> Please help to review the changes. > This looks very similar to the usecase proposed for the HTE > Hardware Timestamping Engine, proposed by Dipen Patel > for the nVidia 194 and which is currently in RFC: > https://lore.kernel.org/linux-gpio/20210625235532.19575-1-dipenp@nvidia.com/ > > Please review this new subsystem and see if you can just > make a slot-in driver using Dipen's patches instead. > > Dipen: please have a look at Sowjanya's patches to see > if this hardware is similar to yours. > > Sometimes several vendors come up with similar hardware > around the same time, because of industry trends, so I would > not be surprised if these two hardwares address the very > same usecase. > > Yours, > Linus Walleij
From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com> Starting with Intel(R) Tiger Lake and Elkhart Lake platforms the PMC hardware adds the Timed I/O hardware interface. The Timed I/O hardware implements some functionality similar to GPIO with added timing logic that is driven by the Always Running Timer (ART). The Timed I/O Hardware implement 3 basic functions: * Input Timestamping * Single Shot Timed Output * Periodic Timed Output Please help to review the changes. Thanks in advance, Sowjanya Christopher Hall (9): gpio: Add basic GPIO driver for Intel PMC Timed I/O device arch: x86: Add ART support function to tsc code gpio: Add input code to Intel PMC Timed I/O Driver tools: gpio: Add additional polling support to gpio-event-mon kernel: time: Add system time to system counter translation tools: gpio: Add GPIO output generation user application arch/x86: Add ART nanosecond to ART conversion pwm: Add capability for PWM Driver managed state tools: gpio: Add PWM monitor application Lakshmi Sowjanya D (11): gpio: Add GPIO polling interface to GPIO lib gpio: Add set_input and polling interface to GPIO lib code gpio: Add output event generation method to GPIOLIB and PMC Driver arch: x86: Add TSC to ART translation gpio: Add event count interface to gpiolib gpio: Add event count to Intel(R) PMC Timed I/O driver tools: gpio: Add event count capability to event monitor application gpio: Add PWM capabilities to Intel(R) PMC TIO driver pwm: Add second alignment to the core PWM interface gpio: Add PWM alignment support to the Intel(R) PMC Timed I/O driver gpio: Add GPIO monitor line to Intel(R) Timed I/O Driver MAINTAINERS | 7 + arch/x86/include/asm/tsc.h | 5 + arch/x86/kernel/tsc.c | 73 +++ drivers/gpio/Kconfig | 11 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-intel-tio-pmc.c | 834 ++++++++++++++++++++++++++++++ drivers/gpio/gpiolib-cdev.c | 145 +++++- drivers/pwm/core.c | 10 +- drivers/pwm/sysfs.c | 37 ++ include/linux/gpio/driver.h | 29 ++ include/linux/pwm.h | 3 + include/linux/timekeeping.h | 3 + include/uapi/linux/gpio.h | 21 + kernel/time/timekeeping.c | 63 +++ tools/gpio/.gitignore | 1 + tools/gpio/Build | 2 + tools/gpio/Makefile | 21 +- tools/gpio/gpio-event-gen.c | 191 +++++++ tools/gpio/gpio-event-mon.c | 58 ++- tools/gpio/gpio-pwm-mon.c | 431 +++++++++++++++ 20 files changed, 1916 insertions(+), 30 deletions(-) create mode 100644 drivers/gpio/gpio-intel-tio-pmc.c create mode 100644 tools/gpio/gpio-event-gen.c create mode 100644 tools/gpio/gpio-pwm-mon.c