diff mbox series

[2/5] ARM: dts: at91: sam9x60-curiosity: Fix EEPROM type

Message ID 20230705201701.322372-3-post@lespocky.de
State Accepted
Delegated to: Eugen Hristev
Headers show
Series ARM: dts: at91: Improve sam9x60-curiosity | expand

Commit Message

Alexander Dahl July 5, 2023, 8:16 p.m. UTC
From: Alexander Dahl <ada@thorsis.com>

The user guide says it's a Microchip 24AA025E48 serial EEPROM, which is
a 2-Kbit I2C Serial EEPROM with EUI-48™ Identity.  This is the chip
actually populated on board EV40E67A rev 4.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
---

Notes:
    Sadly this did not fix the problem, that I could not access that
    eeprom through I²C.

 arch/arm/dts/at91-sam9x60_curiosity.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eugen Hristev July 6, 2023, 8:06 a.m. UTC | #1
On 7/5/23 23:16, Alexander Dahl wrote:
> From: Alexander Dahl <ada@thorsis.com>
> 
> The user guide says it's a Microchip 24AA025E48 serial EEPROM, which is
> a 2-Kbit I2C Serial EEPROM with EUI-48™ Identity.  This is the chip
> actually populated on board EV40E67A rev 4.
> 
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> ---
> 
> Notes:
>      Sadly this did not fix the problem, that I could not access that
>      eeprom through I²C.
> 
>   arch/arm/dts/at91-sam9x60_curiosity.dts | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/dts/at91-sam9x60_curiosity.dts b/arch/arm/dts/at91-sam9x60_curiosity.dts
> index d6ae3d648d..da5e19b66b 100644
> --- a/arch/arm/dts/at91-sam9x60_curiosity.dts
> +++ b/arch/arm/dts/at91-sam9x60_curiosity.dts
> @@ -31,7 +31,7 @@
>   					status = "okay";
>   
>   					eeprom@53 {
> -						compatible = "atmel,24c32";
> +						compatible = "atmel,24c02";
>   						reg = <0x53>;
>   						pagesize = <16>;
>   					};

Hello Alexander,

Thank you for the patch.

I remember I tested this a while back and I remember that the 24c32 
compatible is not correct for this eeprom.

I have this commit that fixed it for sam9x60ek board:

commit 5ae89b3cfe842ecbb5153a95e2e3ac404abe543c
Author: Eugen Hristev <eugen.hristev@collabora.com>
Date:   Thu May 26 17:04:56 2022 +0300

     ARM: dts: at91: sam9x60ek: fix eeprom compatible



24c32 should be 32K and 24c02 is 2K .

I remember that with 24c32 it works, but when you read , the offset 
changes, and then you read the same data multiple times, as if the 2K is 
multiplied to have the 32K the driver thinks it has.

Do you have any reasoning for wanting to change the compatible to 24c32 ?
I am trying to understand how you found that 24c32 is better.

Eugen
Eugen Hristev July 6, 2023, 8:12 a.m. UTC | #2
On 7/6/23 11:06, Eugen Hristev wrote:
> On 7/5/23 23:16, Alexander Dahl wrote:
>> From: Alexander Dahl <ada@thorsis.com>
>>
>> The user guide says it's a Microchip 24AA025E48 serial EEPROM, which is
>> a 2-Kbit I2C Serial EEPROM with EUI-48™ Identity.  This is the chip
>> actually populated on board EV40E67A rev 4.
>>
>> Signed-off-by: Alexander Dahl <ada@thorsis.com>
>> ---
>>
>> Notes:
>>      Sadly this did not fix the problem, that I could not access that
>>      eeprom through I²C.
>>
>>   arch/arm/dts/at91-sam9x60_curiosity.dts | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/dts/at91-sam9x60_curiosity.dts 
>> b/arch/arm/dts/at91-sam9x60_curiosity.dts
>> index d6ae3d648d..da5e19b66b 100644
>> --- a/arch/arm/dts/at91-sam9x60_curiosity.dts
>> +++ b/arch/arm/dts/at91-sam9x60_curiosity.dts
>> @@ -31,7 +31,7 @@
>>                       status = "okay";
>>                       eeprom@53 {
>> -                        compatible = "atmel,24c32";
>> +                        compatible = "atmel,24c02";
>>                           reg = <0x53>;
>>                           pagesize = <16>;
>>                       };
> 
> Hello Alexander,
> 
> Thank you for the patch.
> 
> I remember I tested this a while back and I remember that the 24c32 
> compatible is not correct for this eeprom.
> 
> I have this commit that fixed it for sam9x60ek board:
> 
> commit 5ae89b3cfe842ecbb5153a95e2e3ac404abe543c
> Author: Eugen Hristev <eugen.hristev@collabora.com>
> Date:   Thu May 26 17:04:56 2022 +0300
> 
>      ARM: dts: at91: sam9x60ek: fix eeprom compatible
> 
> 
> 
> 24c32 should be 32K and 24c02 is 2K .
> 
> I remember that with 24c32 it works, but when you read , the offset 
> changes, and then you read the same data multiple times, as if the 2K is 
> multiplied to have the 32K the driver thinks it has.
> 
> Do you have any reasoning for wanting to change the compatible to 24c32 ?
> I am trying to understand how you found that 24c32 is better.
> 
> Eugen
> 

