Hi,
We use Orin NX on a custom carrier board with JP6.1.
I posted a question here:
but now I think I see a more focused problem: I don’t receive an interrupt at all.
I followed after many related posts regarding this matter and this is where I got so far:
- The GPIO is PEE.02
sudo cat /sys/kernel/debug/gpio output:
gpio-341 (PEE.02 |pps_gpio ) in lo IRQ
Full output:
sys_debug_gpio.log (6.9 KB)
The pin is configured as input by gpio generated by execl sheet:
gpio@c2f0000 {
gpio-init-names = “default”;
gpio-init-0 = <&gpio_aon_default>;
gpio_aon_default: default {
gpio-input = <
TEGRA234_AON_GPIO(EE, 2)
TEGRA234_AON_GPIO(EE, 4)
TEGRA234_AON_GPIO(CC, 2)
TEGRA234_AON_GPIO(CC, 3)
>;
gpio-output-low = <
TEGRA234_AON_GPIO(CC, 0)
TEGRA234_AON_GPIO(CC, 1)
TEGRA234_AON_GPIO(AA, 4)
>;
gpio-output-high = <
TEGRA234_AON_GPIO(AA, 5)
TEGRA234_AON_GPIO(BB, 3)
>;
};
};
- The interrupt is registered.
cat /proc/interrupts output:
291: 0 0 0 0 c2f0000.gpio 25 Edge pps_gpio.-1
Full output:
proc_interrupts.log (13.8 KB)
- I modified the pps-gpio for additional info and load it as a module.
dmesg output after insmod:
[ 293.029383] pps-gpio: Probing PPS GPIO driver
[ 293.029392] pps-gpio: Now setting up GPIO…
[ 293.029393] pps-gpio: Setting up GPIO
[ 293.029436] pps-gpio: Acquired GPIO: pin number: 341
[ 293.029439] pps-gpio: Assert falling edge: 1
[ 293.029441] pps-gpio: Mapping GPIO to IRQ…
[ 293.029492] irq: IRQ291: trimming hierarchy from :bus@0:pmc@c360000
[ 293.029497] pps-gpio: GPIO mapped to IRQ: 291
[ 293.029498] pps-gpio: Registering PPS source…
[ 293.029660] pps pps1: new PPS source pps_gpio.-1
[ 293.029664] pps-gpio: PPS source registered successfully
[ 293.029665] pps-gpio: Requesting IRQ handler…
[ 293.029666] pps-gpio: IRQ trigger flags: 2
[ 293.029700] pps-gpio: IRQ successfully requested: 291
[ 293.029702] pps pps1: Registered IRQ 291 as PPS source
Full log:
dmesg.log (61.1 KB)
- I tried various DT settings (following several posts here). Currently the dt node is:
pps_gpio {
interrupts = <0x22 0x02>;
assert-falling-edge;
interrupt-parent = <0x105>;
compatible = “pps-gpio”;
status = “okay”;
phandle = <0x3a2>;
gpios = <0x105 0x22 0x00>;
};
and in source:
pps: pps_gpio
{
compatible = “pps-gpio”;
gpios = <&gpio_aon TEGRA234_AON_GPIO(EE, 2) GPIO_ACTIVE_HIGH>;
status = “okay”;
interrupts = <TEGRA234_AON_GPIO(EE, 2) IRQ_TYPE_EDGE_FALLING>;
assert-falling-edge;
interrupt-parent = <&gpio_aon>;
};
Full dt:
dt.log (330.7 KB)
- We do noticed that the IRQ is connected to bus@0:pmc@c360000
irq: IRQ291: trimming hierarchy from :bus@0:pmc@c360000
Is this valid? shouldn’t it connected to gpio controller interrupts?
- user@target:~$ sudo cat /sys/kernel/debug/pinctrl/c360000.pmc/gpio-ranges
GPIO ranges handled:
I think there is something wrong with the interrupt config. Its not asserted when we toggle the signal that serves as pps source.
We do see the gpio value changes but don’t get interrupt in the system:
user@target:~$ gpioget /dev/gpiochip1 25
1
user@target:~$ gpioget /dev/gpiochip1 25
0
user@target:~$ gpioget /dev/gpiochip1 25
1
user@target:~$ gpioget /dev/gpiochip1 25
0
user@target:~$ gpioget /dev/gpiochip1 25
1
user@target:~$ gpioget /dev/gpiochip1 25
Maybe the interrupt is not connected to the right controller? maybe it masked? how can we verify all these things?
Thanks