[coreboot-gerrit] New patch to review for coreboot: 5e78416 rk3288: set the rk808 BUCK default inductor current to max value

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Tue Apr 14 02:41:49 CEST 2015


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9655

-gerrit

commit 5e784164ff0d6481f6cbf3195589e2e1a965dad4
Author: huang lin <hl at rock-chips.com>
Date:   Fri Jan 23 14:48:42 2015 +0800

    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 at chromium.org>
    Original-Commit-Id: 065a163bb902b8c96d05bfef6ed4885aa20f31cc
    Original-Change-Id: I3801cabeb93d7bf7ecc02db0e69d4932c9394db9
    Original-Signed-off-by: huang lin <hl at rock-chips.com>
    Original-Signed-off-by: Julius Werner <jwerner at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/242785
    Original-Reviewed-by: Douglas Anderson <dianders at chromium.org>
---
 src/soc/rockchip/rk3288/rk808.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/soc/rockchip/rk3288/rk808.c b/src/soc/rockchip/rk3288/rk808.c
index b763454..d375f46 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));
 }



More information about the coreboot-gerrit mailing list