All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ajay Neeli" <ajay.neeli@amd.com>
Cc: linux-scsi@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 2/2] dt-bindings: ufs: amd,versal2-ufs: Add reference clock
Date: Wed, 25 Nov 2026 09:35:21 +0000	[thread overview]
Message-ID: <sashiko-outbox-233016@kernel.org> (raw)
In-Reply-To: <20261125092351.2807658-3-ajay.neeli@amd.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dt-bindings: ufs: amd,versal2-ufs: ref clock name ignored by
  ufshcd_init_clocks()
--

commit 533c5c18f1ac18e00d180f090ca93237f628f615
Author: Ajay Neeli <ajay.neeli@amd.com>

dt-bindings: ufs: amd,versal2-ufs: Add reference clock

This commit adds the reference clock and its "ref" clock-names entry to the
AMD Versal Gen 2 UFS devicetree binding schema so the driver can program the
device bRefClkFreq attribute.

> diff --git a/Documentation/devicetree/bindings/ufs/amd,versal2-ufs.yaml b/Documentation/devicetree/bindings/ufs/amd,versal2-ufs.yaml
> index c00ec342d5743..11138578975f5 100644
> --- a/Documentation/devicetree/bindings/ufs/amd,versal2-ufs.yaml
> +++ b/Documentation/devicetree/bindings/ufs/amd,versal2-ufs.yaml
> @@ -20,11 +20,14 @@ properties:
>      maxItems: 1
>  
>    clocks:
> -    maxItems: 1
> +    items:
> +      - description: UFS core clock
> +      - description: UFS reference clock
>  
>    clock-names:
>      items:
>        - const: core
> +      - const: ref

[Severity: Medium]
Will naming this clock "ref" actually allow the UFS core to parse the
reference clock frequency and program bRefClkFreq?

Earlier commit "scsi: ufs: core: Support "ref" clock name" updated
ufshcd_parse_clock_info() to set clki->keep_link_active for "ref", but
ufshcd_init_clocks() still only checks for "ref_clk":

drivers/ufs/core/ufshcd.c:ufshcd_init_clocks() {
    ...
		if (!strcmp(clki->name, "ref_clk"))
			ufshcd_parse_dev_ref_clk_freq(hba, clki->clk);
    ...
}

With clock-names set to "ref", hba->dev_ref_clk_freq remains
REF_CLK_FREQ_INVAL, so ufshcd_post_device_init() skips
ufshcd_set_dev_ref_clk() and leaves UFS 4.0+ devices at their 52 MHz default.
ufshcd_parse_operating_points() in drivers/ufs/host/ufshcd-pltfrm.c also
checks only for "ref_clk" when setting clki->keep_link_active.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125092351.2807658-1-ajay.neeli@amd.com?part=2

      reply	other threads:[~2026-11-25  9:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  9:23 [PATCH v2 0/2] UFS: Add reference clock support for AMD Versal2 Ajay Neeli
2026-11-25  9:23 ` [PATCH v2 1/2] scsi: ufs: core: Support "ref" clock name Ajay Neeli
2026-11-25  9:32   ` sashiko-bot
2026-11-25  9:23 ` [PATCH v2 2/2] dt-bindings: ufs: amd,versal2-ufs: Add reference clock Ajay Neeli
2026-11-25  9:35   ` sashiko-bot [this message]

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=sashiko-outbox-233016@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ajay.neeli@amd.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.