All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] misc/at24: Add at24c512b eeprom support
@ 2013-01-23  6:32 ` Liu Ying
  0 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23  6:32 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, rob-VoJi6FS/r0vR7s880joybQ,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ,
	shawn.guo-QSEj5FYQhm4dnm+yROfE0A, s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A
  Cc: linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	liu.y.victor-Re5JQEeQqe8AvxtiuMwx3w, Liu Ying

This patch adds at24c512b eeprom support.
The datasheet of at24c512b can be found at:
http://www.alldatasheet.com/datasheet-pdf/pdf/
256958/ATMEL/AT24C512B-TH-B.html

Signed-off-by: Liu Ying <Ying.Liu-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 Documentation/devicetree/bindings/eeprom.txt |    2 +-
 drivers/misc/eeprom/at24.c                   |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/devicetree/bindings/eeprom.txt b/Documentation/devicetree/bindings/eeprom.txt
index 4342c10..fcea214 100644
--- a/Documentation/devicetree/bindings/eeprom.txt
+++ b/Documentation/devicetree/bindings/eeprom.txt
@@ -6,7 +6,7 @@ Required properties:
 		 If there is no specific driver for <manufacturer>, a generic
 		 driver based on <type> is selected. Possible types are:
 		 24c00, 24c01, 24c02, 24c04, 24c08, 24c16, 24c32, 24c64,
-		 24c128, 24c256, 24c512, 24c1024, spd
+		 24c128, 24c256, 24c512, 24c512b, 24c1024, spd
 
   - reg : the I2C address of the EEPROM
 
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 2baeec5..0df4cb0 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -124,6 +124,7 @@ static const struct i2c_device_id at24_ids[] = {
 	{ "24c128", AT24_DEVICE_MAGIC(131072 / 8, AT24_FLAG_ADDR16) },
 	{ "24c256", AT24_DEVICE_MAGIC(262144 / 8, AT24_FLAG_ADDR16) },
 	{ "24c512", AT24_DEVICE_MAGIC(524288 / 8, AT24_FLAG_ADDR16) },
+	{ "24c512b", AT24_DEVICE_MAGIC(524288 / 8, AT24_FLAG_ADDR16) },
 	{ "24c1024", AT24_DEVICE_MAGIC(1048576 / 8, AT24_FLAG_ADDR16) },
 	{ "at24", 0 },
 	{ /* END OF LIST */ }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 1/2] misc/at24: Add at24c512b eeprom support
@ 2013-01-23  6:32 ` Liu Ying
  0 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23  6:32 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds at24c512b eeprom support.
The datasheet of at24c512b can be found at:
http://www.alldatasheet.com/datasheet-pdf/pdf/
256958/ATMEL/AT24C512B-TH-B.html

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
---
 Documentation/devicetree/bindings/eeprom.txt |    2 +-
 drivers/misc/eeprom/at24.c                   |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/devicetree/bindings/eeprom.txt b/Documentation/devicetree/bindings/eeprom.txt
index 4342c10..fcea214 100644
--- a/Documentation/devicetree/bindings/eeprom.txt
+++ b/Documentation/devicetree/bindings/eeprom.txt
@@ -6,7 +6,7 @@ Required properties:
 		 If there is no specific driver for <manufacturer>, a generic
 		 driver based on <type> is selected. Possible types are:
 		 24c00, 24c01, 24c02, 24c04, 24c08, 24c16, 24c32, 24c64,
-		 24c128, 24c256, 24c512, 24c1024, spd
+		 24c128, 24c256, 24c512, 24c512b, 24c1024, spd
 
   - reg : the I2C address of the EEPROM
 
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 2baeec5..0df4cb0 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -124,6 +124,7 @@ static const struct i2c_device_id at24_ids[] = {
 	{ "24c128", AT24_DEVICE_MAGIC(131072 / 8, AT24_FLAG_ADDR16) },
 	{ "24c256", AT24_DEVICE_MAGIC(262144 / 8, AT24_FLAG_ADDR16) },
 	{ "24c512", AT24_DEVICE_MAGIC(524288 / 8, AT24_FLAG_ADDR16) },
+	{ "24c512b", AT24_DEVICE_MAGIC(524288 / 8, AT24_FLAG_ADDR16) },
 	{ "24c1024", AT24_DEVICE_MAGIC(1048576 / 8, AT24_FLAG_ADDR16) },
 	{ "at24", 0 },
 	{ /* END OF LIST */ }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 2/2] ARM: dts: imx51-babbage: Add at24c512b eeprom support
  2013-01-23  6:32 ` Liu Ying
@ 2013-01-23  6:32     ` Liu Ying
  -1 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23  6:32 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, rob-VoJi6FS/r0vR7s880joybQ,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ,
	shawn.guo-QSEj5FYQhm4dnm+yROfE0A, s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A
  Cc: linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	liu.y.victor-Re5JQEeQqe8AvxtiuMwx3w, Liu Ying

This patch adds at24c512b i2c device to the device tree
along with the necessary i2c device node and pinctrl
settings for i2c bus.
The eeprom chip is populated on the accessory board of
the imx51-babbage board.

Signed-off-by: Liu Ying <Ying.Liu-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 arch/arm/boot/dts/imx51-babbage.dts |   12 ++++++++++++
 arch/arm/boot/dts/imx51.dtsi        |    9 +++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
index 567e7ee..4f0fc75 100644
--- a/arch/arm/boot/dts/imx51-babbage.dts
+++ b/arch/arm/boot/dts/imx51-babbage.dts
@@ -241,6 +241,18 @@
 				};
 			};
 
+			i2c@83fc8000 { /* I2C1 */
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_i2c1_1>;
+				status = "okay";
+
+				at24@50 {
+					compatible = "at24,24c512b";
+					pagesize = <128>;
+					reg = <0x50>;
+				};
+			};
+
 			audmux@83fd0000 {
 				pinctrl-names = "default";
 				pinctrl-0 = <&pinctrl_audmux_1>;
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index 1f5d45e..6495c69 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -311,6 +311,15 @@
 					};
 				};
 
