This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4378: GP EVM I2C expander IRQ

Part Number: AM4378
Other Parts Discussed in Thread: TPIC2810
environment:
 AM437x-gp-evm
~/ti-processor-sdk-linux-am437x-evm-06.01.00.08
Ubuntu 18.04
devicetree add i2c device node:
pca9698: gpio@2f {
compatible = "nxp,pca9505";
pinctrl-names = "default";
pinctrl-0 = <&pca9698_int_pins>;
reg = <0x2f>;
reset-gpios = <&gpio3 14 GPIO_ACTIVE_LOW>;
gpio-controller;
#gpio-cells = <2>;
interrupt-parent = <&gpio3>;
interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "pca_input";
};
compile option enable ralated config set:
#
# I2C GPIO expanders
#
# CONFIG_GPIO_ADP5588 is not set
# CONFIG_GPIO_ADNP is not set
# CONFIG_GPIO_MAX7300 is not set
# CONFIG_GPIO_MAX732X is not set
CONFIG_GPIO_PCA953X=y
CONFIG_GPIO_PCA953X_IRQ=y
CONFIG_GPIO_PCF857X=y
CONFIG_GPIO_TPIC2810=m
after booting up, the PCA9698 device can successfully load on i2c bus, showing UU, and there is new adding gpiochip462 under /sys/class/gpio, I can export related GPIO, gpio config is OK.
cat /proc/interrupts
101:        0          481ae000.gpio         15           Level          1-002f
in gpio-pca953x.c, here is
my question is to using IRQ of PCA953x, will it just as using GPIO that it provided, is there any interface under /sys to set the IRQ of PCA953x that i can set which input genarate interrupt and interrupt type, or should I write my own program to handle this. I just want set some GPIO that PCA953x provided as input and make them can genarate interrupt, and using AM437x GPIO3 pin15 to notify the processer. I am new in linux, hope Ti expert can guide me in this question and give me steps to achive my goals. Thanks !

  • Hello Dona,

    Welcome to Linux development!

    I think this is what you are saying. Correct me if I am wrong: "PCA953x is connecting to AM437x over I2C. Now, how do I interact with the PCA953x from Linux?"

    If that is your question, then you need to ask NXP how to use their part in a Linux environment. We cannot support NXP software questions on the TI forums.

    If your question is specific to AM437x, then we can help you on the TI forums. For example, if your I2C connection is not working properly, if you cannot figure out how to toggle AM437x GPIO pins, etc.

    Regards,

    Nick

  • Hi,Nick,

    I'm glad to receive your reply, and I understand what you said, maybe my description is not clear, but I think my question can change to :

    I want to use AM437x GPIO3 pin15 as interrupt pin, how should I do due to Ti steps?

    hope Ti expert can guide me in this question and give me steps to achive my goals. Thanks !

    Regards,

    Dona