diff options
author | Alison Wang <b18965@freescale.com> | 2013-06-17 07:30:38 (GMT) |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2013-07-23 06:34:57 (GMT) |
commit | 1221b3d74a0d92f3fcb5ff3e8b6f721f562b8305 (patch) | |
tree | 2aec28f28577a803a7fa215176ef12577899cdf4 /board/freescale/vf610twr/vf610twr.c | |
parent | cfb25cc40e6cb0f59f751bfb452bba8be8873ee7 (diff) | |
download | u-boot-1221b3d74a0d92f3fcb5ff3e8b6f721f562b8305.tar.xz |
vf610: Add I2C support for Vybrid VF610 platform
This patch adds I2C support for Vybrid VF610 platform and adds
I2C0 support to VF610TWR board.
Signed-off-by: Alison Wang <b18965@freescale.com>
Diffstat (limited to 'board/freescale/vf610twr/vf610twr.c')
-rw-r--r-- | board/freescale/vf610twr/vf610twr.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/board/freescale/vf610twr/vf610twr.c b/board/freescale/vf610twr/vf610twr.c index f14df8b..391f97e 100644 --- a/board/freescale/vf610twr/vf610twr.c +++ b/board/freescale/vf610twr/vf610twr.c @@ -27,6 +27,7 @@ #include <fsl_esdhc.h> #include <miiphy.h> #include <netdev.h> +#include <i2c.h> DECLARE_GLOBAL_DATA_PTR; @@ -280,6 +281,16 @@ static void setup_iomux_enet(void) imx_iomux_v3_setup_multiple_pads(enet0_pads, ARRAY_SIZE(enet0_pads)); } +static void setup_iomux_i2c(void) +{ + static const iomux_v3_cfg_t i2c0_pads[] = { + VF610_PAD_PTB14__I2C0_SCL, + VF610_PAD_PTB15__I2C0_SDA, + }; + + imx_iomux_v3_setup_multiple_pads(i2c0_pads, ARRAY_SIZE(i2c0_pads)); +} + #ifdef CONFIG_FSL_ESDHC struct fsl_esdhc_cfg esdhc_cfg[1] = { {ESDHC1_BASE_ADDR}, @@ -328,7 +339,7 @@ static void clock_init(void) CCM_CCGR3_ANADIG_CTRL_MASK); clrsetbits_le32(&ccm->ccgr4, CCM_REG_CTRL_MASK, CCM_CCGR4_WKUP_CTRL_MASK | CCM_CCGR4_CCM_CTRL_MASK | - CCM_CCGR4_GPC_CTRL_MASK); + CCM_CCGR4_GPC_CTRL_MASK | CCM_CCGR4_I2C0_CTRL_MASK); clrsetbits_le32(&ccm->ccgr6, CCM_REG_CTRL_MASK, CCM_CCGR6_OCOTP_CTRL_MASK | CCM_CCGR6_DDRMC_CTRL_MASK); clrsetbits_le32(&ccm->ccgr7, CCM_REG_CTRL_MASK, @@ -387,6 +398,7 @@ int board_early_init_f(void) setup_iomux_uart(); setup_iomux_enet(); + setup_iomux_i2c(); return 0; } |