public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] eeprom: at25: support Cypress FRAMs without device ID
@ 2025-04-01 13:30 Markus Heidelberg
  2025-04-01 13:30 ` [RFC PATCH 1/2] " Markus Heidelberg
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Markus Heidelberg @ 2025-04-01 13:30 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Christian Eggers
  Cc: Markus Heidelberg, Jiri Prchal, linux-kernel, devicetree

Hello,

this patch series is marked as RFC because I'm unsure if it
should rather be implemented with an adaption in this binding:

  Documentation/devicetree/bindings/eeprom/at25.yaml

Currently supported FRAMs use compatible="cypress,fm25","atmel,at25" in
Devicetree, the memory size is read from its device ID.
For FRAMs without device ID this is not possible, so the "size" property
has to be set manually as it is done for EEPROMs.

I had a few solutions for implementation in mind, but opted for the
simplest one as base for discussion:

- Use the existing "compatible" string and additionally set "size". Only
  read the device ID if "size" is not set.

  But this way there is already the problem that "size" is required for
  FRAMs without device ID, but I cannot specify that in the binding
  because of the reused "compatible" string.

Other ideas that came to mind:

- Add "cypress,fm25l16b" (chip is named FM25L16B) and define "size" as
  required property. Use that instead of "cypress,fm25".

  According to Documentation/devicetree/bindings/writing-bindings.rst
  this might even be necessary regarding this statement:

    "DO add new compatibles in case there are new features or bugs."

  The existing "cypress,fm25" ("FM25" is not the real name of a chip,
  but the common prefix) also doesn't seem chosen right regarding this
  statement:

    "DO make ‘compatible’ properties specific. DON'T use wildcards in
    compatible strings."

- Add a boolean property "no-device-id" to the existing "compatible"
  string and in case this boolean is set, define "size" as required.

  This seems a bit awkward at first sight. Also, would this really solve
  the above mentioned problem with specification of the binding?

Bye!

Markus Heidelberg (2):
  eeprom: at25: support Cypress FRAMs without device ID
  eeprom: at25: make FRAM device ID error message more precise

 drivers/misc/eeprom/at25.c | 42 ++++++++++++++++++++++----------------
 1 file changed, 24 insertions(+), 18 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-04-03 11:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox