diff options
author | Wolfgang Denk <wd@denx.de> | 2012-02-11 22:05:13 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-02-11 22:05:13 +0100 |
commit | 6e4c1da86e77576476b566977305ddd82f9e6b8c (patch) | |
tree | 9aae79ccdf1c55f7999dbd71f5dd137c263266f8 /board | |
parent | b75190debab35f3a138774d0d41595493574d112 (diff) | |
parent | b4116ede36da628a517a94d6cba9dba4a02104a4 (diff) | |
download | u-boot-imx-6e4c1da86e77576476b566977305ddd82f9e6b8c.zip u-boot-imx-6e4c1da86e77576476b566977305ddd82f9e6b8c.tar.gz u-boot-imx-6e4c1da86e77576476b566977305ddd82f9e6b8c.tar.bz2 |
Merge branch 'master' of /home/wd/git/u-boot/custodians
* 'master' of /home/wd/git/u-boot/custodians:
ARM: AM33XX: Add i2c support
ARM: AM33XX: Add AM33XX I2C driver support
ARM: I2C: I2C Multi byte address support
Diffstat (limited to 'board')
-rw-r--r-- | board/ti/am335x/evm.c | 7 | ||||
-rw-r--r-- | board/ti/am335x/mux.c | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/board/ti/am335x/evm.c b/board/ti/am335x/evm.c index 6a9f788..13dc603 100644 --- a/board/ti/am335x/evm.c +++ b/board/ti/am335x/evm.c @@ -18,6 +18,7 @@ #include <asm/arch/hardware.h> #include <asm/arch/common_def.h> #include <serial.h> +#include <i2c.h> DECLARE_GLOBAL_DATA_PTR; @@ -42,6 +43,12 @@ int init_basic_setup(void) int board_init(void) { enable_uart0_pin_mux(); + +#ifdef CONFIG_I2C + enable_i2c0_pin_mux(); + i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); +#endif + init_basic_setup(); return 0; diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c index 4cb0cdf..9ccb436 100644 --- a/board/ti/am335x/mux.c +++ b/board/ti/am335x/mux.c @@ -272,6 +272,14 @@ static struct module_pin_mux mmc0_pin_mux[] = { }; #endif +static struct module_pin_mux i2c0_pin_mux[] = { + {OFFSET(i2c0_sda), (MODE(0) | RXACTIVE | + PULLUDEN | SLEWCTRL)}, /* I2C_DATA */ + {OFFSET(i2c0_scl), (MODE(0) | RXACTIVE | + PULLUDEN | SLEWCTRL)}, /* I2C_SCLK */ + {-1}, +}; + /* * Configure the pin mux for the module */ @@ -297,3 +305,8 @@ void enable_mmc0_pin_mux(void) configure_module_pin_mux(mmc0_pin_mux); } #endif + +void enable_i2c0_pin_mux(void) +{ + configure_module_pin_mux(i2c0_pin_mux); +} |