summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorTom Warren <twarren@nvidia.com>2014-09-18 15:23:10 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-03-28 07:05:39 +0100
commitbfbfcf719c6a64670cb11d7eb596e07c06685a49 (patch)
tree2caaa143ff56032282425d88575f919a7a8ca21b /src/mainboard
parent40edd3864fb2e4a40ac932f7058b8ac04ea93e35 (diff)
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 <pgeorgi@chromium.org> Original-Commit-Id: 4c0bfb5f747f55009b7c2b2ba4b24d91443b1639 Original-Change-Id: Idd5b95cfec7d3ade7508393b81ab3049ce15a2fb Original-Signed-off-by: Tom Warren <twarren@nvidia.com> Original-Reviewed-on: https://chromium-review.googlesource.com/218950 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9095 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/rush_ryu/mainboard.c7
-rw-r--r--src/mainboard/google/rush_ryu/romstage.c5
2 files changed, 7 insertions, 5 deletions
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 <soc/funitcfg.h>
#include <soc/padconfig.h>
#include <soc/nvidia/tegra132/clk_rst.h>
+#include <soc/nvidia/tegra/i2c.h>
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();
}