All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Eugen.Hristev@microchip.com>
To: <michael@walle.cc>
Cc: <hs@denx.de>, <rasmus.villemoes@prevas.dk>, <u-boot@lists.denx.de>
Subject: Re: [PATCH 1/2] misc: i2c_eeprom: add support for microchip 24aa025e48
Date: Tue, 10 May 2022 07:44:59 +0000	[thread overview]
Message-ID: <5986757f-97a3-3f63-088a-c53cbe098a9e@microchip.com> (raw)
In-Reply-To: <20220502092425.2429380-1-michael@walle.cc>

On 5/2/22 12:24 PM, Michael Walle wrote:
>> 24aa025e48 is a variant of 24aa02e48 that has a page size of 16 bytes.
>>
>> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
>> ---
>>   drivers/misc/i2c_eeprom.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c
>> index 89a450d0f8..265c1d0591 100644
>> --- a/drivers/misc/i2c_eeprom.c
>> +++ b/drivers/misc/i2c_eeprom.c
>> @@ -176,6 +176,13 @@ static const struct i2c_eeprom_drv_data mc24aa02e48_data = {
>>        .offset_len = 1,
>>   };
>>
>> +static const struct i2c_eeprom_drv_data mc24aa025e48_data = {
>> +     .size = 256,
>> +     .pagesize = 16,
>> +     .addr_offset_mask = 0,
>> +     .offset_len = 1,
>> +};
>> +
>>   static const struct i2c_eeprom_drv_data atmel24c01a_data = {
>>        .size = 128,
>>        .pagesize = 8,
>> @@ -264,6 +271,7 @@ static const struct i2c_eeprom_drv_data atmel24c512_data = {
>>   static const struct udevice_id i2c_eeprom_std_ids[] = {
>>        { .compatible = "i2c-eeprom", (ulong)&eeprom_data },
>>        { .compatible = "microchip,24aa02e48", (ulong)&mc24aa02e48_data },
>> +     { .compatible = "microchip,24aa025e48", (ulong)&mc24aa025e48_data },
> 
> As far as I can see, this is not a documented compatible string in the
> device tree bindings, which means u-boot is diverting again from its linux
> counterpart. (The same goes for the 24aa02e48).

Hello Michael,

I know. But I thought it was the best way rather than reusing one 
existing compatible and forcing the page size. I can do that if you feel 
it's better.

I have to check how Linux is handling this eeprom as it's using the 
at24c32 compatible which is incorrect. It may be that the at24c32 
compatible with additional properties makes the driver behaving as if 
it's a mc23aa025e48 . Which is not really right... (as the idea above)

Heiko, your thoughts ?

Eugen

> 
> -michael
> 
>>        { .compatible = "atmel,24c01", (ulong)&atmel24c01a_data },
>>        { .compatible = "atmel,24c01a", (ulong)&atmel24c01a_data },
>>        { .compatible = "atmel,24c02", (ulong)&atmel24c02_data },


  reply	other threads:[~2022-05-10  7:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 14:22 [PATCH 1/2] misc: i2c_eeprom: add support for microchip 24aa025e48 Eugen Hristev
2022-04-29 14:22 ` [PATCH 2/2] ARM: dts: at91: sam9x60ek: fix eeprom compatible Eugen Hristev
2022-05-02  4:30 ` [PATCH 1/2] misc: i2c_eeprom: add support for microchip 24aa025e48 Heiko Schocher
2022-05-02  9:24 ` Michael Walle
2022-05-10  7:44   ` Eugen.Hristev [this message]
2022-05-10  8:46     ` Heiko Schocher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5986757f-97a3-3f63-088a-c53cbe098a9e@microchip.com \
    --to=eugen.hristev@microchip.com \
    --cc=hs@denx.de \
    --cc=michael@walle.cc \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.