regulator: s5m8767a: Support AP watchdog reset operation
authorSangbeom Kim <sbkim73@samsung.com>
Mon, 18 Jun 2012 00:49:20 +0000 (09:49 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 19 Jun 2012 11:06:32 +0000 (12:06 +0100)
commitc848bc8538cd29e92223d5e72e8fb60e6f2e176e
treea7a40e51dc2efafc2a25959cb05f7bf9cf71732e
parent852abad238da723efac29f3e78dd768c18d6a062
regulator: s5m8767a: Support AP watchdog reset operation

The S5M8767A can't know status of ap reset.
So, After AP watchdog reset, AP can't boot normally.

Problem can be happened like below condition.
- AP Bootable lowest voltage(vdd_arm): 0.9v
- AP DVFS voltage table: 0.8v, 0.9v, 1.0v
- During AP works on lowest voltage(0.8V), watchdog reset is asserted
- AP can't boot, because vdd arm is still 0.8v

Solution
- Basic concept:
  After ap watchdog reset, GPIO configuration is changed by default value
- S5M8767A has function of voltage control with gpio (8 levels with 3 gpios)
- Set bootable voltage on level 0 -> can work with default gpio configuration
- In the probing, Change voltage control level from level 0 to level 1
- Execute normal dvfs operation on level 1
- After watchdog reset, ap gpio is set by default value
- PMIC operation mode is changed by ap reset (level1 -> level0)
- Regardless of previous vdd_arm voltage, AP always can be booted.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/s5m8767.c
include/linux/mfd/s5m87xx/s5m-core.h