From a73794024060bec9ab0560d9f2dea7b129427033 Mon Sep 17 00:00:00 2001 From: Ben Lok Date: Fri, 31 Jul 2015 17:11:11 +0800 Subject: google/oak: setup usb and configure I2C level shift pin BRANCH=none BUG=none TEST=build pass and verified on rev3 Change-Id: I3849342e59c2b022db723ef0281cdd5153ae27cb Signed-off-by: Patrick Georgi Original-Commit-Id: 495e978cd7381bd393099315ac6d60fe4446dd9f Original-Change-Id: I9626d06746e5d0bf6698a9b8e7594c58e7ff213a Original-Signed-off-by: Ben Lok Original-Reviewed-on: https://chromium-review.googlesource.com/292689 Original-Commit-Ready: Yidi Lin Original-Tested-by: Yidi Lin Original-Reviewed-by: Julius Werner Reviewed-on: https://review.coreboot.org/13096 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/mainboard/google/oak/mainboard.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/mainboard/google/oak') diff --git a/src/mainboard/google/oak/mainboard.c b/src/mainboard/google/oak/mainboard.c index 614c965ae6..fbdddb6930 100644 --- a/src/mainboard/google/oak/mainboard.c +++ b/src/mainboard/google/oak/mainboard.c @@ -25,6 +25,7 @@ #include #include #include +#include static void configure_audio(void) { @@ -67,6 +68,14 @@ static void configure_audio(void) mt_pll_set_aud_div(48 * KHz); } +static void configure_usb(void) +{ + setup_usb_host(); + + if (board_id() > 3) + gpio_output(PAD_CM2MCLK, 1); +} + /* Setup backlight control pins as output pin and power-off by default */ static void configure_backlight(void) { @@ -96,8 +105,14 @@ static void configure_backlight(void) static void mainboard_init(device_t dev) { + /* TP_SHIFT_EN: Enables the level shifter for I2C bus 4 (TPAD), which + * also contains the PS8640 eDP brige and the USB hub. + */ + mt6391_gpio_output(MT6391_KP_ROW2, 1); + configure_audio(); configure_backlight(); + configure_usb(); } static void mainboard_enable(device_t dev) -- cgit v1.2.3