From: Huang Shijie <b32955@freescale.com>
To: broonie@kernel.org
Cc: dwmw2@infradead.org, dedekind1@gmail.com,
computersforpeace@gmail.com, shawn.guo@linaro.org,
kernel@pengutronix.de, b18965@freescale.com,
b44548@freescale.com, lznuaa@gmail.com,
linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org,
devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
Huang Shijie <b32955@freescale.com>
Subject: [PATCH v3 0/8] Add the Quadspi driver for vf610-twr
Date: Fri, 30 Aug 2013 10:07:21 +0800 [thread overview]
Message-ID: <1377828449-18912-1-git-send-email-b32955@freescale.com> (raw)
The patch set is based on Li Xiaochun's init version.
http://marc.info/?l=linux-arm-kernel&m=137181252311126&w=2
(0) What is the Quadspi controller?
The Quadspi(Quad Serial Peripheral Interface) acts as an interface to
one single or two external serial flash devices, each with up to 4
bidirectional data lines.
(1) The Quadspi controller is driven by the LUT(Look-up Table) registers.
The LUT registers are a look-up-table for sequences of instructions.
A valid sequence consists of four LUT registers.
(2) The definition of the LUT register shows below:
---------------------------------------------------
| INSTR1 | PAD1 | OPRND1 | INSTR0 | PAD0 | OPRND0 |
---------------------------------------------------
There are several types of INSTRx, such as:
CMD : the SPI NOR command.
ADDR : the address for the SPI NOR command.
DUMMY : the dummy cycles needed by the SPI NOR command.
....
(3) We connect the NOR the QuadSPI now. I am not sure, but i think the
QuadSPI will be only used for the NOR. We may connect other devices
to it. But, for the reason of (2), we have to parse out the SPI NOR
command for the QuadSPI.
(4) Test this driver with the JFFS2 and UBIFS with the Spansion s25fl128s :
For jffs2:
#flash_eraseall /dev/mtd0
#mount -t jffs2 /dev/mtdblock0 tmp
#bonnie++ -d tmp -u 0 -s 10 -r 5
For ubifs:
#flash_eraseall /dev/mtd0
#ubiattach /dev/ubi_ctrl -m 0
#ubimkvol /dev/ubi0 -N test -m
#mount -t ubifs ubi0:test tmp
#bonnie++ -d tmp -u 0 -s 10 -r 5
(5) The test result of the DDR QUAD Read (66MHz) performance:
#insmod mtd_speedtest.ko dev=0
[ 194.831313] =================================================
[ 194.825453] mtd_speedtest: MTD device: 0
[ 194.818670] mtd_speedtest: not NAND flash, assume page size is 512 bytes.
[ 194.811705] mtd_speedtest: MTD device size 16777216, eraseblock size 65536,
page size 512, count of eraseblocks 256, pages per eraseblock 128, OOB size 0
[ 228.482355] mtd_speedtest: testing eraseblock write speed
[ 213.024166] mtd_speedtest: eraseblock write speed is 203 KiB/s
[ 213.018306] mtd_speedtest: testing eraseblock read speed
[ 212.660856] mtd_speedtest: eraseblock read speed is 46545 KiB/s
[ 181.728267] mtd_speedtest: testing page write speed
[ 231.434842] mtd_speedtest: page write speed is 203 KiB/s
[ 231.429515] mtd_speedtest: testing page read speed
[ 228.957422] mtd_speedtest: page read speed is 6641 KiB/s
[ 197.778872] mtd_speedtest: testing 2 page write speed
[ 247.338069] mtd_speedtest: 2 page write speed is 203 KiB/s
[ 247.332514] mtd_speedtest: testing 2 page read speed
[ 245.925048] mtd_speedtest: 2 page read speed is 11686 KiB/s
[ 245.919460] mtd_speedtest: Testing erase speed
[ 214.612341] mtd_speedtest: erase speed is 523 KiB/s
[ 214.607410] mtd_speedtest: Testing 2x multi-block erase speed
[ 245.545971] mtd_speedtest: 2x multi-block erase speed is 480 KiB/s
[ 245.539744] mtd_speedtest: Testing 4x multi-block erase speed
[ 211.141696] mtd_speedtest: 4x multi-block erase speed is 476 KiB/s
[ 211.135496] mtd_speedtest: Testing 8x multi-block erase speed
[ 241.761502] mtd_speedtest: 8x multi-block erase speed is 475 KiB/s
[ 241.755269] mtd_speedtest: Testing 16x multi-block erase speed
[ 272.307979] mtd_speedtest: 16x multi-block erase speed is 474 KiB/s
[ 272.301660] mtd_speedtest: Testing 32x multi-block erase speed
[ 237.637902] mtd_speedtest: 32x multi-block erase speed is 472 KiB/s
[ 237.631581] mtd_speedtest: Testing 64x multi-block erase speed
[ 267.954341] mtd_speedtest: 64x multi-block erase speed is 471 KiB/s
[ 267.948005] mtd_speedtest: finished
[ 267.944478] =================================================
* Conclusion *:
--------------------------------------------------------------------
We can get the 46.5 MiB/s read speed when the DDR Quad Read is enabled.
(From S25FL128S's spec, the maximum read rate of DDR Quad Read is
66MiB/s)
--------------------------------------------------------------------
Changelog:
v2 --> v3:
[1] use the "num-cs" property, and remove the "fsl,spi-num-chipselects".
[2] remove the redundant log.
v1 --> v2:
[1] add DDR QUAD read support.
[2] add the support for two NOR chips
[3] misc.
init --> v1:
[1] since the ic bug in the IPS read,
abandon the IPS read, use the AHB read.
[2] change the mtd code, add the quad read support.
[3] add the quad read support the QuadSpi driver.
[4] misc.
Huang Shijie (8):
mtd: m25p80: move the spi-nor commands to a header
mtd: m25p80: add support for Spansion s25fl128s chip
mtd: m25p80: add the quad-read support
mtd: m25p80: add the DDR quad-read support
spi: Add Freescale QuadSpi driver
Documentation: add the binding file for Quadspi driver
ARM: dts: vf610: change the PAD values for Quadspi
ARM: dts: vf610-twr: Add SPI NOR support
Documentation/devicetree/bindings/mtd/m25p80.txt | 10 +
.../devicetree/bindings/spi/fsl-quadspi.txt | 32 +
arch/arm/boot/dts/vf610-twr.dts | 36 +
arch/arm/boot/dts/vf610.dtsi | 24 +-
drivers/mtd/devices/m25p80.c | 116 ++-
drivers/spi/Kconfig | 7 +
drivers/spi/Makefile | 1 +
drivers/spi/spi-fsl-quadspi.c | 1031 ++++++++++++++++++++
include/linux/mtd/spi-nor.h | 61 ++
9 files changed, 1265 insertions(+), 53 deletions(-)
create mode 100644 Documentation/devicetree/bindings/spi/fsl-quadspi.txt
create mode 100644 drivers/spi/spi-fsl-quadspi.c
create mode 100644 include/linux/mtd/spi-nor.h
next reply other threads:[~2013-08-30 2:07 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-30 2:07 Huang Shijie [this message]
2013-08-30 2:07 ` [PATCH v3 1/8] mtd: m25p80: move the spi-nor commands to a header Huang Shijie
2013-08-30 2:07 ` [PATCH v3 2/8] mtd: m25p80: add support for Spansion s25fl128s chip Huang Shijie
2013-08-30 2:07 ` [PATCH v3 3/8] mtd: m25p80: add the quad-read support Huang Shijie
2013-08-30 2:07 ` [PATCH v3 4/8] mtd: m25p80: add the DDR " Huang Shijie
2013-08-30 2:07 ` [PATCH v3 5/8] spi: Add Freescale QuadSpi driver Huang Shijie
2013-09-10 18:09 ` Mark Brown
2013-09-11 2:40 ` Huang Shijie
2013-09-11 10:39 ` Mark Brown
2013-08-30 2:07 ` [PATCH v3 6/8] Documentation: add the binding file for Quadspi driver Huang Shijie
2013-08-30 2:07 ` [PATCH v3 7/8] ARM: dts: vf610: change the PAD values for Quadspi Huang Shijie
2013-08-30 2:07 ` [PATCH v3 8/8] ARM: dts: vf610-twr: Add SPI NOR support Huang Shijie
2013-09-04 2:16 ` [PATCH v3 0/8] Add the Quadspi driver for vf610-twr Huang Shijie
2013-09-04 9:55 ` Mark Brown
2013-09-04 10:29 ` Huang Shijie
2013-09-04 11:33 ` Mark Brown
2013-09-05 1:43 ` Huang Shijie
2013-09-04 13:45 ` thomas.langer
2013-09-05 2:04 ` Huang Shijie
2013-09-05 4:25 ` Gupta, Pekon
2013-09-05 5:34 ` Huang Shijie
2013-09-05 6:32 ` Gupta, Pekon
2013-09-05 7:45 ` Huang Shijie
2013-09-05 9:11 ` Gupta, Pekon
2013-09-05 9:30 ` Huang Shijie
2013-09-05 13:50 ` Mark Brown
2013-09-06 2:36 ` Huang Shijie
2013-09-08 13:47 ` Mark Brown
2013-09-09 3:07 ` Huang Shijie
2013-09-09 15:14 ` Mark Brown
2013-09-10 6:59 ` Huang Shijie
2013-09-10 18:07 ` Mark Brown
2013-09-11 2:38 ` Huang Shijie
2013-09-11 10:41 ` Mark Brown
2013-09-11 10:54 ` Huang Shijie
2013-09-11 11:30 ` Mark Brown
2013-09-11 12:26 ` Gupta, Pekon
2013-09-11 12:35 ` Mark Brown
2013-09-12 9:18 ` Huang Shijie
2013-09-12 10:20 ` Mark Brown
2013-09-13 3:30 ` Huang Shijie
2013-09-12 15:32 ` David Woodhouse
2013-09-12 10:39 ` David Woodhouse
2013-09-12 10:56 ` Gupta, Pekon
2013-09-12 11:17 ` David Woodhouse
2013-09-12 11:48 ` Mark Brown
2013-09-12 11:55 ` Russell King - ARM Linux
2013-09-12 13:24 ` Mark Brown
2013-09-12 13:25 ` Ricard Wanderlof
2013-09-12 14:10 ` Russell King - ARM Linux
2013-09-12 12:02 ` David Woodhouse
2013-09-12 13:43 ` Mark Brown
2013-09-12 14:03 ` David Woodhouse
2013-09-12 14:40 ` Mark Brown
2013-09-13 3:14 ` Huang Shijie
2013-09-11 14:05 ` David Woodhouse
2013-09-11 15:07 ` Mark Brown
[not found] ` <20130909151450 <52318953.6090405@freescale.com>
[not found] ` <52318953.6090405@freescale.com>
2013-09-12 9:50 ` David Woodhouse
2013-09-12 10:19 ` Mark Brown
2013-09-13 2:58 ` Huang Shijie
2013-09-12 15:22 ` David Woodhouse
2013-09-13 4:12 ` Huang Shijie
2013-09-12 16:26 ` David Woodhouse
2013-09-13 3:06 ` Huang Shijie
2013-09-12 16:27 ` Fabio Estevam
[not found] ` <CAOMZO5C54wCdEOHJmwVLk_zkh-twjis1ys20Gd1+T+ygM+A6bg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-13 2:21 ` Huang Shijie
2013-09-12 20:56 ` Mark Brown
[not found] ` <20130912205644.GW29403-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-09-13 4:55 ` Huang Shijie
[not found] ` <52329AD3.2050608-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2013-09-13 10:21 ` Mark Brown
[not found] ` <20130913102127.GD29403-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-09-16 2:40 ` Huang Shijie
2013-09-16 10:19 ` Mark Brown
[not found] ` <20130916101912.GY29403-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-09-16 10:27 ` Huang Shijie
[not found] ` <5236DD17.5090203-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2013-09-16 11:06 ` Mark Brown
[not found] ` <20130916110634.GC29403-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-09-17 2:14 ` Huang Shijie
[not found] ` <5237BB01.3080700-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2013-09-17 10:51 ` Mark Brown
[not found] ` <20130917105142.GO21013-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-09-17 15:05 ` Gerhard Sittig
2013-09-17 16:49 ` Gerhard Sittig
2013-09-17 19:54 ` Sourav Poddar
[not found] ` <20130917150548.GE14747-kDjWylLy9wD0K7fsECOQyeGNnDKD8DIp@public.gmane.org>
2013-09-17 19:13 ` Mark Brown
[not found] ` <20130917191318.GJ21013-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-09-18 15:40 ` David Woodhouse
[not found] ` <1379518822.753.91.camel-Fexsq3y4057IgHVZqg5X0TlWvGAXklZc@public.gmane.org>
2013-09-18 16:00 ` Mark Brown
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=1377828449-18912-1-git-send-email-b32955@freescale.com \
--to=b32955@freescale.com \
--cc=b18965@freescale.com \
--cc=b44548@freescale.com \
--cc=broonie@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=lznuaa@gmail.com \
--cc=shawn.guo@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).