From: Neil Armstrong <neil.armstrong@linaro.org>
To: petr.hodina@protonmail.com, u-boot@lists.u-boot-project.org,
Sumit Garg <sumit.garg@kernel.org>,
u-boot-qcom@groups.io
Cc: Bhupesh Sharma <bhupesh.linux@gmail.com>,
Neha Malcom Francis <n-francis@ti.com>,
Casey Connolly <casey.connolly@linaro.org>,
Tom Rini <trini@konsulko.com>,
Angelo Gioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
David Heidelberg <david@ixit.cz>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Padmarao Begari <padmarao.begari@amd.com>,
Macpaul Lin <macpaul.lin@mediatek.com>,
Julien Stephan <jstephan@baylibre.com>,
Kunihiko Hayashi <hayashi.kunihiko@socionext.com>,
Shawn Lin <shawn.lin@rock-chips.com>,
Jared McArthur <j-mcarthur@ti.com>,
Michal Simek <michal.simek@amd.com>, Udit Kumar <u-kumar1@ti.com>,
Igor Belwon <igor.belwon@mentallysanemainliners.org>,
Tuyen Dang <tuyen.dang.xa@renesas.com>,
Alexey Charkov <alchark@gmail.com>,
Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>,
Simon Glass <sjg@chromium.org>,
Aswin Murugan <aswin.murugan@oss.qualcomm.com>,
Bin Meng <bmeng.cn@gmail.com>,
Marek Vasut <marek.vasut@mailbox.org>,
David Lechner <dlechner@baylibre.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Kory Maincent <kory.maincent@bootlin.com>,
Peng Fan <peng.fan@nxp.com>, Kuan-Wei Chiu <visitorckw@gmail.com>,
Janne Grunau <j@jannau.net>, Julien Masson <jmasson@baylibre.com>,
Raymond Mao <raymond.mao@riscstar.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
Philip Molloy <philip.molloy@analog.com>,
Jerome Forissier <jerome.forissier@arm.com>,
Markus Niebel <Markus.Niebel@ew.tq-group.com>,
Petr Pavlata <petr@acrux.cz>
Subject: Re: [PATCH u-boot 4/8] ufs: add CONFIG_UFS_RESTRICT_TX_LANES
Date: Mon, 5 Oct 2026 11:41:43 +0200 [thread overview]
Message-ID: <a59f088a-d1ea-4ceb-9f91-55b067e12e18@linaro.org> (raw)
In-Reply-To: <20261004-b4-ufs-sony-v1-4-54e71c95ba62@protonmail.com>
On 10/4/26 21:22, Petr Hodina via B4 Relay wrote:
> From: Petr Hodina <petr.hodina@protonmail.com>
>
> Add CONFIG_UFS_RESTRICT_TX_LANES, to restrict the amount
> PA_AVAILTXDATALANES = 1 at the start of ufshcd_link_startup().
>
> Some platforms (notably the Sony Yoshino/Tama families on MSM8998 /
> SDM845) have only a single reliably-usable UFS TX lane.
Why can't this be a quirk set only on those platforms ?
Neil>
> Signed-off-by: Petr Hodina <petr.hodina@protonmail.com>
> ---
> drivers/ufs/Kconfig | 14 ++++++++++++++
> drivers/ufs/ufs-uclass.c | 13 +++++++++++++
> 2 files changed, 27 insertions(+)
>
> diff --git a/drivers/ufs/Kconfig b/drivers/ufs/Kconfig
> index 49472933de3..266e7180152 100644
> --- a/drivers/ufs/Kconfig
> +++ b/drivers/ufs/Kconfig
> @@ -8,6 +8,20 @@ config UFS
> This selects support for Universal Flash Subsystem (UFS).
> Say Y here if you want UFS Support.
>
> +config UFS_RESTRICT_TX_LANES
> + bool "Restrict the number of UFS TX lanes to 1"
> + depends on UFS
> + default n
> + help
> + Say Y here to restrict the number of UFS TX lanes to 1. This saves
> + power at the cost of write performance.
> +
> + This is useful (and on some devices required) for platforms such as
> + the Sony Yoshino/Tama families where only a single TX lane is
> + reliably usable.
> +
> + If unsure, say N.
> +
> config UFS_AMD_VERSAL2
> bool "AMD Versal Gen 2 UFS controller platform driver"
> depends on UFS && ZYNQMP_FIRMWARE
> diff --git a/drivers/ufs/ufs-uclass.c b/drivers/ufs/ufs-uclass.c
> index fdf62a69c02..977ffebc21f 100644
> --- a/drivers/ufs/ufs-uclass.c
> +++ b/drivers/ufs/ufs-uclass.c
> @@ -508,6 +508,19 @@ static int ufshcd_link_startup(struct ufs_hba *hba)
> int ret;
> int retries = DME_LINKSTARTUP_RETRIES;
>
> + if (IS_ENABLED(CONFIG_UFS_RESTRICT_TX_LANES)) {
> + /*
> + * Restrict the number of available TX lanes to 1. This saves
> + * power at the cost of write performance and is required on
> + * some platforms (e.g. Sony Yoshino/Tama) where only a single
> + * TX lane is reliably usable.
> + */
> + ret = ufshcd_dme_set(hba, UIC_ARG_MIB(PA_AVAILTXDATALANES), 1);
> + if (ret)
> + dev_warn(hba->dev, "%s: failed to restrict TX lanes: %d\n",
> + __func__, ret);
> + }
> +
> do {
> ret = ufshcd_ops_link_startup_notify(hba, PRE_CHANGE);
> if (ret)
>
next prev parent reply other threads:[~2026-10-05 13:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 19:22 [PATCH u-boot 0/8] ufs: Sony Yoshino/Tama (MSM8998 / SDM845) UFS bring-up Petr Hodina via B4 Relay
2026-10-04 19:22 ` Petr Hodina
2026-10-04 19:22 ` [PATCH u-boot 1/8] ufs: read product revision and spec version into ufs_dev_desc Petr Hodina via B4 Relay
2026-10-04 19:22 ` Petr Hodina
2026-10-04 19:22 ` [PATCH u-boot 2/8] ufs: add device-quirk infrastructure Petr Hodina via B4 Relay
2026-10-04 19:22 ` Petr Hodina
2026-10-05 9:40 ` Neil Armstrong
2026-10-06 13:23 ` phodina
2026-10-06 13:31 ` Neil Armstrong
2026-10-06 13:39 ` phodina
2026-10-04 19:22 ` [PATCH u-boot 3/8] ufs: program extended HS sync length for SK Hynix devices Petr Hodina via B4 Relay
2026-10-04 19:22 ` Petr Hodina
2026-10-04 19:22 ` [PATCH u-boot 4/8] ufs: add CONFIG_UFS_RESTRICT_TX_LANES Petr Hodina via B4 Relay
2026-10-04 19:22 ` Petr Hodina
2026-10-05 9:41 ` Neil Armstrong [this message]
2026-10-04 19:22 ` [PATCH u-boot 5/8] scsi: ufs: refuse erase/UNMAP on NO_PURGE devices Petr Hodina via B4 Relay
2026-10-04 19:22 ` Petr Hodina
2026-10-05 9:37 ` Neil Armstrong
2026-10-04 19:22 ` [PATCH u-boot 6/8] ufs: print device information at probe Petr Hodina via B4 Relay
2026-10-04 19:22 ` Petr Hodina
2026-10-05 9:36 ` Neil Armstrong
2026-10-04 19:22 ` [PATCH u-boot 7/8] ufs: gate NO_PURGE on Sony Yoshino/Tama platform compatible Petr Hodina via B4 Relay
2026-10-04 19:22 ` Petr Hodina
2026-10-04 19:22 ` [PATCH u-boot 8/8] arm: dts: qcom: akatsuki: re-enable the UFS controller node Petr Hodina via B4 Relay
2026-10-04 19:22 ` Petr Hodina
2026-10-04 19:30 ` [PATCH u-boot 0/8] ufs: Sony Yoshino/Tama (MSM8998 / SDM845) UFS bring-up David Heidelberg
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=a59f088a-d1ea-4ceb-9f91-55b067e12e18@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=Markus.Niebel@ew.tq-group.com \
--cc=alchark@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=aswin.murugan@oss.qualcomm.com \
--cc=balaji.selvanathan@oss.qualcomm.com \
--cc=bhupesh.linux@gmail.com \
--cc=bmeng.cn@gmail.com \
--cc=casey.connolly@linaro.org \
--cc=david@ixit.cz \
--cc=dlechner@baylibre.com \
--cc=hayashi.kunihiko@socionext.com \
--cc=igor.belwon@mentallysanemainliners.org \
--cc=ilias.apalodimas@linaro.org \
--cc=j-mcarthur@ti.com \
--cc=j@jannau.net \
--cc=jerome.forissier@arm.com \
--cc=jmasson@baylibre.com \
--cc=jstephan@baylibre.com \
--cc=kory.maincent@bootlin.com \
--cc=macpaul.lin@mediatek.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=marek.vasut@mailbox.org \
--cc=michal.simek@amd.com \
--cc=n-francis@ti.com \
--cc=padmarao.begari@amd.com \
--cc=peng.fan@nxp.com \
--cc=petr.hodina@protonmail.com \
--cc=petr@acrux.cz \
--cc=philip.molloy@analog.com \
--cc=quentin.schulz@cherry.de \
--cc=raymond.mao@riscstar.com \
--cc=shawn.lin@rock-chips.com \
--cc=sjg@chromium.org \
--cc=sumit.garg@kernel.org \
--cc=trini@konsulko.com \
--cc=tuyen.dang.xa@renesas.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.u-boot-project.org \
--cc=u-kumar1@ti.com \
--cc=visitorckw@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.