From ef639b2dd3ec7d322c59d53e4e614b31e209d8d3 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Thu, 6 Nov 2014 14:33:12 -0800 Subject: veyron: Change VCC10_LCD_PWREN_H to allowed maximum of 2.5V LDO7 (VCC10_LCD_PWREN_H) is essentially just a glorified GPIO that turns the real VCC10 regulator on or off. We tried setting it to 3.3V since it matches the VCC33_SYS voltage on the input of that regulator. However, we didn't notice that the LDO only supports going up to 2.5V. This patch changes the voltage to the allowed maximum, which should still work fine as an enable line (and is the same value used by the kernel). This removes an assertion error in the ramstage. Also change the PMIC driver to assert maximum VSEL values based on the LDO, because the lower-voltage ones support one more setting. (LDO3 is actually listed to only go up to 0b1111 in the manual, and has a weird jump from 0b1101 -> 2.2V (skipping over 0b1110) to 0b1111 -> 2.5V. I don't know if that's a documentation error or what they were smoking when they designed that, but we don't need to care for now.) BRANCH=None BUG=None TEST=Booted on Pinky, no more ASSERTION FAILED. Change-Id: I38bf99e38822fd0883fd4d0bd9a1b01143545a95 Signed-off-by: Patrick Georgi Original-Commit-Id: 70f3149efbc3aa9a03ab3fd5be99d17d9c5e1c87 Original-Change-Id: I68a3bb882cf25d98aca8922ede2a17e1ef6524de Original-Signed-off-by: Julius Werner Original-Reviewed-on: https://chromium-review.googlesource.com/228292 Original-Commit-Queue: Lin Huang Original-Tested-by: Lin Huang Original-Reviewed-by: Jerry Parson Reviewed-on: http://review.coreboot.org/9547 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/soc/rockchip/rk3288/rk808.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/soc/rockchip') diff --git a/src/soc/rockchip/rk3288/rk808.c b/src/soc/rockchip/rk3288/rk808.c index fea64e5ebe..fffef8907e 100644 --- a/src/soc/rockchip/rk3288/rk808.c +++ b/src/soc/rockchip/rk3288/rk808.c @@ -60,16 +60,17 @@ void rk808_configure_ldo(uint8_t bus, int ldo, int millivolts) case 5: case 8: vsel = div_round_up(millivolts, 100) - 18; + assert(vsel <= 0x10); break; case 3: case 6: case 7: vsel = div_round_up(millivolts, 100) - 8; + assert(vsel <= 0x11); break; default: die("Unknown LDO index!"); } - assert(vsel <= 0x10); rk808_clrsetbits(bus, LDO_ONSEL(ldo), 0x1f, vsel); rk808_clrsetbits(bus, LDO_EN, 0, 1 << (ldo - 1)); -- cgit v1.2.3