linux/drivers/clk/rockchip
Doug Anderson a7d9500044 clk: rockchip: rk3288: Make s2r reliable by switching PLLs to slow mode
We've been seeing some crashes at resume time on rk3288-based systems.
On some machines they simply never wake up from suspend.  Symptoms
include:

- System clearly got to sleep OK.  Power consumption is low, the PWM
  for the PWM regulator has stopped, and the "global_pwroff" output
  shows that the system is down.

- When system tries to wake up power consumption goes up.

- No kernel resume code (which was left in PMU SRAM) ran.  We added
  some basic logging to this code (write to a location in SRAM right
  at resume time) and didn't see the logging run.

It appears that we can fix the problem by slowing down APLL before we
suspend.  On the system I tested things seemed reliable if I disabled
1.8GHz and 1.7GHz.  The Mask ROM itself tries to slow things down
(which is why PLLs are in slow mode by the time we get to the kernel),
but apparently it is crashing before it even gets there.

We'll be super paranoid and not just go down to 1.6GHz but we'll match
what the Mask ROM seems to be doing and go into slow mode.  We'll also
be safe and put all PLLs (not just APLL) into slow mode (well, except
DPLL which is needed for SDRAM).  We'll even put NPLL into slow mode
which the Mask ROM didn't do (not that it's used for much important
stuff at early resume time).

Note that the old Rockchip reference code did something just like
this, though they jammed it into pm.c instead of putting it in the
syscore ops of the clock driver.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2014-12-31 16:20:52 +01:00
..
clk-cpu.c clk: rockchip: add new clock-type for the cpuclk 2014-09-27 17:57:41 +02:00
clk-mmc-phase.c clk: rockchip: Add support for the mmc clock phases using the framework 2014-11-28 00:44:24 +01:00
clk-pll.c clk: rockchip: add optional sync to pll rate parameters 2014-11-25 09:57:18 +01:00
clk-rk3188.c clk: rockchip: add ROCKCHIP_PLL_SYNC_RATE flag to some plls 2014-11-25 09:57:22 +01:00
clk-rk3288.c clk: rockchip: rk3288: Make s2r reliable by switching PLLs to slow mode 2014-12-31 16:20:52 +01:00
clk-rockchip.c
clk.c - clock phase setting capability for the rk3288 mmc clocks 2014-11-28 21:00:16 -08:00
clk.h clk: rockchip: Add support for the mmc clock phases using the framework 2014-11-28 00:44:24 +01:00
Makefile clk: rockchip: Add support for the mmc clock phases using the framework 2014-11-28 00:44:24 +01:00
softrst.c clk: rockchip: add reset controller 2014-07-13 12:17:07 -07:00