Other Parts Discussed in Thread: SK-AM62B-P1, SK-AM62
Hi TI Experts,
We have a custom HW based on AM62 SOCs. We are trying to integrate suspend-to-ram/deep-sleep functionality on our HW.
It seems that GPIO interrupt functionality stops working once system resumes from deepsleep on AM62.
'cat /proc/interrupts' count for GPIO irqs are not getting updated upon actual HW events. 'evtests' fails detecting input events after resume too. (The same GPIO interrupts works fine before deepsleep entry)
I suspect that breakage of this GPIO interrupt functionality is the main root cause of the Ethernet PHY not resuming properly with an interrupt mode as discussed here.
Please have a look at '364: 256 GPIO 32 Edge -davinci_gpio Wake-Up' line for the exact issue.
root@verdin-am62-15136141:~# cat /proc/interrupts | grep GPIO 357: 2 GPIO 25 Edge -davinci_gpio 8000f00.mdio:00 364: 101 GPIO 32 Edge -davinci_gpio Wake-Up 445: 0 GPIO 17 Edge -davinci_gpio HPD 447: 0 GPIO 19 Edge -davinci_gpio extcon-usb0 root@verdin-am62-15136141:~# cat /proc/interrupts | grep GPIO 357: 2 GPIO 25 Edge -davinci_gpio 8000f00.mdio:00 364: 122 GPIO 32 Edge -davinci_gpio Wake-Up 445: 0 GPIO 17 Edge -davinci_gpio HPD 447: 0 GPIO 19 Edge -davinci_gpio extcon-usb0 root@verdin-am62-15136141:~# ev eval evtest root@verdin-am62-15136141:~# evtest No device specified, trying to scan all of /dev/input/event* Available devices: /dev/input/event0: tps65219-pwrbutton /dev/input/event1: gpio-keys /dev/input/event2: Logitech G300s Optical Gaming Mouse /dev/input/event3: Logitech G300s Optical Gaming Mouse Keyboard /dev/input/event4: Logitech G300s Optical Gaming Mouse Select the device event number [0-4]: 1 Input driver version is 1.0.1 Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100 Input device name: "gpio-keys" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 143 (KEY_WAKEUP) Properties: Testing ... (interrupt to exit) Event: time 1706800933.815546, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 0 Event: time 1706800933.815546, -------------- SYN_REPORT ------------ Event: time 1706800935.293734, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 1 Event: time 1706800935.293734, -------------- SYN_REPORT ------------ Event: time 1706800936.115144, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 0 Event: time 1706800936.115144, -------------- SYN_REPORT ------------ Event: time 1706800936.865577, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 1 Event: time 1706800936.865577, -------------- SYN_REPORT ------------ Event: time 1706800938.004802, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 0 Event: time 1706800938.004802, -------------- SYN_REPORT ------------ Event: time 1706800938.767227, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 1 Event: time 1706800938.767227, -------------- SYN_REPORT ------------ Event: time 1706800939.416789, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 0 Event: time 1706800939.416789, -------------- SYN_REPORT ------------ Event: time 1706800940.345778, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 1 Event: time 1706800940.345778, -------------- SYN_REPORT ------------ Event: time 1706800941.133675, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 0 Event: time 1706800941.133675, -------------- SYN_REPORT ------------ Event: time 1706800941.985323, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 1 Event: time 1706800941.985323, -------------- SYN_REPORT ------------ Event: time 1706800942.999731, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 0 Event: time 1706800942.999731, -------------- SYN_REPORT ------------ Event: time 1706800943.909666, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 1 Event: time 1706800943.909666, -------------- SYN_REPORT ------------ Event: time 1706800944.730682, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 0 Event: time 1706800944.730682, -------------- SYN_REPORT ------------ Event: time 1706800945.685882, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 1 root@verdin-am62-15136141:~# rtcwake -s 10 -m mem -d rtc1 rtcwake: assuming RTC uses UTC ... rtcwake: wakeup from "mem" using rtc1 at Thu Jan 1 00:02:05 1970 [ 107.905705] PM: suspend entry (deep) [ 107.910853] Filesystems sync: 0.001 seconds [ 107.922678] Freezing user space processes [ 107.930158] Freezing user space processes completed (elapsed 0.003 seconds) [ 107.937431] OOM killer disabled. [ 107.940661] Freezing remaining freezable tasks [ 107.946643] Freezing remaining freezable tasks completed (elapsed 0.001 seconds) [ 107.954114] printk: Suspending console(s) (use no_console_suspend to debug) [ 108.021094] tc358768 0-000e: Software disable failed: -121 [ 108.053438] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down [ 108.056896] omap8250 2810000.serial: PM domain pd:152 will not be powered off [ 108.068964] Disabling non-boot CPUs ... [ 108.070388] ti-sci 44043000.system-controller: ti_sci_resume: setting EXT_REFCLK1 at 25MHz success : 0 [ 108.070463] ti-sci 44043000.system-controller: ti_sci_resume: wakeup source: 0x50 [ 108.084779] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19 [ 108.105533] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=357) [ 108.106120] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode [ 108.331965] tc358768 0-000e: Software reset failed: -121 [ 108.332105] tc358768 0-000e: Bridge is not enabled [ 108.455849] OOM killer enabled. [ 108.459042] Restarting tasks ... done. [ 108.538455] random: crng reseeded on system resumption [ 108.576035] PM: suspend exit root@verdin-am62-15136141:~# [ 109.140849] VFS: busy inodes on changed media sda [ 109.182735] sda: root@verdin-am62-15136141:~# cat /proc/interrupts | grep GPIO 357: 3 GPIO 25 Edge -davinci_gpio 8000f00.mdio:00 364: 256 GPIO 32 Edge -davinci_gpio Wake-Up 445: 0 GPIO 17 Edge -davinci_gpio HPD 447: 0 GPIO 19 Edge -davinci_gpio extcon-usb0 root@verdin-am62-15136141:~# cat /proc/interrupts | grep GPIO 357: 3 GPIO 25 Edge -davinci_gpio 8000f00.mdio:00 364: 256 GPIO 32 Edge -davinci_gpio Wake-Up 445: 0 GPIO 17 Edge -davinci_gpio HPD 447: 0 GPIO 19 Edge -davinci_gpio extcon-usb0 root@verdin-am62-15136141:~# evtest No device specified, trying to scan all of /dev/input/event* Available devices: /dev/input/event0: tps65219-pwrbutton /dev/input/event1: gpio-keys /dev/input/event2: Logitech G300s Optical Gaming Mouse /dev/input/event3: Logitech G300s Optical Gaming Mouse Keyboard /dev/input/event4: Logitech G300s Optical Gaming Mouse Select the device event number [0-4]: 1 Input driver version is 1.0.1 Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100 Input device name: "gpio-keys" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 143 (KEY_WAKEUP) Properties: Testing ... (interrupt to exit) ^Croot@verdin-am62-15136141:~#
SW details:
- All SW components at latest and greatest tag - '09.01.00.008' from the December 2023 release
- DTSI
- https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi?h=toradex_ti-linux-6.1.y -> The main DTS for our Verdin AM62 SOMs (Generic one)
- https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/ti/k3-am62-verdin-dev.dtsi?h=toradex_ti-linux-6.1.y -> The DTS for development carrier boards for Verdin AM62 SOMs. This has
- https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/ti/k3-am62-verdin-wifi.dtsi?h=toradex_ti-linux-6.1.y -> The DTS for the WIFI supported Verdin AM62 SOMs.
I tested this on SK-AM62B-P1 boards and there also I see the same issue of GPIO interrupt count not getting increased after resume from deepsleep.
Questions :
- Is GPIO interrupt functionality tested and working with a latest SDK with deepsleep feature on AM62 ?
- What could be the possible solution/workaround for this issue ?
Looking forward for support. Thank you.
Regards,
Parth P