google/oak: Initialize the necessary pins

BRANCH=none
BUG=none
TEST=verified on Oak rev2 & rev3

Change-Id: I35776f5bdf54243236afba860ae8e9117a160cde
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b46bd9a079107ab78964f7e39582b3b5c863b559
Original-Change-Id: I6696972d07adbf3da5967f09c1638bb977c10207
Original-Signed-off-by: Biao Huang <biao.huang@mediatek.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/292673
Original-Commit-Ready: Yidi Lin <yidi.lin@mediatek.com>
Original-Tested-by: Yidi Lin <yidi.lin@mediatek.com>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/12605
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Biao Huang
2015-07-31 17:10:56 +08:00
committed by Patrick Georgi
parent 1a8e43e4e3
commit 9d48e1732a
6 changed files with 300 additions and 1 deletions

View File

@@ -20,7 +20,17 @@
#include <arch/io.h>
#include <bootblock_common.h>
#include <delay.h>
#include <soc/gpio.h>
#include <soc/pericfg.h>
#include <soc/pinmux.h>
static void i2c_set_gpio_pinmux(void)
{
gpio_set_mode(PAD_SDA1, PAD_SDA1_FUNC_SDA1);
gpio_set_mode(PAD_SCL1, PAD_SCL1_FUNC_SCL1);
gpio_set_mode(PAD_SDA4, PAD_SDA4_FUNC_SDA4);
gpio_set_mode(PAD_SCL4, PAD_SCL4_FUNC_SCL4);
}
void bootblock_mainboard_early_init(void)
{
@@ -30,4 +40,9 @@ void bootblock_mainboard_early_init(void)
void bootblock_mainboard_init(void)
{
/* adjust gpio params when external voltage is 1.8V */
gpio_init(GPIO_EINT_1P8V);
/* set i2c related gpio */
i2c_set_gpio_pinmux();
}