dm: Generic MTD Subsystem/SPI-NOR
Get series with b4
b4 am [email protected]Versions newest first
- v9 Latest21 patches 0 repliesNew
Patches in v9 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/21 | dm: mtd: Add dm mtd core opsdrivers/ include/ | +126 | 1 reply | |
| 2/21 | mtd: Add SPI-NOR core supportMakefile drivers/ drivers/ +3 more | +1046 | 1 reply | |
| 3/21 | mtd: spi-nor: Kconfig: Add MTD_SPI_NOR entrydrivers/ drivers/ | +16 | 1 reply | |
| 4/21 | mtd: spi-nor: Kconfig: Add MTD_SPI_NOR_USE_4K_SECTORSdrivers/ | +18 | 1 reply | |
| 5/21 | mtd: spi-nor: Kconfig: Add SPI_NOR_MISC entrydrivers/ | +6 | 1 reply | |
| 6/21 | mtd: spi-nor: Kconfig: Add SPI_NOR_MACRONIX entrydrivers/ | +5 | 1 reply | |
| 7/21 | mtd: spi-nor: Kconfig: Add SPI_NOR_SPANSION entrydrivers/ | +5 | 1 reply | |
| 8/21 | mtd: spi-nor: Kconfig: Add SPI_NOR_STMICRO entrydrivers/ | +5 | 1 reply | |
| 9/21 | mtd: spi-nor: Kconfig: Add SPI_NOR_SST entrydrivers/ | +5 | 1 reply | |
| 10/21 | mtd: spi-nor: Kconfig: Add SPI_NOR_WINBOND entrydrivers/ | +5 | 1 reply | |
| 11/21 | spi: Add spi_write_then_readdrivers/ include/ | +44 | 1 reply | |
| 12/21 | mtd: spi-nor: Add m25p80 driverdrivers/ drivers/ | +220 | 1 reply | |
| 13/21 | mtd: spi-nor: Kconfig: Add MTD_M25P80 entrydrivers/ | +17 | 1 reply | |
| 14/21 | mtd: spi-nor: Add zynq qspinor driverdrivers/ drivers/ | +644 | 0 replies | |
| 15/21 | mtd: spi-nor: zynq_qspi: Kconfig: Add MTD_ZYNQdrivers/ | +9 | 0 replies | |
| 16/21 | mtd: spi-nor: Add 4-byte addresswidth supportdrivers/ drivers/ include/ | +42 | 0 replies | |
| 17/21 | dm: mtd: Add uclass_driver.flagsdrivers/ | +1 | 1 reply | |
| 18/21 | dm: mtd: Add post_binddrivers/ | +3 | 1 reply | |
| 19/21 | cmd: Add mtd command supportcmd/ cmd/ cmd/ +3 more | +319 | 1 reply | |
| 20/21 | arm: dts: zynq: Add zynq-qspinor nodearch/ | +12 | 0 replies | |
| 21/21 | dm: zynq: microzed: Enable MTD/SPI-NORarch/ configs/ | +15 | 0 replies |
Reviews trailers per patch
14 of 21 patches have a Reviewed-by or Acked-by.
| Patch | Simon Glass |
|---|---|
| 1/21 | R-b |
| 2/21 | |
| 3/21 | R-b |
| 4/21 | R-b |
| 5/21 | R-b |
| 6/21 | R-b |
| 7/21 | R-b |
| 8/21 | R-b |
| 9/21 | R-b |
| 10/21 | R-b |
| 11/21 | R-b |
| 12/21 | |
| 13/21 | R-b |
| 14/21 | |
| 15/21 | |
| 16/21 | |
| 17/21 | R-b |
| 18/21 | R-b |
| 19/21 | R-b |
| 20/21 | |
| 21/21 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [U-Boot] [PATCH v9 00/21] dm: Generic MTD Subsystem/SPI-NOR
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.
Previous design series[3]: 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.
This series adding a new command 'mtd.c' which is common for all MTD devices SPI-NOR, SPI-NOR(master) and Parallel NOR with dm-driven.
SPI-NOR and Parallel NOR:
------------------------
------------------------------------
mtd.c
------------------------------------
mtd-uclass
------------------------------------
SPI-NOR Core CFI FLASH
------------------------------------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.
Current Status:
--------------
- SPI-NOR Controller design flow working, see Log
TODO:
----
- SPI-NOR with SPI bus
- Parallel NOR.
Log:
----
Zynq> mtd
mtd - MTD Sub-system
Usage:
mtd list - show list of MTD devices mtd info - show current MTD device info mtd probe devnum - probe the 'devnum' MTD device mtd erase offset len - erase 'len' bytes from 'offset' mtd write addr to len - write 'len' bytes to 'to' from 'addr' mtd read addr from len - read 'len' bytes from 'from' to 'addr'
Zynq> mtd list
MTD 1: spi-nor at e000d000
Zynq>
MTD 1: spi-nor at e000d000
Zynq> mtd list
MTD 1: spi-nor at e000d000
Zynq> mtd probe 0
failing to set MTD device 0
Zynq> mtd probe 1
SPI-NOR: detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB Zynq> mtd info
MTD Device 1: s25fl128s_64k
Page size: 256 B Erase size: 64 KiB Size: 16 MiB
Zynq> mtd list
MTD 1: spi-nor at e000d000 (active 1)
Zynq> mtd erase 0xE00000 0x100000
MTD: 1048576 bytes @ 0xe00000 Erased: OK
Zynq> mw.b 0x100 0xaa 0x100000
Zynq> mtd write 0x100 0xE00000 0x100000
device 0 offset 0xe00000, size 0x100000
MTD: 1048576 bytes @ 0xe00000 Written: OK
Zynq> mtd read 0x3000000 0xE00000 0x100000
device 0 offset 0xe00000, size 0x100000
MTD: 1048576 bytes @ 0xe00000 Read: OK
Zynq> cmp.b 0x3000000 0x100 0x100000
Total of 1048576 byte(s) were the same
Testing:
-------
$ git clone git://git.denx.de/u-boot-spi.git $ cd u-boot-spi $ git checkout -b mtd origin/mtd-working
[1] http://lists.denx.de/pipermail/u-boot/2016-March/249286.html
[2] http://lists.denx.de/pipermail/u-boot/2016-February/245418.html
[3] [PATCH RFC v8 00/16] SPI-NOR/MTD addition
Jagan Teki (21):
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 qspinor driver
mtd: spi-nor: zynq_qspi: Kconfig: Add MTD_ZYNQ
mtd: spi-nor: Add 4-byte addresswidth support
dm: mtd: Add uclass_driver.flags
dm: mtd: Add post_bind
cmd: Add mtd command support
arm: dts: zynq: Add zynq-qspinor node
dm: zynq: microzed: Enable MTD/SPI-NOR
Makefile | 1 + arch/arm/dts/zynq-7000.dtsi | 12 + arch/arm/dts/zynq-microzed.dts | 6 + cmd/Kconfig | 6 + cmd/Makefile | 1 + cmd/mtd.c | 285 ++++++++++++++++ configs/zynq_microzed_defconfig | 14 +- drivers/mtd/Kconfig | 2 + drivers/mtd/Makefile | 2 +- drivers/mtd/mtd-uclass.c | 93 +++++ 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 | 684 +++++++++++++++++++++++++++++++++++++ drivers/mtd/spi-nor/zynq_qspinor.c | 641 ++++++++++++++++++++++++++++++++++ drivers/spi/spi-uclass.c | 24 ++ include/linux/err.h | 5 + include/linux/mtd/spi-nor.h | 211 ++++++++++++ include/mtd.h | 63 ++++ include/spi.h | 20 ++ 21 files changed, 2562 insertions(+), 6 deletions(-) create mode 100644 cmd/mtd.c 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_qspinor.c create mode 100644 include/linux/mtd/spi-nor.h
Signature · 1 line
2.7.4