From bfbfcf719c6a64670cb11d7eb596e07c06685a49 Mon Sep 17 00:00:00 2001 From: Tom Warren Date: Thu, 18 Sep 2014 15:23:10 -0700 Subject: Ryu: Move I2C6 init to ramstage BUG=chrome-os-partner:31820 BRANCH=none TEST=Dumped Speaker Driver (AD SSM4567) regs on Ryu, looks good. Change-Id: I9b094e9d22726d67d41f2ce78088f361c73895fd Signed-off-by: Patrick Georgi Original-Commit-Id: 4c0bfb5f747f55009b7c2b2ba4b24d91443b1639 Original-Change-Id: Idd5b95cfec7d3ade7508393b81ab3049ce15a2fb Original-Signed-off-by: Tom Warren Original-Reviewed-on: https://chromium-review.googlesource.com/218950 Original-Reviewed-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/9095 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/rush_ryu/mainboard.c | 7 +++++++ src/mainboard/google/rush_ryu/romstage.c | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/mainboard') diff --git a/src/mainboard/google/rush_ryu/mainboard.c b/src/mainboard/google/rush_ryu/mainboard.c index 3b291c8203..ffa323476a 100644 --- a/src/mainboard/google/rush_ryu/mainboard.c +++ b/src/mainboard/google/rush_ryu/mainboard.c @@ -27,6 +27,7 @@ #include #include #include +#include static const struct pad_config mmcpads[] = { /* MMC4 (eMMC) */ @@ -45,6 +46,8 @@ static const struct pad_config mmcpads[] = { static const struct funit_cfg funits[] = { /* MMC on SDMMC4 controller at 48MHz. */ FUNIT_CFG(SDMMC4, PLLP, 48000, mmcpads, ARRAY_SIZE(mmcpads)), + /* I2C6 for audio, temp sensor, etc. */ + FUNIT_CFG(I2C6, PLLP, 400, NULL, 0), FUNIT_CFG_USB(USBD), }; @@ -60,6 +63,10 @@ static void mainboard_init(device_t dev) if (disp_clk != req_disp_clk) printk(BIOS_DEBUG, "display clock: %u vs %u (r)\n", disp_clk, req_disp_clk); + + /* I2C6 bus (audio, etc.) */ + soc_configure_i2c6pad(); + i2c_init(I2C6_BUS); } static void mainboard_enable(device_t dev) diff --git a/src/mainboard/google/rush_ryu/romstage.c b/src/mainboard/google/rush_ryu/romstage.c index ab5b2a8e29..d4e38a8a43 100644 --- a/src/mainboard/google/rush_ryu/romstage.c +++ b/src/mainboard/google/rush_ryu/romstage.c @@ -57,8 +57,6 @@ static const struct funit_cfg funits[] = { FUNIT_CFG(I2C3, PLLP, 400, tpm_pads, ARRAY_SIZE(tpm_pads)), /* EC on I2C2 - pulled to 3.3V @ 100kHz */ FUNIT_CFG(I2C2, PLLP, 100, ec_i2c_pads, ARRAY_SIZE(ec_i2c_pads)), - /* I2C6 for audio, temp sensor, etc. */ - FUNIT_CFG(I2C6, PLLP, 400, NULL, 0), }; static void lte_modem_init(void) @@ -92,14 +90,11 @@ void romstage_mainboard_init(void) /* Bring up controller interfaces for ramstage loading. */ soc_configure_funits(funits, ARRAY_SIZE(funits)); soc_configure_pads(padcfgs, ARRAY_SIZE(padcfgs)); - soc_configure_i2c6pad(); /* TPM */ i2c_init(I2C3_BUS); /* EC */ i2c_init(I2C2_BUS); - /* I2C6 bus (audio, etc.) */ - i2c_init(I2C6_BUS); lte_modem_init(); } -- cgit v1.2.3