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.

Linux/AM5728: device tree node interrupt in am5728 evm

Part Number: AM5728


Tool/software: Linux

hai,

i am using am5728 evm. i am unable to find out the interrupt index number 4 in "interrupt =<4 0>" property in AM5728 TRM. Please help me with this.

&i2c5 {
    clock-frequency = <400000>;
    status = "okay";

    pixcir_ts@5c {
        compatible = "pixcir,pixcir_tangoc";
        attb-gpio = <&gpio2 4 GPIO_ACTIVE_HIGH>;
        interrupt-parent = <&gpio2>;
        interrupts = <4 0>;
        reg = <0x5c>;
        reset-gpio = <&gpio2 6 GPIO_ACTIVE_HIGH>;
        touchscreen-size-x = <1024>;
        touchscreen-size-y = <600>;
    };
};

Thanks & Regards

venkat R.

  • Hi Rav,

    Refer to the below doc file:

    linux-kernel/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

    You can also get more info regarding interrupt requests registered on your board using the below tools. You can execute the below commands on your AM57x target board in user space.

    1. cat /proc/interrupts
    2. omapconf dump crossbar irq mpu

    Regards,
    Pavel
  • thanks but i am developing an userspace application so i want to know it from SDK without executing the above command. i need to add the details of the interrupt index value i asked above .
  • is there any update can you please update me with this.
  • GPIO interrupt controller is configured not the MPU interrupt controller, so GPIO 4 in Bank2 is used for interrupt source. You won't find this 160 interrupts under MPU

    interrupt-parent = <&gpio2>;
    interrupts = <4 0>;

    So all 32 GPIO's in bank can act as interrupt source but, GPIO controller for BANK will have 1 or 2 interrupt registered to MPU
  • Rav,

    rav venkat said:
    i am unable to find out the interrupt index number 4 in "interrupt =<4 0>" property in AM5728 TRM.

    This index 4 stands for gpio2_4


    Pin gpio2_4 (GPIO2[4]) is used as Pixcir Touch Controller Interrupt (CAP_INT). This is GPIO2_IRQ_1 (index 25) mapped by linux kernel to MPU_IRQ_143.

     

    root@am57xx-evm:~# cat /proc/interrupts
               CPU0       CPU1

    38:          5          0      CBAR  25 Level     48055000.gpio

     

    root@am57xx-evm:~# omapconf dump crossbar irq mpu

    |----------------------------------------------------------------------------------------------------------------------------------------------|
    | mpu IRQ Crossbar Dump                                                                                                                        |
    |----------------------------------------------------------------------------------------------------------------------------------------------|
    | Index | Addr       | Val | Name                               | Source        | Description                                                  |
    |----------------------------------------------------------------------------------------------------------------------------------------------|

    | 143   | 0x4A002B56 |  25 | GPIO2_IRQ_1                        | GPIO2         | GPIO2 interrupt 1 

    Regards,
    Pavel

  • thanks i can understand about it. Can you help me to use gpio-keys driver and create node to generate interrupt when the button connected to GPIO2_20 is pressed.
  • Part Number: AM5728

    Tool/software: Linux

    hai,

     I am using AM5728 GP EVM.Can you please explain me about the steps required to use push button on lcd module to generate interrupt and execute a code when interrupt has occurred.
    I want use the button connected to gpio2_25 to create the interrupt and use the interrupt to run my application code.
    can you help me about the bridge between how to use hardware button in code development.
    I have seen the DTB file of AM5728 EVM

    gpio_keys {
                compatible = "gpio-keys";
                #address-cells = <1>;
                #size-cells = <0>;
                autorepeat;

                                        USER2 {
                                           gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
                                           label = "Down";
                                           linux,code = <KEY_DOWN>;
                };
    the above code uses gpio-key driver and the button is connected to GPIO2_25.
    I am unable understand how and when label, (linux,code) property can be used for application development.

    And if interrupt property is to be used, how can i know the interrupt property value to be used for GPIO2_25 as my interrupt pin.

    Thanks & Regards,

    Venkat R.

  • Venkat,

    Supporting custom user application is out of scope of the e2e forum. I can provide you only the below pointers:

    linux-4.14.67/Documentation/devicetree/bindings/input/gpio-keys.txt
    linux-4.14.67/drivers/input/misc/soc_button_array.c

    e2e.ti.com/.../670949
    e2e.ti.com/.../564290
    e2e.ti.com/.../729711
    e2e.ti.com/.../683329


    e2e.ti.com/.../286380
    e2e.ti.com/.../641645
    e2e.ti.com/.../438783
    e2e.ti.com/.../249476

    If you have questions regarding AM57x device or EVM, questions regarding AM57x PSDK Linux, please let me know.
    Regarding custom user application with GPIO push buttons examples, you might search in WWW, this is what I was able to find:

    www.linux.com/.../beaglebone-black-how-get-interrupts-through-linux-gpio
    bec-systems.com/.../how-to-implement-an-interrupt-driven-gpio-input-in-linux

    Regards,
    Pavel

  • Venkat,

    If you have no more questions related to the subject of this e2e thread, pelase close/verify/resolve this thread.

    Regards,
    Pavel