From: Christian Eggers <ceggers@arri.de>
To: Markus Heidelberg <M.Heidelberg@cab.de>
Cc: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jiri Prchal <jiri.prchal@aksignal.cz>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [RFC PATCH 0/2] eeprom: at25: support Cypress FRAMs without device ID
Date: Wed, 2 Apr 2025 12:49:24 +0200 [thread overview]
Message-ID: <2293994.vFx2qVVIhK@n9w6sw14> (raw)
In-Reply-To: <Z-zr2oj-hD28ccy3@KAN23-025>
Hi Markus,
<disclaimer>I'm not maintaining the AT25 driver</disclaimer>
On Wednesday, 2 April 2025, 09:48:52 CEST, Markus Heidelberg wrote:
> Hi Christian,
>
> On Tue, Apr 01, 2025 at 03:45:14PM +0200, Christian Eggers wrote:
> >
> > I use the following FRAM device: Fujitsu mb85rs1mt.
> >
> > This FRAM is also not able to report its size (at least I didn't
> > try).
>
> According to the datasheet there is a device ID, but with a different
> response compared to Cypress FRAMs. It wouldn't work without modifying
> the current implementation.
>
> > I can use this FRAM with the following (Eeeprom) settings:
> >
> > compatible = "fujitsu,mb85rs1mt", "atmel,at25";
> > reg = <0>;
> > spi-max-frequency = <30000000>;
> > /* mode0, uncomment for mode3 */
> > /*spi-cpha;
> > spi-cpol;*/
> >
> > /* from the datasheet it seems that there is no page size for FRAM */
> > pagesize = <131072>;
> > size = <131072>;
> > address-width = <24>;
> >
> > Is this what you are looking for? Of course, the "type" attribute
> > reports "EEPROM" with this configuration, but my application don't care
> > about this.
>
> This is what I started with, but I thought there has to be a reason that
> EEPROM and FRAM are distinguished in the driver (at25 and nvmem core)
> and I wanted to do it right. If not relevant now, maybe in the future.
maybe the "EEPROM" protocol used by at24 (I2C) and at25 (SPI) EEPROMs is
not smart enough to provide really useful detection of device capabilities.
At least I remember that I2C eeproms of different sizes require a different
number of bytes for addressing. AFAIK, using a wrong number of addressing bytes
may accidentally overwrite data on the device. If this is the same for SPI
eeproms / FRAMs, reliable auto-detection may be impossible or require
at least knowing the vendor in advance.
Flash (MTD) devices provide much more powerful methods for enumerating the
device's geometry/capabilities than eeprom/fram. But even for ONFI there are
extra tables for vendor/device specific workarounds. I am not sure whether
adding such stuff for at24/at25 devices is really worth the trouble...
>
> Markus
>
regards,
Christian
next prev parent reply other threads:[~2025-04-02 10:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 13:30 [RFC PATCH 0/2] eeprom: at25: support Cypress FRAMs without device ID Markus Heidelberg
2025-04-01 13:30 ` [RFC PATCH 1/2] " Markus Heidelberg
2025-04-01 13:30 ` [RFC PATCH 2/2] eeprom: at25: make FRAM device ID error message more precise Markus Heidelberg
2025-04-01 13:45 ` [RFC PATCH 0/2] eeprom: at25: support Cypress FRAMs without device ID Christian Eggers
2025-04-02 7:48 ` Markus Heidelberg
2025-04-02 10:49 ` Christian Eggers [this message]
2025-04-03 11:48 ` Markus Heidelberg
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=2293994.vFx2qVVIhK@n9w6sw14 \
--to=ceggers@arri.de \
--cc=M.Heidelberg@cab.de \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jiri.prchal@aksignal.cz \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@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