[PATCH V1 1/3] dt-bindings: ufs: qcom: Add reg and reg-names

Ram Kumar Dwivedi posted 3 patches 2 months, 1 week ago
There is a newer version of this series
[PATCH V1 1/3] dt-bindings: ufs: qcom: Add reg and reg-names
Posted by Ram Kumar Dwivedi 2 months, 1 week ago
Update the Qualcomm UFS device tree bindings to support Multi-Circular
Queue (MCQ) operation. This includes increasing the maximum number of
register entries from 2 to 3 and extending the accepted values for
reg-names to include "mcq_sqd" and "mcq_vs".

These changes are required to enable MCQ support via Device Tree for
platforms such as SM8650 and SM8750.

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

diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
index 6c6043d9809e..de263118b552 100644
--- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
@@ -86,12 +86,17 @@ properties:
 
   reg:
     minItems: 1
-    maxItems: 2
+    maxItems: 3
 
   reg-names:
-    items:
-      - const: std
-      - const: ice
+    oneOf:
+      - items:
+          - const: std
+          - const: ice
+      - items:
+          - const: ufs_mem
+          - const: mcq_sqd
+          - const: mcq_vs
 
   required-opps:
     maxItems: 1
@@ -177,9 +182,9 @@ allOf:
             - const: rx_lane1_sync_clk
         reg:
           minItems: 1
-          maxItems: 1
+          maxItems: 3
         reg-names:
-          maxItems: 1
+          maxItems: 3
 
   - if:
       properties:
@@ -280,7 +285,7 @@ allOf:
     then:
       properties:
         reg:
-          maxItems: 1
+          maxItems: 3
         clocks:
           minItems: 7
           maxItems: 8
@@ -288,7 +293,7 @@ allOf:
       properties:
         reg:
           minItems: 1
-          maxItems: 2
+          maxItems: 3
         clocks:
           minItems: 7
           maxItems: 9
-- 
2.50.1
Re: [PATCH V1 1/3] dt-bindings: ufs: qcom: Add reg and reg-names
Posted by Krzysztof Kozlowski 2 months, 1 week ago
On 30/07/2025 10:22, Ram Kumar Dwivedi wrote:
> Update the Qualcomm UFS device tree bindings to support Multi-Circular
> Queue (MCQ) operation. This includes increasing the maximum number of
> register entries from 2 to 3 and extending the accepted values for
> reg-names to include "mcq_sqd" and "mcq_vs".
> 
> These changes are required to enable MCQ support via Device Tree for
> platforms such as SM8650 and SM8750.
> 
> Signed-off-by: Ram Kumar Dwivedi <quic_rdwivedi@quicinc.com>
> ---
>  .../devicetree/bindings/ufs/qcom,ufs.yaml     | 21 ++++++++++++-------
>  1 file changed, 13 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> index 6c6043d9809e..de263118b552 100644
> --- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> +++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> @@ -86,12 +86,17 @@ properties:
>  
>    reg:
>      minItems: 1
> -    maxItems: 2
> +    maxItems: 3
>  
>    reg-names:
> -    items:
> -      - const: std
> -      - const: ice
> +    oneOf:
> +      - items:
> +          - const: std
> +          - const: ice
> +      - items:
> +          - const: ufs_mem
> +          - const: mcq_sqd
> +          - const: mcq_vs

This is incompatible change and commit msg is inaccurate here. It says
"extending" but you are not extending at all.

Recent qcom patches love to break ABI and impact users. No.

Best regards,
Krzysztof
Re: [PATCH V1 1/3] dt-bindings: ufs: qcom: Add reg and reg-names
Posted by Ram Kumar Dwivedi 2 months, 1 week ago

On 30-Jul-25 2:41 PM, Krzysztof Kozlowski wrote:
> On 30/07/2025 10:22, Ram Kumar Dwivedi wrote:
>> Update the Qualcomm UFS device tree bindings to support Multi-Circular
>> Queue (MCQ) operation. This includes increasing the maximum number of
>> register entries from 2 to 3 and extending the accepted values for
>> reg-names to include "mcq_sqd" and "mcq_vs".
>>
>> These changes are required to enable MCQ support via Device Tree for
>> platforms such as SM8650 and SM8750.
>>
>> Signed-off-by: Ram Kumar Dwivedi <quic_rdwivedi@quicinc.com>
>> ---
>>  .../devicetree/bindings/ufs/qcom,ufs.yaml     | 21 ++++++++++++-------
>>  1 file changed, 13 insertions(+), 8 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
>> index 6c6043d9809e..de263118b552 100644
>> --- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
>> +++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
>> @@ -86,12 +86,17 @@ properties:
>>  
>>    reg:
>>      minItems: 1
>> -    maxItems: 2
>> +    maxItems: 3
>>  
>>    reg-names:
>> -    items:
>> -      - const: std
>> -      - const: ice
>> +    oneOf:
>> +      - items:
>> +          - const: std
>> +          - const: ice
>> +      - items:
>> +          - const: ufs_mem
>> +          - const: mcq_sqd
>> +          - const: mcq_vs
> 
> This is incompatible change and commit msg is inaccurate here. It says
> "extending" but you are not extending at all.
> 
> Recent qcom patches love to break ABI and impact users. No.
> 
> Best regards,
> Krzysztof


