summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi-nor
Commit message (Collapse)AuthorAgeFilesLines
* mtd: spi-nor: fix format specifier in debug messageAhmad Fatoum2024-02-011-2/+2
| | | | | | | | | | | | | The type size_t is to be printed with the %zu modifier as it's not necessarily typedef'ed as unsigned long, even if for barebox purposes, the sizeof(size_t) is always equal to sizeof(ulong). Building the dw-ospi-nor driver for 32-bit warns about this, so fix that. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240131230347.1747216-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: add support for Winbond w25q256jwmMarco Felsch2024-01-021-0/+2
| | | | | | | | | Add entry for Winbond w25q256jwm. Flags are aligned with the Linux spi-nor/winbond driver. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20240102091837.250238-1-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: add support for Winbond w25q512nwqSascha Hauer2023-11-211-0/+1
| | | | | | | Add entry for the Winbond w25q512nwq. Link: https://lore.barebox.org/20231110130259.2228089-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: Add Synopsys DesignWare Octal SPI driverJules Maselbas2023-08-143-0/+936
| | | | Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
* mtd: spi-nor: move SPI_NOR_MAX_ADDR_WIDTH define to spi-nor.hJules Maselbas2023-08-141-1/+0
| | | | | | | Move the SPI_NOR_MAX_ADDR_WIDTH define into spi-nor.h to be used by drivers. Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
* mtd: spi-nor: enable quad-write for is25lp01gJules Maselbas2023-08-141-1/+1
| | | | Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
* mtd: spi-nor: enable {dual,quad}-read and quad-write for w25q256Clement Leger2023-08-141-1/+2
| | | | | | | The w25q256 flash supports these modes. Signed-off-by: Clement Leger <cleger@kalray.eu> Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
* mtd: spi-nor: Add SPI_NOR_QUAD_WRITE hwcapJules Maselbas2023-08-141-0/+8
| | | | Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
* mtd: spi-nor: cadence: fix typesAhmad Fatoum2023-06-131-5/+3
| | | | | | | | | | | The JH7100 for which we have basic support has 64-bit CPUs and a cadence quad SPI controller. Building the driver for that CPU would result in a couple of warning due to casting 64-bit pointers to 32-bit integers. Fix this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230612130239.1087599-16-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: add MODULE_DEVICE_TABLE markersAhmad Fatoum2023-06-131-0/+1
| | | | | | | | | | | | | | | | Syncing device trees with Linux upstream can lead to breakage, when the device trees are switched to newer bindings, which are not yet supported in barebox. To make it easier to spot such issues, we want to start applying some heuristics to flag possibly problematic DT changes. One step towards being able to do that is to know what nodes barebox actually consumes. Most of the nodes have a compatible entry, which is matched by an array of of_device_id, so let's have MODULE_DEVICE_TABLE point at it for future extraction. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230612125908.1087340-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* spi: remove flash_platform_data supportMarco Felsch2023-03-171-1/+0
| | | | | | | | | Drop the non-dt platform data since the last user was removed by commit 1266831db8 ("ARM: OMAP: PCM051: Remove spi platform data"). Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20230228-v2023-02-0-topic-flexspi-v2-1-3d33126d2434@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct driver_d to driverSascha Hauer2023-01-101-1/+1
| | | | | | | | | | | The '_d' suffix was originally meant to distinguish barebox struct names from Linux struct names. struct driver doesn't exist in Linux, so we can rename it and remove the meaningless suffix. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct device_d to deviceSascha Hauer2023-01-102-6/+6
| | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename device_d::device_node to device_d::of_nodeSascha Hauer2023-01-102-6/+6
| | | | | | | | | | | | | | | | | | | | Linux struct device has the member of_node for the device_node pointer. Rename this in barebox accordingly to minimize the necessary changes when porting Linux code. This was done with the semantic patch: @@ struct device_d E; @@ - E.device_node + E.of_node @@ struct device_d *E; @@ - E->device_node + E->of_node Plus some manual adjustments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: add support for ISSI IS25WP256Ahmad Fatoum2022-03-281-0/+2
| | | | | | | | This flash chip is emulated by QEMU for the HiFive Unleashed. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20220319072410.1310723-3-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: mtd: spi-nor: Add Micron MT25QU256A 1V8 SPI flashJoacim Zetterling2022-03-021-0/+1
| | | | | | | | | | | | | Add the Micron MT25QU256A 1V8 SPI flash to the mtd/spi-nor driver. The flash has the same name as the 3V variant but as an other manufacturer ID (20 bb 19 instead of 20 ba 19). This SPI/QSPI flash is used on i.e. NXP IMX8MN-EVK board. Signed-off-by: Joacim Zetterling <joacim.zetterling@westermo.com> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220301132254.343387-1-joacim.zetterling@westermo.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: migrate "GPL-2.0" license identifiers to SPDX 2.0Roland Hieber2021-11-224-4/+4
| | | | | | | | | | "GPL-2.0-only" was introduced in SPDX 2.0, and the old identifier "GPL-2.0" is now considered deprecated; see <https://spdx.org/licenses>. Fixes: 28f4a6a4df76f0f1581d (2021-10-30, "drivers: add missing SPDX-License-Identifier") Signed-off-by: Roland Hieber <rhi@pengutronix.de> Link: https://lore.barebox.org/20211117113851.2022669-2-rhi@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/spdx'Sascha Hauer2021-11-154-16/+4
|\
| * drivers: add missing SPDX-License-IdentifierAhmad Fatoum2021-11-014-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the suitable SPDX-License-Identifier to all files in drivers/ that previously lacked one. To aid manual inspection, following heuristics can be used: * No changes outside of comments/whitespace: git show -U0 HEAD | rg -v '^(@@|diff|index)|[-+]([-+]|//|#|[\s/]\*)' * -or-later come in pairs: git show --inter-hunk-context=19 HEAD | \ perl -0777 -F'/^@/gm' -ne 'for (@F) { @m = /later/g; print if @m & 1 }' Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211030175632.2276077-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: remove NULLness check for IOMEM()Ahmad Fatoum2021-11-011-10/+0
|/ | | | | | | | | While ioremap can fail, IOMEM() in our identity-mapped barebox can't. Thus remove the never entered error branches. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211030175812.2276705-6-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: Add support for gd25q16Michael Olbrich2021-05-251-0/+1
| | | | | | | | | | | | The entry is imported from Linux v5.12. It can befound on new versions of the Boundary Devices i.MX6 Quad Nitrogen6x boards. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210520154929.25131-1-m.olbrich@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: fix possible overflow during mtd size multiplicationAhmad Fatoum2021-03-251-1/+1
| | | | | | | | | | | | LGTM[1] flags a couple of places where we write a 32-bit multiplication result into a 64-bit destination. While it might very well be that there are more places in need of fixing to support flashes bigger than 4G, fixing these issues is easy and reduces the noise. Do so. [1]: https://lgtm.com/projects/g/saschahauer/barebox/alerts/?mode=list Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: Make write support optionalSascha Hauer2020-12-111-0/+9
| | | | | | | Write support is optional with the CONFIG_MTD_WRITE option. Bail out early in the write functions to save some binary space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: rename class_dev to devSascha Hauer2020-11-091-1/+1
| | | | | | | | The mtds own device is named 'dev' in the Kernel whereas it's named 'class_dev' in barebox. Rename it to 'dev' for better compatilibility to the Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: Use classdev->parentSascha Hauer2020-11-091-1/+1
| | | | | | | | | | Instead of mtd->parent we can use mtd->classdev.parent which points to the same device. With this we can remove the 'parent' member of struct mtd_info. This member exists in the Linux kernel as well, but is of type struct mtd_info, so this is done as preparation to re-add mtd->parent with the same type as in Linux. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: Add underscore prefix to mtd hooksSascha Hauer2020-11-061-6/+6
| | | | | | | In the Kernel the mtd function hooks begin with an underscore. Do the same in barebox to be better comparable to the Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: Drop asynchronous erase supportSascha Hauer2020-11-061-4/+0
| | | | | | | asynchronous erase support is unused and also dropped from the Kernel, so remove it from barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: cadence: fix csqpi corruption in cqspi_set_protocolIan Abbott2020-09-181-1/+5
| | | | | | | | | | | | cqspi_set_protocol() sets `inst_width`, `addr_width` and `data_width` for the previous chip-select in `cqspi->current_cs`, but that is initially set to -1, leading to corruption of other `cqspi->` members. Change it to set `inst_width`, `addr_width` and `data_width` for the chip-select associated with the `nor` parameter. Fixes: 5085d2ef3fbf ("mtd: spi-nor: cadence: add cqspi_set_protocol") Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: Add support for cy15x104qSascha Hauer2020-04-141-0/+3
| | | | | | | The Cypress cy15b104q and cy15v104q are 4Mbit serial SPI F-RAM devices. Add support for them to the spi-nor driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: Add support for en25qh64Ulrich Ölmann2019-12-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | This is a port of Linux kernel commit | commit 30a2c8aa3c520d54bcaf3015ca8141b0156448b1 | Author: Roger Pueyo Centelles <roger.pueyo@guifi.net> | Date: Thu Feb 7 20:09:35 2019 +0100 | | mtd: spi-nor: Add support for en25qh64 | | 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: Roger Pueyo Centelles <roger.pueyo@guifi.net> | Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com> | Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: Add support for is25lp01gClement Leger2019-11-251-0/+2
| | | | | | | Add ISSI 128Mb nor flash. Signed-off-by: Clement Leger <cleger@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mtd'Sascha Hauer2019-09-121-0/+7
|\
| * mtd: spi-nor: Import missing Micron devicesAndrey Smirnov2019-09-091-0/+3
| | | | | | | | | | | | | | | | Import entries for n25q00a, mt25qu02g, mt25ql02g, supported by latest Linux kernel. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: spi-nor: Add support for s25fl128s0 s25fl128s1 flashes from LinuxDU HUANPENG2019-09-021-0/+4
| | | | | | | | | | | | | | These definitions are taken from Linux's spi-nor driver as of v5.2-rc4 Signed-off-by: DU HUANPENG <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: spi-nor: add support for sst26vf seriesOleksij Rempel2019-08-211-0/+25
| | | | | | | | | | | | | | | | Ported from linux-4.19-at91 linux4sam_6.1 and needed for SAMA5D27 SOM1 EK. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: spi-nor: add UNLOCK_GLOBAL_BLOCK supportOleksij Rempel2019-08-211-1/+24
|/ | | | | | | | Ported from linux-4.19-at91 linux4sam_6.1 and needed for SAMA5D27 SOM1 EK. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: fix page offset/remains calculation in spi_nor_writeBastian Krause2019-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | nor->write() simply adds the number of written bytes to the pointer given. Thus retval is incremented in each loop cycle for each spi_nor_write() call without ever resetting it. This leads to wrong page offset/remains calculations and an incorrect number of bytes written to retlen. This becomes apparant only if the calling function actually compares len and retlen (e.g. mtd_peb_write() ). Otherwise wrong data is written: $ memcpy -s /dev/prng -d prng_data 0 0 10k $ erase /dev/mtd0.mypart $ cp prng_data /dev/mtd0.mypart $ memcmp -s prng_data -d /dev/mtd0.mypart 0 0 memcmp returned "files differ" before, with this patch it returns "OK". Fixes: c8516869c4 ("spi: Extend the core to ease integration of SPI memory controllers") Signed-off-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: Add support for ISSI flashes from LinuxUwe Kleine-König2019-06-171-0/+21
| | | | | | | The definitions are taken from Linux's spi-nor driver as of v5.2-rc4. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/qspi'Sascha Hauer2019-05-102-279/+650
|\
| * mtd: spi-nor: Add support for more Macronix devicesSascha Hauer2019-05-081-0/+3
| | | | | | | | | | | | Add support for the Macronix mx66u51235f, mx66l1g45g and mx66l1g55g. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: spi-nor: provide default erase_sector implementationSteffen Trumtrar2019-05-081-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the Linux v4.4 patch commit c67cbb839da9cc2757eabfa128556db6a2baf160 Author: Brian Norris <computersforpeace@gmail.com> AuthorDate: Tue Nov 10 12:15:27 2015 -0800 Commit: Brian Norris <computersforpeace@gmail.com> CommitDate: Thu Nov 19 13:34:44 2015 -0800 mtd: spi-nor: provide default erase_sector implementation Some spi-nor drivers perform sector erase by duplicating their write_reg() command. Let's not require that the driver fill this out, and provide a default instead. Tested on m25p80.c and Medatek's MT8173 SPI NOR flash driver. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocolsSteffen Trumtrar2019-05-082-202/+500
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync the driver with Linux v4.12 and apply the patch commit cfc5604c488ccd17936b69008af0c9ae050f4a08 Author: Cyrille Pitchen <cyrille.pitchen@atmel.com> AuthorDate: Tue Apr 25 22:08:46 2017 +0200 Commit: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr> CommitDate: Mon May 15 21:56:17 2017 +0200 mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocols This patch changes the prototype of spi_nor_scan(): its 3rd parameter is replaced by a 'struct spi_nor_hwcaps' pointer, which tells the spi-nor framework about the actual hardware capabilities supported by the SPI controller and its driver. Besides, this patch also introduces a new 'struct spi_nor_flash_parameter' telling the spi-nor framework about the hardware capabilities supported by the SPI flash memory and the associated settings required to use those hardware caps. Then, to improve the readability of spi_nor_scan(), the discovery of the memory settings and the memory initialization are now split into two dedicated functions. 1 - spi_nor_init_params() The spi_nor_init_params() function is responsible for initializing the 'struct spi_nor_flash_parameter'. Currently this structure is filled with legacy values but further patches will allow to override some parameter values dynamically, for instance by reading the JESD216 Serial Flash Discoverable Parameter (SFDP) tables from the SPI memory. The spi_nor_init_params() function only deals with the hardware capabilities of the SPI flash memory: especially it doesn't care about the hardware capabilities supported by the SPI controller. 2 - spi_nor_setup() The second function is called once the 'struct spi_nor_flash_parameter' has been initialized by spi_nor_init_params(). With both 'struct spi_nor_flash_parameter' and 'struct spi_nor_hwcaps', the new argument of spi_nor_scan(), spi_nor_setup() computes the best match between hardware caps supported by both the (Q)SPI memory and controller hence selecting the relevant settings for (Fast) Read and Page Program operations. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: spi-nor: remove unused write_enable from write_regSteffen Trumtrar2019-05-082-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the Linux v4.2 commit: commit f9f3ce835ddce3c669eee869253105f88819888b Author: Jagan Teki <jteki@openedev.com> AuthorDate: Wed Aug 19 15:26:44 2015 +0530 Commit: Brian Norris <computersforpeace@gmail.com> CommitDate: Fri Sep 11 16:04:55 2015 -0700 mtd: spi-nor: Zap unneeded write_enable from write_reg The 'write_enable' argument is unused and unneeded, so remove it from the API. Signed-off-by: Jagan Teki <jteki@openedev.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Han Xu <han.xu@freescale.com> [Brian: fixed for nxp-spifi.c] Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * spi: Extend the core to ease integration of SPI memory controllersSteffen Trumtrar2019-05-081-23/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync with Linux v5.1-rc1. This is the barebox adoption of the commit commit c36ff266dc82f4ae797a6f3513c6ffa344f7f1c7 Author: Boris Brezillon <boris.brezillon@bootlin.com> Date: Thu Apr 26 18:18:14 2018 +0200 spi: Extend the core to ease integration of SPI memory controllers Some controllers are exposing high-level interfaces to access various kind of SPI memories. Unfortunately they do not fit in the current spi_controller model and usually have drivers placed in drivers/mtd/spi-nor which are only supporting SPI NORs and not SPI memories in general. This is an attempt at defining a SPI memory interface which works for all kinds of SPI memories (NORs, NANDs, SRAMs). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@exceet.de> Tested-by: Frieder Schrempf <frieder.schrempf@exceet.de> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: spi-nor: cadence: add cqspi_set_protocolSteffen Trumtrar2019-05-081-63/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | Sync up the driver with the original linux v4.7 driver version. As only Quad-SPI mode is/was supported, the function was not ported in the initial move to barebox. To make future synchronizations with the kernel driver easier, add this function and reorder the functions in the driver accordingly. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: spi-nor: add Winbond W25Q40BWAlexander Kurz2019-04-231-0/+1
|/ | | | | | | This 4MBit SPI chip can be found in Kindle Voyage devices Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: Add support for sst25wf040bYao Yuan2018-12-051-0/+1
| | | | | | | | Signed-off-by: Yuan Yao <yao.yuan@freescale.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> [Linux upstream commit: c887be71cc39] Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: Add support for sst25wf020aAlexis Ballier2018-12-051-0/+1
| | | | | | | | | | | | | | It is a 256KiB flash with 4 KiB erase sectors and 64KiB overlay blocks. This is the one available on Hardkernel's Odroid U3 shield. Signed-off-by: Alexis Ballier <aballier@gentoo.org> [Brian: seems like this does NOT require the usual SST_WRITE hacks] Signed-off-by: Brian Norris <computersforpeace@gmail.com> [Linux upstream commit: a1d97ef96e38] Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: Introduce dev_set_name()Andrey Smirnov2018-10-181-1/+1
| | | | | | | | Introduce dev_set_name() in order to hide implementation details of setting device's name so it'd be easier to change it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: spi-nor: add manufacturer IDs for ISSI and Winbondmichael grassmann2018-03-221-0/+4
| | | | | | | | | | This patch includes new NOR flash IDs to support flashes from the manufacturers ISSI and Winbond - ISSI IS25LP128-JBLA3 and IS25LP128-JBLE - Winbond W25Q128JVSIM Signed-off-by: michael grassmann <m.grassmann@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>