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.

PROCESSOR-SDK-AM62X: AM62X: Power Management: Main GPIO as an I/O daisy chain wakeup source

Part Number: PROCESSOR-SDK-AM62X

Tool/software:

Dear TI support,

according the BSP documentation

    https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_02_01_10/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Power_Management/pm_wakeup_sources.html#main-gpio

a generic GPIO can be used as wake-up source.

The reference example

    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62x-sk-lpm-wkup-sources.dtso?h=ti-linux-6.1.y#n329

works out of the box using GPIO1_10

I can easily get the same example working using

- GPIO0_7 => interrupts-extended = <&main_gpio0 7 IRQ_TYPE_EDGE_RISING>, <&main_pmx0 0x01C>;

- GPIO1_16 => interrupts-extended = <&main_gpio1 16 IRQ_TYPE_EDGE_FALLING>, <&main_pmx0 0x1B8>;

but if I try using

- GPIO1_30 => interrupts-extended = <&main_gpio1 30 IRQ_TYPE_EDGE_FALLING>, <&main_pmx0 0x1F0>;

I can't get it working.

Is there any limitation in the list of GPIOs which can be used as wakeup sources ?

Thanks

Best Regards

Pier

  • Hi Pier,

    Are you using a TI EVM or custom hardware?

    Have you update the main_pmx node in the device tree with the change?

    Thanks,

    Anshu

  • Hi ,

    I'm not using TI EVK, but GPIO1_30  is correctly working as interrupt as gpio-keys, iIt's just not working as wakeup source.

    The gpio-keys node has been changed as follow

    gpio-keys {
        compatible = "gpio-keys";
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&main_wkgpio_pins_default>;
        switch007 {
            label = "WKGPIO0_07";
            linux,code = <KEY_WAKEUP>;
            interrupts-extended = <&main_gpio0 7 IRQ_TYPE_EDGE_RISING>,
                <&main_pmx0 0x01c>;
            interrupt-names = "irq", "wakeup";
        };
        switch110 {
            label = "WKGPIO1_10";
            linux,code = <KEY_WAKEUP>;
            interrupts-extended = <&main_gpio1 10 IRQ_TYPE_EDGE_RISING>,
                <&main_pmx0 0x1a0>;
            interrupt-names = "irq", "wakeup";
        };
        switch130 {
            label = "WKGPIO1_30";
            linux,code = <KEY_WAKEUP>;
            interrupts-extended = <&main_gpio1 30 IRQ_TYPE_EDGE_RISING>,
                <&main_pmx0 0x1f0>; /* pin 69 => J18.2 */
            interrupt-names = "irq", "wakeup";
        };
    };

    and the main_pmx has been changed as follow

    main_wkgpio_pins_default: main-wkgpio-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x1a0, PIN_INPUT_PULLUP, 7) /* (E18) MCASP0_AXR0.GPIO1_10 */
            AM62X_IOPAD(0x01c, PIN_INPUT_PULLUP, 7) /* (J23) OSPI0_D4.GPIO0_7 */
            AM62X_IOPAD(0x01f0, PIN_INPUT_PULLUP, 7) /* (A18) EXT_REFCLK1.GPIO1_30 */
        >;
    };

    Can you please try the same on your side ?

    Thanks

    Best Regards

    Pier

  • Hi Pier,

    I will try it on my end and get back to you. Please ping this thread if you haven't received a response by Friday.

    Thanks,

    Anshu

  • Thanks

    Best Regards

    Pier

  • Hi ,

    any update on this ?

    Can you reproduce the same behavior on your side ?

    Thanks

    Best Regards

    Pier

  • Hi Pier,

    Thank you for your patience on this.

    I also tested this on my end and also noticed that GPIO1_30 does not wakeup.

    After digging through the design specifications, it looks like the PAD EXT_REFCLK1 (GPIO1_30 when MUXMODE = 7) is not capable of being a wakeup source because its not connected to the IO daisy chain.

    Since its not connected to the daisy chain, its not capable of being a wakeup source (also won't support state retention in sleep). This is likely caused by the pad used by various other peripherals as a source clock.

    Thanks,

    Anshu

  • Hi ,

    thanks for confirming the behavior.

    Given a specific pad, how can I know if it's connected or not to the IO daisy chain ?

    Thanks

    Best Regards

    Pier

  • Hi Pier,

    Please see Section 6.2.4.11 I/O Power Management and Daisy Chaining in the AM62x TRM: https://www.ti.com/lit/pdf/spruiv7

    The bottom of the section has a list of pins that are not wakeup capable.

    Best Regards,

    Anshu

  • Hi Pier,

    This thread will be closed. Please create a new E2E thread for any follow ups.

    Thanks,

    Anshu