Hi
I am trying to suspend tx2 (suspend-to-mem) with one of our carriers, however, without success. Below is the overall behaviour:
- Suspend triggered through desktop gui
- Device enters SC7 ( observed from dmesg)
- Device immediately exits SC7 (from dmesg)
- Wake up factor (Wake 80)
Wake 80 maps to INT_XUSB
So, it seems the device enters sleep state, but immediately exits due to xhci (Wake 80) interrupt.
Any help would be appreciated. Below are some queries:
- How to achieve suspend through SW in TX2?
- Is there any device tree parameter to be set to achieve suspend functionality?
Note: CONFIG_PM_SLEEP is enabled.
Thank you.
- How to achieve suspend through SW in TX2?
Your method sounds correct.
Wake up factor (Wake 80)
Wake 80 maps to INT_XUSB
This seems not under expectation. What board are you using? Custom carrier board or devkit?
What usb device is connected?
It is custom carrier board.
The devices connected are keyboard and mouse.
Do you mean the usb keyboard immediately triggers the board to wake up?
I do not know what triggers the wake up. Even without using any usb device(keyboard and mouse in this case), it comes out of suspend immediately.
Below is the dmesg snip for a suspend sequence.
[ 415.279462] Resume caused by WAKE79, 3530000.xhci
[ 415.279462] Exited SC7
[ 410.972912] tegradc 15210000.nvdisplay: blank - powerdown
[ 411.005921] wl_android_wifi_off in
[ 411.008946] dhd_wlfc_deinit():3472, maintain HOST RXRERODER flag in tvl
[ 411.009444] dhdsdio_isr : bus is down. we have nothing to do
[ 411.009478] gpio tegra-gpio-aon wake69 for gpio=59(FF:3)
[ 411.009480] Disabling wake69
[ 411.009581] sdhci-tegra 3440000.sdhci: Tuning done, restoring the best tap value : 60
[ 411.010625] wifi_platform_set_power = 0
[ 411.037452] extcon-disp-state external-connection:disp-state: cable 47 state 0
[ 411.037455] Extcon AUX1(HDMI) disable
[ 411.059206] tegra_nvdisp_handle_pd_disable: Powergated Head2 pd
[ 411.059290] tegra_nvdisp_handle_pd_disable: Powergated Head1 pd
[ 411.061725] tegra_nvdisp_handle_pd_disable: Powergated Head0 pd
[ 411.110170] tegradc 15210000.nvdisplay: unblank
[ 411.110793] tegra_nvdisp_handle_pd_enable: Unpowergated Head0 pd
[ 411.110886] tegra_nvdisp_handle_pd_enable: Unpowergated Head1 pd
[ 411.110965] tegra_nvdisp_handle_pd_enable: Unpowergated Head2 pd
[ 411.112263] Parent Clock set for DC plld2
[ 411.117999] tegradc 15210000.nvdisplay: hdmi: tmds rate:148500K prod-setting:prod_c_hdmi_111m_223m
[ 411.119093] tegradc 15210000.nvdisplay: hdmi: get RGB quant from EDID.
[ 411.119100] tegradc 15210000.nvdisplay: hdmi: get YCC quant from EDID.
[ 411.154385] extcon-disp-state external-connection:disp-state: cable 47 state 1
[ 411.154387] Extcon AUX1(HDMI) enable
[ 411.155624] tegradc 15210000.nvdisplay: unblank
[ 411.265914] CFGP2P-ERROR) wl_cfgp2p_del_p2p_disc_if :
[ 411.265917] P2P interface unregistered
[ 411.770193] PM: suspend entry 2018-01-28 16:05:06.433259392 UTC
[ 411.770197] PM: Syncing filesystems ... done.
[ 411.799308] PM: Preparing system for sleep (mem)
[ 411.822779] tegradc 15210000.nvdisplay: blank - powerdown
[ 411.886522] extcon-disp-state external-connection:disp-state: cable 47 state 0
[ 411.886525] Extcon AUX1(HDMI) disable
[ 411.909019] tegra_nvdisp_handle_pd_disable: Powergated Head2 pd
[ 411.909104] tegra_nvdisp_handle_pd_disable: Powergated Head1 pd
[ 411.910162] tegra_nvdisp_handle_pd_disable: Powergated Head0 pd
[ 411.918935] tegradc 15210000.nvdisplay: blank - powerdown
[ 411.918947] tegradc 15210000.nvdisplay: unblank
[ 411.919637] tegra_nvdisp_handle_pd_enable: Unpowergated Head0 pd
[ 411.920454] tegra_nvdisp_handle_pd_enable: Unpowergated Head1 pd
[ 411.920699] tegra_nvdisp_handle_pd_enable: Unpowergated Head2 pd
[ 411.921942] Parent Clock set for DC plld2
[ 411.924993] tegradc 15210000.nvdisplay: hdmi: tmds rate:148500K prod-setting:prod_c_hdmi_111m_223m
[ 411.926070] tegradc 15210000.nvdisplay: hdmi: get RGB quant from EDID.
[ 411.926077] tegradc 15210000.nvdisplay: hdmi: get YCC quant from EDID.
[ 411.961728] extcon-disp-state external-connection:disp-state: cable 47 state 1
[ 411.961730] Extcon AUX1(HDMI) enable
[ 415.011716] Freezing user space processes ... (elapsed 0.026 seconds) done.
[ 415.038225] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 415.040096] PM: Suspending system (mem)
[ 415.051392] nvlogger_suspend_work
[ 415.052177] usb usb2: usb_suspend_both: status 0
[ 415.053542] Wake24 for irq=241
[ 415.053547] Enabling wake24
[ 415.053811] usb 1-2: usb_suspend_both: status 0
[ 415.054435] nct1008_nct72 7-004c: success in disabling tmp451 VDD rail
[ 415.054509] gpio tegra-gpio-aon wake29 for gpio=56(FF:0)
[ 415.054511] Enabling wake29
[ 415.054529] tegra_cec 3960000.tegra_cec: suspended
[ 415.059758] gpio tegra-gpio wake53 for gpio=159(X:7)
[ 415.059761] Enabling wake53
[ 415.097907] usb 1-1: usb_suspend_both: status 0
[ 415.117921] usb usb1: usb_suspend_both: status 0
[ 415.117949] tegra-xusb 3530000.xhci: entering ELPG
[ 415.121309] tegra-xusb 3530000.xhci: entering ELPG done
[ 415.121316] Wake76 for irq=199
[ 415.121318] Wake77 for irq=199
[ 415.121321] Wake78 for irq=199
[ 415.121323] Wake79 for irq=199
[ 415.121325] Wake80 for irq=199
[ 415.121327] Wake81 for irq=199
[ 415.121330] Wake82 for irq=199
[ 415.121333] Enabling wake76
[ 415.121335] Enabling wake77
[ 415.121337] Enabling wake78
[ 415.121339] Enabling wake79
[ 415.121341] Enabling wake80
[ 415.121343] Enabling wake81
[ 415.121344] Enabling wake82
[ 415.121380] Wake73 for irq=42
[ 415.121382] Enabling wake73
[ 415.121450] tegradc 15210000.nvdisplay: suspend
[ 415.126302] extcon-disp-state external-connection:disp-state: cable 47 state 0
[ 415.126307] Extcon AUX1(HDMI) disable
[ 415.183857] tegra_nvdisp_handle_pd_disable: Powergated Head2 pd
[ 415.183963] tegra_nvdisp_handle_pd_disable: Powergated Head1 pd
[ 415.185112] tegra_nvdisp_handle_pd_disable: Powergated Head0 pd
[ 415.188624] gpio tegra-gpio wake71 for gpio=125(P:5)
[ 415.188628] Enabling wake71
[ 415.189085] sdhci-tegra 3440000.sdhci: Tuning done, restoring the best tap value : 60
[ 415.189718] PM: suspend of devices complete after 138.594 msecs
[ 415.193104] host1x 13e10000.host1x: suspended
[ 415.193258] PM: late suspend of devices complete after 3.531 msecs
[ 415.195485] tegra-pcie 10003000.pcie-controller: PCIE: Disable power rails
[ 415.196963] PM: noirq suspend of devices complete after 3.696 msecs
[ 415.196967] Disabling non-boot CPUs ...
[ 415.226491] CPU3: shutdown
[ 415.229255] psci: CPU3 killed.
[ 415.250513] CPU4: shutdown
[ 415.253280] psci: CPU4 killed.
[ 415.274398] CPU5: shutdown
[ 415.277161] psci: CPU5 killed.
[ 415.279462] Entered SC7
[ 415.279462] Wake[31-0] level=0x40200000
[ 415.279462] Wake[63-32] level=0x200000
[ 415.279462] Wake[95-64] level=0x7f220
[ 415.279462] Wake[31-0] enable=0x21000000
[ 415.279462] Wake[63-32] enable=0x200000
[ 415.279462] Wake[95-64] enable=0x7f280
[ 415.279462] Wake[31-0] route=0x21000000
[ 415.279462] Wake[63-32] route=0x200000
[ 415.279462] Wake[95-64] route=0x7f280
[ 415.279462] Wake[32:0] status=0x0
[ 415.279462] Wake[64:32] status=0x0
[ 415.279462] Wake[96:64] status=0x8000
[ 415.279462] Resume caused by WAKE79, 3530000.xhci
[ 415.279462] Exited SC7
[ 415.279462] bpmp: waiting for handshake
[ 415.279462] bpmp: synchronizing channels
[ 415.279462] bpmp: channels synchronized
[ 415.279462] Suspended for 1.523 seconds
[ 415.279618] Enabling non-boot CPUs ...
[ 415.280011] CPU3: Booted secondary processor [411fd073]
[ 415.280299] cache: parent cpu3 should not be sleeping
[ 415.285990] CPU3 is up
[ 415.286404] CPU4: Booted secondary processor [411fd073]
[ 415.286621] cache: parent cpu4 should not be sleeping
[ 415.292167] CPU4 is up
[ 415.292530] CPU5: Booted secondary processor [411fd073]
[ 415.292723] cache: parent cpu5 should not be sleeping
[ 415.298476] CPU5 is up
[ 415.357887] tegra-xusb 3530000.xhci: exiting ELPG
[ 415.361875] tegra-xusb 3530000.xhci: Firmware timestamp: 2019-10-31 05:52:15 UTC, Version: 55.17 release
[ 415.362729] tegra-xusb 3530000.xhci: exiting ELPG done
Out of curiosity, that shows a USB device showing wake…was this log from a case of waking with nothing attached? If so, is it possible the wiring could somehow be reacting to crosstalk or some sort of environmental noise? Unfortunately I do not know the meaning of “WAKE79”.
The logs are captured when keyboard and mouse are attached. WAKE 79 maps to INT_XUSB.
From Tx2 TRM,page 978, it says
wake 79
- RTL Signal: utmip0_line_wakeup_event
- Internal trigger
- wake events from USB2 sleepwalk logic
If so, is it possible the wiring could somehow be reacting to crosstalk or some sort of environmental noise?
If no USB devices are attached and trigger a suspend from remote terminal, it stays in suspend state.
It really sounds like the devices themselves are triggering this, or else environmental noise is triggering something. You’re going to find this a bit odd, but if you wrap all of the external components (keyboard, mouse, etc.) in aluminum foil, and ground the aluminum foil, does it still trigger?
If the external devices include a mouse, then are you absolutely certain that the mouse did not move even slightly from some vibration? Mice in particular are very sensitive to even the slightest vibration or movement. It could be something in software triggering this, but it really seems like (since removing external devices removes the trigger) that the issue is something else.
One other thought is that if the power itself has a very short spike in it, then this could also result in a USB device waking even if the spike does not cause a system failure. At least while testing I would make sure there is no possibility of any kind of power noise.
Further analysis on hold for a while. Switched to another priority task.
Hello, I am having this same problem and would like to completely disable the ability to wake using USB. I see from the “Power Management for Jetson TX2 Series Devices” document the following statement: “prior to entering Deep Sleep, software can select which of the many hardware wake events can wake the chip from Deep Sleep.”
Could you please tell me where in software I can disable the USB wake functionality?
Hi electric27,
Do you also use custom carrier board and hit this issue?
Hi
Is this related to special USB device? are you using a KB/MS usb receiver?
File: wakeups-t18x.c
Path: /sources/kernel/nvidia/drivers/platform/tegra/
In the file, check table tegra_wake_event_irq
Replace entries for USB with -EAGAIN.
Ex:
-EAGAIN, //INT_XUSB, /* wake79 /
-EAGAIN, //INT_XUSB, / wake80 */
Note:
- For my carrier board, these interrupts were waking up the system. You might need to identify the corresponding wake up interrupt and comment those.
- I have not found the root cause of the issue on my carrier board yet. Hence, not sure whether this is the right fix or not. However, it works for me.