From: Ajay Neeli <ajaneeli@amd.com>
To: Conor Dooley <conor@kernel.org>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
sai.krishna.potthuri@amd.com, alim.akhtar@samsung.com,
bvanassche@acm.org, beanhuo@micron.com,
linux-scsi@vger.kernel.org, devicetree@vger.kernel.org,
git@amd.com, michal.simek@amd.com, srinivas.goud@amd.com,
radhey.shyam.pandey@amd.com
Subject: Re: [PATCH] dt-bindings: ufs: amd,versal2-ufs: Add ref_clk clock property
Date: Tue, 17 Nov 2026 12:27:35 +0530 [thread overview]
Message-ID: <cca85186-7e00-4fbd-87e6-25c4155c6b72@amd.com> (raw)
In-Reply-To: <20261111-facility-pristine-82e76afe8d8b@spud>
On 11/11/2026 11:43 PM, Conor Dooley wrote:
> On Wed, Nov 11, 2026 at 10:08:40AM +0530, Ajay Neeli wrote:
>> Add ref_clk clock property to specify the reference clock frequency
>> supplied to the UFS device.
>>
>> The AMD Versal2 UFS controller operates with a 26 MHz reference clock.
>> UFS 3.x devices default their bRefClkFreq attribute to 26 MHz, matching
>> the controller, so no explicit configuration is needed. However, UFS 4.0
>> and later devices default bRefClkFreq to 52 MHz, expecting a 52 MHz
>> reference clock. This mismatch causes timing violations and link
>> instability.
>>
>> Adding the ref_clk property allows the UFS driver to read the actual
>> reference clock frequency from the devicetree and program the device
>> bRefClkFreq attribute accordingly during initialization.
>>
>> Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
>> ---
>> .../devicetree/bindings/ufs/amd,versal2-ufs.yaml | 9 +++++----
>> 1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/ufs/amd,versal2-ufs.yaml b/Documentation/devicetree/bindings/ufs/amd,versal2-ufs.yaml
>> index c00ec342d574..e294c0f1b0ce 100644
>> --- a/Documentation/devicetree/bindings/ufs/amd,versal2-ufs.yaml
>> +++ b/Documentation/devicetree/bindings/ufs/amd,versal2-ufs.yaml
>> @@ -20,11 +20,12 @@ properties:
>> maxItems: 1
>>
>> clocks:
>> - maxItems: 1
>> + maxItems: 2
>
> Please add an items list here.
>
Sure, will add it in v2.
>>
>> clock-names:
>> items:
>> - const: core
>> + - const: ref_clk
>
> its a clock by nature, don't restate that in the name.
> pw-bot: changes-requested
The generic UFS platform code currently identifies the reference clock
by the "ref_clk" clock name in ufshcd_parse_clock_info().
Would you prefer that the common UFS code be changed to use "ref" as
well, or should this binding retain "ref_clk" for consistency with the
existing UFS core convention?
>
> Thanks,
> Conor.
>
>>
>> power-domains:
>> maxItems: 1
>> @@ -52,10 +53,10 @@ examples:
>> ufs@f10b0000 {
>> compatible = "amd,versal2-ufs";
>> reg = <0xf10b0000 0x1000>;
>> - clocks = <&ufs_core_clk>;
>> - clock-names = "core";
>> + clocks = <&ufs_core_clk>, <&ufs_ref_clk>;
>> + clock-names = "core", "ref_clk";
>> resets = <&scmi_reset 4>, <&scmi_reset 35>;
>> reset-names = "host", "phy";
>> interrupts = <GIC_SPI 234 IRQ_TYPE_LEVEL_HIGH>;
>> - freq-table-hz = <0 0>;
>> + freq-table-hz = <0 0>, <26000000 26000000>;
>> };
>> --
>> 2.43.7
>>
>>
next prev parent reply other threads:[~2026-11-17 6:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 4:38 [PATCH] dt-bindings: ufs: amd,versal2-ufs: Add ref_clk clock property Ajay Neeli
2026-11-11 18:13 ` Conor Dooley
2026-11-17 6:57 ` Ajay Neeli [this message]
2026-11-17 17:33 ` Conor Dooley
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=cca85186-7e00-4fbd-87e6-25c4155c6b72@amd.com \
--to=ajaneeli@amd.com \
--cc=alim.akhtar@samsung.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=git@amd.com \
--cc=krzk+dt@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=robh@kernel.org \
--cc=sai.krishna.potthuri@amd.com \
--cc=srinivas.goud@amd.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