hello,
SDK version: Jetson_Linux_R36.4.3_aarch64.tbz2
kernel: 5.15.148
orin@orin:~$ cat /etc/nv_tegra_release
# R36 (release), REVISION: 4.7, GCID: 42132812, BOARD: generic, EABI: aarch64, DATE: Thu Sep 18 22:54:44 UTC 2025
# KERNEL_VARIANT: oot
TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia
orin@orin:~$ sudo gpioinfo gpiochip1
gpiochip1 - 32 lines:
line 0: "PAA.00" unused input active-high
line 1: "PAA.01" unused input active-high
line 2: "PAA.02" unused input active-high
line 3: "PAA.03" unused input active-high
line 4: "PAA.04" unused input active-high
line 5: "PAA.05" unused input active-high
line 6: "PAA.06" unused input active-high
line 7: "PAA.07" unused input active-high
line 8: "PBB.00" unused input active-high
line 9: "PBB.01" unused input active-high
line 10: "PBB.02" unused input active-high
line 11: "PBB.03" unused output active-high
platform-drivers: func_probe():
/* 从设备树获取GPIO中断描述符 */
data->irq_gpio = devm_gpiod_get_optional(dev, "interrupt", GPIOD_IN);
if (IS_ERR(data->irq_gpio)) {
ret = PTR_ERR(data->irq_gpio);
dev_err(dev, "Failed to get interrupt GPIO: %d\n", ret);
return ret;
}
/* 将GPIO转换为中断号 */
data->irq = gpiod_to_irq(data->irq_gpio);
if (data->irq < 0) {
dev_err(dev, "Failed to get IRQ from GPIO: %d\n", data->irq);
return data->irq;
}
dts property:
i2c@3180000 {
tca9546@70 {
status = "okay";
compatible = "nxp,pca9546";
...
i2c@1{
reg = <1>;
i2c-mux,deselect-on-exit;
zzz_irq_device: zzz_irq_device@5A {
compatible = "nvidia,tegra234-zzz-irq";
reg = <0x5A>;
interrupt-parent = <&gpio_aon>;
interrupts = <TEGRA234_AON_GPIO(BB, 0) IRQ_TYPE_EDGE_RISING>;
status = "okay";
};
};
};
};
but insmod the driver, the console shows:
Failed to get IRQ from GPIO: -22
From the GPIO chapter of the Developer Guide, I learned that GPIO Interrupt Mapping configuration is required. Do I need to modify this configuration for GPIOBB.00?
can you help me to get the gpiochip1(PBB.00) control?
Add pinmux.dts:
gpio_aon_default: default {
gpio-input = <
TEGRA234_AON_GPIO(EE, 4)
TEGRA234_AON_GPIO(CC, 0)
TEGRA234_AON_GPIO(CC, 1)
TEGRA234_AON_GPIO(CC, 2)
TEGRA234_AON_GPIO(CC, 3)
TEGRA234_AON_GPIO(AA, 4)
TEGRA234_AON_GPIO(AA, 7)
TEGRA234_AON_GPIO(BB, 0)
TEGRA234_AON_GPIO(BB, 1)
TEGRA234_AON_GPIO(BB, 2)
>;
};
...
can1_stb_pbb0 {
nvidia,pins = "can1_stb_pbb0";
nvidia,function = "rsvd0";
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
Hi nathanzhangbq,
Are you using the devkit or custom board for AGX Orin?
Could you share the full device tree as file here for further check?
Please also refer to the following document to check if it helps for your case.
GPIO Interrupt Mapping Configuration — NVIDIA Jetson Linux Developer Guide
Hi,
AGX Orin DevKit, model P3730, Jetson_Linux_R36.4.3_aarch64.tbz2
cat /etc/nv_tegra_release
# R36 (release), REVISION: 4.3, GCID: 38968081, BOARD: generic, EABI: aarch64, DATE: Wed Jan 8 01:49:37 UTC 2025
# KERNEL_VARIANT: oot
TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia
tegra234-p3737-camera-8ch-ar0234-overlay.dts.log (28.2 KB)
Could you try configure them as following instead?
zzz_irq_device: zzz_irq_device@5A {
compatible = "nvidia,tegra234-zzz-irq";
reg = <0x5A>;
- interrupt-parent = <&gpio_aon>;
- interrupts = <TEGRA234_AON_GPIO(BB, 0) IRQ_TYPE_EDGE_RISING>;
+ interrupts = <&gpio_aon TEGRA234_AON_GPIO(BB, 0) IRQ_TYPE_EDGE_RISING >;
status = "okay";
};
Please share the full device tree rather than just the overlay.
You can simply run the following command on your board and share extracted_proc.dts for further check.
$ sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree
Hi Kevin,
Here is the console log with panic info and dts.
session-agx-pbb00-panic.log (95.9 KB)
extracted_proc.dts.log (419.8 KB)
Sorry that you may need to revert it back to original configuration as the cell of interrupts property is 2.
zzz_irq_device: zzz_irq_device@5A {
compatible = "nvidia,tegra234-zzz-irq";
reg = <0x5A>;
interrupt-parent = <&gpio_aon>;
interrupts = <TEGRA234_AON_GPIO(BB, 0) IRQ_TYPE_EDGE_RISING>;
status = "okay";
};
Please also run the following command to check if this GPIO(i.e. PBB.00) is used by other driver.
$ sudo cat /sys/kernel/debug/gpio|grep PBB.00
Hi Kevin,
here is the dmesg and dts info. Following your command :
$ sudo cat /sys/kernel/debug/gpio|grep PBB.00
gpio-324 (PBB.00 )
$ sudo cat /sys/kernel/debug/gpio|grep PEE.04
gpio-343 (PEE.04 |Power ) in hi IRQ ACTIVE LOW
and the dmesg info should be noted:
[ 14.794772] irq: IRQ308: trimming hierarchy from :bus@0:interrupt-controller@f400000-1
[ 14.795560] hwmon hwmon8: temp1_input not attached to any thermal zone
[ 14.813708] IRQ286: set affinity failed(-22).
[ 14.813745] IRQ299: set affinity failed(-22).
[ 14.814874] psci: CPU10 killed (polled 0 ms)
[ 14.828539] usb 1-4: new high-speed USB device number 3 using tegra-xusb
[ 14.873823] IRQ286: set affinity failed(-22).
[ 14.873916] IRQ299: set affinity failed(-22).
and the kernel ./arch/arm64/deconfig ignore the macro “CONFIG_GPIOLIB”, but the ./.config set the macro “CONFIG_GPIOLIB=y”, Is this discrepancy normal? Should we configure this macro?
dmesg.txt.log (83.0 KB)
extracted_proc.dts.log (419.8 KB)
It should be fine if CONFIG_GPIOLIB is enabled in .config.
You can also run the following command on your board to check its configuration.
$ zcat /proc/config.gz |grep CONFIG_GPIOLIB
nathanzhangbq:
/* 从设备树获取GPIO中断描述符 */
data->irq_gpio = devm_gpiod_get_optional(dev, "interrupt", GPIOD_IN);
if (IS_ERR(data->irq_gpio)) {
ret = PTR_ERR(data->irq_gpio);
dev_err(dev, "Failed to get interrupt GPIO: %d\n", ret);
return ret;
}
/* 将GPIO转换为中断号 */
data->irq = gpiod_to_irq(data->irq_gpio);
if (data->irq < 0) {
dev_err(dev, "Failed to get IRQ from GPIO: %d\n", data->irq);
return data->irq;
}
Could you try using platform_get_irq() as following instead?
data->irq = platform_get_irq(pdev, 0);
if (data->irq < 0) {
dev_err(dev, "Failed to get IRQ from DTS: %d\n", data->irq);
return data->irq;
}
Hi Kevin,
modify dts property:
/ {
fragment@0 {
__overlay__ {
zzz_irq_device: zzz_irq_device {
compatible = "nvidia,tegra234-zzz-irq";
interrupt-parent = <&gpio_aon>;
interrupts = <TEGRA234_AON_GPIO(BB, 0) IRQ_TYPE_EDGE_RISING>;
status = "okay";
};
...
}
}
}
and the platform driver probe completed, but the platform_get_irq(pdev, 0) function return value(253), so 253 is the PBB.00-irq value? and the interrupt handler is not work as expected.
Here is console info:
[ 8.622810] tegra234-zzz-irq zzz_irq_device: Virtual I2C device probed, IRQ: 253
gaxorin@gaxorin-desktop:/sys/firmware/devicetree/base/zzz_irq_device$ cat interrupts
gaxorin@gaxorin-desktop:/sys/firmware/devicetree/base/zzz_irq_device$ cat interrupt-parent
gaxorin@gaxorin-desktop:/sys/firmware/devicetree/base/zzz_irq_device$ sudo cat /sys/kernel/debug/gpio|grep PBB.00
gpio-324 (PBB.00 )
gaxorin@gaxorin-desktop:/sys/firmware/devicetree/base/zzz_irq_device$
Yes, it seems you can probe the driver correctly.
Please simply run the following command to check the IRQ.
$ cat /proc/interrupts |grep 253
Do you mean that there’s no interrupt count when the IRQ is triggered?
Or your handler is not working when there’s the interrupt?
system
Closed
December 2, 2025, 7:39am
16
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.