diff options
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/rush/romstage.c | 32 | ||||
-rw-r--r-- | src/mainboard/google/rush_ryu/romstage.c | 4 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/mainboard/google/rush/romstage.c b/src/mainboard/google/rush/romstage.c index bb173c09d6..7c01a30604 100644 --- a/src/mainboard/google/rush/romstage.c +++ b/src/mainboard/google/rush/romstage.c @@ -19,6 +19,38 @@ #include <soc/romstage.h> +#include <soc/addressmap.h> +#include <soc/clock.h> +#include <soc/nvidia/tegra/i2c.h> +#include <soc/nvidia/tegra132/pinmux.h> +#include <soc/nvidia/tegra132/gpio.h> + +static struct clk_rst_ctlr *clk_rst = (void *)TEGRA_CLK_RST_BASE; + +static void configure_tpm_i2c_bus(void) +{ + clock_configure_i2c_scl_freq(i2c3, PLLP, 19); + + i2c_init(2); +} + +void mainboard_init_tpm_i2c(void) +{ + clock_enable_clear_reset(0, 0, CLK_U_I2C3, 0, 0, 0); + + gpio_output(GPIO(I5), 1); + + // I2C3 (cam) clock. + pinmux_set_config(PINMUX_CAM_I2C_SCL_INDEX, + PINMUX_CAM_I2C_SCL_FUNC_I2C3 | PINMUX_INPUT_ENABLE); + // I2C3 (cam) data. + pinmux_set_config(PINMUX_CAM_I2C_SDA_INDEX, + PINMUX_CAM_I2C_SDA_FUNC_I2C3 | PINMUX_INPUT_ENABLE); + + + configure_tpm_i2c_bus(); +} + void mainboard_configure_pmc(void) { } diff --git a/src/mainboard/google/rush_ryu/romstage.c b/src/mainboard/google/rush_ryu/romstage.c index bb173c09d6..9a41247dd8 100644 --- a/src/mainboard/google/rush_ryu/romstage.c +++ b/src/mainboard/google/rush_ryu/romstage.c @@ -19,6 +19,10 @@ #include <soc/romstage.h> +void mainboard_init_tpm_i2c(void) +{ +} + void mainboard_configure_pmc(void) { } |