diff options
author | Julius Werner <jwerner@chromium.org> | 2014-09-26 21:01:08 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@google.com> | 2015-04-02 20:46:26 +0200 |
commit | 8f3883d5f444d3b72661d585e4671d0996771305 (patch) | |
tree | 9443ef37ec8e4cfd7e3f8e14838adf0b3dd00472 /src/soc/rockchip | |
parent | 5c2988c4616d8326f56037e7ef5e8280c134ef7d (diff) | |
download | coreboot-8f3883d5f444d3b72661d585e4671d0996771305.tar.xz |
veyron_pinky: Add rev2 support, clean up mainboard.c
This patch adds support for the board changes in rev2 (board_id = 0001).
It also moves the existing mainboard.c code around a bit to group it by
component.
BUG=chrome-os-partner:32139
TEST=Booted on rev1. Confirmed SD card still works. Confirmed power
button was still as broken as before.
Original-Change-Id: Ifc4876687db64ca50e41d009d911446129d57b1b
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/220251
(cherry picked from commit 9428e0d1b784b27790b3b3dbbb18a769e51c6fd3)
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: I8d3479aa314f8c6f1591c1b69b0a3827234fc730
Reviewed-on: http://review.coreboot.org/9237
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/soc/rockchip')
-rw-r--r-- | src/soc/rockchip/rk3288/rk808.c | 7 | ||||
-rw-r--r-- | src/soc/rockchip/rk3288/rk808.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/rockchip/rk3288/rk808.c b/src/soc/rockchip/rk3288/rk808.c index 0d629ca041..50df96d591 100644 --- a/src/soc/rockchip/rk3288/rk808.c +++ b/src/soc/rockchip/rk3288/rk808.c @@ -26,6 +26,7 @@ #define RK808_ADDR 0x1b +#define DCDC_EN 0x23 #define LDO_EN 0x24 #define LDO_ONSEL(i) (0x39 + 2 * i) #define LDO_SLPSEL(i) (0x3a + 2 * i) @@ -39,6 +40,12 @@ static void rk808_clrsetbits(uint8_t bus, uint8_t reg, uint8_t clr, uint8_t set) printk(BIOS_ERR, "ERROR: Cannot set Rk808[%#x]!\n", reg); } +void rk808_configure_switch(uint8_t bus, int sw, int enabled) +{ + assert(sw == 1 || sw == 2); + rk808_clrsetbits(bus, DCDC_EN, 1 << (sw + 4), !!enabled << (sw + 4)); +} + void rk808_configure_ldo(uint8_t bus, int ldo, int millivolts) { uint8_t vsel; diff --git a/src/soc/rockchip/rk3288/rk808.h b/src/soc/rockchip/rk3288/rk808.h index a6ba67c538..00520751b5 100644 --- a/src/soc/rockchip/rk3288/rk808.h +++ b/src/soc/rockchip/rk3288/rk808.h @@ -20,6 +20,7 @@ #ifndef __SOC_ROCKCHIP_RK3288_PMIC_H__ #define __SOC_ROCKCHIP_RK3288_PMIC_H__ +void rk808_configure_switch(uint8_t bus, int sw, int enabled); void rk808_configure_ldo(uint8_t bus, int ldo, int millivolts); #endif |