Hi,
I’m currently trying to use GPIO04, aka TEGRA194_AON_GPIO(CC, 1) on the Xavier NX as the interrupt line for a PCA9534 I2C gpio expander.
I have set up the device tree as so:
i2c@c240000 {
gpio_i: gpio@20 {
compatible = "nxp,pca9534";
reg = <0x20>;
interrupt-parent = <&tegra_aon_gpio>;
interrupts = <TEGRA194_AON_GPIO(CC, 1) GPIO_ACTIVE_LOW>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
status = "okay";
};
I have also adjusted the pinmux as follows:
&tegra_pinctrl {
pinctrl-names = "default", "drive", "unused";
pinctrl-0 = <&pinmux_default>;
status = "okay";
pinmux_default: common {
spi2_miso_pcc1 {
nvidia,pins = "spi2_miso_pcc1";
nvidia,function = "rsvd2";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,io-high-voltage = <TEGRA_PIN_ENABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
};
};
gpio@c2f0000 {
gpio-init-names = "default";
gpio-init-0 = <&gpio_default>;
gpio_default: default {
gpio-input = <
TEGRA_GPIO(CC,1);
>;
};
};
However I am seeing in dmesg that the driver fails to probe due to the IRQ not being able to be set up.
[ 5.250949] irq: IRQ261: trimming hierarchy from :pmc@c360000
[ 5.251140] pca953x 1-0020: supply vcc not found, using dummy regulator
[ 5.256810] pca953x 1-0020: using no AI
[ 5.262059] gpio gpiochip2: (tegra194-gpio-aon): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ
[ 5.271058] gpio gpiochip2: (tegra194-gpio-aon): unable to lock HW IRQ 13 for IRQ
[ 5.278578] genirq: Failed to request resources for 1-0020 (irq 261) on irqchip gpio
[ 5.286475] pca953x 1-0020: failed to request irq 261
[ 5.291449] pca953x: probe of 1-0020 failed with error -5
What is the issue with my current setup? Is it possible to configure AON gpio as hardware interrupts?
Thanks,
Akhil