- 27 6月, 2019 1 次提交
-
-
由 Liu Xiang 提交于
mtd: spi-nor: fix nor->addr_width when its value configured from SFDP does not match the actual width IS25LP256 gets BFPT_DWORD1_ADDRESS_BYTES_3_ONLY from BFPT table for address width. But in actual fact the flash can support 4-byte address. Use a post bfpt fixup hook to overwrite the address width advertised by the BFPT. Signed-off-by: NLiu Xiang <liu.xiang6@zte.com.cn> Reviewed-by: NVignesh Raghavendra <vigneshr@ti.com> Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
- 24 6月, 2019 1 次提交
-
-
由 Tudor Ambarus 提交于
SPI memory devices from different manufacturers have widely different configurations for Status, Control and Configuration registers. JEDEC 216C defines a new map for these common register bits and their functions, and describes how the individual bits may be accessed for a specific device. For the JEDEC 216B compliant flashes, we can partially deduce Status and Configuration registers functions by inspecting the 16th DWORD of BFPT. Older flashes that don't declare the SFDP tables (SPANSION FL512SAIFG1 311QQ063 A ©11 SPANSION) let the software decide how to interact with these registers. The commit dcb4b22e ("spi-nor: s25fl512s supports region locking") uncovered a probe error for s25fl512s, when the Quad Enable bit CR[1] was set to one in the bootloader. When this bit is one, only the Write Status (01h) command with two data byts may be used, the 01h command with one data byte is not recognized and hence the error when trying to clear the block protection bits. Fix the above by using the Write Status (01h) command with two data bytes when the Quad Enable bit is one. Backward compatibility should be fine. The newly introduced spi_nor_spansion_clear_sr_bp() is tightly coupled with the spansion_quad_enable() function. Both assume that the Write Register with 16 bits, together with the Read Configuration Register (35h) instructions are supported. Fixes: dcb4b22e ("spi-nor: s25fl512s supports region locking") Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Tested-by: NJonas Bonn <jonas@norrbonn.se> Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NVignesh Raghavendra <vigneshr@ti.com> Tested-by: NVignesh Raghavendra <vigneshr@ti.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
- 22 6月, 2019 2 次提交
-
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
由 Robert Marko 提交于
Testing done on Mikrotik Routerboard RB450Gx4 board under 4.14.119 and 4.19.43 kernels. The test board does not support Dual or Quad modes. Datasheet at: https://www.winbond.com/resource-files/w25q16jv%20spi%20revg%2003222018%20plus.pdfSigned-off-by: NRobert Marko <robimarko@gmail.com> [tudor.ambarus@microchip.com: w25q16jv-im/jm and w25q16jv-iq/jq have different jedec ids, fix flash name.] Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
- 07 6月, 2019 2 次提交
-
-
由 Flavio Suligoi 提交于
In case of SPI error during the reading of the nor Id, the probe fails without any error message related to the JEDEC Id reading procedure. Signed-off-by: NFlavio Suligoi <f.suligoi@asem.it> Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
由 Andrey Smirnov 提交于
Add an entry for Micron MT25QL02 which is a 3V variant of already supported MT25QU02. Testing was done on a ZII VF610 Dev Board (rev. B). Signed-off-by: NCory Tusar <cory.tusar@pid1solutions.com> Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Cc: Chris Healy <cphealy@gmail.com> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tudor Ambarus <tudor.ambarus@microchip.com> Cc: linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org [tudor.ambarus@microchip.com: order entry alphabetically, wrap to 80 chars limit] Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
- 01 4月, 2019 1 次提交
-
-
由 Jonas Bonn 提交于
Both the BP[0-2] bits and the TBPROT bit are supported on this chip. Tested and verified on a Cypress s25fl512s. Signed-off-by: NJonas Bonn <jonas@norrbonn.se> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
- 22 3月, 2019 2 次提交
-
-
由 Alexander Sverdlin 提交于
Erase types are sorted *smallest* type first, refer to spi_nor_sort_erase_mask(). Signed-off-by: NAlexander Sverdlin <alexander.sverdlin@nokia.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Geert Uytterhoeven 提交于
If identification of an SPI NOR FLASH fails, the JEDEC ID is printed, which is stored in the first 3 bytes of the ID read from the FLASH. However, the extended JEDEC ID, which is stored in the remaining bytes, also matters, as it is used for identification of some FLASH types. Print all (currently 6) ID bytes read to ease failure analysis and debugging. Suggested-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
- 21 2月, 2019 3 次提交
-
-
由 Roger Pueyo Centelles 提交于
The Eon EN25QH64 is a 64 Mbit SPI NOR flash memory chip found on recent wireless routers. Its 32, 128 and 256 Mbit siblings are already supported. Tested on a COMFAST CF-E120A v3 router board. Signed-off-by: NRoger Pueyo Centelles <roger.pueyo@guifi.net> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com>
-
由 Frieder Schrempf 提交于
This adds support for the Macronix MX25V8035F, a 8Mb SPI NOR chip. It is used on i.MX6UL/ULL SoMs by Kontron Electronics GmbH (N631x). It was only tested with a single data line connected, by writing and reading random data with dd. Signed-off-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com>
-
由 Frieder Schrempf 提交于
This adds support for the EON EN25Q80A, a 8Mb SPI NOR chip. It is used on i.MX6 boards by Kontron Electronics GmbH (N60xx, N61xx). It was only tested with a single data line connected, by writing and reading random data with dd. Signed-off-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com>
-
- 13 2月, 2019 1 次提交
-
-
由 Ahmet Celenk 提交于
Due to two different versions (S25FL128SAGBHI200 and S25FL128SAGBHI210) of the s25fl128s qspi memory, the single "s25fl128s" device entry must be split into two to match the correct JEDEC ID's for each version. Solves paging related issues of S25FL128SAGBHI210 chips. Signed-off-by: NAhmet Celenk <ahmet.celenk@procenne.com> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Marek Vasut <marek.vasut@gmail.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com>
-
- 10 2月, 2019 1 次提交
-
-
由 André Valentin 提交于
The mx25u3235f is found on the ZyXEL NBG6817 router, therefore add driver support for it so that we can upstream board support. Minimal tested with u-boot tools fw_printenv/fw_setenv on GlobalScale ESPRESSObin v5 board. Signed-off-by: NAndré Valentin <avalentin@marcant.net> [miyatsu@qq.com: Remove unnecessary white space.] Signed-off-by: NDing Tao <miyatsu@qq.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com>
-
- 23 1月, 2019 2 次提交
-
-
由 Sergei Shtylyov 提交于
Spansion S25FL512S ID is erroneously using 5-byte JEDEC ID, while the chip family ID is stored in the 6th byte. Due to using only 5-byte ID, it's also covering S25FS512S and now that we have added 6-byte ID for that chip, we can convert S25FL512S to using a proper 6-byte ID as well... Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <bbrezillon@kernel.org>
-
由 Sergei Shtylyov 提交于
Spansion S25FS512S flash is currently misdetected as S25FL512S since the latter uses 5-byte JEDEC ID, while the 6th ID byte (family ID) is different on those chips. Add the 6-byte S25FS512S ID before S25FL512S ID in order not to break the existing S25FS512S users. Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <bbrezillon@kernel.org>
-
- 17 1月, 2019 2 次提交
-
-
由 Yogesh Narayan Gaur 提交于
Add octal read flag for flash mt35xu512aba. This flash, mt35xu512aba, is only complaint to SFDP JESD216B and does not seem to support newer JESD216C standard that provides auto detection of Octal mode capabilities and opcodes. Therefore, this capability is manually added using new SPI_NOR_OCTAL_READ flag. Signed-off-by: NVignesh R <vigneshr@ti.com> Signed-off-by: NYogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <bbrezillon@kernel.org>
-
由 Yogesh Narayan Gaur 提交于
- Add opcodes for octal I/O commands * Read : 1-1-8 and 1-8-8 protocol * Write : 1-1-8 and 1-8-8 protocol * opcodes for 4-byte address mode command - Entry of macros in _convert_3to4_xxx function - Add flag SPI_NOR_OCTAL_READ specifying flash support octal read commands. This flag is required for flashes which didn't provides support for auto detection of Octal mode capabilities i.e. not seems to support newer JESD216C standard. Signed-off-by: NVignesh R <vigneshr@ti.com> Signed-off-by: NYogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <bbrezillon@kernel.org>
-
- 11 12月, 2018 19 次提交
-
-
由 Fabrizio Castro 提交于
The is25lp016d is found on the iwg23s from iWave, therefore add driver support for it so that we can upstream board support. Signed-off-by: NFabrizio Castro <fabrizio.castro@bp.renesas.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
由 Cyrille Pitchen 提交于
Add support for SFDP (JESD216B) 4-byte Address Instruction Table. This table is optional but when available, we parse it to get the 4-byte address op codes supported by the memory. Using these op codes is stateless as opposed to entering the 4-byte address mode or setting the Base Address Register (BAR). Flashes that have the 4BAIT table declared can now support SPINOR_OP_PP_1_1_4_4B and SPINOR_OP_PP_1_4_4_4B opcodes. Tested on MX25L25673G. Signed-off-by: NCyrille Pitchen <cyrille.pitchen@microchip.com> [tudor.ambarus@microchip.com: - rework erase and page program logic, - pass DMA-able buffer to spi_nor_read_sfdp(), - introduce SPI_NOR_HAS_4BAIT - various minor updates.] Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
由 Liu Xiang 提交于
The is25lp256 supports 4-byte opcodes and quad output. Suggested-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NLiu Xiang <liu.xiang6@zte.com.cn> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
由 Boris Brezillon 提交于
Add SPDX tags to replace the license boiler-plate and fix the MODULE_LICENSE() definition in spi-nor.c to match the license text (GPL v2). Interestingly, spi-nor.h and spi-nor.c do not use the same license (GPL v2+ for spi-nor.h, GPL v2 for spi-nor.c). Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
由 Boris Brezillon 提交于
No need to use an integer when the value is either true or false. Make it a boolean. Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
由 Boris Brezillon 提交于
Some functions called from spi_nor_scan() need a flash_info object. Let's assign nor->info early on to avoid passing info as an extra argument to each of these sub-functions. We also stop passing a flash_info object to set_4byte() and use nor->info directly. Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
由 Boris Brezillon 提交于
Reorganize the code to kill forward declarations of spi_nor_match_id() macronix_quad_enable() and spi_nor_hwcaps_read2cmd(). Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
由 Boris Brezillon 提交于
gcc should be smart enough to decide when inlining a function makes sense. Drop all inline specifiers. Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
由 Boris Brezillon 提交于
MX25L25635F and MX25L25635E share the same JEDEC-ID, but the F variant supports 4-byte opcodes while the E variant doesn't. We need a way to differentiate those 2 chips and set the SNOR_F_4B_OPCODES flag only for the F variant. Luckily, 4-byte opcode support is not the only difference: Fast Read 4-4-4 is only supported by the F variant, and this feature is advertised in the BFPT table. Use this to decide when to set the SNOR_F_4B_OPCODES flag. Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
由 Boris Brezillon 提交于
Experience has proven that SFDP tables are sometimes wrong, and parsing of these broken tables can lead to erroneous flash config. This leaves us 2 options: 1/ set the SPI_NOR_SKIP_SFDP flag and completely ignore SFDP parsing 2/ fix things at runtime While #1 should always work, it might imply extra work if most of the SFDP is correct. #2 has the benefit of keeping the generic SFDP parsing logic almost untouched while allowing SPI NOR manufacturer drivers to fix the broken bits. Add a spi_nor_fixups struct where we'll put all our fixup hooks, each of them being called at a different point in the scan process. We start a hook called just after the BFPT parsing to allow fixing up info extracted from the BFPT section. More hooks will be added if other sections need to be fixed. Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
由 Boris Brezillon 提交于
Some flash_info entries have the SPI_NOR_4B_OPCODES flag set to let the core know that the flash supports 4B opcode. While this solution works fine for id-based caps detection, it doesn't work that well when relying on SFDP-based caps detection. Let's add an SNOR_F_4B_OPCODES flag so that the SFDP parsing code can set it when appropriate. Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com>
-
由 huijin.park 提交于
The "params->size" is defined as "u64". And "info->sector_size" and "info->n_sectors" are defined as unsigned int and u16. Thus, u64 data might have strange data(loss data) if the result overflows an unsigned int. This patch casts "info->sector_size" to an u64. Signed-off-by: Nhuijin.park <huijin.park@samsung.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
由 Uwe Kleine-König 提交于
The datasheet is publically available at http://www.issi.com/WW/pdf/IS25LP032-064-128.pdf. The parameters fit to what is already available for IS25LP128/256. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
由 Yogesh Narayan Gaur 提交于
Add entry for mt35xu512aba Micron NOR flash. This flash is having uniform sector erase size of 128KB, have support of FSR(flag status register), flash size is 64MB and supports 4-byte commands. Signed-off-by: NYogesh Gaur <yogeshnarayan.gaur@nxp.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
由 Yogesh Narayan Gaur 提交于
Some MICRON related macros in spi-nor domain were ST. Rename entries related to STMicroelectronics under macro SNOR_MFR_ST. Added entry of MFR Id for Micron flashes, 0x002C. Signed-off-by: NYogesh Gaur <yogeshnarayan.gaur@nxp.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
gcc 7 with -Wimplicit-fallthrough raises: drivers/mtd/spi-nor/spi-nor.c: In function ‘set_4byte’: drivers/mtd/spi-nor/spi-nor.c:289:13: warning: this statement may fall through [-Wimplicit-fallthrough=] need_wren = true; ~~~~~~~~~~^~~~~~ drivers/mtd/spi-nor/spi-nor.c:290:2: note: here case SNOR_MFR_MACRONIX: ^~~~ Quiet the warning by marking the expected switch fall through. Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
由 Alexander Sverdlin 提交于
This chip supports dual and quad read and uniform 4K-byte erase. Signed-off-by: NAlexander Sverdlin <alexander.sverdlin@nokia.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
由 Robert Marko 提交于
Datasheet: http://www.winbond.com/resource-files/w25q128jv%20revf%2003272018%20plus.pdf Testing done on Mikrotik Routerboard wAP R board. It does not support Dual or Quad modes. Signed-off-by: NRobert Marko <robimarko@gmail.com> Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
The entire smpt array is initialized with data read from sfdp, there is no need to init it with zeroes before. Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
- 28 11月, 2018 1 次提交
-
-
由 Tudor Ambarus 提交于
BFPT advertises all the erase types supported by all the possible map configurations. Mask out the erase types that are not supported by the current map configuration. Backward compatibility test done on sst26vf064b. Fixes: b038e8e3 ("mtd: spi-nor: parse SFDP Sector Map Parameter Table") Reported-by: NAlexander Sverdlin <alexander.sverdlin@nokia.com> Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Tested-by: NAlexander Sverdlin <alexander.sverdlin@nokia.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
- 20 11月, 2018 1 次提交
-
-
There are uniform, non-uniform and flexible erase flash configurations. The non-uniform erase types, are the erase types that can _not_ erase the entire flash by their own. As the code was, in case flashes had flexible erase capabilities (support both uniform and non-uniform erase types in the same flash configuration) and supported multiple uniform erase type sizes, the code did not sort the uniform erase types, and could select a wrong erase type size. Sort the uniform erase mask in case of flexible erase flash configurations, in order to select the best uniform erase type size. Uniform, non-uniform, and flexible configurations with just a valid uniform erase type, are not affected by this change. Uniform erase tested on mx25l3273fm2i-08g and sst26vf064B-104i/sn. Non uniform erase tested on sst26vf064B-104i/sn. Fixes: 5390a8df ("mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories") Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
- 14 11月, 2018 1 次提交
-
-
spi_nor_read_raw() calls nor->read() which might be implemented by the m25p80 driver. m25p80 uses the spi-mem layer which requires DMA-able in/out buffers. Pass kmalloc'ed dma buffer to spi_nor_read_raw(). Fixes: b038e8e3 ("mtd: spi-nor: parse SFDP Sector Map Parameter Table") Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-