I am running with WL1271 on DM3730 using DVSDK 4.00.00.17.
When going into suspend after initializing the WLAN chip, I get the expected notifications that it is successfully calling sdio_suspend ("WLAN: Suspend call", "WLAN_firmware Suspend"), but then the core power domain is not shutting down and I can see by looking at the CM_CORE registers, that it is because MMC2 is being left active. Any ideas what I could be missing to get the kernel to correctly suspend MMC2 as part of the WLAN suspend process?
Thank you,
Glenn Wainwright
Hi Glenn,
Basically upon Kernel request to go to suspend mode the WLAN driver will have to approve that and also acknowledge the PM kernel module that the WLAN driver is able to go to suspend by shutting down the SDIO clock, only then will the host be able to go to suspend.
Which code base are you using (that is where did you download the release?) since not all releases supports the suspend resume well.
Regards,
Eyal
This is using DVSDK 4.00.00.17, Linux PSP 3.00.01.06, and the WLAN integration package 6.1.5.4 using WiLink driver 6.1.0.0.130 and firmware 6.1.0.0.313.
This version doesn't support suspend\Resume feature.It will be supported in the upcoming releases for both AM37x & AM35x DVP.
Please keep track after the connectivity wiki for upcoming releases.http://processors.wiki.ti.com/index.php/ARM_Processor_Wireless_Connectivity_Downloads
Thanks,
Alon.S
Okay, thank you for the response. In the interim, is there any workaround that I can do to get suspend working? For example, is there a good way that I can forceably shut down the WLAN driver prior to suspend and bring it back after resume that would allow the system to suspend properly?
Thanks again,
I think that you might be forced to rmmod the tiwlan driver before suspending and insmod it after resuming.
Thanks,Alon.S
I gave that a try without any luck, I also went through the installation step by step and the problem seems to appear as soon as I install bmtrace.ko and does not go away with an rmmod. Please let me know if you have any other ideas for possible workarounds.
Thanks,Glenn Wainwright
We will look into that and update you.
.
This solution was discovered by our Lead Embedded Engineer, Dean Gray:
I have our system going into suspend now while loading the WLAN drivers. I had to make two modifications to the code to get it working on our system.
1. There is a bug in the sdiodrv_free_resources function in the SdioDrv.c file. It tries to disable the MMC2 FCLK and ICLK with 0xFBFFFFFF. It should be using 0xFDFFFFFF.
2. The last line in the tiwlan.ini file should be ‘SuspendAction = 0’ to properly stop the driver for suspend. You will get a message about active wake clocks if this isn’t done. (at least I did with the CLI instead of using a wrapper, like you are)
Congrats Dean! That seems to be working great for me as well.
thanks for the fix, i will verify it.
Glenn,
I put in the fixes you describe, and was able to get the CORE powerdomain to reach the OFF state, which reduced my power consumption in the suspend-to-RAM state significantly. When I try to wake up from the suspend-to-RAM state, however, there is now a DMA error:
[ 72.275573] PM: Syncing filesystems ... done.[ 72.295288] Freezing user space processes ... (elapsed 0.02 seconds) done.[ 72.323059] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.[ 72.350463] WLAN: Suspend call[ 72.353576] WLAN_firmware Suspend[ 72.466796] Shutting Down I&F Clock Interface[ 83.193359] Successfully put all powerdomains to target state[ 83.199310] IRQ_DISABLED (11) (action=0xc5ddfac0, desc->status&IRQ_DISABLED=IRQ_DISABLED)[ 83.208831] WLAN: resume call[ 83.211944] WLAN: firmaware resume[ 83.215454] wlanDrvIf_pm_resume() Called[ 83.420989] SDIO clock Configuration is now set to 24Mhz[ 83.426605] TIWLAN: 1769.651334: CHIP VERSION... set 1273 chip top registers[ 83.434478] TIWLAN: 1769.659238: Working on a 1273 PG 2.0 board.[ 83.440551] TIWLAN: 1769.665311: Starting to process NVS...[ 83.446197] TIWLAN: 1769.670956: NVS found, EEPROM Image addr=0xc5ebd400, EEPROM Len=0x0x1d4[ 83.454864] DMA transaction error with device 47
DMA device 47 is, as you might expect, MMC2. Did you see this? Did you have to do anything to get around this?
Chris
Interesting. I do not get an error like that on resume. Everything appears to be working fine for both myself and our other DM3730 project.
SDIO clock Configuration is now set to 24Mhz After sdioDrv_ConnectBus, iStatus=0 After SD_IO_GO_IDLE_STATE, iStatus=0 After VDD_VOLTAGE_WINDOW, iStatus=0 After SD_IO_SEND_RELATIVE_ADDR, iStatus=0 After SD_IO_SELECT_CARD, iStatus=0 After w 0x82, iStatus=0 After r 0x82, iStatus=0 After w 0xC8, iStatus=0 After CCCR_BUS_INTERFACE_CONTOROL, uCount=1 After CCCR_IO_ENABLE, uCount=1 TIWLAN: 312.250201: CHIP VERSION... set 1273 chip top registers TIWLAN: 312.250933: Working on a 1273 PG 2.0 board. TIWLAN: 312.250964: Starting to process NVS... TIWLAN: 312.250964: NVS found, EEPROM Image addr=0xcd93d400, EEPROM Len=0x0x3b TIWLAN: 312.251116: Chip ID is 0x4030111. TIWLAN: 312.251452: FEM Type 1 TIWLAN: 312.251696: Starting to download firmware... TIWLAN: 312.340930: Starting to download firmware... TIWLAN: 312.364215: Starting to download firmware... TIWLAN: 312.364550: Starting to download firmware... TIWLAN: 312.372515: Starting to download firmware... TIWLAN: 312.376513: Starting to download firmware... TIWLAN: 312.378253: Finished downloading firmware. TIWLAN: 312.378283: Firmware running. TIWLAN: 312.419482: TIWLAN: 312.419482: -------------------------------------------------------------------- TIWLAN: 312.419512: Driver Version : WiLink_Driver_6.1.0.0.130 TIWLAN: 312.419512: Firmware Version: Rev 6.1.0.0.313 TIWLAN: 312.419543: Station ID : AA-BB-CC-11-22-33 TIWLAN: 312.419543: --------------------------------------------------------------------
I don't know what I might be doing differently.
Glenn
Does anyone know how suspend/resume works on an Android device with the wl1271? I have the driver integrated on to one of our devices but the suspend/resume functions (sdio_suspend/sdio_resume) never get called even when the device starts to suspend and enters retention mode. I see all other devices having their suspend routines called (e.g. BT, keypad, etc), but just not wl1271. Thanks.
Dear RP68577,
Please let us know the platform (AM37x/AM335x/DMxx) that you are using and the Android version. Also the version of wifi driver and from where did you get the Android BSP for your platform.
Naveen
------------------------------------------------------------------------------------------Please click the Verify Answer button on this post if it answers your question.------------------------------------------------------------------------------------------