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 6/8] ufs: print device information at probe
Date: Mon, 5 Oct 2026 11:36:00 +0200 [thread overview]
Message-ID: <3524dbdf-dc86-4312-a57f-7e2f16c87632@linaro.org> (raw)
In-Reply-To: <20261004-b4-ufs-sony-v1-6-54e71c95ba62@protonmail.com>
Hi,
On 10/4/26 21:22, Petr Hodina via B4 Relay wrote:
> From: Petr Hodina <petr.hodina@protonmail.com>
>
> Dump the key UFS device properties (manufacturer, model, fw revision,
> spec version, negotiated gear/lane/power, and the applied device quirks)
> at the end of ufs_start().
Can you add a Kconfig config to enable this ?
Thanks,
Neil
>
> Signed-off-by: Petr Hodina <petr.hodina@protonmail.com>
> ---
> drivers/ufs/ufs-uclass.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 54 insertions(+)
>
> diff --git a/drivers/ufs/ufs-uclass.c b/drivers/ufs/ufs-uclass.c
> index 7dfba3ac1ac..3cc4fd6bde3 100644
> --- a/drivers/ufs/ufs-uclass.c
> +++ b/drivers/ufs/ufs-uclass.c
> @@ -2218,6 +2218,58 @@ static void ufshcd_def_desc_sizes(struct ufs_hba *hba)
> hba->desc_size.hlth_desc = QUERY_DESC_HEALTH_DEF_SIZE;
> }
>
> +/* Map a JEDEC UFS manufacturer id to a human-readable vendor name */
> +static const char *ufshcd_vendor_name(u16 mid)
> +{
> + switch (mid) {
> + case UFS_VENDOR_TOSHIBA: return "Toshiba/Kioxia";
> + case UFS_VENDOR_SAMSUNG: return "Samsung";
> + case UFS_VENDOR_SKHYNIX: return "SK Hynix";
> + case UFS_VENDOR_MICRON: return "Micron";
> + case UFS_VENDOR_WDC: return "Western Digital";
> + default: return NULL;
> + }
> +}
> +
> +static void ufshcd_rtrim(char *s)
> +{
> + size_t n = strlen(s);
> +
> + while (n && s[n - 1] == ' ')
> + s[--n] = '\0';
> +}
> +
> +static void ufshcd_print_dev_info(struct ufs_hba *hba,
> + struct ufs_dev_desc *card)
> +{
> + const char *vendor = ufshcd_vendor_name(card->wmanufacturerid);
> +
> + ufshcd_rtrim(card->model);
> + ufshcd_rtrim(card->revision);
> +
> + printf("UFS Device Information (%s)\n", hba->dev->name);
> + if (vendor)
> + printf(" Manufacturer: %s (0x%04x)\n", vendor,
> + card->wmanufacturerid);
> + else
> + printf(" Manufacturer ID: 0x%04x\n", card->wmanufacturerid);
> + printf(" Model: %s\n",
> + card->model[0] ? card->model : "(unset)");
> + printf(" Revision: %s\n",
> + card->revision[0] ? card->revision : "(unset)");
> + printf(" Spec Version: 0x%04x\n", card->wspecversion);
> + printf(" Gear - RX: %u, TX: %u\n",
> + hba->pwr_info.gear_rx, hba->pwr_info.gear_tx);
> + printf(" Lane - RX: %u, TX: %u\n",
> + hba->pwr_info.lane_rx, hba->pwr_info.lane_tx);
> + printf(" Power - RX: %u, TX: %u, HS rate: %u\n",
> + hba->pwr_info.pwr_rx, hba->pwr_info.pwr_tx,
> + hba->pwr_info.hs_rate);
> + printf(" Device Quirks: 0x%08x\n", hba->dev_quirks);
> + printf(" NO_PURGE Quirk: %s\n",
> + (hba->dev_quirks & UFS_DEVICE_QUIRK_NO_PURGE) ? "Yes" : "No");
> +}
> +
> static int ufs_start(struct ufs_hba *hba)
> {
> struct ufs_dev_desc card = {0};
> @@ -2268,6 +2320,8 @@ static int ufs_start(struct ufs_hba *hba)
> ufshcd_print_pwr_info(hba);
> }
>
> + ufshcd_print_dev_info(hba, &card);
> +
> return 0;
> }
>
>
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
2026-10-04 19:22 ` Petr Hodina via B4 Relay
2026-10-04 19:22 ` [PATCH u-boot 1/8] ufs: read product revision and spec version into ufs_dev_desc Petr Hodina
2026-10-04 19:22 ` Petr Hodina via B4 Relay
2026-10-04 19:22 ` [PATCH u-boot 2/8] ufs: add device-quirk infrastructure Petr Hodina
2026-10-04 19:22 ` Petr Hodina via B4 Relay
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
2026-10-04 19:22 ` Petr Hodina via B4 Relay
2026-10-04 19:22 ` [PATCH u-boot 4/8] ufs: add CONFIG_UFS_RESTRICT_TX_LANES Petr Hodina
2026-10-04 19:22 ` Petr Hodina via B4 Relay
2026-10-05 9:41 ` Neil Armstrong
2026-10-04 19:22 ` [PATCH u-boot 5/8] scsi: ufs: refuse erase/UNMAP on NO_PURGE devices Petr Hodina
2026-10-04 19:22 ` Petr Hodina via B4 Relay
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
2026-10-04 19:22 ` Petr Hodina via B4 Relay
2026-10-05 9:36 ` Neil Armstrong [this message]
2026-10-04 19:22 ` [PATCH u-boot 7/8] ufs: gate NO_PURGE on Sony Yoshino/Tama platform compatible Petr Hodina
2026-10-04 19:22 ` Petr Hodina via B4 Relay
2026-10-04 19:22 ` [PATCH u-boot 8/8] arm: dts: qcom: akatsuki: re-enable the UFS controller node Petr Hodina
2026-10-04 19:22 ` Petr Hodina via B4 Relay
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=3524dbdf-dc86-4312-a57f-7e2f16c87632@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.