From: Andrei Simion <andrei.simion@microchip.com>
To: <bgolaszewski@baylibre.com>
Cc: <claudiu.beznea@tuxon.dev>, <arnd@arndb.de>,
<gregkh@linuxfoundation.org>, <linux-i2c@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] eeprom: at24: avoid adjusting offset for 24AA025E{48, 64}
Date: Mon, 17 Jun 2024 09:53:26 +0300 [thread overview]
Message-ID: <20240617065326.17010-1-andrei.simion@microchip.com> (raw)
In-Reply-To: <CAMpxmJWrXSU8i1O8+dwuSLksNsiGXRWGEKCb93kVYFt1b06n1Q@mail.gmail.com>
On Tue, Apr 13, 2021 at 1:03 PM <Claudiu.Beznea@microchip.com> wrote:
>
> On 12.04.2021 21:29, Bartosz Golaszewski wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> >
> > On Mon, Apr 12, 2021 at 9:42 AM <Claudiu.Beznea@microchip.com> wrote:
> >>
> >> On 07.04.2021 21:37, Bartosz Golaszewski wrote:
> >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> >>>
> >>> On Fri, Apr 2, 2021 at 3:24 PM Claudiu Beznea
> >>> <claudiu.beznea@microchip.com> wrote:
> >>>>
> >>>> Some EEPROMs could be used only for MAC storage. In this case the
> >>>> EEPROM areas where MACs resides could be modeled as NVMEM cells
> >>>> (directly via DT bindings) such that the already available networking
> >>>> infrastructure to read properly the MAC addresses (via
> >>>> of_get_mac_address()). Add "atmel,24mac02e4", "atmel,24mac02e4"
> >>>> compatible for the usage w/ 24AA025E{48, 64} type of EEPROMs and adapt
> >>>> the driver to not do offset adjustments.
> >>>>
> >>>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> >>>> ---
> >>>>
> >>>> Hi Bartosz,
> >>>>
> >>>> For the previously available compatibles the offset adjustment is done
> >>>> (probably for compatibility w/ old DT bindings?). In my scenario 24AA025E48
> >>>> is used in setup with macb driver which is calling of_get_mac_address()
> >>>> to get the proper NVMEM cell in EEPROM where the MAC resides and read
> >>>> directly from there. We modeled the EEPROM and NVMEM cell in DT as
> >>>> follows:
> >>>>
> >>>> &i2cnode {
> >>>> // ...
> >>>> eeprom0: eeprom0@52 {
> >>>> compatible = "atmel,24mac02e4";
> >
> > Can you point me to the datasheet for this model, google only directs
> > me to this very email.
>
> This is the datasheet:
> https://ww1.microchip.com/downloads/en/DeviceDoc/24AA02E48-24AA025E48-24AA02E64-24AA025E64-Data-Sheet-20002124H.pdf
>
> >
> >>From the device tree it looks as if it was just a regular 24c02 EEPROM
> > with MAC hard-coded at 250-255 bytes, is that right?
>
> Yes, the MAC is hard-coded at 250. But using "24c02" compatible will
> involve the offset adjustment in the driver (let me know if I missed
> something).
>
>
> Something seems to be wrong. There's no offset adjustment for "24c02".
> Have you tried running i2cdump on the EEPROM's address? Do you see the
> MAC?
>
Hi,
I'm trying to revive this thread.
Yes, I see the MAC using i2cdump for both: eeprom0@52 and eeprom1@53 from 0xfa.
PS: I will send a new series to include these new compatible into DT binding document, all rebased on the current rc.
Best Regards,
Andrei Simion
> Bartosz
prev parent reply other threads:[~2024-06-17 6:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-02 13:24 [PATCH] eeprom: at24: avoid adjusting offset for 24AA025E{48, 64} Claudiu Beznea
2021-04-07 18:37 ` Bartosz Golaszewski
2021-04-12 7:42 ` Claudiu.Beznea
2021-04-12 18:29 ` Bartosz Golaszewski
2021-04-13 11:03 ` Claudiu.Beznea
2021-04-16 14:13 ` Bartosz Golaszewski
2024-06-17 6:53 ` Andrei Simion [this message]
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=20240617065326.17010-1-andrei.simion@microchip.com \
--to=andrei.simion@microchip.com \
--cc=arnd@arndb.de \
--cc=bgolaszewski@baylibre.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=gregkh@linuxfoundation.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).