mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kathpalia, Tanmay" <tanmay.kathpalia@altera.com>
To: tze.yee.ng@altera.com, Adrian Hunter <adrian.hunter@intel.com>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org, Ulf Hansson <ulfh@kernel.org>
Subject: Re: [PATCH v4 3/3] mmc: sdhci-cadence6: tune SD6HC DDR50/DDR52 read path
Date: Mon, 23 Nov 2026 00:36:09 +0530	[thread overview]
Message-ID: <0163d3d3-432b-478b-90bc-22d6c3f03656@altera.com> (raw)
In-Reply-To: <20261119-sd_cadence_ddr50_v3-v4-3-95a94a0aaaf3@altera.com>


On 19-11-2026 15:15, tze.yee.ng@altera.com wrote:
> From: Tze Yee Ng <tze.yee.ng@altera.com>
>
> DDR50 and DDR52 have no CMD19 tuning, so the SD6HC extended-read path
> relies on static PHY settings. Two things are needed to make it work.
>
> First, PHONY_DQS_TIMING (phy_ctrl_reg[9:4]) was left at 0 in every mode.
> In extended-read mode the RE# (rebar) pulse is held high for half an
> SDCLK period, so its width in clk_phy (sdmclk) cycles is the SDCLK/sdmclk
> divider / 2, and the field must hold that width minus 1 (0 otherwise).
> Leaving it at 0 in extended-read DDR duplicates one DDR edge and corrupts
> reads. Derive the width from the clock divider so it tracks the
> integration rather than a hard-coded value: e.g. 1 at divide-by-4,
> confirmed on DDR50 hardware where 1 captures both beats and 0 corrupts
> reads. The field only takes effect when the fabricated phony DQS is
> selected, so the computed value is written in every extended-read mode
> and clamped to the 6-bit field. This timing model follows the Cadence
> SD6HC PHY documentation.
>
> Second, the remaining read-path knobs need board/SoC characterisation, so
> read them from device tree at PHY probe and apply them in the
> extended-read DDR modes (DDR50 and DDR52):
>
>    - cdns,ddr-read-dqs-delay: read-DQS delay as a count of DLL delay
>      elements (each cdns,delay-element-ps wide), written to the 8-bit PHY
>      field (0-255);
>    - cdns,ddr-no-lpbk-dqs: fall back from the recommended loopback DQS to
>      the fabricated phony DQS.
>
> Signed-off-by: Tze Yee Ng <tze.yee.ng@altera.com>
> ---
> Changes in v4:
> - Merged v3 2/4 (PHONY_DQS_TIMING) and v3 4/4 (read DDR tuning from
>    device tree)
> - Derive the PHONY_DQS_TIMING rebar pulse width from the
>    SDCLK/sdmclk divider (t_sdclk / (2 * t_sdmclk) - 1, clamped to the 6-bit
>    field) instead of the hard-coded 2 clk_phy cycles, and apply it in every
>    extended-read mode instead of only DDR50/DDR52.
> - Dropped the cdns,ddr-phony-dqs-timing override.

In v1 you mentioned that the modular SoM needs ddr-phony-dqs-timing
at 0. With the override gone the driver writes 1 there at 50 MHz.
Does DDR still work on the SoM with v4?


>

  reply	other threads:[~2026-11-22 19:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  9:45 [PATCH v4 0/3] mmc: sdhci-cadence: SD6HC DDR50/DDR52 read-path tuning and fixes tze.yee.ng
2026-11-19  9:45 ` [PATCH v4 1/3] mmc: sdhci-cadence: abort failed tuning command on SD6HC tze.yee.ng
2026-11-19  9:45 ` [PATCH v4 2/3] dt-bindings: mmc: cdns,sd6hc: add SD6HC DDR50 read-path tuning tze.yee.ng
2026-11-22 16:03   ` Krzysztof Kozlowski
2026-11-22 19:05   ` Kathpalia, Tanmay
2026-11-19  9:45 ` [PATCH v4 3/3] mmc: sdhci-cadence6: tune SD6HC DDR50/DDR52 read path tze.yee.ng
2026-11-22 19:06   ` Kathpalia, Tanmay [this message]
2026-11-22 16:03 ` [PATCH v4 0/3] mmc: sdhci-cadence: SD6HC DDR50/DDR52 read-path tuning and fixes Krzysztof Kozlowski

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=0163d3d3-432b-478b-90bc-22d6c3f03656@altera.com \
    --to=tanmay.kathpalia@altera.com \
    --cc=adrian.hunter@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=tze.yee.ng@altera.com \
    --cc=ulfh@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

all inboxes | Powered by JetHome®