Thread (9 messages) 9 messages, 2 authors, 2021-09-01

RE: [EXT] [PATCH 3/4] spi: spi-nxp-fspi: add DDR mode support

From: Kuldeep Singh <hidden>
Date: 2021-08-31 10:41:57

Hi Haibo,
-----Original Message-----
From: haibo.chen@nxp.com <haibo.chen@nxp.com>
Sent: Friday, August 20, 2021 1:14 PM
To: Ashish Kumar <redacted>; yogeshgaur.83@gmail.com;
broonie@kernel.org
Cc: linux-spi@vger.kernel.org; dl-linux-imx <redacted>; Bough Chen
[off-list ref]
Subject: [EXT] [PATCH 3/4] spi: spi-nxp-fspi: add DDR mode support

Caution: EXT Email

From: Haibo Chen <haibo.chen@nxp.com>

For LUT, add DDR command support.
Also use new API spi_mem_dtr_supports_op() to check the DTR mode.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Thanks for submitting patch to support octal DTR.
quoted hunk ↗ jump to hunk
---
 drivers/spi/spi-nxp-fspi.c | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c index
a764eb475aed..f7acad2cbe64 100644
--- a/drivers/spi/spi-nxp-fspi.c
+++ b/drivers/spi/spi-nxp-fspi.c
@@ -486,6 +486,9 @@ static bool nxp_fspi_supports_op(struct spi_mem
*mem,
            op->data.nbytes > f->devtype_data->txfifo)
                return false;

+       if (op->cmd.dtr && op->addr.dtr && op->dummy.dtr && op->data.dtr)
+               return spi_mem_dtr_supports_op(mem, op);
+
[snip]

Now that spi-nor framework and flexspi driver supports octal DTR, if device-tree specifies RX and TX bus-width as <8,8> ,
then above change will always make sure to select DTR mode and SDR will never get selected.
Please note, Layerscape LX2160A and LX2162A are two platforms which have micron mt35xu512aba (support octal dtr) 
and are causing probe failure with these patches as required dependencies for enabling DTR are not met.

Since framework selects maximum supported capability, I think there should be a mechanism to choose SDR or DTR mode in driver itself.
This will also help for a platform to fallback from DTR to SDR in case DTR doesn't work.
We can enable this feature as a quirk or by reading a property from device-tree.
Please let me know your views.

Regards
Kuldeep
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help