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/AM5726: GPIO interrupt configuration

Part Number: AM5726
Other Parts Discussed in Thread: TMP102

Tool/software: Linux

Hi Sir 

we would like to set one GPIO as interrupt pin to get signal from external device. 

Where can we find the example about AM57xx GPIO setting ( like request_irq)

thanks for reply

BR

Yimin

  • What software are you using?
  • Hi Yimin,

    You can set this in the dts file, for example see am57xx-beagle-x15-common.dtsi:
    tmp102: tmp102@48 {
    compatible = "ti,tmp102";
    reg = <0x48>;
    interrupt-parent = <&gpio7>;
    interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
    #thermal-sensor-cells = <1>;
    };

    You can see that tmp102 uses gpio7_16 as interrupt.

    Best Regards,
    Yordan
  • HI Sir

    If we used nmin_dsp as interrupt pin , and we already set below registers
    1. CTRL_CORE_PAD_NMIN_DSP -> set Wakeup is enabled and Pull Up is selected
    2. CTRL_CORE_NMI_DESTINATION_2 [7:0] -> set 0x1 => NMI mapping to MPU_IRQ_133

    and in below sample code
    irq_id = 133;
    ret = request_irq(irq_id, sdr_dev_intr, IRQF_TRIGGER_FALLING, "fpga_irq", 0);
    if (ret != 0)
    {
    printk("interrupt init error!ret = %d\n", ret);
    }
    else
    printk("interrupt init success!!\n");

    we cannot receive the interrupt.

    what is the number of irq_id ? and do you have any document for reference

    BR
    Yimin