+				i2c1 {
+					pinctrl_i2c1_1: i2c1grp-1 {
+						fsl,pins = <
+							4  0x400001ed	/* MX51_PAD_EIM_D16__I2C1_SDA */
+							23 0x400001ed	/* MX51_PAD_EIM_D19__I2C1_SCL */
+						>;
+					};
+				};
+
 				i2c2 {
 					pinctrl_i2c2_1: i2c2grp-1 {
 						fsl,pins = <
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 2/2] ARM: dts: imx51-babbage: Add at24c512b eeprom support
@ 2013-01-23  6:32     ` Liu Ying
  0 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23  6:32 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds at24c512b i2c device to the device tree
along with the necessary i2c device node and pinctrl
settings for i2c bus.
The eeprom chip is populated on the accessory board of
the imx51-babbage board.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
---
 arch/arm/boot/dts/imx51-babbage.dts |   12 ++++++++++++
 arch/arm/boot/dts/imx51.dtsi        |    9 +++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
index 567e7ee..4f0fc75 100644
--- a/arch/arm/boot/dts/imx51-babbage.dts
+++ b/arch/arm/boot/dts/imx51-babbage.dts
@@ -241,6 +241,18 @@
 				};
 			};
 
+			i2c at 83fc8000 { /* I2C1 */
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_i2c1_1>;
+				status = "okay";
+
+				at24 at 50 {
+					compatible = "at24,24c512b";
+					pagesize = <128>;
+					reg = <0x50>;
+				};
+			};
+
 			audmux at 83fd0000 {
 				pinctrl-names = "default";
 				pinctrl-0 = <&pinctrl_audmux_1>;
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index 1f5d45e..6495c69 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -311,6 +311,15 @@
 					};
 				};
 
+				i2c1 {
+					pinctrl_i2c1_1: i2c1grp-1 {
+						fsl,pins = <
+							4  0x400001ed	/* MX51_PAD_EIM_D16__I2C1_SDA */
+							23 0x400001ed	/* MX51_PAD_EIM_D19__I2C1_SCL */
+						>;
+					};
+				};
+
 				i2c2 {
 					pinctrl_i2c2_1: i2c2grp-1 {
 						fsl,pins = <
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/2] ARM: dts: imx51-babbage: Add at24c512b eeprom support
  2013-01-23  6:32     ` Liu Ying
@ 2013-01-23  7:30       ` Sascha Hauer
  -1 siblings, 0 replies; 28+ messages in thread
From: Sascha Hauer @ 2013-01-23  7:30 UTC (permalink / raw)
  To: Liu Ying
  Cc: grant.likely, rob.herring, rob, linux, w.sang, shawn.guo,
	linus.walleij, linux-doc, linux-arm-kernel, linux-i2c,
	liu.y.victor

On Wed, Jan 23, 2013 at 02:32:44PM +0800, Liu Ying wrote:
> This patch adds at24c512b i2c device to the device tree
> along with the necessary i2c device node and pinctrl
> settings for i2c bus.
> The eeprom chip is populated on the accessory board of
> the imx51-babbage board.

Given that it's optional should the binding be here anyway? I don't have
this accessory board and this may conflict with the boards other people
have connected on this port.

Sascha

> 
> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
> ---
>  arch/arm/boot/dts/imx51-babbage.dts |   12 ++++++++++++
>  arch/arm/boot/dts/imx51.dtsi        |    9 +++++++++
>  2 files changed, 21 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
> index 567e7ee..4f0fc75 100644
> --- a/arch/arm/boot/dts/imx51-babbage.dts
> +++ b/arch/arm/boot/dts/imx51-babbage.dts
> @@ -241,6 +241,18 @@
>  				};
>  			};
>  
> +			i2c@83fc8000 { /* I2C1 */
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&pinctrl_i2c1_1>;
> +				status = "okay";
> +
> +				at24@50 {
> +					compatible = "at24,24c512b";
> +					pagesize = <128>;
> +					reg = <0x50>;
> +				};
> +			};
> +
>  			audmux@83fd0000 {
>  				pinctrl-names = "default";
>  				pinctrl-0 = <&pinctrl_audmux_1>;
> diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
> index 1f5d45e..6495c69 100644
> --- a/arch/arm/boot/dts/imx51.dtsi
> +++ b/arch/arm/boot/dts/imx51.dtsi
> @@ -311,6 +311,15 @@
>  					};
>  				};
>  
> +				i2c1 {
> +					pinctrl_i2c1_1: i2c1grp-1 {
> +						fsl,pins = <
> +							4  0x400001ed	/* MX51_PAD_EIM_D16__I2C1_SDA */
> +							23 0x400001ed	/* MX51_PAD_EIM_D19__I2C1_SCL */
> +						>;
> +					};
> +				};
> +
>  				i2c2 {
>  					pinctrl_i2c2_1: i2c2grp-1 {
>  						fsl,pins = <
> -- 
> 1.7.1
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 2/2] ARM: dts: imx51-babbage: Add at24c512b eeprom support
@ 2013-01-23  7:30       ` Sascha Hauer
  0 siblings, 0 replies; 28+ messages in thread
From: Sascha Hauer @ 2013-01-23  7:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 23, 2013 at 02:32:44PM +0800, Liu Ying wrote:
> This patch adds at24c512b i2c device to the device tree
> along with the necessary i2c device node and pinctrl
> settings for i2c bus.
> The eeprom chip is populated on the accessory board of
> the imx51-babbage board.

Given that it's optional should the binding be here anyway? I don't have
this accessory board and this may conflict with the boards other people
have connected on this port.

Sascha

> 
> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
> ---
>  arch/arm/boot/dts/imx51-babbage.dts |   12 ++++++++++++
>  arch/arm/boot/dts/imx51.dtsi        |    9 +++++++++
>  2 files changed, 21 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
> index 567e7ee..4f0fc75 100644
> --- a/arch/arm/boot/dts/imx51-babbage.dts
> +++ b/arch/arm/boot/dts/imx51-babbage.dts
> @@ -241,6 +241,18 @@
>  				};
>  			};
>  
> +			i2c at 83fc8000 { /* I2C1 */
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&pinctrl_i2c1_1>;
> +				status = "okay";
> +
> +				at24 at 50 {
> +					compatible = "at24,24c512b";
> +					pagesize = <128>;
> +					reg = <0x50>;
> +				};
> +			};
> +
>  			audmux at 83fd0000 {
>  				pinctrl-names = "default";
>  				pinctrl-0 = <&pinctrl_audmux_1>;
> diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
> index 1f5d45e..6495c69 100644
> --- a/arch/arm/boot/dts/imx51.dtsi
> +++ b/arch/arm/boot/dts/imx51.dtsi
> @@ -311,6 +311,15 @@
>  					};
>  				};
>  
> +				i2c1 {
> +					pinctrl_i2c1_1: i2c1grp-1 {
> +						fsl,pins = <
> +							4  0x400001ed	/* MX51_PAD_EIM_D16__I2C1_SDA */
> +							23 0x400001ed	/* MX51_PAD_EIM_D19__I2C1_SCL */
> +						>;
> +					};
> +				};
> +
>  				i2c2 {
>  					pinctrl_i2c2_1: i2c2grp-1 {
>  						fsl,pins = <
> -- 
> 1.7.1
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/2] ARM: dts: imx51-babbage: Add at24c512b eeprom support
  2013-01-23  7:30       ` Sascha Hauer
@ 2013-01-23  7:51         ` Liu Ying
  -1 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23  7:51 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Liu Ying, grant.likely, rob.herring, rob, linux, w.sang,
	shawn.guo, linus.walleij, linux-doc, linux-arm-kernel, linux-i2c

2013/1/23 Sascha Hauer <s.hauer@pengutronix.de>:
> On Wed, Jan 23, 2013 at 02:32:44PM +0800, Liu Ying wrote:
>> This patch adds at24c512b i2c device to the device tree
>> along with the necessary i2c device node and pinctrl
>> settings for i2c bus.
>> The eeprom chip is populated on the accessory board of
>> the imx51-babbage board.
>
> Given that it's optional should the binding be here anyway? I don't have
> this accessory board and this may conflict with the boards other people
> have connected on this port.
>
> Sascha

Understand your concern. Is there any way to handle this? How can we support
the present accessory board correctly? More generally, not all main boards can
figure out what kind of accessory board is attached to them, at least, some main
boards can only figure out limited number of accessory boards by using some ways
of board ID check.

>
>>
>> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
>> ---
>>  arch/arm/boot/dts/imx51-babbage.dts |   12 ++++++++++++
>>  arch/arm/boot/dts/imx51.dtsi        |    9 +++++++++
>>  2 files changed, 21 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
>> index 567e7ee..4f0fc75 100644
>> --- a/arch/arm/boot/dts/imx51-babbage.dts
>> +++ b/arch/arm/boot/dts/imx51-babbage.dts
>> @@ -241,6 +241,18 @@
>>                               };
>>                       };
>>
>> +                     i2c@83fc8000 { /* I2C1 */
>> +                             pinctrl-names = "default";
>> +                             pinctrl-0 = <&pinctrl_i2c1_1>;
>> +                             status = "okay";
>> +
>> +                             at24@50 {
>> +                                     compatible = "at24,24c512b";
>> +                                     pagesize = <128>;
>> +                                     reg = <0x50>;
>> +                             };
>> +                     };
>> +
>>                       audmux@83fd0000 {
>>                               pinctrl-names = "default";
>>                               pinctrl-0 = <&pinctrl_audmux_1>;
>> diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
>> index 1f5d45e..6495c69 100644
>> --- a/arch/arm/boot/dts/imx51.dtsi
>> +++ b/arch/arm/boot/dts/imx51.dtsi
>> @@ -311,6 +311,15 @@
>>                                       };
>>                               };
>>
>> +                             i2c1 {
>> +                                     pinctrl_i2c1_1: i2c1grp-1 {
>> +                                             fsl,pins = <
>> +                                                     4  0x400001ed   /* MX51_PAD_EIM_D16__I2C1_SDA */
>> +                                                     23 0x400001ed   /* MX51_PAD_EIM_D19__I2C1_SCL */
>> +                                             >;
>> +                                     };
>> +                             };
>> +
>>                               i2c2 {
>>                                       pinctrl_i2c2_1: i2c2grp-1 {
>>                                               fsl,pins = <
>> --
>> 1.7.1
>>
>>
>>
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



-- 
Best Regards,
Liu Ying

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 2/2] ARM: dts: imx51-babbage: Add at24c512b eeprom support
@ 2013-01-23  7:51         ` Liu Ying
  0 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23  7:51 UTC (permalink / raw)
  To: linux-arm-kernel

2013/1/23 Sascha Hauer <s.hauer@pengutronix.de>:
> On Wed, Jan 23, 2013 at 02:32:44PM +0800, Liu Ying wrote:
>> This patch adds at24c512b i2c device to the device tree
>> along with the necessary i2c device node and pinctrl
>> settings for i2c bus.
>> The eeprom chip is populated on the accessory board of
>> the imx51-babbage board.
>
> Given that it's optional should the binding be here anyway? I don't have
> this accessory board and this may conflict with the boards other people
> have connected on this port.
>
> Sascha

Understand your concern. Is there any way to handle this? How can we support
the present accessory board correctly? More generally, not all main boards can
figure out what kind of accessory board is attached to them, at least, some main
boards can only figure out limited number of accessory boards by using some ways
of board ID check.

>
>>
>> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
>> ---
>>  arch/arm/boot/dts/imx51-babbage.dts |   12 ++++++++++++
>>  arch/arm/boot/dts/imx51.dtsi        |    9 +++++++++
>>  2 files changed, 21 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
>> index 567e7ee..4f0fc75 100644
>> --- a/arch/arm/boot/dts/imx51-babbage.dts
>> +++ b/arch/arm/boot/dts/imx51-babbage.dts
>> @@ -241,6 +241,18 @@
>>                               };
>>                       };
>>
>> +                     i2c at 83fc8000 { /* I2C1 */
>> +                             pinctrl-names = "default";
>> +                             pinctrl-0 = <&pinctrl_i2c1_1>;
>> +                             status = "okay";
>> +
>> +                             at24 at 50 {
>> +                                     compatible = "at24,24c512b";
>> +                                     pagesize = <128>;
>> +                                     reg = <0x50>;
>> +                             };
>> +                     };
>> +
>>                       audmux at 83fd0000 {
>>                               pinctrl-names = "default";
>>                               pinctrl-0 = <&pinctrl_audmux_1>;
>> diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
>> index 1f5d45e..6495c69 100644
>> --- a/arch/arm/boot/dts/imx51.dtsi
>> +++ b/arch/arm/boot/dts/imx51.dtsi
>> @@ -311,6 +311,15 @@
>>                                       };
>>                               };
>>
>> +                             i2c1 {
>> +                                     pinctrl_i2c1_1: i2c1grp-1 {
>> +                                             fsl,pins = <
>> +                                                     4  0x400001ed   /* MX51_PAD_EIM_D16__I2C1_SDA */
>> +                                                     23 0x400001ed   /* MX51_PAD_EIM_D19__I2C1_SCL */
>> +                                             >;
>> +                                     };
>> +                             };
>> +
>>                               i2c2 {
>>                                       pinctrl_i2c2_1: i2c2grp-1 {
>>                                               fsl,pins = <
>> --
>> 1.7.1
>>
>>
>>
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



-- 
Best Regards,
Liu Ying

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/2] ARM: dts: imx51-babbage: Add at24c512b eeprom support
  2013-01-23  7:51         ` Liu Ying
@ 2013-01-23  7:55             ` Sascha Hauer
  -1 siblings, 0 replies; 28+ messages in thread
From: Sascha Hauer @ 2013-01-23  7:55 UTC (permalink / raw)
  To: Liu Ying
  Cc: Liu Ying, grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, rob-VoJi6FS/r0vR7s880joybQ,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ,
	shawn.guo-QSEj5FYQhm4dnm+yROfE0A,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

On Wed, Jan 23, 2013 at 03:51:12PM +0800, Liu Ying wrote:
> 2013/1/23 Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>:
> > On Wed, Jan 23, 2013 at 02:32:44PM +0800, Liu Ying wrote:
> >> This patch adds at24c512b i2c device to the device tree
> >> along with the necessary i2c device node and pinctrl
> >> settings for i2c bus.
> >> The eeprom chip is populated on the accessory board of
> >> the imx51-babbage board.
> >
> > Given that it's optional should the binding be here anyway? I don't have
> > this accessory board and this may conflict with the boards other people
> > have connected on this port.
> >
> > Sascha
> 
> Understand your concern. Is there any way to handle this? How can we support
> the present accessory board correctly? More generally, not all main boards can
> figure out what kind of accessory board is attached to them, at least, some main
> boards can only figure out limited number of accessory boards by using some ways
> of board ID check.

We don't have support for such things atm. We'll have to wait for

OF: Introduce DT overlay support.

Pantelis Antoniou is working on this currently.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 2/2] ARM: dts: imx51-babbage: Add at24c512b eeprom support
@ 2013-01-23  7:55             ` Sascha Hauer
  0 siblings, 0 replies; 28+ messages in thread
From: Sascha Hauer @ 2013-01-23  7:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 23, 2013 at 03:51:12PM +0800, Liu Ying wrote:
> 2013/1/23 Sascha Hauer <s.hauer@pengutronix.de>:
> > On Wed, Jan 23, 2013 at 02:32:44PM +0800, Liu Ying wrote:
> >> This patch adds at24c512b i2c device to the device tree
> >> along with the necessary i2c device node and pinctrl
> >> settings for i2c bus.
> >> The eeprom chip is populated on the accessory board of
> >> the imx51-babbage board.
> >
> > Given that it's optional should the binding be here anyway? I don't have
> > this accessory board and this may conflict with the boards other people
> > have connected on this port.
> >
> > Sascha
> 
> Understand your concern. Is there any way to handle this? How can we support
> the present accessory board correctly? More generally, not all main boards can
> figure out what kind of accessory board is attached to them, at least, some main
> boards can only figure out limited number of accessory boards by using some ways
> of board ID check.

We don't have support for such things atm. We'll have to wait for

OF: Introduce DT overlay support.

Pantelis Antoniou is working on this currently.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/2] ARM: dts: imx51-babbage: Add at24c512b eeprom support
  2013-01-23  7:55             ` Sascha Hauer
@ 2013-01-23  7:59               ` Liu Ying
  -1 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23  7:59 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Liu Ying, grant.likely, rob.herring, rob, linux, w.sang,
	shawn.guo, linus.walleij, linux-doc, linux-arm-kernel, linux-i2c

2013/1/23 Sascha Hauer <s.hauer@pengutronix.de>:
> On Wed, Jan 23, 2013 at 03:51:12PM +0800, Liu Ying wrote:
>> 2013/1/23 Sascha Hauer <s.hauer@pengutronix.de>:
>> > On Wed, Jan 23, 2013 at 02:32:44PM +0800, Liu Ying wrote:
>> >> This patch adds at24c512b i2c device to the device tree
>> >> along with the necessary i2c device node and pinctrl
>> >> settings for i2c bus.
>> >> The eeprom chip is populated on the accessory board of
>> >> the imx51-babbage board.
>> >
>> > Given that it's optional should the binding be here anyway? I don't have
>> > this accessory board and this may conflict with the boards other people
>> > have connected on this port.
>> >
>> > Sascha
>>
>> Understand your concern. Is there any way to handle this? How can we support
>> the present accessory board correctly? More generally, not all main boards can
>> figure out what kind of accessory board is attached to them, at least, some main
>> boards can only figure out limited number of accessory boards by using some ways
>> of board ID check.
>
> We don't have support for such things atm. We'll have to wait for
>
> OF: Introduce DT overlay support.
>
> Pantelis Antoniou is working on this currently.
>
> Sascha
>
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Good to know that. Thanks.