I am sorry, I misread your patch. You are doing the exact opposite, 
which appears to be correct ! Ignore the noise.
Durai Manickam KR July 6, 2023, 8:30 a.m. UTC | #3
Hi Alexander,

I hope these changes are already present in upstream branch linux-6.4.y

On 06/07/23 01:46, Alexander Dahl wrote:
> [Some people who received this message don't often get email from post@lespocky.de. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> From: Alexander Dahl <ada@thorsis.com>
>
> The user guide says it's a Microchip 24AA025E48 serial EEPROM, which is
> a 2-Kbit I2C Serial EEPROM with EUI-48™ Identity.  This is the chip
> actually populated on board EV40E67A rev 4.
>
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> ---
>
> Notes:
>      Sadly this did not fix the problem, that I could not access that
>      eeprom through I²C.
>
>   arch/arm/dts/at91-sam9x60_curiosity.dts | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/dts/at91-sam9x60_curiosity.dts b/arch/arm/dts/at91-sam9x60_curiosity.dts
> index d6ae3d648d..da5e19b66b 100644
> --- a/arch/arm/dts/at91-sam9x60_curiosity.dts
> +++ b/arch/arm/dts/at91-sam9x60_curiosity.dts
> @@ -31,7 +31,7 @@
>                                          status = "okay";
>
>                                          eeprom@53 {
> -                                               compatible = "atmel,24c32";
> +                                               compatible = "atmel,24c02";
>                                                  reg = <0x53>;
>                                                  pagesize = <16>;
>                                          };
> --
> 2.30.2
>
Durai Manickam KR July 6, 2023, 9:08 a.m. UTC | #4
Sorry! misunderstood as kernel. Ignore this comment.

On 06/07/23 14:00, Durai Manickam KR wrote:
> Hi Alexander,
>
> I hope these changes are already present in upstream branch linux-6.4.y
>
> On 06/07/23 01:46, Alexander Dahl wrote:
>> [Some people who received this message don't often get email from 
>> post@lespocky.de. Learn why this is important at 
>> https://aka.ms/LearnAboutSenderIdentification ]
>>
>> EXTERNAL EMAIL: Do not click links or open attachments unless you 
>> know the content is safe
>>
>> From: Alexander Dahl <ada@thorsis.com>
>>
>> The user guide says it's a Microchip 24AA025E48 serial EEPROM, which is
>> a 2-Kbit I2C Serial EEPROM with EUI-48™ Identity.  This is the chip
>> actually populated on board EV40E67A rev 4.
>>
>> Signed-off-by: Alexander Dahl <ada@thorsis.com>
>> ---
>>
>> Notes:
>>      Sadly this did not fix the problem, that I could not access that
>>      eeprom through I²C.
>>
>>   arch/arm/dts/at91-sam9x60_curiosity.dts | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/dts/at91-sam9x60_curiosity.dts 
>> b/arch/arm/dts/at91-sam9x60_curiosity.dts
>> index d6ae3d648d..da5e19b66b 100644
>> --- a/arch/arm/dts/at91-sam9x60_curiosity.dts
>> +++ b/arch/arm/dts/at91-sam9x60_curiosity.dts
>> @@ -31,7 +31,7 @@
>>                                          status = "okay";
>>
>>                                          eeprom@53 {
>> -                                               compatible = 
>> "atmel,24c32";
>> +                                               compatible = 
>> "atmel,24c02";
>>                                                  reg = <0x53>;
>>                                                  pagesize = <16>;
>>                                          };
>> -- 
>> 2.30.2
>>
diff mbox series

Patch

diff --git a/arch/arm/dts/at91-sam9x60_curiosity.dts b/arch/arm/dts/at91-sam9x60_curiosity.dts
index d6ae3d648d..da5e19b66b 100644
--- a/arch/arm/dts/at91-sam9x60_curiosity.dts
+++ b/arch/arm/dts/at91-sam9x60_curiosity.dts
@@ -31,7 +31,7 @@ 
 					status = "okay";
 
 					eeprom@53 {
-						compatible = "atmel,24c32";
+						compatible = "atmel,24c02";
 						reg = <0x53>;
 						pagesize = <16>;
 					};