Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] Add static TX Equalization settings support from DT
@ 2026-05-01 13:44 Can Guo
  2026-05-01 13:44 ` [PATCH 1/2] dt-bindings: ufs: Document static TX Equalization settings properties Can Guo
  2026-05-01 13:44 ` [PATCH 2/2] scsi: ufs: core: Add support for static TX Equalization settings Can Guo
  0 siblings, 2 replies; 5+ messages in thread
From: Can Guo @ 2026-05-01 13:44 UTC (permalink / raw)
  To: bvanassche, beanhuo, peter.wang, martin.petersen, mani
  Cc: linux-scsi, Can Guo

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-02  9:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-01 13:44 [PATCH 0/2] Add static TX Equalization settings support from DT Can Guo
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox