<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/misc/eeprom/at25.c, branch linux-7.1.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-27T14:55:45+00:00</updated>
<entry>
<title>eeprom: at25: expose JEDEC ID via sysfs</title>
<updated>2026-01-27T14:55:45+00:00</updated>
<author>
<name>Patrick Wicki</name>
<email>patrick.wicki@siemens.com</email>
</author>
<published>2026-01-20T13:06:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=62bb2054f9e84ec89c416d4558dbd574c54beddf'/>
<id>urn:sha1:62bb2054f9e84ec89c416d4558dbd574c54beddf</id>
<content type='text'>
Return the raw JEDEC ID bytes as returned by the RDID command, even for
variations that have the bytes in reverse order. This way we can avoid
ambiguity if the manufacturer ever releases a new chip that returns them
according to standard.

Signed-off-by: Patrick Wicki &lt;patrick.wicki@siemens.com&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
Tested-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
Link: https://patch.msgid.link/20260120130603.1066559-2-patrick@subset.ch
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>eeprom: at25: add support for Infineon Cypress QSN FRAMs</title>
<updated>2026-01-27T14:55:45+00:00</updated>
<author>
<name>Patrick Wicki</name>
<email>patrick.wicki@siemens.com</email>
</author>
<published>2026-01-20T13:06:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3fcd9a0fbb7dfbad3caa5057054d21b903157079'/>
<id>urn:sha1:3fcd9a0fbb7dfbad3caa5057054d21b903157079</id>
<content type='text'>
Add support for Infineon Cypress CY15****QSN FRAM chips.
Unlike the QN variants these chips have an 8 byte JEDEC ID.

The layout of the serial number matches that of already supported chips
like the CY15B204QN, so make the read-out unconditional.

Tested with the CY15B204QSN. According to Infineon datasheets, all QSN
variants appear to share a consistent pattern so the size should be
correctly detected based on the density bits in the ID:

CY15B201QSN: 0x00 00 00 00 06 82 54 40, density_id:  8: 1Mb
CY15B102QSN: 0x00 00 00 00 06 82 51 48, density_id:  9: 2Mb
CY15B204QSN: 0x00 00 00 00 06 82 54 50, density_id: 10: 4Mb
CY15V108QSN: 0x00 00 00 00 06 82 52 58, density_id: 11: 8Mb

Signed-off-by: Patrick Wicki &lt;patrick.wicki@siemens.com&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
Tested-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
Link: https://patch.msgid.link/20260120130603.1066559-1-patrick@subset.ch
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>eeprom: at25: fram: Fix chip range in comment</title>
<updated>2025-10-22T05:59:57+00:00</updated>
<author>
<name>Alexander Sverdlin</name>
<email>alexander.sverdlin@siemens.com</email>
</author>
<published>2025-10-20T14:58:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4c987d67b31f93ac88f4be6dfec6a169997fc2c8'/>
<id>urn:sha1:4c987d67b31f93ac88f4be6dfec6a169997fc2c8</id>
<content type='text'>
The first chip supported by the commented code is CY15B102QN, fix the
copy-paste error.

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
Link: https://patch.msgid.link/20251020145858.1598599-1-alexander.sverdlin@siemens.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>eeprom: at25: make FRAM device ID error message more precise</title>
<updated>2025-09-06T13:58:23+00:00</updated>
<author>
<name>Markus Heidelberg</name>
<email>m.heidelberg@cab.de</email>
</author>
<published>2025-08-15T09:58:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dfb962e214788aa5f6dfe9f2bd4a482294533e3e'/>
<id>urn:sha1:dfb962e214788aa5f6dfe9f2bd4a482294533e3e</id>
<content type='text'>
The error description would be wrong in case the "size" Devicetree
property is missing for an FRAM without device ID.

