* [U-Boot] [PATCH] mx28evk: Add I2C support
@ 2012-05-07 15:42 Fabio Estevam
2012-05-07 16:09 ` Marek Vasut
2012-06-21 19:57 ` Wolfgang Denk
0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2012-05-07 15:42 UTC (permalink / raw)
To: u-boot
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>
---
board/freescale/mx28evk/iomux.c | 3 +++
include/configs/mx28evk.h | 8 ++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/board/freescale/mx28evk/iomux.c b/board/freescale/mx28evk/iomux.c
index 396761b..4201097 100644
--- a/board/freescale/mx28evk/iomux.c
+++ b/board/freescale/mx28evk/iomux.c
@@ -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)
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index b165285..26e24e2 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -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
*/
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot] [PATCH] mx28evk: Add I2C support
2012-05-07 15:42 [U-Boot] [PATCH] mx28evk: Add I2C support Fabio Estevam
@ 2012-05-07 16:09 ` Marek Vasut
2012-06-21 19:57 ` Wolfgang Denk
1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2012-05-07 16:09 UTC (permalink / raw)
To: u-boot
Dear Fabio Estevam,
> 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 | 3 +++
> include/configs/mx28evk.h | 8 ++++++++
> 2 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/board/freescale/mx28evk/iomux.c
> b/board/freescale/mx28evk/iomux.c index 396761b..4201097 100644
> --- a/board/freescale/mx28evk/iomux.c
> +++ b/board/freescale/mx28evk/iomux.c
> @@ -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)
> diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
> index b165285..26e24e2 100644
> --- a/include/configs/mx28evk.h
> +++ b/include/configs/mx28evk.h
> @@ -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
> */
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 3+ messages in thread* [U-Boot] [PATCH] mx28evk: Add I2C support
2012-05-07 15:42 [U-Boot] [PATCH] mx28evk: Add I2C support Fabio Estevam
2012-05-07 16:09 ` Marek Vasut
@ 2012-06-21 19:57 ` Wolfgang Denk
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2012-06-21 19:57 UTC (permalink / raw)
To: u-boot
Dear Fabio Estevam,
In message <1336405354-15410-1-git-send-email-fabio.estevam@freescale.com> you wrote:
> 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>
> ---
> 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
--
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-21 19:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-07 15:42 [U-Boot] [PATCH] mx28evk: Add I2C support Fabio Estevam
2012-05-07 16:09 ` Marek Vasut
2012-06-21 19:57 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.