public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Markus Heidelberg <M.Heidelberg@cab.de>
To: Christian Eggers <ceggers@arri.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: Thu, 3 Apr 2025 11:48:39 +0000	[thread overview]
Message-ID: <Z-51jz_A73rHq1w9@KAN23-025> (raw)
In-Reply-To: <2293994.vFx2qVVIhK@n9w6sw14>

On Wed, Apr 02, 2025 at 12:49:24PM +0200, Christian Eggers wrote:
> 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.

The "read device ID" command works without address, so it can be used to
determine the memory size and thus the address length.

If the response to this command is similar for various devices/vendors
(in consideration of the variable length manufacturer ID using the 0x7F
continuation code), auto-detection should be possible without having to
know the manufacturer in advance and without having to interpret it from
the read ID.

But the maximum possible response length increases by one byte with each
new manufacturer bank of up to 126 manufacturers added to the JEDEC ID
list.

> 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...

I feel the same that this wouldn't be worth it, but I guess it's
avoidable if further auto-detection should needed by someone.

Markus

      reply	other threads:[~2025-04-03 11:48 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
2025-04-03 11:48       ` Markus Heidelberg [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=Z-51jz_A73rHq1w9@KAN23-025 \
    --to=m.heidelberg@cab.de \
    --cc=arnd@arndb.de \
    --cc=ceggers@arri.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