-- 
Best Regards,
Liu Ying

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 2/2] ARM: dts: imx51-babbage: Add at24c512b eeprom support
@ 2013-01-23  7:59               ` Liu Ying
  0 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23  7:59 UTC (permalink / raw)
  To: linux-arm-kernel

2013/1/23 Sascha Hauer <s.hauer@pengutronix.de>:
> On Wed, Jan 23, 2013 at 03:51:12PM +0800, Liu Ying wrote:
>> 2013/1/23 Sascha Hauer <s.hauer@pengutronix.de>:
>> > On Wed, Jan 23, 2013 at 02:32:44PM +0800, Liu Ying wrote:
>> >> This patch adds at24c512b i2c device to the device tree
>> >> along with the necessary i2c device node and pinctrl
>> >> settings for i2c bus.
>> >> The eeprom chip is populated on the accessory board of
>> >> the imx51-babbage board.
>> >
>> > Given that it's optional should the binding be here anyway? I don't have
>> > this accessory board and this may conflict with the boards other people
>> > have connected on this port.
>> >
>> > Sascha
>>
>> Understand your concern. Is there any way to handle this? How can we support
>> the present accessory board correctly? More generally, not all main boards can
>> figure out what kind of accessory board is attached to them, at least, some main
>> boards can only figure out limited number of accessory boards by using some ways
>> of board ID check.
>
> We don't have support for such things atm. We'll have to wait for
>
> OF: Introduce DT overlay support.
>
> Pantelis Antoniou is working on this currently.
>
> Sascha
>
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Good to know that. Thanks.

-- 
Best Regards,
Liu Ying

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] misc/at24: Add at24c512b eeprom support
  2013-01-23  6:32 ` Liu Ying
@ 2013-01-23 12:24   ` Linus Walleij
  -1 siblings, 0 replies; 28+ messages in thread
From: Linus Walleij @ 2013-01-23 12:24 UTC (permalink / raw)
  To: Liu Ying, Arnd Bergmann
  Cc: grant.likely, rob.herring, rob, linux, w.sang, shawn.guo,
	s.hauer, linux-doc, linux-arm-kernel, linux-i2c, liu.y.victor

On Wed, Jan 23, 2013 at 7:32 AM, Liu Ying <Ying.Liu@freescale.com> wrote:

> This patch adds at24c512b eeprom support.
> The datasheet of at24c512b can be found at:
> http://www.alldatasheet.com/datasheet-pdf/pdf/
> 256958/ATMEL/AT24C512B-TH-B.html
>
> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>

Arnd Bergmann is the misc maintainer, route this by him.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/2] misc/at24: Add at24c512b eeprom support
@ 2013-01-23 12:24   ` Linus Walleij
  0 siblings, 0 replies; 28+ messages in thread
From: Linus Walleij @ 2013-01-23 12:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 23, 2013 at 7:32 AM, Liu Ying <Ying.Liu@freescale.com> wrote:

> This patch adds at24c512b eeprom support.
> The datasheet of at24c512b can be found at:
> http://www.alldatasheet.com/datasheet-pdf/pdf/
> 256958/ATMEL/AT24C512B-TH-B.html
>
> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>

Arnd Bergmann is the misc maintainer, route this by him.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] misc/at24: Add at24c512b eeprom support
  2013-01-23 12:24   ` Linus Walleij
@ 2013-01-23 12:50     ` Wolfram Sang
  -1 siblings, 0 replies; 28+ messages in thread
From: Wolfram Sang @ 2013-01-23 12:50 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Liu Ying, Arnd Bergmann, grant.likely, rob.herring, rob, linux,
	shawn.guo, s.hauer, linux-doc, linux-arm-kernel, linux-i2c,
	liu.y.victor

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

On Wed, Jan 23, 2013 at 01:24:52PM +0100, Linus Walleij wrote:
> On Wed, Jan 23, 2013 at 7:32 AM, Liu Ying <Ying.Liu@freescale.com> wrote:
> 
> > This patch adds at24c512b eeprom support.
> > The datasheet of at24c512b can be found at:
> > http://www.alldatasheet.com/datasheet-pdf/pdf/
> > 256958/ATMEL/AT24C512B-TH-B.html
> >
> > Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
> 
> Arnd Bergmann is the misc maintainer, route this by him.

I usually take at24 patches via my I2C tree.

But not this one, though. The 512b can equally use the 512 entry. The
devicetree should contain both entries, the 512 one as a fallback. (And
the vendor is not "at24"!)

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/2] misc/at24: Add at24c512b eeprom support
@ 2013-01-23 12:50     ` Wolfram Sang
  0 siblings, 0 replies; 28+ messages in thread
From: Wolfram Sang @ 2013-01-23 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 23, 2013 at 01:24:52PM +0100, Linus Walleij wrote:
> On Wed, Jan 23, 2013 at 7:32 AM, Liu Ying <Ying.Liu@freescale.com> wrote:
> 
> > This patch adds at24c512b eeprom support.
> > The datasheet of at24c512b can be found at:
> > http://www.alldatasheet.com/datasheet-pdf/pdf/
> > 256958/ATMEL/AT24C512B-TH-B.html
> >
> > Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
> 
> Arnd Bergmann is the misc maintainer, route this by him.

I usually take at24 patches via my I2C tree.

But not this one, though. The 512b can equally use the 512 entry. The
devicetree should contain both entries, the 512 one as a fallback. (And
the vendor is not "at24"!)

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130123/86f5b0b3/attachment.sig>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] misc/at24: Add at24c512b eeprom support
  2013-01-23 12:50     ` Wolfram Sang
