Hardware Timestamp Engine LIC interrupts

Hello,

Based on the documentation there are 2 HTE driver instances, GPIO GTE and LIC (Legacy Interrupt Controller) IRQ GTE

To use LIC IRQ GTE, the kernel has this example:

 *	tegra_hte_test {
 *		compatible = "nvidia,tegra194-hte-test";
. . .
 *		timestamps = <&tegra_hte_aon TEGRA194_AON_GPIO(BB, 1)>,
 *			     <&tegra_hte_lic 0x19>;
 *		timestamp-names = "hte-gpio", "hte-i2c-irq";
 *		status = "okay";
 *	};

Where it uses 0x19 interrupt which is i2c controller 1.

How I can know the interrupt value for other i2c buses or which are all the interrupts values available for LIC IRQ GTE?

Regards,

Hi ManuelLeiva,

Are you working on the devkit or custom board for AGX Orin?
What’s the Jetpack version in use?

It seems the example you are referring is for T194(Xavier series) rather than T234(Orin series).
May I know what’s your use case for Hardware Timestamp?

Sorry for the confusion. I just copy the code from hte-tegra194-test.c code description.
But this is the same driver for t194 and t234.

I am using AGX Orin devkit and R36.3.0.

I want to see what other interrupts I can monitoring, and what is the value that I have to use. For example, the documentation says 0x19 is the interrupt of i2c controller 1. So what is the value if I want to use the interrupt of the i2c controller 2 or what other interrupts I can use.

Thanks.

Okay, I just want to note that TEGRA194_AON_GPIO(BB, 1) is the definition for T194 series.

Have you also referred to hte-consumer.yaml for details?

You have to locate the HTE Instances. Please check the device tree bindings for the Tegra HTE provider.

Yes, In my case I have an example working using AA0 and AA1 for HTE AON

#define GPIO_CAN0_DOUT TEGRA234_AON_GPIO(AA, 0)
#define GPIO_CAN0_DIN  TEGRA234_AON_GPIO(AA, 1)

My question now is how to use the HTE LIC, What you mean with locate HTE instances?
This is the hte_lic instance:

		hte_lic: hardware-timestamp@3aa0000 {
			compatible = "nvidia,tegra234-gte-lic";
			reg = <0x0 0x3aa0000 0x0 0x10000>;
			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
			nvidia,int-threshold = <1>;
			#timestamp-cells = <1>;
		};

In the bindings directory (kernel-jammy-src/Documentation/devicetree/bindings/timestamp/hte-consumer.yaml) I have seen this documentation and this example:

examples:
  - |
    hte_tegra_consumer {
              timestamps = <&tegra_hte_aon 0x9>, <&tegra_hte_lic 0x19>;
              timestamp-names = "hte-gpio", "hte-i2c";
    };

But the documentation doesn’t explain how the value 0x19 is computed, or what other interrupts values I can use.

Hello,

Someone knows how the value 0x19 was computed?

Regards,

from public notes

i2cdetect -y 1 from the userspace on this platform should be enough to
generate LIC I2C IRQ.

Hello Andrey

I know 0x19 is the I2C bus 1 interrupt, but I want to know how this value is computed, or For example If I need the Interrupt value for I2C bus 2, Where i can see the value required?

Regards,

Hello,

Thank you for your question. I believe there’s some confusion regarding the role of 0x19. In fact, 0x19 refers to the IRQ number assigned to the I²C controller at a specific memory address (in your case, likely 3160000.i2c), not directly to I²C bus 1.

How IRQ Values Are Computed:

IRQ numbers like 0x19 are pre-assigned by the system based on the hardware configuration. These IRQ numbers are not “computed” by the user but are set by the platform’s hardware design and its device tree configuration. For example, on your system, IRQ 0x19 (which is 25 in decimal) is assigned to the I²C controller at address 3160000.i2c. This controller likely handles bus 1, but the IRQ is tied to the controller, not the bus itself.

Finding the IRQ for I²C Bus 2:

If you need to find the IRQ for another I²C controller (such as the one handling I²C bus 2), you can check your system’s device tree or /proc/interrupts. Here are a couple of methods:

  1. Device Tree: The device tree (.dts or .dtb file) defines the hardware layout, including the I²C controllers and their IRQ assignments. Look for the section that defines the I²C controller for bus 2.Example entry:

dts

i2c@3180000 {  // This could represent I²C bus 2
    compatible = "some-i2c-controller";
    reg = <0x03180000 0x1000>;
    interrupts = <0x1A>;  // This is the IRQ for this I²C controller
    ...
};
  1. /proc/interrupts: You can also view the current IRQ assignments for all devices on your system by running:

bash

cat /proc/interrupts

This will list the IRQ numbers along with the corresponding device names (including the I²C controllers).

Let me know if you need further clarification on this.

Best regards,
ViziochronAI

Moreover, you may also like to check corresponding information here
Andre

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.