Signed-off-by: Markus Heidelberg &lt;m.heidelberg@cab.de&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@gmail.com&gt;
Link: https://lore.kernel.org/r/20250815095839.4219-4-m.heidelberg@cab.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>eeprom: at25: support Cypress FRAMs without device ID</title>
<updated>2025-09-06T13:58:23+00:00</updated>
<author>
<name>Markus Heidelberg</name>
<email>m.heidelberg@cab.de</email>
</author>
<published>2025-08-15T09:58:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1b434ed000cd474f074e62e8ab876f87449bb4ac'/>
<id>urn:sha1:1b434ed000cd474f074e62e8ab876f87449bb4ac</id>
<content type='text'>
Not all FRAM chips have a device ID and implement the corresponding read
command. For such chips this led to the following error on module
loading:

    at25 spi2.0: Error: no Cypress FRAM (id 00)

The device ID contains the memory size, so devices without this ID are
supported now by setting the size manually in Devicetree using the
"size" property.

Tested with FM25L16B and "size = &lt;2048&gt;;":

    at25 spi2.0: 2 KByte fm25 fram, pagesize 4096

According to Infineon/Cypress datasheets, these FRAMs have a device ID:

    FM25V01A
    FM25V02A
    FM25V05
    FM25V10
    FM25V20A
    FM25VN10

but these do not:

    FM25040B
    FM25640B
    FM25C160B
    FM25CL64B
    FM25L04B
    FM25L16B
    FM25W256

So all "FM25V*" FRAMs and only these have a device ID. The letter after
"FM25" (V/C/L/W) only describes the voltage range, though.

Link: https://lore.kernel.org/all/20250401133148.38330-1-m.heidelberg@cab.de/
Signed-off-by: Markus Heidelberg &lt;m.heidelberg@cab.de&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@gmail.com&gt;
Link: https://lore.kernel.org/r/20250815095839.4219-3-m.heidelberg@cab.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>eeprom: at25: convert to spi-mem API</title>
<updated>2025-07-16T12:24:52+00:00</updated>
<author>
<name>Alexander Sverdlin</name>
<email>alexander.sverdlin@siemens.com</email>
</author>
<published>2025-07-02T22:28:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8ad6249c51d0ea41ad75d770178d8e4efdbc9948'/>
<id>urn:sha1:8ad6249c51d0ea41ad75d770178d8e4efdbc9948</id>
<content type='text'>
Replace the RAW SPI accesses with spi-mem API. The latter will fall back to
RAW SPI accesses if spi-mem callbacks are not implemented by a controller
driver.

Notable advantages:
- read function now allocates a bounce buffer for SPI DMA compatibility,
  similar to write function;
- the driver can now be used in conjunction with SPI controller drivers
  providing spi-mem API only, e.g. spi-nxp-fspi.
- during the initial probe the driver polls busy/ready status bit for 25ms
  instead of giving up instantly and hoping that the FW didn't write the
  EEPROM

Notes:
- mutex_lock() has been dropped from fm25_aux_read() because the latter is
  only being called in probe phase and therefore cannot race with
  at25_ee_read() or at25_ee_write()

Quick 4KB block size test with CY15B102Q 256KB F-RAM over spi_omap2_mcspi
driver (no spi-mem ops provided, fallback to raw SPI inside spi-mem):

OP	| throughput, KB/s	| change
--------+-----------------------+-------
write	| 1717.847 -&gt; 1656.684	| -3.6%
read	| 1115.868 -&gt; 1059.367	| -5.1%

The lower throughtput probably comes from the 3 messages per SPI transfer
inside spi-mem instead of hand-crafted 2 messages per transfer in the
former at25 code. However, if the raw SPI access is not preserved, then
the driver doesn't grow from the lines-of-code perspective and subjectively
could be considered even a bit simpler.

Higher performance impact on the read operation could be explained by the
newly introduced bounce buffer in read operation. I didn't find any
explanation or guarantee, why would a bounce buffer be not needed on the
read side, so I assume it's a pure luck that nobody read EEPROM into
some variable on stack on an architecture where kernel stack would be
not DMA-able.

