NishanthMenon changed the topic of #linux-ti to: Linux development for TI SoCs | Logs: https://libera.irclog.whitequark.org/linux-ti/| paste logs in https://pastebin.ubuntu.com/ | Let it rock! Vendor SDK/kernel: Also see e2e.ti.com
Peng_Fan has quit [Quit: Connection closed for inactivity]
Peng_Fan has joined #linux-ti
ecdhe has quit [Read error: Connection reset by peer]
ecdhe has joined #linux-ti
goliath has joined #linux-ti
wadim_ has joined #linux-ti
<wadim_> I tested a few more combinations when having USB1 & M4 enabled/disabled. Also with suspending into s2idle.
<wadim_> USB1 and M4 having direct influence on how the system behaves when it wants to go into suspend.
<wadim_> I can also see that the wakeup reason reported by TISCI is always USB1 even if the WKUP_RTC is hitting.
<wadim_> By suspending into idle, DWC3 attempts to disable a clock which is already disabled and I end up with a Kernel warning.
Kubu_work has joined #linux-ti
wadim_ has quit [Ping timeout: 256 seconds]
<dhruvag2000> Yeah s2idle is not really expected to work, atleast from what little I understand about that flow is it ends up in k3_validate_power_state which is a "TODO" at this point, so I think it doesn't proceed further into deep sleep sequence. I am not too sure about why the dwc3 issue comes up in s2idle and not in deepsleep because that just seems totally kernel side sequence to me.
<dhruvag2000> Does the wakeup source come up as usb1 even if you disabled it and did a rtcwake?
florian has joined #linux-ti
wadim_ has joined #linux-ti
<wadim_> Disabling USB1 breaks the suspend/resume process. It hangs and I have to restart my system. It will never wakeup.
florian has quit [Ping timeout: 276 seconds]
wadim_ has quit [Ping timeout: 256 seconds]
<dhruvag2000> Trying to gather few more data points, when you do rtcwake does the device resume instantly or does it actually wait for 5 seconds before resume sequence?
<dhruvag2000> If 5 is too fast to catch, try with 10 seconds perhaps and ensure that device stays suspended for around 10 seconds
<dhruvag2000> What I am suspecting is that USB is still triggering a wakeup before the rtc and hence you're seeing it as the wakeup source
<dhruvag2000> Also, does the USB1 have any peripheral connected?
wadim_ has joined #linux-ti
florian has joined #linux-ti
wadim_ has quit [Ping timeout: 256 seconds]
wadim_ has joined #linux-ti
<wadim_> With rtcwake and if M4 is running, the wakeup happens after the wakealarm timeout of the rtc. Without M4, the rtcwake happens instantly.
<wadim_> I tested also longer timeouts of 10 seconds and it behaves identically.
<wadim_> Our board has a USB Hub connected to USB1. But I do not see any interrupts from USB, only if I enter the suspend state it generates a lot of interrupts.
florian_kc has joined #linux-ti
<dhruvag2000> @wadim_ /////can you please disconnect the usb hub and try once?
<dhruvag2000> We have seen issues in the past as well where some USB hubs if connected , they cause issue with suspend resume. I don't have the exact root cause yet on this, maybe try e2e.ti.com for a deep dive with why USB hub may fail. There maybe hardware related stuff that I may not be aware of
<wadim_> It is a Microchip USB2514 hub. I can not just disconnect it on my hardware. I will try to find a way to test it without the hub, thanks!
<dhruvag2000> Another data point, when you disable usb and you say it locks up the system, I want to ensure that in your entire boot process no body is touching usb1 including u-boot. Best way to check is using `k3conf dump device 162` (ref. https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am62x/devices.html ) and see before suspending if it's actually disabled/ OFF state. If not then it maybe in some unclean state
<dhruvag2000> > I will try to find a way to test it without the hub
<dhruvag2000> Quick hack maybe to just hack the drivers/usb/dwc3/dwc3-am62.c driver to disable device wakeup stuff, but I am no USB expert so I can't comment more on what exactly needs to be done to achieve wakeup disable.
<wadim_> Uh, interesting the k3conf device dump returns DEVICE_STATE_ON even after disabling USB1 via device tree
<wadim_> Got it disabled, and rtcwake works and TISCI reports 0x50 as the wakeup source
<dhruvag2000> Great!
<wadim_> I will check with hardware guys if the USB hub is the actual issue
<wadim_> Thank you for the help so far :)
<dhruvag2000> For the MCU, there maybe an update needed on the suspend sequence, please refer https://github.com/TexasInstruments/mcupsdk-core-k3/blob/k3_main/examples/drivers/ipc/ipc_rpmsg_echo_linux/ipc_rpmsg_echo.c
<dhruvag2000> There is a new LPM ARCH that is being shipped with 10.00 hence you maybe missing some steps in the firmware.
wadim_ has quit [Ping timeout: 256 seconds]
florian_kc has quit [Ping timeout: 276 seconds]
crabbedhaloablut has quit [Ping timeout: 252 seconds]
crabbedhaloablut has joined #linux-ti
Peng_Fan has quit [Quit: Connection closed for inactivity]
minas has quit [Remote host closed the connection]
minas has joined #linux-ti
florian has quit [Quit: Ex-Chat]
Kubu_work has quit [Quit: Leaving.]
florian_kc has joined #linux-ti
florian_kc has quit [Ping timeout: 245 seconds]
florian_kc has joined #linux-ti
florian_kc has quit [Ping timeout: 276 seconds]
florian_kc has joined #linux-ti
florian_kc has quit [Ping timeout: 252 seconds]