From: Jagan Teki <jagan@openedev.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v9 00/21] dm: Generic MTD Subsystem/SPI-NOR
Date: Sun, 30 Oct 2016 23:53:32 +0530 [thread overview]
Message-ID: <1477851833-23960-1-git-send-email-jagan@openedev.com> (raw)
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
--
2.7.4
next reply other threads:[~2016-10-30 18:23 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-30 18:23 Jagan Teki [this message]
2016-10-30 18:23 ` [U-Boot] [PATCH v9 01/21] dm: mtd: Add dm mtd core ops Jagan Teki
2016-11-05 16:07 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 02/21] mtd: Add SPI-NOR core support Jagan Teki
2016-11-05 16:10 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 03/21] mtd: spi-nor: Kconfig: Add MTD_SPI_NOR entry Jagan Teki
2016-11-05 16:09 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 04/21] mtd: spi-nor: Kconfig: Add MTD_SPI_NOR_USE_4K_SECTORS Jagan Teki
2016-11-05 16:09 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 05/21] mtd: spi-nor: Kconfig: Add SPI_NOR_MISC entry Jagan Teki
2016-11-05 16:09 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 06/21] mtd: spi-nor: Kconfig: Add SPI_NOR_MACRONIX entry Jagan Teki
2016-11-05 16:09 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 07/21] mtd: spi-nor: Kconfig: Add SPI_NOR_SPANSION entry Jagan Teki
2016-11-05 16:09 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 08/21] mtd: spi-nor: Kconfig: Add SPI_NOR_STMICRO entry Jagan Teki
2016-11-05 16:09 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 09/21] mtd: spi-nor: Kconfig: Add SPI_NOR_SST entry Jagan Teki
2016-11-05 16:09 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 10/21] mtd: spi-nor: Kconfig: Add SPI_NOR_WINBOND entry Jagan Teki
2016-11-05 16:09 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 11/21] spi: Add spi_write_then_read Jagan Teki
2016-11-05 16:09 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 12/21] mtd: spi-nor: Add m25p80 driver Jagan Teki
2016-11-05 16:10 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 13/21] mtd: spi-nor: Kconfig: Add MTD_M25P80 entry Jagan Teki
2016-11-05 16:09 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 14/21] mtd: spi-nor: Add zynq qspinor driver Jagan Teki
2016-10-30 18:23 ` [U-Boot] [PATCH v9 15/21] mtd: spi-nor: zynq_qspi: Kconfig: Add MTD_ZYNQ Jagan Teki
2016-10-30 18:23 ` [U-Boot] [PATCH v9 16/21] mtd: spi-nor: Add 4-byte addresswidth support Jagan Teki
2016-10-30 18:23 ` [U-Boot] [PATCH v9 17/21] dm: mtd: Add uclass_driver.flags Jagan Teki
2016-11-05 16:10 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 18/21] dm: mtd: Add post_bind Jagan Teki
2016-11-05 16:10 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 19/21] cmd: Add mtd command support Jagan Teki
2016-11-05 16:10 ` Simon Glass
2016-10-30 18:23 ` [U-Boot] [PATCH v9 20/21] arm: dts: zynq: Add zynq-qspinor node Jagan Teki
2016-10-30 18:23 ` [U-Boot] [PATCH v9 21/21] dm: zynq: microzed: Enable MTD/SPI-NOR Jagan Teki
2016-11-05 16:07 ` [U-Boot] [PATCH v9 00/21] dm: Generic MTD Subsystem/SPI-NOR Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1477851833-23960-1-git-send-email-jagan@openedev.com \
--to=jagan@openedev.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox