diff options
author | huang lin <hl@rock-chips.com> | 2015-01-23 14:48:42 +0800 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2015-04-15 22:10:43 +0200 |
commit | 75f431a8edfe4215d1a6d0bc505e28c629e6d6fd (patch) | |
tree | 98eb96e96120abf2777d4f9e1de7faa77984c3d7 /src/soc/rockchip/rk3288 | |
parent | 129b5fa973ca4d2c5e2a62bede3470da3bf8de3b (diff) |
rk3288: set the rk808 BUCK default inductor current to max value
Our use of the bucks may exceed their default maximum inductor current.
Just set it to the highest possible value for every buck we configure to
avoid problems... the kernel can later fine-tune the values further if
needed. (Also some slight grammar updates while I'm in there.)
BRANCH=veyron
TEST=Build and Boot on Jerry
BUG=None
Change-Id: If8258cf4feefe191604365405bff1f20c8ab8746
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Original-Commit-Id: 065a163bb902b8c96d05bfef6ed4885aa20f31cc
Original-Change-Id: I3801cabeb93d7bf7ecc02db0e69d4932c9394db9
Original-Signed-off-by: huang lin <hl@rock-chips.com>
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/242785
Original-Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: http://review.coreboot.org/9655
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/soc/rockchip/rk3288')
-rw-r--r-- | src/soc/rockchip/rk3288/rk808.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/soc/rockchip/rk3288/rk808.c b/src/soc/rockchip/rk3288/rk808.c index b763454903..d375f46483 100644 --- a/src/soc/rockchip/rk3288/rk808.c +++ b/src/soc/rockchip/rk3288/rk808.c @@ -54,6 +54,8 @@ #define RTC_CTRL_GET_TIME (1 << 6) #define RTC_CTRL_RTC_READSEL (1 << 7) +#define DCDC_ILMAX 0x90 + static int rk808_read(uint8_t reg, uint8_t *value) { return i2c_readb(CONFIG_PMIC_BUS, RK808_ADDR, reg, value); @@ -118,7 +120,7 @@ void rk808_configure_buck(int buck, int millivolts) switch (buck) { case 1: case 2: - /*base on 725mv, use 25mv step */ + /* 25mV steps. base = 29 * 25mV = 725 */ vsel = (div_round_up(millivolts, 25) - 29) * 2 + 1; assert(vsel <= 0x3f); buck_reg = BUCK1SEL + 4 * (buck - 1); @@ -129,8 +131,9 @@ void rk808_configure_buck(int buck, int millivolts) buck_reg = BUCK4SEL; break; default: - die("fault buck index!"); + die("Unknown buck index!"); } + rk808_clrsetbits(DCDC_ILMAX, 0, 3 << ((buck - 1) * 2)); rk808_clrsetbits(buck_reg, 0x3f, vsel); rk808_clrsetbits(DCDC_EN, 0, 1 << (buck - 1)); } |