Patchwork [U-Boot,2/3] netspace_v2: enable I2C EEPROM support

login
register
mail settings
Submitter Simon Guinot
Date Oct. 31, 2011, 1:58 p.m.
Message ID <1320069516-2105-3-git-send-email-simon@sequanux.org>
Download mbox | patch
Permalink /patch/122811/
State Accepted
Commit c841c12c7a0ebf99987b424cf03d114c3c81b6b3
Headers show

Comments

Simon Guinot - Oct. 31, 2011, 1:58 p.m.
From: Simon Guinot <simon.guinot@sequanux.org>

An I2C EEPROM HT24LC04 (512B) is available on the netspace_v2 board
(and parents). This EEPROM hold data such as Ethernet MAC addresses
and power flags.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
---
 include/configs/netspace_v2.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
Prafulla Wadaskar - Nov. 1, 2011, 7:36 a.m.
> -----Original Message-----
> From: Simon Guinot [mailto:simon@sequanux.org]
> Sent: Monday, October 31, 2011 7:29 PM
> To: Prafulla Wadaskar
> Cc: u-boot@lists.denx.de; Simon Guinot
> Subject: [PATCH 2/3] netspace_v2: enable I2C EEPROM support
> 
> From: Simon Guinot <simon.guinot@sequanux.org>
> 
> An I2C EEPROM HT24LC04 (512B) is available on the netspace_v2
> board
> (and parents). This EEPROM hold data such as Ethernet MAC
> addresses
> and power flags.
> 
> Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
> ---
>  include/configs/netspace_v2.h |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/include/configs/netspace_v2.h
> b/include/configs/netspace_v2.h
> index 5790602..bb27ed7 100644
> --- a/include/configs/netspace_v2.h
> +++ b/include/configs/netspace_v2.h
> @@ -108,6 +108,17 @@
>  #define CONFIG_KIRKWOOD_GPIO
> 
>  /*
> + * Enable I2C support
> + */
> +#ifdef CONFIG_CMD_I2C
> +/* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */
> +#define CONFIG_CMD_EEPROM
> +#define CONFIG_SYS_I2C_EEPROM_ADDR		0x50
> +#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	4 /* 16-byte page
> size */
> +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1 /* 8-bit device
> address */
> +#endif /* CONFIG_CMD_I2C */
> +
> +/*
>   * File systems support
>   */
>  #define CONFIG_CMD_EXT2
> --

Applied to u-boot-marvell.git master branch

Regards..
Prafulla . . .

Patch

diff --git a/include/configs/netspace_v2.h b/include/configs/netspace_v2.h
index 5790602..bb27ed7 100644
--- a/include/configs/netspace_v2.h
+++ b/include/configs/netspace_v2.h
@@ -108,6 +108,17 @@ 
 #define CONFIG_KIRKWOOD_GPIO
 
 /*
+ * Enable I2C support
+ */
+#ifdef CONFIG_CMD_I2C
+/* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */
+#define CONFIG_CMD_EEPROM
+#define CONFIG_SYS_I2C_EEPROM_ADDR		0x50
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	4 /* 16-byte page size */
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1 /* 8-bit device address */
+#endif /* CONFIG_CMD_I2C */
+
+/*
  * File systems support
  */
 #define CONFIG_CMD_EXT2