lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2759958.vuYhMxLoTh@n9w6sw14>
Date: Tue, 1 Apr 2025 15:45:14 +0200
From: Christian Eggers <ceggers@...i.de>
To: Arnd Bergmann <arnd@...db.de>, Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>, Rob Herring <robh@...nel.org>, Krzysztof
 Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Markus
 Heidelberg <m.heidelberg@....de>
CC: Markus Heidelberg <m.heidelberg@....de>, Jiri Prchal
	<jiri.prchal@...ignal.cz>, <linux-kernel@...r.kernel.org>,
	<devicetree@...r.kernel.org>
Subject: Re: [RFC PATCH 0/2] eeprom: at25: support Cypress FRAMs without device ID

Hi Markus,

I use the following FRAM device: Fujitsu mb85rs1mt. 

This FRAM is also not able to report its size (at least I didn't
try). 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.

regards,
Christian

On Tuesday, 1 April 2025, 15:30:46 CEST, Markus Heidelberg wrote:
> 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(-)
> 
> 





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