@ 2013-01-23 13:40       ` Liu Ying
  -1 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23 13:40 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linus Walleij, Liu Ying, Arnd Bergmann, grant.likely,
	rob.herring, rob, linux, shawn.guo, s.hauer, linux-doc,
	linux-arm-kernel, linux-i2c

2013/1/23 Wolfram Sang <w.sang@pengutronix.de>:
> On Wed, Jan 23, 2013 at 01:24:52PM +0100, Linus Walleij wrote:
>> On Wed, Jan 23, 2013 at 7:32 AM, Liu Ying <Ying.Liu@freescale.com> wrote:
>>
>> > This patch adds at24c512b eeprom support.
>> > The datasheet of at24c512b can be found at:
>> > http://www.alldatasheet.com/datasheet-pdf/pdf/
>> > 256958/ATMEL/AT24C512B-TH-B.html
>> >
>> > Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
>>
>> Arnd Bergmann is the misc maintainer, route this by him.
>
> I usually take at24 patches via my I2C tree.
>
> But not this one, though. The 512b can equally use the 512 entry. The
> devicetree should contain both entries, the 512 one as a fallback. (And
> the vendor is not "at24"!)

There are some difference between 24c512 and 24c512b about the system
reset procedure, according to the two devices' spec:
24c512b:(a) Create a start bit condition, (b)clock 9 cycles, (c)
create another start bit followed by stop bit condition.
24c512:(a) Clock up to 9 cycles, (b) look for SDA high in each cycle
while SCL is high and then, (c) create a start condition as SDA is
high.
Could this be a reason to add an entry for 24c512b?

About the vendor name, I took the at24c32 node in
arch/arm/boot/dts/imx28-evk.dts as a reference:

                                at24@51 {
                                        compatible = "at24,24c32";
                                        pagesize = <32>;
                                        reg = <0x51>;
                                };

Now, I think the correct vendor name should be "at" or "atmel".

Thanks.

>
> Regards,
>
>    Wolfram
>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |



-- 
Best Regards,
Liu Ying

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/2] misc/at24: Add at24c512b eeprom support
@ 2013-01-23 13:40       ` Liu Ying
  0 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23 13:40 UTC (permalink / raw)
  To: linux-arm-kernel

2013/1/23 Wolfram Sang <w.sang@pengutronix.de>:
> On Wed, Jan 23, 2013 at 01:24:52PM +0100, Linus Walleij wrote:
>> On Wed, Jan 23, 2013 at 7:32 AM, Liu Ying <Ying.Liu@freescale.com> wrote:
>>
>> > This patch adds at24c512b eeprom support.
>> > The datasheet of at24c512b can be found at:
>> > http://www.alldatasheet.com/datasheet-pdf/pdf/
>> > 256958/ATMEL/AT24C512B-TH-B.html
>> >
>> > Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
>>
>> Arnd Bergmann is the misc maintainer, route this by him.
>
> I usually take at24 patches via my I2C tree.
>
> But not this one, though. The 512b can equally use the 512 entry. The
> devicetree should contain both entries, the 512 one as a fallback. (And
> the vendor is not "at24"!)

There are some difference between 24c512 and 24c512b about the system
reset procedure, according to the two devices' spec:
24c512b:(a) Create a start bit condition, (b)clock 9 cycles, (c)
create another start bit followed by stop bit condition.
24c512:(a) Clock up to 9 cycles, (b) look for SDA high in each cycle
while SCL is high and then, (c) create a start condition as SDA is
high.
Could this be a reason to add an entry for 24c512b?

About the vendor name, I took the at24c32 node in
arch/arm/boot/dts/imx28-evk.dts as a reference:

                                at24 at 51 {
                                        compatible = "at24,24c32";
                                        pagesize = <32>;
                                        reg = <0x51>;
                                };

Now, I think the correct vendor name should be "at" or "atmel".

Thanks.

>
> Regards,
>
>    Wolfram
>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |



-- 
Best Regards,
Liu Ying

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] misc/at24: Add at24c512b eeprom support
  2013-01-23 13:40       ` Liu Ying
@ 2013-01-23 13:49           ` Wolfram Sang
  -1 siblings, 0 replies; 28+ messages in thread
From: Wolfram Sang @ 2013-01-23 13:49 UTC (permalink / raw)
  To: Liu Ying
  Cc: Linus Walleij, Liu Ying, Arnd Bergmann,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, rob-VoJi6FS/r0vR7s880joybQ,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, shawn.guo-QSEj5FYQhm4dnm+yROfE0A,
	s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]

Hi,

> There are some difference between 24c512 and 24c512b about the system
> reset procedure, according to the two devices' spec:
> 24c512b:(a) Create a start bit condition, (b)clock 9 cycles, (c)
> create another start bit followed by stop bit condition.
> 24c512:(a) Clock up to 9 cycles, (b) look for SDA high in each cycle
> while SCL is high and then, (c) create a start condition as SDA is
> high.
> Could this be a reason to add an entry for 24c512b?

Since the entries in at24_ids[] are the same, no. If they would differ,
that is a reason.

> Now, I think the correct vendor name should be "at" or "atmel".

"atmel" would be better, but the MX28EVK doesn't even have an I2C eeprom
by default IIRC? But that is unrelated to your patch.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/2] misc/at24: Add at24c512b eeprom support
@ 2013-01-23 13:49           ` Wolfram Sang
  0 siblings, 0 replies; 28+ messages in thread
From: Wolfram Sang @ 2013-01-23 13:49 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

> There are some difference between 24c512 and 24c512b about the system
> reset procedure, according to the two devices' spec:
> 24c512b:(a) Create a start bit condition, (b)clock 9 cycles, (c)
> create another start bit followed by stop bit condition.
> 24c512:(a) Clock up to 9 cycles, (b) look for SDA high in each cycle
> while SCL is high and then, (c) create a start condition as SDA is
> high.
> Could this be a reason to add an entry for 24c512b?

Since the entries in at24_ids[] are the same, no. If they would differ,
that is a reason.

> Now, I think the correct vendor name should be "at" or "atmel".

"atmel" would be better, but the MX28EVK doesn't even have an I2C eeprom
by default IIRC? But that is unrelated to your patch.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130123/dab379ec/attachment.sig>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] misc/at24: Add at24c512b eeprom support
  2013-01-23 13:49           ` Wolfram Sang
