ppc: p2020rdb i2c support
Support for both i2c busses on the p2020rdb board is added and the configuration file is updated to add the I2C driver and commands. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
f8e0d68214
commit
075209e8f3
|
@ -26,6 +26,7 @@
|
|||
#include <driver.h>
|
||||
#include <ns16550.h>
|
||||
#include <types.h>
|
||||
#include <i2c/i2c.h>
|
||||
#include <partition.h>
|
||||
#include <memory.h>
|
||||
#include <asm/cache.h>
|
||||
|
@ -61,10 +62,20 @@
|
|||
#define SYSCLK_50 50000000
|
||||
#define SYSCLK_100 100000000
|
||||
|
||||
/* I2C busses. */
|
||||
struct i2c_platform_data i2cplat = {
|
||||
.bitrate = 400000,
|
||||
};
|
||||
|
||||
static int devices_init(void)
|
||||
{
|
||||
add_cfi_flash_device(-1, CFG_FLASH_BASE, 16 << 20, 0);
|
||||
|
||||
add_generic_device("i2c-fsl", 0, NULL, I2C1_BASE_ADDR,
|
||||
0x100, IORESOURCE_MEM, &i2cplat);
|
||||
add_generic_device("i2c-fsl", 1, NULL, I2C2_BASE_ADDR,
|
||||
0x100, IORESOURCE_MEM, &i2cplat);
|
||||
|
||||
devfs_add_partition("nor0", 0xf80000, 0x80000, DEVFS_PARTITION_FIXED,
|
||||
"self0");
|
||||
return 0;
|
||||
|
|
|
@ -21,3 +21,6 @@ CONFIG_MALLOC_SIZE=0x200000
|
|||
CONFIG_BAUDRATE=115200
|
||||
CONFIG_DRIVER_SERIAL_NS16550=y
|
||||
CONFIG_RELOCATABLE=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_IMX=y
|
||||
CONFIG_CMD_I2C=y
|
||||
|
|
Loading…
Reference in New Issue