Cc: Michael Walle &lt;mwalle@kernel.org&gt;
Cc: Hui Wang &lt;hui.wang@canonical.com&gt;
Link: https://lore.kernel.org/all/28ab8b72afee1af59b628f7389f0d7f5@kernel.org/
Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
Link: https://lore.kernel.org/r/20250702222823.864803-1-alexander.sverdlin@siemens.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>eeprom: at25: fram: Detect and support inside-out chip variants</title>
<updated>2025-07-16T12:17:57+00:00</updated>
<author>
<name>Alexander Sverdlin</name>
<email>alexander.sverdlin@siemens.com</email>
</author>
<published>2025-07-02T22:29:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf4d2ce1eded8de0a678f5e473322eef84adb5e8'/>
<id>urn:sha1:cf4d2ce1eded8de0a678f5e473322eef84adb5e8</id>
<content type='text'>
Infineon seems to be confused with the order ID bytes should be presented
by the FRAM chips and to be on the safe side they offer chips which are
either JEDEC conform or the full opposite of the latter.

Examples of the chips which present ID bytes in the reversed order are:
CY15B102QN
CY15B204QSN

Let's support them nevertheless. Except reversing the ID bytes, they also
have quite different density encoding even across EXCELON(tm) family.

The patch has been tested with the above two chips.

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
Link: https://lore.kernel.org/r/20250702222927.864875-1-alexander.sverdlin@siemens.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>eeprom: at25: drop unneeded MODULE_ALIAS</title>
<updated>2024-04-29T09:14:00+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2024-04-14T15:49:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7c28f964b7febc00edfced0f499630005a800643'/>
<id>urn:sha1:7c28f964b7febc00edfced0f499630005a800643</id>
<content type='text'>
The ID table already has respective entry and MODULE_DEVICE_TABLE and
creates proper alias for SPI driver.  Having another MODULE_ALIAS causes
the alias to be duplicated.

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Link: https://lore.kernel.org/r/20240414154957.127113-1-krzk@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>eeprom: at25: Convert to use fwnode_device_is_compatible()</title>
<updated>2023-01-20T11:05:01+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-01-19T17:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0eb468b6e1c56b55c01bfc588f9a519ac15b4ff5'/>
<id>urn:sha1:0eb468b6e1c56b55c01bfc588f9a519ac15b4ff5</id>
<content type='text'>
Replace open coded fwnode_device_is_compatible() in the driver.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230119175742.77723-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>eeprom: at25: Rework buggy read splitting</title>
<updated>2022-06-27T14:21:05+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2022-06-21T13:22:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=19e506b317497a8c2b3ec2f12314d355d2f00ad0'/>
<id>urn:sha1:19e506b317497a8c2b3ec2f12314d355d2f00ad0</id>
<content type='text'>
The recent change to split reads into chunks has several problems:
  1. If an SPI controller has no transfer size limit, max_chunk is
     SIZE_MAX, and num_msgs becomes zero, causing no data to be read
     into the buffer, and exposing the original contents of the buffer
     to userspace,
  2. If the requested read size is not a multiple of the maximum
     transfer size, the last transfer reads too much data, overflowing
     the buffer,
  3. The loop logic differs from the write case.

Fix the above by:
  1. Keeping track of the number of bytes that are still to be
     transferred, instead of precalculating the number of messages and
     keeping track of the number of bytes tranfered,
  2. Calculating the transfer size of each individual message, taking
     into account the number of bytes left,
  3. Switching from a "while"-loop to a "do-while"-loop, and renaming
     "msg_count" to "segment".

While at it, drop the superfluous cast from "unsigned int" to "unsigned
int", also from at25_ee_write(), where it was probably copied from.

Fixes: 0a35780c755ccec0 ("eeprom: at25: Split reads into chunks and cap write size")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/7ae260778d2c08986348ea48ce02ef148100e088.1655817534.git.geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
