Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Yixun Lan <dlan@kernel.org>
To: alan <alan.tseng.cs@gmail.com>
Cc: Iker Pedrosa <ikerpedrosam@gmail.com>,
	adrian.hunter@intel.com, ulfh@kernel.org,
	long.wan@linux.spacemit.com, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	spacemit@lists.linux.dev
Subject: Re: [PATCH 6/7] mmc: sdhci-of-k1: Improve RX tuning window
Date: Tue, 1 Dec 2026 06:30:04 +0000	[thread overview]
Message-ID: <20261201063004-GKE27669@kernel.org> (raw)
In-Reply-To: <CACwt7EYh9+MZHC7Qn910iOxvnjd42u_NoSX3+YpjQCxCxtY=6Q@mail.gmail.com>

Hi

On 19:58 Sat 19 Sep     , alan wrote:
> On Tue, Sep 15, 2026, Iker Pedrosa wrote:
> > A jump from a minimum window size of 3 to 50 delay codes is quite dramatic.
> > Could you clarify how 50 was chosen? Is there a specific hardware specification,
> > phy datasheet recommendation, or test dataset across multiple boards that
> > justifies this exact number?
> 
> 50 is not my number; Yixun would need to answer where it comes from. What
> I can add is what the vendor driver does. In SpacemiT's sdhci-of-k1x.c
> (bianbu linux-6.6), the defaults when DT says nothing are:
> 
The 50 number is a configuration suggested from vendor, which should work
for all boards, it's still an value derived from statistics, not caclulated
precisely..

>   #define RX_TUNING_WINDOW_THRESHOLD 80
Choose 50 here to be less aggresive, which should satisfy the tuning case

>   #define RX_TUNING_DLINE_REG 0x09
> 
> The Jupiter DT overrides both together: spacemit,rx_dline_reg = <0> and
> spacemit,rx_tuning_limit = <50>. So 50 is what the vendor pairs with the
> finer delay-line step, not a standalone default. That makes the 5/7 ->
> 6/7 dependency concrete rather than theoretical.
> 
> I also need to correct what I said earlier. The current driver already
> centres on the widest passing window; the "< 3" check only decides when
> to give up with -EIO. Raising it to 50 does not change which window is
> selected, only whether tuning fails. The 1- and 5-code windows I reported
> were never the widest in their boot (the widest was 74 or more each
> time), so they do not show the old threshold picking a bad window.
> 
Right, it actually check the final widest tunning window, and abort if
smaller than it, for the worst case!

> On the form: spacemit,sdhci.yaml has no such property, so a DT knob
> would need a binding change. A compile-time default, with DT override
> if the binding maintainers accept it, still seems the lower-risk option.
> 
It's just not neccessary, introducing a DT property is overkill, it's probably
only useful for debugging purpose, while we stride hard to not introduce
DT property which isn't necessary. For compile-time default, are you suggesting
a CONFIG option or just a C-Code maro? I would go for latter

To be clear, I object to introduce a DT property for the window limit.

-- 
Yixun Lan (dlan)

  reply	other threads:[~2026-12-01  6:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02  8:04 [PATCH 0/7] mmc: spacemit: improve clock and tuning logic Yixun Lan
2026-09-02  8:04 ` [PATCH 1/7] mmc: sdhci-of-k1: no pinctrl state switching Yixun Lan
2026-09-02  8:04 ` [PATCH 2/7] mmc: sdhci-of-k1: drop duplicated voltage settings Yixun Lan
2026-09-02  8:04 ` [PATCH 3/7] mmc: sdhci-of-k1: configure PHY mode Yixun Lan
2026-09-02  8:04 ` [PATCH 4/7] mmc: sdhci-of-k1: Improve power control Yixun Lan
2026-09-02  8:04 ` [PATCH 5/7] mmc: sdhci-of-k1: Use finest delay granularity for RX tuning Yixun Lan
2026-09-02  8:04 ` [PATCH 6/7] mmc: sdhci-of-k1: Improve RX tuning window Yixun Lan
2026-09-07 15:53   ` Hung-Chun Tseng
2026-09-15  9:48     ` Iker Pedrosa
2026-09-19 11:58       ` alan
2026-12-01  6:30         ` Yixun Lan [this message]
2026-09-02  8:04 ` [PATCH 7/7] mmc: sdhci-of-k1: Implement SD clock gating for voltage switch Yixun Lan
2026-09-09  8:40 ` [PATCH 0/7] mmc: spacemit: improve clock and tuning logic Adrian Hunter
2026-12-01  6:36   ` Yixun Lan

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=20261201063004-GKE27669@kernel.org \
    --to=dlan@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alan.tseng.cs@gmail.com \
    --cc=ikerpedrosam@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=long.wan@linux.spacemit.com \
    --cc=spacemit@lists.linux.dev \
    --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