Skip to contentSkip to conversation

mx28evk: Add I2C support

PATCH New Fabio Estevam 3 participants 3 messages May 7, 2012 – Jun 21, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mx28evk: Add I2C support

Add I2C support.

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

---
 board/freescale/mx28evk/iomux.c |    3 +++
 include/configs/mx28evk.h       |    8 ++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
board/freescale/mx28evk/iomux.c +3 -0
index 396761b..4201097 100644
@@ -138,6 +138,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,
 };
 
 void board_init_ll(void)
include/configs/mx28evk.h +8 -0
index b165285..26e24e2 100644
@@ -67,6 +67,7 @@
 #define CONFIG_CMD_SF
 #define CONFIG_CMD_SPI
 #define CONFIG_CMD_USB
+#define CONFIG_CMD_I2C
 
 /*
  * Memory configurations
@@ -179,6 +180,13 @@
 #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
  */
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 mx28evk: Add I2C support

Dear Fabio Estevam,

Quoted 6 lines

Add I2C support.

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

Quoted 35 lines
---
 board/freescale/mx28evk/iomux.c |    3 +++
 include/configs/mx28evk.h       |    8 ++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/board/freescale/mx28evk/iomux.c index 396761b..4201097 100644

board/freescale/mx28evk/iomux.c +3 -0
@@ -138,6 +138,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,
 };
 
 void board_init_ll(void)
include/configs/mx28evk.h +1 -0
index b165285..26e24e2 100644
@@ -67,6 +67,7 @@
 #define CONFIG_CMD_SF
 #define CONFIG_CMD_SPI
 #define CONFIG_CMD_USB
+#define CONFIG_CMD_I2C
 
 /*
  * Memory configurations
@@ -179,6 +180,13 @@
 #define	CONFIG_USB_STORAGE
 #endif
 

include/configs/mx28evk.h line 192

Quoted 10 lines
include/configs/mx28evk.h +7 -0
+/* I2C */
+#ifdef CONFIG_CMD_I2C
+#define CONFIG_I2C_MXS
+#define CONFIG_HARD_I2C
+#define CONFIG_SYS_I2C_SPEED	400000
+#endif
+
 /*
  * SPI
  */

Best regards,
Marek Vasut

#2 lore raw

PATCH 1/1 mx28evk: Add I2C support

In reply to Fabio Estevam

Dear Fabio Estevam,

Quoted 9 lines · In message <[email protected]> you…

Add I2C support.

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

---
 board/freescale/mx28evk/iomux.c |    3 +++
 include/configs/mx28evk.h       |    8 ++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

I'm adding the I2C custodian to Cc: list....

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Always leave room to add an explanation if it doesn't work out.