From: wangyuhang <wangyuhang2014@gmail.com>
To: broonie@kernel.org, linux-spi@vger.kernel.org,
devicetree@vger.kernel.org, linux-mtd@lists.infradead.org
Cc: sourav.poddar@ti.com, pekon@ti.com,
wangyuhang <wangyuhang2014@gmail.com>
Subject: [PATCH V2 2/2] spi: dual and quad support(device tree)
Date: Tue, 27 Aug 2013 08:50:03 +0800 [thread overview]
Message-ID: <1377564603-4030-2-git-send-email-wangyuhang2014@gmail.com> (raw)
In-Reply-To: <1377564603-4030-1-git-send-email-wangyuhang2014@gmail.com>
Add spi-tmax-nbits and spi-rmax-nbits for spi slave node.
Modify the related dt document(spi-bus.txt)
spi-tmax-nbits:Max number of bits slave will use for MOSI(writting)
spi-rmax-nbits:Max number of bits slave will use for MISO(reading)
Support for spi-tx/rmax-nbits in SPI framework has been picked[1].
[1]: http://comments.gmane.org/gmane.linux.kernel.spi.devel/14420
Commit Id:f477b7fb13df2b843997559ff34e87d054ba6538
Signed-off-by: wangyuhang <wangyuhang2014@gmail.com>
---
Documentation/devicetree/bindings/spi/spi-bus.txt | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
index 296015e..211336c 100644
--- a/Documentation/devicetree/bindings/spi/spi-bus.txt
+++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
@@ -55,6 +55,22 @@ contain the following properties.
chip select active high
- spi-3wire - (optional) Empty property indicating device requires
3-wire mode.
+- spi-tmax-nbits - (optional) Max number of bits slave will use for
+ MOSI(writting)
+- spi-rmax-nbits - (optional) Max number of bits slave will use for
+ MISO(reading)
+
+So if for example the slave has 4 wires for writting and 2 wires for reading,
+and the spi-tx/rx-nbits property should be set as follows:
+
+spi-tmax-nbits = <4>;
+spi-rmax-nbits = <2>;
+
+Now the value that spi-tmax-nbits and spi-rmax-nbits can receive is only
+1(single), 2(dual) and 4(quad). If you don't set spi-tmax-nbits or spi-rmax-nbits,
+spi_device mode will be set in single(1 wire) as default. Another point, if
+property:spi-3wire is set, spi-t/rmax-nbits is forbidden to set to <2 or 4>,
+otherwise, an errro will return.
If a gpio chipselect is used for the SPI slave the gpio number will be passed
via the cs_gpio
--
1.7.9.5
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2013-08-27 0:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 0:50 [PATCH V2 1/2] spi: dual and quad support(device tree) wangyuhang
2013-08-27 0:50 ` wangyuhang [this message]
2013-08-27 4:03 ` [PATCH V2 2/2] " Gupta, Pekon
2013-08-30 21:26 ` Stephen Warren
2013-08-30 22:23 ` Mark Brown
2013-09-01 8:05 ` yuhang wang
2013-08-30 21:30 ` Tomasz Figa
2013-09-01 8:14 ` yuhang wang
2013-08-27 4:09 ` [PATCH V2 1/2] " Gupta, Pekon
2013-08-27 4:58 ` yuhang wang
2013-08-27 7:56 ` yuhang wang
2013-08-27 8:37 ` Gupta, Pekon
2013-08-30 21:20 ` Stephen Warren
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=1377564603-4030-2-git-send-email-wangyuhang2014@gmail.com \
--to=wangyuhang2014@gmail.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=pekon@ti.com \
--cc=sourav.poddar@ti.com \
/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).