RFC SPI-NOR/MTD addition
Get series with b4
b4 am [email protected]Versions newest first
- v8 RFC Latest16 patches 0 repliesNew
Patches in v8 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/16 | dm: mtd: Add dm mtd core opsdrivers/ include/ | +130 | 0 replies | |
| 2/16 | mtd: Add SPI-NOR core supportMakefile drivers/ drivers/ +3 more | +1047 | 0 replies | |
| 3/16 | mtd: spi-nor: Kconfig: Add MTD_SPI_NOR entrydrivers/ drivers/ | +16 | 0 replies | |
| 4/16 | mtd: spi-nor: Kconfig: Add MTD_SPI_NOR_USE_4K_SECTORSdrivers/ | +18 | 0 replies | |
| 5/16 | mtd: spi-nor: Kconfig: Add SPI_NOR_MISC entrydrivers/ | +6 | 0 replies | |
| 6/16 | mtd: spi-nor: Kconfig: Add SPI_NOR_MACRONIX entrydrivers/ | +5 | 0 replies | |
| 7/16 | mtd: spi-nor: Kconfig: Add SPI_NOR_SPANSION entrydrivers/ | +5 | 0 replies | |
| 8/16 | mtd: spi-nor: Kconfig: Add SPI_NOR_STMICRO entrydrivers/ | +5 | 0 replies | |
| 9/16 | mtd: spi-nor: Kconfig: Add SPI_NOR_SST entrydrivers/ | +5 | 0 replies | |
| 10/16 | mtd: spi-nor: Kconfig: Add SPI_NOR_WINBOND entrydrivers/ | +5 | 0 replies | |
| 11/16 | spi: Add spi_write_then_readdrivers/ include/ | +44 | 0 replies | |
| 12/16 | mtd: spi-nor: Add m25p80 driverdrivers/ drivers/ | +220 | 0 replies | |
| 13/16 | mtd: spi-nor: Kconfig: Add MTD_M25P80 entrydrivers/ | +17 | 0 replies | |
| 14/16 | mtd: spi-nor: Add zynq qspi driverdrivers/ drivers/ | +641 | 0 replies | |
| 15/16 | mtd: spi-nor: zynq_qspi: Kconfig: Add MTD_ZYNQdrivers/ | +9 | 0 replies | |
| 16/16 | mtd: spi-nor: Add 4-byte address width supportdrivers/ drivers/ include/ | +42 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.
Cover letter [U-Boot] [PATCH RFC v8 00/16] SPI-NOR/MTD addition
On-top-of u-boot-spi/next,
The previous series [1] [2] are added SPI-NOR on top of mtd/spi where it bypassing DM_SPI_FLASH and use the existing mtd core (which is non-dm), I feel this is moving in a reverse direction where adding new feature with the help of non-dm mtd core support and also few of the spi drivers are not fully dm-driven.
So this new design will keep the mtd/spi as it is and start adding spi-nor features separately. The idea here is to add the dm features
to MTD first and then add UCLASS_MTD spi-nor drivers so-that the commands are interfacing to spi-nor through dm-driven MTD core to spi-nor.
And this could also be a generic solutions for all MTD flash's like NAND, NOR and etc.
About this series:
------------------------------
cmd_sf.c
------------------------------
mtd-uclass
-------------------------------
SPI-NOR Core
-------------------------------m25p80.c zynq_qspi
-------------------------------
spi-uclass SPI NOR chip
-------------------------------
spi drivers
-------------------------------
SPI NOR chip
-------------------------------
drivers/mtd/spi-nor/
- Add dm mtd operations
- spi-nor.c: Add basic SPI-NOR core like erase/read/write ops and lock's will add later
- m25p80.c: spi-nor to spi divers interface layer drivers/spi-nor
- zynq_qspi.c: zynq qspi spi-nor controller driver.
CONFIG_SPI_FLASH_BAR and DUAL_FLASH code shouldn't be part of spi-nor core as these are strictly controller features. and 4-byte address width in spi-nor will handle > 16MiB flash devices.
What need to be add:
1) 'sf probe' interface:
Need to probe the chips in two directions A) one is for direct spi-nor driver (zynq_qspi here) and other B) one is for interface driver(m25p80.c). the later is bit tricky as it will also probe the UCLASS_SPI.
A)
qspi1: spi at e000d000 {
compatible = "xlnx,zynq-qspi-1.0";
status = "disabled";
}; B)
spi0: spi at e0006000 {
compatible = "xlnx,zynq-spi-r1p6";
status = "disabled";
}; alias {
mtd0 = &qspi1;
spi1 = &spi0;};
2) sf env:
same as 1)
Any ideas about this probe interface are 'Welcome'
[1] http://lists.denx.de/pipermail/u-boot/2016-March/249286.html
[2] http://lists.denx.de/pipermail/u-boot/2016-February/245418.html
Jagan Teki (16):
dm: mtd: Add dm mtd core ops
mtd: Add SPI-NOR core support
mtd: spi-nor: Kconfig: Add MTD_SPI_NOR entry
mtd: spi-nor: Kconfig: Add MTD_SPI_NOR_USE_4K_SECTORS
mtd: spi-nor: Kconfig: Add SPI_NOR_MISC entry
mtd: spi-nor: Kconfig: Add SPI_NOR_MACRONIX entry
mtd: spi-nor: Kconfig: Add SPI_NOR_SPANSION entry
mtd: spi-nor: Kconfig: Add SPI_NOR_STMICRO entry
mtd: spi-nor: Kconfig: Add SPI_NOR_SST entry
mtd: spi-nor: Kconfig: Add SPI_NOR_WINBOND entry
spi: Add spi_write_then_read
mtd: spi-nor: Add m25p80 driver
mtd: spi-nor: Kconfig: Add MTD_M25P80 entry
mtd: spi-nor: Add zynq qspi driver
mtd: spi-nor: zynq_qspi: Kconfig: Add MTD_ZYNQ
mtd: spi-nor: Add 4-byte address width support
Makefile | 1 + drivers/mtd/Kconfig | 2 + drivers/mtd/mtd-uclass.c | 72 ++++ drivers/mtd/spi-nor/Kconfig | 89 +++++ drivers/mtd/spi-nor/Makefile | 15 + drivers/mtd/spi-nor/m25p80.c | 218 ++++++++++++ drivers/mtd/spi-nor/spi-nor-ids.c | 176 ++++++++++ drivers/mtd/spi-nor/spi-nor.c | 685 ++++++++++++++++++++++++++++++++++++++ drivers/mtd/spi-nor/zynq_qspi.c | 638 +++++++++++++++++++++++++++++++++++ drivers/spi/spi-uclass.c | 24 ++ include/linux/err.h | 5 + include/linux/mtd/mtd.h | 58 ++++ include/linux/mtd/spi-nor.h | 211 ++++++++++++ include/spi.h | 20 ++ 14 files changed, 2214 insertions(+) create mode 100644 drivers/mtd/spi-nor/Kconfig create mode 100644 drivers/mtd/spi-nor/Makefile create mode 100644 drivers/mtd/spi-nor/m25p80.c create mode 100644 drivers/mtd/spi-nor/spi-nor-ids.c create mode 100644 drivers/mtd/spi-nor/spi-nor.c create mode 100644 drivers/mtd/spi-nor/zynq_qspi.c create mode 100644 include/linux/mtd/spi-nor.h
Signature · 1 line
2.7.4