hte: Re-phrase tegra API document

Make Tegra194 API document generic to make it applicable for
current and future tegra hte providers.

Signed-off-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
This commit is contained in:
Dipen Patel 2023-04-13 17:44:51 -07:00
parent 29662d6226
commit 59cc80a6d8
2 changed files with 17 additions and 18 deletions

View File

@ -18,5 +18,5 @@ HTE Tegra Provider
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
tegra194-hte tegra-hte

View File

@ -5,25 +5,25 @@ HTE Kernel provider driver
Description Description
----------- -----------
The Nvidia tegra194 HTE provider driver implements two GTE The Nvidia tegra HTE provider also known as GTE (Generic Timestamping Engine)
(Generic Timestamping Engine) instances: 1) GPIO GTE and 2) LIC driver implements two GTE instances: 1) GPIO GTE and 2) LIC
(Legacy Interrupt Controller) IRQ GTE. Both GTE instances get the (Legacy Interrupt Controller) IRQ GTE. Both GTE instances get the timestamp
timestamp from the system counter TSC which has 31.25MHz clock rate, and the from the system counter TSC which has 31.25MHz clock rate, and the driver
driver converts clock tick rate to nanoseconds before storing it as timestamp converts clock tick rate to nanoseconds before storing it as timestamp value.
value.
GPIO GTE GPIO GTE
-------- --------
This GTE instance timestamps GPIO in real time. For that to happen GPIO This GTE instance timestamps GPIO in real time. For that to happen GPIO
needs to be configured as input. The always on (AON) GPIO controller instance needs to be configured as input. Only the always on (AON) GPIO controller
supports timestamping GPIOs in real time and it has 39 GPIO lines. The GPIO GTE instance supports timestamping GPIOs in real time as it is tightly coupled with
and AON GPIO controller are tightly coupled as it requires very specific bits the GPIO GTE. To support this, GPIOLIB adds two optional APIs as mentioned
to be set in GPIO config register before GPIO GTE can be used, for that GPIOLIB below. The GPIO GTE code supports both kernel and userspace consumers. The
adds two optional APIs as below. The GPIO GTE code supports both kernel kernel space consumers can directly talk to HTE subsystem while userspace
and userspace consumers. The kernel space consumers can directly talk to HTE consumers timestamp requests go through GPIOLIB CDEV framework to HTE
subsystem while userspace consumers timestamp requests go through GPIOLIB CDEV subsystem. The hte devicetree binding described at
framework to HTE subsystem. ``Documentation/devicetree/bindings/timestamp`` provides an example of how a
consumer can request an GPIO line.
See gpiod_enable_hw_timestamp_ns() and gpiod_disable_hw_timestamp_ns(). See gpiod_enable_hw_timestamp_ns() and gpiod_disable_hw_timestamp_ns().
@ -34,9 +34,8 @@ returns the timestamp in nanoseconds.
LIC (Legacy Interrupt Controller) IRQ GTE LIC (Legacy Interrupt Controller) IRQ GTE
----------------------------------------- -----------------------------------------
This GTE instance timestamps LIC IRQ lines in real time. There are 352 IRQ This GTE instance timestamps LIC IRQ lines in real time. The hte devicetree
lines which this instance can add timestamps to in real time. The hte binding described at ``Documentation/devicetree/bindings/timestamp``
devicetree binding described at ``Documentation/devicetree/bindings/timestamp``
provides an example of how a consumer can request an IRQ line. Since it is a provides an example of how a consumer can request an IRQ line. Since it is a
one-to-one mapping with IRQ GTE provider, consumers can simply specify the IRQ one-to-one mapping with IRQ GTE provider, consumers can simply specify the IRQ
number that they are interested in. There is no userspace consumer support for number that they are interested in. There is no userspace consumer support for