From a406c2a954830e8cad2efdd4210f1a240c5342bc Mon Sep 17 00:00:00 2001 From: Lin Huang Date: Fri, 8 Jul 2016 14:30:18 +0800 Subject: rockchip/rk3399: set kevin rev3 pwm regulator initial value to 0.95v kevin rev3 pwm regulator ripple is still not great, especially for center logic. To make sdram at 800MHz stable, raise it to 0.95v. BRANCH=none BUG=chrome-os-partner:54871 TEST=run "stressapptest -M 1024 -s 1000" on kevin board and pass Change-Id: If4a15eb7398eea8214cb58422bca7cfb5f4a051a Signed-off-by: Martin Roth Original-Commit-Id: d29bc581effb0008eb196685aa22dd65b5d478a5 Original-Change-Id: Ideec9c3ab2f919af732719ed2f6a702068d99c8f Original-Signed-off-by: Lin Huang Original-Reviewed-on: https://chromium-review.googlesource.com/359130 Original-Commit-Ready: Douglas Anderson Original-Reviewed-by: Douglas Anderson Original-Reviewed-by: Julius Werner Reviewed-on: https://review.coreboot.org/15659 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/soc/rockchip/rk3399/romstage.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/soc/rockchip/rk3399') diff --git a/src/soc/rockchip/rk3399/romstage.c b/src/soc/rockchip/rk3399/romstage.c index b65a9adc87..11454d3d04 100644 --- a/src/soc/rockchip/rk3399/romstage.c +++ b/src/soc/rockchip/rk3399/romstage.c @@ -41,6 +41,7 @@ static void init_dvs_outputs(void) { int duty_ns; uint32_t i; + uint32_t id; write32(&rk3399_grf->iomux_pwm_0, IOMUX_PWM_0); /* GPU */ write32(&rk3399_grf->iomux_pwm_1, IOMUX_PWM_1); /* Big */ @@ -76,10 +77,15 @@ static void init_dvs_outputs(void) * period = 3337, volt = 1.0: 2383 * period = 3337, volt = 0.9: 2860 */ - if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN) && (board_id() <= 2)) - duty_ns = 1906; /* 1.1v */ - else - duty_ns = 2860; /* 0.9v */ + duty_ns = 2860; /* 0.9v */ + + if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN)) { + id = board_id(); + if (id <= 2) + duty_ns = 1906; /* 1.1v */ + else if (id == 3) + duty_ns = 2621; /* 0.95v */ + } for (i = 0; i < 4; i++) pwm_init(i, 3337, duty_ns); -- cgit v1.2.3