Hi Krzysztof,

Thanks for your feedback.

Regarding your concern about this being an incompatible change — could you please clarify what specific aspect you believe breaks compatibility? 
From my side, I’ve carefully tested the patch and verified that it does not break any existing DTs. I ran the following command to validate against the schema:

make -j32 dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
make -j32 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/ufs/qcom,ufs.yaml

There were no errors reported for any target DTB.

As for the commit message, I acknowledge your point and will revise it in the next patchset to more accurately reflect the nature of the change.

Best regards,
Ram.


Re: [PATCH V1 1/3] dt-bindings: ufs: qcom: Add reg and reg-names
Posted by Krzysztof Kozlowski 2 months, 1 week ago
On 30/07/2025 12:27, Ram Kumar Dwivedi wrote:
> 
> 
> On 30-Jul-25 2:41 PM, Krzysztof Kozlowski wrote:
>> On 30/07/2025 10:22, Ram Kumar Dwivedi wrote:
>>> Update the Qualcomm UFS device tree bindings to support Multi-Circular
>>> Queue (MCQ) operation. This includes increasing the maximum number of
>>> register entries from 2 to 3 and extending the accepted values for
>>> reg-names to include "mcq_sqd" and "mcq_vs".
>>>
>>> These changes are required to enable MCQ support via Device Tree for
>>> platforms such as SM8650 and SM8750.
>>>
>>> Signed-off-by: Ram Kumar Dwivedi <quic_rdwivedi@quicinc.com>
>>> ---
>>>  .../devicetree/bindings/ufs/qcom,ufs.yaml     | 21 ++++++++++++-------
>>>  1 file changed, 13 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
>>> index 6c6043d9809e..de263118b552 100644
>>> --- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
>>> +++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
>>> @@ -86,12 +86,17 @@ properties:
>>>  
>>>    reg:
>>>      minItems: 1
>>> -    maxItems: 2
>>> +    maxItems: 3
>>>  
>>>    reg-names:
>>> -    items:
>>> -      - const: std
>>> -      - const: ice
>>> +    oneOf:
>>> +      - items:
>>> +          - const: std
>>> +          - const: ice
>>> +      - items:
>>> +          - const: ufs_mem
>>> +          - const: mcq_sqd
>>> +          - const: mcq_vs
>>
>> This is incompatible change and commit msg is inaccurate here. It says
>> "extending" but you are not extending at all.
>>
>> Recent qcom patches love to break ABI and impact users. No.
>>
>> Best regards,
>> Krzysztof
> 
> 
> Hi Krzysztof,
> 
> Thanks for your feedback.
> 
> Regarding your concern about this being an incompatible change — could you please clarify what specific aspect you believe breaks compatibility? 
> From my side, I’ve carefully tested the patch and verified that it does not break any existing DTs. I ran the following command to validate against the schema:


I missed that earlier list is not actually used for SM8550 and SM8650.
The syntax is a bit confusing after looking only at diff, which probably
means this binding is getting messy.

I think binding should be just split the constraints are easier to follow.

Best regards,
Krzysztof
Re: [PATCH V1 1/3] dt-bindings: ufs: qcom: Add reg and reg-names
Posted by Krzysztof Kozlowski 2 months, 1 week ago
On 30/07/2025 13:33, Krzysztof Kozlowski wrote:
>>> "extending" but you are not extending at all.
>>>
>>> Recent qcom patches love to break ABI and impact users. No.
>>>
>>> Best regards,
>>> Krzysztof
>>
>>
>> Hi Krzysztof,
>>
>> Thanks for your feedback.
>>
>> Regarding your concern about this being an incompatible change — could you please clarify what specific aspect you believe breaks compatibility? 
>> From my side, I’ve carefully tested the patch and verified that it does not break any existing DTs. I ran the following command to validate against the schema:
> 
> 
> I missed that earlier list is not actually used for SM8550 and SM8650.
> The syntax is a bit confusing after looking only at diff, which probably
> means this binding is getting messy.
> 
> I think binding should be just split the constraints are easier to follow.

I sent a patch for splitting the bindings.

Best regards,
Krzysztof