linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Clark Wang <xiaoning.wang@nxp.com>
To: "broonie@kernel.org" <broonie@kernel.org>
Cc: "linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Clark Wang <xiaoning.wang@nxp.com>
Subject: [PATCH V3 0/4] spi: lpspi: Add Slave Mode support for LPSPI
Date: Fri, 7 Dec 2018 02:50:32 +0000	[thread overview]
Message-ID: <20181207024924.6315-1-xiaoning.wang@nxp.com> (raw)

Hi Mark,

i.MX LPSPI controller only works in Master mode previously. This patch
series adds support slave mode to LPSPI controller, including:
 - Replace all related structure names and object names which is named
   "master" with "controller",
 - adds SPI slave mode support for i.MX7ulp and i.MX8qm/qxp in PIO mode,
 - DT binding updates for slave mode.

Currently SPI Slave mode support patch has the following limitations:
1. The stale data in RXFIFO will be dropped when the Slave does any new
   transfer.
2. One transfer can be finished only after all transfer->len data been
   transferred to master device
3. Slave device only accepts transfer->len data. Any data longer than
   this from master device will be dropped. Any data shorter than this
   from master will cause LPSPI to stuck due to mentioned limitation 2.
4. Only PIO transfer is supported in Slave Mode.

Wire connection:
GND, SCK, MISO(to MISO of slave), MOSI(to MOSI of slave), SCS

Change log:
V2: 
 - Split last version patch into 3 patches, and add the doc update.
V3:
 - Add more detailed description in commit message of the second patch.
 - Keep the description of "fsl,imx8qxp-spi" in spi-fsl-lpspi.txt in the
   fourth patch.

Clark Wang (4):
  spi: lpspi: Replace all "master" with "controller"
  spi: lpspi: Add slave mode support
  spi: lpspi: Let watermark change with send data length
  doc: lpspi: Document DT bindings for LPSPI slave mode

 .../devicetree/bindings/spi/spi-fsl-lpspi.txt |   4 +
 drivers/spi/spi-fsl-lpspi.c                   | 202 ++++++++++++------
 2 files changed, 138 insertions(+), 68 deletions(-)

-- 
2.17.1

             reply	other threads:[~2018-12-07  2:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07  2:50 Clark Wang [this message]
2018-12-07  2:50 ` [PATCH V3 1/4] spi: lpspi: Replace all "master" with "controller" Clark Wang
2018-12-08  5:14   ` Joe Perches
2018-12-08  5:42     ` Clark Wang
2018-12-07  2:50 ` [PATCH V3 2/4] spi: lpspi: Add slave mode support Clark Wang
2018-12-07  2:50 ` [PATCH V3 3/4] spi: lpspi: Let watermark change with send data length Clark Wang
2018-12-07  2:50 ` [PATCH V3 4/4] doc: lpspi: Document DT bindings for LPSPI slave mode Clark Wang
2018-12-13 12:09   ` Applied "doc: lpspi: Document DT bindings for LPSPI slave mode" to the spi tree 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=20181207024924.6315-1-xiaoning.wang@nxp.com \
    --to=xiaoning.wang@nxp.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.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).