linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Haibo Chen <haibo.chen@nxp.com>
To: Han Xu <han.xu@nxp.com>, Yogesh Gaur <yogeshgaur.83@gmail.com>,
	 Mark Brown <broonie@kernel.org>, Frank Li <frank.li@nxp.com>
Cc: linux-spi@vger.kernel.org, imx@lists.linux.dev,
	 linux-kernel@vger.kernel.org, Haibo Chen <haibo.chen@nxp.com>,
	 Frank Li <Frank.Li@nxp.com>
Subject: [PATCH v2 0/5] spi: spi-nxp-fspi: add DTR mode support
Date: Wed, 17 Sep 2025 15:27:05 +0800	[thread overview]
Message-ID: <20250917-flexspi-ddr-v2-0-bb9fe2a01889@nxp.com> (raw)

this patch set add DTR mode support for flexspi.
For DTR mode, flexspi only support 8D-8D-8D mode.

Patch 1~2 extract nxp_fspi_dll_override(), prepare for adding the DTR mode.
        in nor suspend, it will disable DTR mode, and enable DTR mode back
	in nor resume. this require the flexspi driver has the ability to 
	set back to dll override mode in STR mode when clock rate < 100MHz.
Patch 3 Add the DDR LUT command support. flexspi use LUT command to handle
	the dtr/str mode.
Patch 4 add the logic of sample clock source selection for STR/DTR mode
	STR use the default mode 0, sample based on the internal dummy pad.
	DTR use the mode 3, sample based on the external DQS pad, so this
	board and device connect the DQS pad.
	adjust the clock rate for DTR mode, when detect the DDR LUT command,
	flexspi will automatically div 2 of the root clock and output to device.
Patch 5 finally add the DTR support in default after the upper 4 patches's
	prepareation. Since lx2160a do not implement DQS pad, so can't support
	this DTR mode.
	

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
Changes in v2:
- split the original PATCH 1 into two patches.
- PATCH 3 put the ?: in one line and add Frank Li's reviewed tag.
- combine the original PATCH3 and PATCH4, and simplify the code logic according to Frank's suggestion.
- rename nxp_fspi_mem_caps_quirks to nxp_fspi_mem_caps_disable_dtr.
- Link to v1: https://lore.kernel.org/r/20250916-flexspi-ddr-v1-0-69358b5dc862@nxp.com

---
Haibo Chen (5):
      spi: spi-nxp-fspi: extract function nxp_fspi_dll_override()
      spi: spi-nxp-fspi: set back to dll override mode when clock rate < 100MHz
      spi: spi-nxp-fspi: Add the DDR LUT command support
      spi: spi-nxp-fspi: add the support for sample data from DQS pad
      spi: spi-nxp-fspi: Add OCT-DTR mode support

 drivers/spi/spi-nxp-fspi.c | 115 ++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 98 insertions(+), 17 deletions(-)
---
base-commit: c3067c2c38316c3ef013636c93daa285ee6aaa2e
change-id: 20250916-flexspi-ddr-f841f3d79aef

Best regards,
-- 
Haibo Chen <haibo.chen@nxp.com>


             reply	other threads:[~2025-09-17  7:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17  7:27 Haibo Chen [this message]
2025-09-17  7:27 ` [PATCH v2 1/5] spi: spi-nxp-fspi: extract function nxp_fspi_dll_override() Haibo Chen
2025-09-17 16:24   ` Frank Li
2025-09-17  7:27 ` [PATCH v2 2/5] spi: spi-nxp-fspi: set back to dll override mode when clock rate < 100MHz Haibo Chen
2025-09-17 16:26   ` Frank Li
2025-09-17  7:27 ` [PATCH v2 3/5] spi: spi-nxp-fspi: Add the DDR LUT command support Haibo Chen
2025-09-17  7:27 ` [PATCH v2 4/5] spi: spi-nxp-fspi: add the support for sample data from DQS pad Haibo Chen
2025-09-17 16:28   ` Frank Li
2025-09-17  7:27 ` [PATCH v2 5/5] spi: spi-nxp-fspi: Add OCT-DTR mode support Haibo Chen
2025-09-17 16:30   ` Frank Li
2025-09-17 18:09     ` Mark Brown
2025-09-19 16:03 ` [PATCH v2 0/5] spi: spi-nxp-fspi: add DTR " 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=20250917-flexspi-ddr-v2-0-bb9fe2a01889@nxp.com \
    --to=haibo.chen@nxp.com \
    --cc=broonie@kernel.org \
    --cc=frank.li@nxp.com \
    --cc=han.xu@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=yogeshgaur.83@gmail.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).