]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mx28evk: Add I2C support
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 7 May 2012 05:42:34 +0000 (05:42 +0000)
committerHeiko Schocher <hs@denx.de>
Wed, 11 Jul 2012 08:54:53 +0000 (10:54 +0200)
Add I2C support.

Tested by placing a 24LC16 EEPROM into the U50 slot which comes empty from factory.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
board/freescale/mx28evk/iomux.c
include/configs/mx28evk.h

index 00cc0cc2fa292395b7dbceb6f87eccaecaebe5ce..40d8cf60976785b2e94f515ff4216601999ba93e 100644 (file)
@@ -159,6 +159,9 @@ const iomux_cfg_t iomux_setup[] = {
        MX28_PAD_SSP2_MISO__SSP2_D0 | MUX_CONFIG_SSP2,
        MX28_PAD_SSP2_SS0__SSP2_D3 |
                (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP),
+       /* I2C */
+       MX28_PAD_I2C0_SCL__I2C0_SCL,
+       MX28_PAD_I2C0_SDA__I2C0_SDA,
 };
 
 #define HW_DRAM_CTL29  (0x74 >> 2)
index 8f60496d355009c203975976d0abec2286364b8e..54d21e687a9c3c24e10c1eeff929b3a0928735fc 100644 (file)
@@ -68,6 +68,7 @@
 #define CONFIG_CMD_SPI
 #define CONFIG_CMD_USB
 #define CONFIG_CMD_BOOTZ
+#define CONFIG_CMD_I2C
 
 /*
  * Memory configurations
 #define        CONFIG_USB_STORAGE
 #endif
 
+/* I2C */
+#ifdef CONFIG_CMD_I2C
+#define CONFIG_I2C_MXS
+#define CONFIG_HARD_I2C
+#define CONFIG_SYS_I2C_SPEED   400000
+#endif
+
 /*
  * SPI
  */