From 70b3044e4565de6885d09c7c3050aebe3411303d Mon Sep 17 00:00:00 2001 From: "henryc.chen" Date: Wed, 23 Dec 2015 11:45:29 +0800 Subject: google/oak: da9212 gpio configuration for rev5 BRANCH=none BUG=none TEST=none Change-Id: Ib44a9e8ca94727809e47831228f4742c25a53977 Signed-off-by: Patrick Georgi Original-Commit-Id: da9185c22264440da822aa252c0c5d2aef78b455 Original-Change-Id: I98c2ad757d0cd0e3234e49392091784b43a106e7 Original-Signed-off-by: henryc.chen Original-Reviewed-on: https://chromium-review.googlesource.com/320028 Original-Commit-Ready: Yidi Lin Original-Tested-by: Yidi Lin Original-Reviewed-by: Julius Werner Reviewed-on: https://review.coreboot.org/13972 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/oak/mainboard.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/mainboard') diff --git a/src/mainboard/google/oak/mainboard.c b/src/mainboard/google/oak/mainboard.c index c330fac4a0..b09703eec6 100644 --- a/src/mainboard/google/oak/mainboard.c +++ b/src/mainboard/google/oak/mainboard.c @@ -40,9 +40,9 @@ static void register_da9212_to_bl31(void) }, .i2c_bus = 1, .ic_en = { - .type = PARAM_GPIO_SOC, + .type = PARAM_GPIO_MT6391, .polarity = PARAM_GPIO_ACTIVE_HIGH, - .index = PAD_UCTS2, + .index = MT6391_KP_ROW3, }, .en_a = { .type = PARAM_GPIO_MT6391, @@ -53,6 +53,10 @@ static void register_da9212_to_bl31(void) .type = PARAM_GPIO_NONE, }, }; + if (board_id() == 2) { + param_da9212.ic_en.type = PARAM_GPIO_SOC; + param_da9212.ic_en.index = PAD_UCTS2; + } register_bl31_param(¶m_da9212.h); /* Init i2c bus Timing register for da9212 */ @@ -79,13 +83,16 @@ static void register_mt6311_to_bl31(void) static void configure_bl31(void) { switch (board_id()) { - case 2: - register_da9212_to_bl31(); - break; - default: + case 3: + case 4: /* rev-3 and rev-4 use mt6311 as external buck */ register_mt6311_to_bl31(); break; + case 2: + default: + /* rev-2 and rev-5 use da9212 as external buck */ + register_da9212_to_bl31(); + break; } } -- cgit v1.2.3