@ 2013-01-23 14:08             ` Liu Ying
  -1 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23 14:08 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linus Walleij, Liu Ying, Arnd Bergmann, grant.likely,
	rob.herring, rob, linux, shawn.guo, s.hauer, linux-doc,
	linux-arm-kernel, linux-i2c

2013/1/23 Wolfram Sang <w.sang@pengutronix.de>:
> Hi,
>
>> There are some difference between 24c512 and 24c512b about the system
>> reset procedure, according to the two devices' spec:
>> 24c512b:(a) Create a start bit condition, (b)clock 9 cycles, (c)
>> create another start bit followed by stop bit condition.
>> 24c512:(a) Clock up to 9 cycles, (b) look for SDA high in each cycle
>> while SCL is high and then, (c) create a start condition as SDA is
>> high.
>> Could this be a reason to add an entry for 24c512b?
>
> Since the entries in at24_ids[] are the same, no. If they would differ,
> that is a reason.

The names of the two entries are not the same, one is "24c512", the
other is "24c512b".
My original idea to add the new entry is to count on the name
difference to do different system reset operations.

>
>> Now, I think the correct vendor name should be "at" or "atmel".
>
> "atmel" would be better, but the MX28EVK doesn't even have an I2C eeprom
> by default IIRC? But that is unrelated to your patch.
The commit message of the patch which adds 24c32 support for MX28EVK
tells that "mx28evk has a free slot U50 that can be used to populate
an I2C EEPROM.".

>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |



-- 
Best Regards,
Liu Ying

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/2] misc/at24: Add at24c512b eeprom support
@ 2013-01-23 14:08             ` Liu Ying
  0 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23 14:08 UTC (permalink / raw)
  To: linux-arm-kernel

2013/1/23 Wolfram Sang <w.sang@pengutronix.de>:
> Hi,
>
>> There are some difference between 24c512 and 24c512b about the system
>> reset procedure, according to the two devices' spec:
>> 24c512b:(a) Create a start bit condition, (b)clock 9 cycles, (c)
>> create another start bit followed by stop bit condition.
>> 24c512:(a) Clock up to 9 cycles, (b) look for SDA high in each cycle
>> while SCL is high and then, (c) create a start condition as SDA is
>> high.
>> Could this be a reason to add an entry for 24c512b?
>
> Since the entries in at24_ids[] are the same, no. If they would differ,
> that is a reason.

The names of the two entries are not the same, one is "24c512", the
other is "24c512b".
My original idea to add the new entry is to count on the name
difference to do different system reset operations.

>
>> Now, I think the correct vendor name should be "at" or "atmel".
>
> "atmel" would be better, but the MX28EVK doesn't even have an I2C eeprom
> by default IIRC? But that is unrelated to your patch.
The commit message of the patch which adds 24c32 support for MX28EVK
tells that "mx28evk has a free slot U50 that can be used to populate
an I2C EEPROM.".

>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |



-- 
Best Regards,
Liu Ying

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] misc/at24: Add at24c512b eeprom support
  2013-01-23 14:08             ` Liu Ying
@ 2013-01-23 14:14                 ` Wolfram Sang
  -1 siblings, 0 replies; 28+ messages in thread
From: Wolfram Sang @ 2013-01-23 14:14 UTC (permalink / raw)
  To: Liu Ying
  Cc: Linus Walleij, Liu Ying, Arnd Bergmann,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, rob-VoJi6FS/r0vR7s880joybQ,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, shawn.guo-QSEj5FYQhm4dnm+yROfE0A,
	s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]


> The names of the two entries are not the same, one is "24c512", the
> other is "24c512b".

I do understand that. There are TONS of 24c512 variants out there.

> My original idea to add the new entry is to count on the name
> difference to do different system reset operations.

Your devicetree may have both names, but at24 doesn't need it since
there is no code involved handling the difference.

> The commit message of the patch which adds 24c32 support for MX28EVK
> tells that "mx28evk has a free slot U50 that can be used to populate
> an I2C EEPROM.".

I do know that, too. You can put other things there, too. But well, not
worth the hazzle...

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/2] misc/at24: Add at24c512b eeprom support
@ 2013-01-23 14:14                 ` Wolfram Sang
  0 siblings, 0 replies; 28+ messages in thread
From: Wolfram Sang @ 2013-01-23 14:14 UTC (permalink / raw)
  To: linux-arm-kernel


> The names of the two entries are not the same, one is "24c512", the
> other is "24c512b".

I do understand that. There are TONS of 24c512 variants out there.

> My original idea to add the new entry is to count on the name
> difference to do different system reset operations.

Your devicetree may have both names, but at24 doesn't need it since
there is no code involved handling the difference.

> The commit message of the patch which adds 24c32 support for MX28EVK
> tells that "mx28evk has a free slot U50 that can be used to populate
> an I2C EEPROM.".

I do know that, too. You can put other things there, too. But well, not
worth the hazzle...

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130123/f1167045/attachment.sig>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] misc/at24: Add at24c512b eeprom support
  2013-01-23 14:14                 ` Wolfram Sang
@ 2013-01-23 14:23                   ` Liu Ying
  -1 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23 14:23 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linus Walleij, Liu Ying, Arnd Bergmann, grant.likely,
	rob.herring, rob, linux, shawn.guo, s.hauer, linux-doc,
	linux-arm-kernel, linux-i2c

2013/1/23 Wolfram Sang <w.sang@pengutronix.de>:
>
>> The names of the two entries are not the same, one is "24c512", the
>> other is "24c512b".
>
> I do understand that. There are TONS of 24c512 variants out there.
>
>> My original idea to add the new entry is to count on the name
>> difference to do different system reset operations.
>
> Your devicetree may have both names, but at24 doesn't need it since
> there is no code involved handling the difference.
>
>> The commit message of the patch which adds 24c32 support for MX28EVK
>> tells that "mx28evk has a free slot U50 that can be used to populate
>> an I2C EEPROM.".
>
> I do know that, too. You can put other things there, too. But well, not
> worth the hazzle...

I accept your comments on this patch. Thanks for your review!

>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAlD/8FUACgkQD27XaX1/VRsmGgCeJZCaByj0gw37lr753wxW0npY
> 06oAn0WAmYiUabRNgQ6eAmcO7Ky3f1U4
> =JSKP
> -----END PGP SIGNATURE-----
>



-- 
Best Regards,
Liu Ying

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/2] misc/at24: Add at24c512b eeprom support
@ 2013-01-23 14:23                   ` Liu Ying
  0 siblings, 0 replies; 28+ messages in thread
