nyan: Initialize the i2c pins and controllers.
Set up the i2c controllers that are used on nyan. BUG=None TEST=Built and booted into the bootblock on nyan. BRANCH=None Change-Id: Ibdd5685e3effdd13ca560b8f18db25e9edadc07b Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://chromium-review.googlesource.com/172584 Reviewed-by: Ronald Minnich <rminnich@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org> Commit-Queue: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
parent
ea703137fc
commit
9c10a3074e
1 changed files with 34 additions and 0 deletions
|
|
@ -18,9 +18,43 @@
|
|||
*/
|
||||
|
||||
#include <bootblock_common.h>
|
||||
#include <console/console.h>
|
||||
#include <device/i2c.h>
|
||||
#include <soc/nvidia/tegra/i2c.h>
|
||||
#include <soc/nvidia/tegra124/clock.h>
|
||||
#include <soc/nvidia/tegra124/pinmux.h>
|
||||
|
||||
void bootblock_mainboard_init(void)
|
||||
{
|
||||
clock_config();
|
||||
|
||||
// I2C1 clock.
|
||||
pinmux_set_config(PINMUX_GEN1_I2C_SCL_INDEX,
|
||||
PINMUX_GEN1_I2C_SCL_FUNC_I2C1 | PINMUX_INPUT_ENABLE);
|
||||
// I2C1 data.
|
||||
pinmux_set_config(PINMUX_GEN1_I2C_SDA_INDEX,
|
||||
PINMUX_GEN1_I2C_SDA_FUNC_I2C1 | PINMUX_INPUT_ENABLE);
|
||||
// I2C2 clock.
|
||||
pinmux_set_config(PINMUX_GEN2_I2C_SCL_INDEX,
|
||||
PINMUX_GEN2_I2C_SCL_FUNC_I2C2 | PINMUX_INPUT_ENABLE);
|
||||
// I2C2 data.
|
||||
pinmux_set_config(PINMUX_GEN2_I2C_SDA_INDEX,
|
||||
PINMUX_GEN2_I2C_SDA_FUNC_I2C2 | PINMUX_INPUT_ENABLE);
|
||||
// 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);
|
||||
// I2C5 (PMU) clock.
|
||||
pinmux_set_config(PINMUX_PWR_I2C_SCL_INDEX,
|
||||
PINMUX_PWR_I2C_SCL_FUNC_I2CPMU | PINMUX_INPUT_ENABLE);
|
||||
// I2C5 (PMU) data.
|
||||
pinmux_set_config(PINMUX_PWR_I2C_SDA_INDEX,
|
||||
PINMUX_PWR_I2C_SDA_FUNC_I2CPMU | PINMUX_INPUT_ENABLE);
|
||||
|
||||
i2c_init(0);
|
||||
i2c_init(1);
|
||||
i2c_init(2);
|
||||
i2c_init(4);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue