[PATCH V2 1/4] ufs: dt-bindings: Document gear and rate limit properties

Ram Kumar Dwivedi posted 4 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH V2 1/4] ufs: dt-bindings: Document gear and rate limit properties
Posted by Ram Kumar Dwivedi 1 month, 1 week ago
Add optional "limit-hs-gear" and "limit-rate" properties to the
UFS controller common binding. These properties allow limiting
the maximum HS gear and rate.

This is useful in cases where the customer board may have signal
integrity, clock configuration or layout issues that prevent reliable
operation at higher gears. Such limitations are especially critical in
those platforms, where stability is prioritized over peak performance.

Signed-off-by: Ram Kumar Dwivedi <quic_rdwivedi@quicinc.com>
---
 .../devicetree/bindings/ufs/ufs-common.yaml      | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/ufs/ufs-common.yaml b/Documentation/devicetree/bindings/ufs/ufs-common.yaml
index 31fe7f30ff5b..baa978389ec7 100644
--- a/Documentation/devicetree/bindings/ufs/ufs-common.yaml
+++ b/Documentation/devicetree/bindings/ufs/ufs-common.yaml
@@ -89,6 +89,22 @@ properties:
 
   msi-parent: true
 
+  limit-hs-gear:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 5
+    description:
+      Restricts the maximum HS gear used in both TX and RX directions,
+      typically for hardware or power constraints in automotive use cases.
+
+  limit-rate:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [1, 2]
+    description:
+      Restricts the UFS controller to Rate A (1) or Rate B (2) for both
+      TX and RX directions, often required in automotive environments due
+      to hardware limitations.
+
 dependencies:
   freq-table-hz: [ clocks ]
   operating-points-v2: [ clocks, clock-names ]
-- 
2.50.1
Re: [PATCH V2 1/4] ufs: dt-bindings: Document gear and rate limit properties
Posted by Krzysztof Kozlowski 1 month, 1 week ago
On Thu, Aug 21, 2025 at 03:46:06PM +0530, Ram Kumar Dwivedi wrote:
> +  limit-hs-gear:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    minimum: 1
> +    maximum: 5

default:

> +    description:
> +      Restricts the maximum HS gear used in both TX and RX directions,
> +      typically for hardware or power constraints in automotive use cases.
> +
> +  limit-rate:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [1, 2]

default:

> +    description:
> +      Restricts the UFS controller to Rate A (1) or Rate B (2) for both

Is 1 and 2 known in UFS spec? Feels like you wanted here string for 'a'
and 'b'.

Best regards,
Krzysztof
Re: [PATCH V2 1/4] ufs: dt-bindings: Document gear and rate limit properties
Posted by Ram Kumar Dwivedi 1 month, 1 week ago

On 24-Aug-25 2:59 PM, Krzysztof Kozlowski wrote:
> On Thu, Aug 21, 2025 at 03:46:06PM +0530, Ram Kumar Dwivedi wrote:
>> +  limit-hs-gear:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    minimum: 1
>> +    maximum: 5
> 
> default:

Hi Krzysztof,

I will add it in next patchset

Thanks,
Ram.

> 
>> +    description:
>> +      Restricts the maximum HS gear used in both TX and RX directions,
>> +      typically for hardware or power constraints in automotive use cases.
>> +
>> +  limit-rate:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    enum: [1, 2]
> 
> default:

I will add it in next patchset

Thanks,
Ram.> 
>> +    description:
>> +      Restricts the UFS controller to Rate A (1) or Rate B (2) for both
> 
> Is 1 and 2 known in UFS spec? Feels like you wanted here string for 'a'
> and 'b'.


Yes, 1 and 2 is mentioned in MIPI Unipro(UFS Interconnect layer) spec.

Thanks,
Ram.

> 
> Best regards,
> Krzysztof
>