From: "NG, TZE YEE" <tze.yee.ng@altera.com>
To: "Kathpalia, Tanmay" <tanmay.kathpalia@altera.com>, u-boot@lists.denx.de
Cc: Peng Fan <peng.fan@nxp.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Tom Rini <trini@konsulko.com>,
Marek Vasut <marek.vasut+socfpga@mailbox.org>,
Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>,
Tien Fong Chee <tien.fong.chee@altera.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
u-boot@lists.u-boot-project.org,
Chen Huei Lok <chen.huei.lok@altera.com>,
Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>,
Dinesh Maniyam <dinesh.maniyam@altera.com>,
Boon Khai Ng <boon.khai.ng@altera.com>,
Kok Kiang Hea <kok.kiang.hea@altera.com>
Subject: Re: [PATCH 3/4] mmc: sdhci-cadence6: configure PHY control register per speed mode
Date: Mon, 5 Oct 2026 16:06:06 +0800 [thread overview]
Message-ID: <5a6c71d7-e7a2-488e-920d-0f1bce3a8d6c@altera.com> (raw)
In-Reply-To: <081f83da-8d7c-4cdf-8c6c-151e0372a5a1@altera.com>
On 4/10/2026 2:53 am, Kathpalia, Tanmay wrote:
>
> On 21-09-2026 09:20, NG, TZE YEE wrote:
>>
>>
>> On 13/9/2026 5:06 am, Kathpalia, Tanmay wrote:
>>> Hi Tze,
>>>
>>> On 26-08-2026 08:23, tze.yee.ng@altera.com wrote:
>>>> From: Tze Yee Ng <tze.yee.ng@altera.com>
>>>>
>>>> The PHY control register (0x2080) holds phony_dqs_timing (bits [9:4]),
>>>> which shifts the read-capture strobe relative to the data slices.
>>>>
>>>> Extend the per-mode PHY configuration arrays with a "cdns,phy-ctrl-*"
>>>> entry (default 0x41F0) and program register 0x2080 during PHY
>>>> adjustment. This lets each speed mode - and each board via device
>>>> tree -
>>>> select an appropriate value.
>>>>
>>>> Signed-off-by: Tze Yee Ng <tze.yee.ng@altera.com>
>>>> ---
>>>
>>> The PHY_CTRL default needs to be corrected. All six tables also use the
>>> same 0x41F0, so this is not actually per-mode.
>>>
>>> Please fix the defaults.
>>>
>>> Regards,
>>> Tanmay
>>
>> Hi Tanmay,
>>
>> 0x41F0 is the PHY_CTRL (0x2080) reset value from the PHY spec. The
>> driver never wrote this register before, so the PHY already ran at
>> 0x41F0 in every mode. Using it as the default in all six tables just
>> preserves that (the write is a no-op unless overridden), while making
>> the register tunable per mode/board via cdns,phy-ctrl-<mode> in DT,
>> e.g. on Agilex5:
>>
>> 013b: cdns,phy-ctrl-emmc-ddr = <0x4010>; (phony_dqs_timing = 1)
>> modular: cdns,phy-ctrl-emmc-ddr = <0x4000>; (phony_dqs_timing = 0)
>>
>>
>> So the defaults match only because the reset value is mode-independent;
>> the real tuning lives in DT. You're right that six bare 0x41F0
>> literals are misleading. For v3 I'll add a named constant
>> (SDHCI_CDNS6_PHY_CTRL_REG_DEFAULT = 0x000041F0) for the default and
>> reword the commit to say the register is made programmable with the
>> reset value as default (no functional change), overridable per mode/
>> board via DT.
>>
>> Does that work for you, or did you expect distinct per-mode defaults? I
>> don't have validated per-mode values, that tuning is meant to live in DT.
>>
>>
>
> I expect mode-specific, validated defaults, consistent with the other
> PHY configuration values in each mode table.
> Please determine the appropriate default for each speed mode rather
> than using 0x41F0 universally. Board-specific DT values may still
> override those defaults where required.
Hi Tanmay,
For v3, I'll drop the universal 0x41F0 and the per-mode cdns,phy-ctrl
table entirely. The PHY_CTRL reset value already works for the SD/eMMC
SDR and HS modes, so there are no per-mode defaults to validate there,
the driver simply leaves PHY_CTRL untouched in those modes.
Only the DDR read path is sensitive to phony_dqs_timing, so the driver
programs it just for DDR50/DDR52 via a single mode-neutral property,
cdns,ddr-phony-dqs-timing (shared by SD DDR50 and eMMC DDR52). It
defaults to 0 (the neutral assertion timing) and a board whose DDR read
path needs tuning sets it explicitly: SoCDK, eMMC and 013B use 1, while
the modular SoM's longer SD path uses the default 0.
The binding goes through Linux (its canonical home), currently under
review:
https://lore.kernel.org/all/25649477d9967bb04b12c6e60b0ee76443f356af.1790074790.git.tze.yee.ng@altera.com/
I've adopted the cdns,ddr-* naming you recommended there, so the U-Boot
property matches the binding.
Let me know if you see it differently.
Thanks,
Tze Yee
next prev parent reply other threads:[~2026-10-05 8:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 2:52 [PATCH 0/4] mmc: sdhci-cadence6: harden PHY config tables and enable Agilex5 UHS modes tze.yee.ng
2026-08-26 2:53 ` [PATCH 1/4] mmc: sdhci-cadence6: use const PHY config tables with per-call overrides tze.yee.ng
2026-09-12 20:26 ` Kathpalia, Tanmay
2026-09-21 3:39 ` NG, TZE YEE
2026-08-26 2:53 ` [PATCH 2/4] mmc: sdhci-cadence6: name PHY and controller config table slots tze.yee.ng
2026-09-12 20:36 ` Kathpalia, Tanmay
2026-09-21 3:40 ` NG, TZE YEE
2026-08-26 2:53 ` [PATCH 3/4] mmc: sdhci-cadence6: configure PHY control register per speed mode tze.yee.ng
2026-09-12 21:06 ` Kathpalia, Tanmay
2026-09-21 3:50 ` NG, TZE YEE
2026-10-03 18:53 ` Kathpalia, Tanmay
2026-10-05 8:06 ` NG, TZE YEE [this message]
2026-10-18 19:52 ` Kathpalia, Tanmay
2026-08-26 2:53 ` [PATCH 4/4] arm: dts: socfpga: agilex5: add SD/eMMC UHS PHY timing tze.yee.ng
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=5a6c71d7-e7a2-488e-920d-0f1bce3a8d6c@altera.com \
--to=tze.yee.ng@altera.com \
--cc=alif.zakuan.yuslaimi@altera.com \
--cc=boon.khai.ng@altera.com \
--cc=chen.huei.lok@altera.com \
--cc=dinesh.maniyam@altera.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jh80.chung@samsung.com \
--cc=kok.kiang.hea@altera.com \
--cc=marek.vasut+socfpga@mailbox.org \
--cc=peng.fan@nxp.com \
--cc=simon.k.r.goldschmidt@gmail.com \
--cc=tanmay.kathpalia@altera.com \
--cc=tien.fong.chee@altera.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=u-boot@lists.u-boot-project.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