GPIO21 Cannot Be Requested as Interrupt

On our carrier board, there’s an FUSB301 chip using GPIO21 (GPIO3_PA.00) as an interrupt pin, but the driver fails to request the interrupt.

1. Hardware Connection

2. Device Tree Configuration:

i2c@c250000 {
    status = "okay";
    clock-frequency = <100000>;

    fusb301@25 {
        compatible = "onsemi,fusb301";
        reg = <0x25>;
        status = "okay";
        #address-cells = <1>;
        #size-cells = <0>;
        interrupt-parent = <&gpio>;
        interrupts = <TEGRA234_MAIN_GPIO(A, 0) IRQ_TYPE_LEVEL_LOW>;
        connector@0 {
            port@0 {
                fusb_p1: endpoint {
                    remote-endpoint = <&typec_p1>;
                };
            };
        };
    };
};

3. Pinmux Configuration:

4. GPIO Status:

5. Kernel Log Error:

*** Please note that this reply is generated by LLM automatically ***

To address the issue with the FUSB301 chip using GPIO21 (GPIO3_PA00) as an interrupt pin, but the driver failing to request the interrupt, we need to follow a series of steps to identify and potentially resolve the problem. The process involves understanding the pin configuration, ensuring proper setup in the device tree, and verifying the interrupt request in the kernel.

  1. Verify Pin Configuration:

    • First, ensure that GPIO21 (GPIO3_PA00) is correctly configured as an interrupt pin in your carrier board’s design. This involves checking the schematic and the layout to confirm that the pin is connected to the FUSB301 chip correctly and that there are no shorts or opens that could prevent the interrupt from being detected.
  2. Check Device Tree Configuration:

    • The next step is to verify that the device tree (DT) configuration for the Jetson AGX Orin module correctly defines the GPIO pin as an interrupt. This involves checking the .dtsi files, specifically the ones related to GPIO configurations, to ensure that GPIO3_PA00 is defined and configured to support interrupts.
    • You might need to modify the device tree source files to include the necessary configuration for GPIO3_PA00 as an interrupt pin. This typically involves adding or modifying nodes related to the GPIO controller and the specific pin in question.
  3. Kernel Configuration and Interrupt Request:

    • After ensuring the device tree is correctly configured, the next step is to verify that the kernel is correctly requesting the interrupt for GPIO3_PA00. This can be done by checking the kernel logs (dmesg) for any messages related to the GPIO interrupt request.
    • If the interrupt is not being requested, you may need to modify the kernel driver for the FUSB301 chip to correctly request the interrupt. This involves understanding the kernel’s interrupt handling mechanisms and how device drivers interact with them.
  4. Debugging:

    • If the issue persists, debugging the kernel and the device driver may be necessary. This can involve adding debug prints or using a debugger to step through the code and understand where the interrupt request is failing.
    • Additionally, checking the kernel’s interrupt statistics (/proc/interrupts) can provide insights into whether the interrupt is being triggered and handled by the kernel.
  5. Comparison with Similar Issues:

    • If similar issues have been reported or documented for the Jetson AGX Orin or other NVIDIA Jetson modules, comparing the solutions or workarounds might provide valuable insights. NVIDIA’s forums, GitHub, and other developer communities can be useful resources for this.

By following these steps, you should be able to identify and potentially resolve the issue with the FUSB301 chip’s interrupt not being requested correctly on your carrier board.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi norman_xu,

What’s the Jetpack version in use?

Could you configure it in pinmux spreadsheet as following before use?
image

It seems you want to use an Output pin as interrupt.
Please share the result of the following commands on your board.

$ sudo gpioinfo|grep "PA.00"
$ sudo busybox devmem 0x02432020

Hi Kevin,

jetpack 6.0 (R36.3)

  1. yes, we configure the pinmux
cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups

132 (soc_gpio21_ph0):
        pull=1
        tristate=1
        enable-input=1
        open-drain=0
        io-reset=0
        rcv-sel=0
        io-hv=0
        schmitt=0
        pull-down-strength=0
        pull-up-strength=0
        drive-type=0
        gpio-mode=0
        function=rsvd0

Do you want to use PA.00 or PH.00?

Your current gpioinfo shows the unexpected result.
Your pinmux register for PA.00 should be correct but I would still suggest you using the pinmux spreadsheet to configure it as Input/PU as there’s also the configuration in gpio dtsi.

Hi Kevin,

  1. We are using “PA.00”.
  2. Yes, we configured through pinmux spreadsheet and then flashed the device.
  3. The file hardware/nvidia/t23x/nv-public/nv-platform/tegra234-p3767-0000.dtsi contains PA.00 references, but we have commented them out.

    image

Okay, GPIO21(PA.00) is different from SOC_GPIO21(PH.00).
GPIO21 is the name for the Module.
SOC_GPIO21 is the name for the SoC.

Could you share your pinmux spreadsheet and also the pinmux/gpio dtsi generated from pinmux spreadsheet for further check?

The result reported by gpioinfo still shows it is configured as Output rather than Input.

Hi Kevein,

Orin_Jetson_Series_Pinmux_Config_Template.zip (2.0 MB)
Orin-jetson_agx_orin-gpio-default.dtsi.txt (4.6 KB)
Orin-jetson_agx_orin-pinmux.dtsi.txt (65.7 KB)

I can not open this .xlsm in the zip file.

The results in pinmux/gpio dtsi look good to me.

Have you also updated the following line in p3701.conf.common before flash to apply the change?

SCR_CONFIG="tegra234-mb2-bct-scr-p3701-0000.dts";
- PINMUX_CONFIG="tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi";
+ PINMUX_CONFIG="Orin-jetson_agx_orin-pinmux.dtsi.txt";
PMIC_CONFIG="tegra234-mb1-bct-pmic-p3701-0000.dts";