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.

SK-AM62B: How to configure the RTC interrupt to serve as a wake-up source

Part Number: SK-AM62B


Hi guys,

I have an RTC interrupt pin connected to the SoC EXTINTn/GPIO1_31, and I want to use it as a wakeup source from the s2idle state.

The first question is: Should I configure the D16 PIN as GPIO1_31 or leave it at the default value EXTINTn?

The second question is: Are interrupts controlled by GIC_SPI?

The third question is: What is the interrupt number of the RTC device on I2C bus 1? Should it be an I2C bus 1 device?"

TRM: Table 10-12. GIC Interrupt Connection

The final question is: Is IRQ_TYPE_EDGE_FALLING supported by the GIC?"

Thanks,

Sean

  • Hello Sean, 

    Thank you for the query.

    I am trying to understand the use case.

    Is this s general query or have you made the connections and seeing some issues?

    Regards,

    Sreenivasa

  • Hi Sreenivasa,

    I have successfully woken the operating system from s2idle via the gpio-keys subsystem. like this:

      buttons0 {
                    compatible = "gpio-keys";
                    pinctrl-names = "default";
                    pinctrl-0 = <&push_button_pins_default>;
    
                    push-button {
                            label = "GPIO Key USER1";
                            linux,code = <KEY_WAKEUP>;
                            gpios = <&main_gpio0 12 GPIO_ACTIVE_LOW>;
                            wakeup-source;
                    };
            };
    

    My next task is to add the RTC as a wakeup source. The first thing that confuses me is what is the difference between EXTINTn and GPIO1_31. Also, if EXTINTn is the right choice, what should the interrupt number be?

    Finally, I noticed that my RTC is edge-triggered. I conducted a small experiment to change the parameters from IRQ_TYPE_LEVEL_HIGH to IRQ_TYPE_EDGE_FALLING on the i2c node in the device tree. After booting into the OS and checking /proc/interrupts, I observed that the entry for i2c1 disappeared. This is one thing I am concerned about.

    Thanks,

    Sean

  • Hello Sean, 

    Thank you for the inputs,

    EXTINTn is just a dedicated interrupt pin using an open drain buffer.

    My next task is to add the RTC as a wakeup source. The first thing that confuses me is what is the difference between EXTINTn and GPIO1_31. Also, if EXTINTn is the right choice, what should the interrupt number be?

    Finally, I noticed that my RTC is edge-triggered. I conducted a small experiment to change the parameters from IRQ_TYPE_LEVEL_HIGH to IRQ_TYPE_EDGE_FALLING on the i2c node in the device tree. After booting into the OS and checking /proc/interrupts, I observed that the entry for i2c1 disappeared. This is one thing I am concerned about.

    I will have to assign to a software expert. If you could add any additional details that would help as i assign to the expert.

    Regards,

    Sreenivasa

  • Hello Sean, 

    I added additional inputs on the EXTINTn 

    Can you confirm that the EXTINTn signal is routed to the GIC500 as SPI 256?
    Yes it does. There is a hop in the path from the extint_n signal to the GIC where the signal is inverted.
    Additional info:
    glue_ext_intn is an inversion of the ext_intn pin. ext_intn is positive low. Before this signal is routed to the interrupt destination, it is made positive high going through this glue logic. Ext_intn is used as nmi interrupt source from external input through the pin.

    Regards,

    Sreenivasa

  • Hi Sreenivasa,

     

    Yes, the EXTINTn signal is routed to the GIC500 as SPI 256.

    Now, I can catch interrupts.

    Note: I am referring to the settings of the device tree properties in k3-am625-beagleplay.dts.

    &main_i2c0 {
    
        tps65219: pmic@30 {
            pinctrl-names = "default";
            pinctrl-0 = <&pmic_irq_pins_default>;
            interrupt-parent = <&gic500>;
            interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
            interrupt-controller;
            #interrupt-cells = <1>;
        };
    };

    thanks for your help

    Sean

  • Hello Sean, 

    Thank you for the inputs.

    I will close the thread.

    Regards,

    Sreenivasa