Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Can Guo <can.guo@oss.qualcomm.com>
To: bvanassche@acm.org, beanhuo@micron.com, peter.wang@mediatek.com,
	martin.petersen@oracle.com, mani@kernel.org
Cc: linux-scsi@vger.kernel.org, Can Guo <can.guo@oss.qualcomm.com>
Subject: [PATCH 0/2] Add static TX Equalization settings support from DT
Date: Fri,  1 May 2026 06:44:16 -0700	[thread overview]
Message-ID: <20260501134418.863432-1-can.guo@oss.qualcomm.com> (raw)

Hi,

This series adds support for board-specific static TX Equalization settings
provided through device tree.

This series is based on the earlier TX Equalization enablement work and
persistent storage/retrieval of optimal TX Equalization settings work:
https://lore.kernel.org/all/20260325152154.1604082-1-can.guo@oss.qualcomm.com
https://lore.kernel.org/all/20260424151420.111675-1-can.guo@oss.qualcomm.com

Background
==========

For some boards, HW design teams also provide pre-characterized static TX
Equalization values per gear/lane. This series adds a DT path for those
static values.

Relationship with Adaptive TX Equalization
==========================================

Adaptive TX Equalization remains the primary path when enabled.

Static TX Equalization settings from DT are board-specific baseline values,
but when adaptive TX Equalization is used, static settings are not final:
- If valid settings are retrieved from qTxEQGnSettings/wTxEQGnSettingsExt,
those retrieved settings override static DT settings.
- If retrieval is not available/valid, TX EQTR runs and trained settings
override static DT settings.

So static DT settings are a fallback and are intended for cases where
adaptive TX Equalization is not enabled/used.

No behavior changes for platforms that do not provide `txeq-settings-g*`
properties.

What this series adds
=====================

1. dt-bindings:
- Document `txeq-settings-g[1-6]` in `ufs-common.yaml`.
- Define tuple format as `(PreShoot, DeEmphasis, PreCodeEn)` in lane order:
Host Lane 0, [Host Lane 1], Device Lane 0, [Device Lane 1].

2. UFS core/platform integration:
- Parse and validate per-gear DT TX EQ settings during platform init.
- Store parsed values into per-gear TX EQ params and mark them as static.
- Integrate static-state handling in TX EQ flow so static entries are
  handled through the adaptive TX Equalization path and then converted to
  normal runtime params.


Can Guo (2):
  dt-bindings: ufs: Document static TX Equalization settings properties
  scsi: ufs: core: Add support for static TX Equalization settings

 .../devicetree/bindings/ufs/ufs-common.yaml   | 11 +++
 drivers/ufs/core/ufs-txeq.c                   |  4 +-
 drivers/ufs/host/ufshcd-pltfrm.c              | 82 +++++++++++++++++++
 include/ufs/ufshcd.h                          |  5 ++
 4 files changed, 101 insertions(+), 1 deletion(-)

-- 
2.34.1


             reply	other threads:[~2026-05-01 13:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-01 13:44 Can Guo [this message]
2026-05-01 13:44 ` [PATCH 1/2] dt-bindings: ufs: Document static TX Equalization settings properties Can Guo
2026-05-01 17:02   ` Conor Dooley
2026-05-02  9:30     ` Can Guo
2026-05-01 13:44 ` [PATCH 2/2] scsi: ufs: core: Add support for static TX Equalization settings Can Guo

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=20260501134418.863432-1-can.guo@oss.qualcomm.com \
    --to=can.guo@oss.qualcomm.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=peter.wang@mediatek.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