RE: [EXT] [PATCH 3/4] spi: spi-nxp-fspi: add DDR mode support
From: Kuldeep Singh <hidden>
Date: 2021-09-01 08:21:30
-----Original Message----- From: Bough Chen <haibo.chen@nxp.com> Sent: Wednesday, September 1, 2021 1:35 PM To: Kuldeep Singh <redacted> Cc: linux-spi@vger.kernel.org; dl-linux-imx <redacted>; Rajesh Bhagat [off-list ref]; broonie@kernel.org Subject: RE: [EXT] [PATCH 3/4] spi: spi-nxp-fspi: add DDR mode supportquoted
-----Original Message----- From: Kuldeep Singh Sent: 2021年8月31日 18:42 To: Bough Chen <haibo.chen@nxp.com> Cc: linux-spi@vger.kernel.org; dl-linux-imx <redacted>; BoughChenquoted
[off-list ref]; Rajesh Bhagat [off-list ref]; broonie@kernel.org Subject: RE: [EXT] [PATCH 3/4] spi: spi-nxp-fspi: add DDR mode support Hi Haibo,quoted
-----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
--- 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.cindex 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)quoted
+ 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 changewillquoted
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 shouldbequoted
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 fromdevice-tree.quoted
Please let me know your views.Thanks for your comments! The flexspi controller in Layerscape support 8bit DTR, but for flexspi, if support 8bit DTR, need to use mode3, which means we must connect the DQS pad on board. Seems LX216x board do not connect DQS line. We should take this into consideration, this is board limitation, better to involve a property in device-tree. I will send a V2 patch soon.
Thanks for your understanding. I will make sure to confirm NXP layerscape devices for next version of series. Regards Kuldeep