On Wed, 10 Sep 2014 03:52:38 -0700 (PDT)
Toroshin Dmitry <[email protected]> wrote:

> I have Wexler.tab 7200 with broken standby mode in sunxi kernel (in aw 
> kernel suspend works).
> I have tried to debug standby code using RTC to trace it (i have no access 
> to UART now), it hangs after this lines in dram.c:
> reg_val = mctl_read_w(SDR_DCR);
> reg_val &= ~(0x1fU<<27);
> reg_val |= 0x12U<<27;
> mctl_write_w(SDR_DCR, reg_val);
> in DRAMC_enter_selfrefresh (before suspend)
> I tried to replace standby binary with other, compiled from sdk. device now 
> can  enter standby mode, but kernel crashes (reboot) after resume.
> Does standby mode (not super standby) work on other A20 devices?

Now I also have an Allwinner A20 tablet and can share this fun.

I'm not entirely sure what is the actual difference between the standby
and super standby mode. However I think that the latter is related to
the following bit of code, which dot recently purged from the mainline
u-boot:
    
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f2577967738f923571b7156ad46ef91d9fa8d9f8

Note that this code was already mutilated in u-boot-sunxi, so I doubt
that it was in a usable shape anyway.

My understanding of this super-standby stuff is that the SoC gets
powered off, while DRAM remains in self-refresh mode. And after we
turn the device on again, the bootloader gets executed just like on any
normal boot and checks the bit in the dram->ppwrsctl register. If the
bootloader can see that the DRAM is in self-refresh mode, then we need
to bring the DRAM back out of the self-refresh mode and the execution
needs to be resumed somehow. This requires some mutual understanding
between the kernel and the bootloader.

As a test, you can insert some bootable SD card into the SD slot (for
example, the FEL SD card). After that, in Android system switch the
tablet into the 'airplane mode' (to turn off WLAN) and try to blank
the screen. It is easy to see that the tablet does not wake up in
Android anymore, but tries to boot from the SD card instead. This
does not end up well.

Going forward, we eventually need to have standby and/or suspend-to-RAM
support. Can you provide more details about your use case? Are you
running a GNU/Linux system? What kind of kernel is used (sunxi-3.4 or
mainline)? How are you switching the tablet to the standby mode?

-- 
Best regards,
Siarhei Siamashka

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to