From: Liu Ying @ 2013-01-23 14:23 UTC (permalink / raw)
  To: linux-arm-kernel

2013/1/23 Wolfram Sang <w.sang@pengutronix.de>:
>
>> The names of the two entries are not the same, one is "24c512", the
>> other is "24c512b".
>
> I do understand that. There are TONS of 24c512 variants out there.
>
>> My original idea to add the new entry is to count on the name
>> difference to do different system reset operations.
>
> Your devicetree may have both names, but at24 doesn't need it since
> there is no code involved handling the difference.
>
>> The commit message of the patch which adds 24c32 support for MX28EVK
>> tells that "mx28evk has a free slot U50 that can be used to populate
>> an I2C EEPROM.".
>
> I do know that, too. You can put other things there, too. But well, not
> worth the hazzle...

I accept your comments on this patch. Thanks for your review!

>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAlD/8FUACgkQD27XaX1/VRsmGgCeJZCaByj0gw37lr753wxW0npY
> 06oAn0WAmYiUabRNgQ6eAmcO7Ky3f1U4
> =JSKP
> -----END PGP SIGNATURE-----
>



-- 
Best Regards,
Liu Ying

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] misc/at24: Add at24c512b eeprom support
  2013-01-23 12:50     ` Wolfram Sang
@ 2013-01-24 14:41       ` Linus Walleij
  -1 siblings, 0 replies; 28+ messages in thread
From: Linus Walleij @ 2013-01-24 14:41 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Liu Ying, Arnd Bergmann, grant.likely, rob.herring, rob, linux,
	shawn.guo, s.hauer, linux-doc, linux-arm-kernel, linux-i2c,
	liu.y.victor

On Wed, Jan 23, 2013 at 1:50 PM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> On Wed, Jan 23, 2013 at 01:24:52PM +0100, Linus Walleij wrote:
>> On Wed, Jan 23, 2013 at 7:32 AM, Liu Ying <Ying.Liu@freescale.com> wrote:
>>
>> > This patch adds at24c512b eeprom support.
>> > The datasheet of at24c512b can be found at:
>> > http://www.alldatasheet.com/datasheet-pdf/pdf/
>> > 256958/ATMEL/AT24C512B-TH-B.html
>> >
>> > Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
>>
>> Arnd Bergmann is the misc maintainer, route this by him.
>
> I usually take at24 patches via my I2C tree.

Oh I didn't mean he'd merge it, I meant route it by him as
in "let him have a look at it" :-)

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/2] misc/at24: Add at24c512b eeprom support
@ 2013-01-24 14:41       ` Linus Walleij
  0 siblings, 0 replies; 28+ messages in thread
From: Linus Walleij @ 2013-01-24 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 23, 2013 at 1:50 PM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> On Wed, Jan 23, 2013 at 01:24:52PM +0100, Linus Walleij wrote:
>> On Wed, Jan 23, 2013 at 7:32 AM, Liu Ying <Ying.Liu@freescale.com> wrote:
>>
>> > This patch adds at24c512b eeprom support.
>> > The datasheet of at24c512b can be found at:
>> > http://www.alldatasheet.com/datasheet-pdf/pdf/
>> > 256958/ATMEL/AT24C512B-TH-B.html
>> >
>> > Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
>>
>> Arnd Bergmann is the misc maintainer, route this by him.
>
> I usually take at24 patches via my I2C tree.

Oh I didn't mean he'd merge it, I meant route it by him as
in "let him have a look at it" :-)

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2013-01-24 14:41 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-23  6:32 [PATCH 1/2] misc/at24: Add at24c512b eeprom support Liu Ying
2013-01-23  6:32 ` Liu Ying
     [not found] ` <1358922764-31654-1-git-send-email-Ying.Liu-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2013-01-23  6:32   ` [PATCH 2/2] ARM: dts: imx51-babbage: " Liu Ying
2013-01-23  6:32     ` Liu Ying
2013-01-23  7:30     ` Sascha Hauer
2013-01-23  7:30       ` Sascha Hauer
2013-01-23  7:51       ` Liu Ying
2013-01-23  7:51         ` Liu Ying
     [not found]         ` <CA+8Hj80ceGEUtzfvvEuH7ZftWGydzd9pHK_FxfE59WBxOst4rQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-23  7:55           ` Sascha Hauer
2013-01-23  7:55             ` Sascha Hauer
2013-01-23  7:59             ` Liu Ying
2013-01-23  7:59               ` Liu Ying
2013-01-23 12:24 ` [PATCH 1/2] misc/at24: " Linus Walleij
2013-01-23 12:24   ` Linus Walleij
2013-01-23 12:50   ` Wolfram Sang
2013-01-23 12:50     ` Wolfram Sang
2013-01-23 13:40     ` Liu Ying
2013-01-23 13:40       ` Liu Ying
     [not found]       ` <CA+8Hj80=Mk1gMSC9gcRT_XPFrEdRxifaB9FNMtkn3BkUkv9bGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-23 13:49         ` Wolfram Sang
2013-01-23 13:49           ` Wolfram Sang
2013-01-23 14:08           ` Liu Ying
2013-01-23 14:08             ` Liu Ying
     [not found]             ` <CA+8Hj83n+pC+a6bYOOH1b61DTqSjpKsxyKDgDL2pCRKxTq4EXg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-23 14:14               ` Wolfram Sang
2013-01-23 14:14                 ` Wolfram Sang
2013-01-23 14:23                 ` Liu Ying
2013-01-23 14:23                   ` Liu Ying
2013-01-24 14:41     ` Linus Walleij
2013-01-24 14:41       ` Linus Walleij

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.