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>
This commit is contained in:
parent
129b5fa973
commit
75f431a8ed
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue