diff mbox series

[RFC,8/8] arm64: dts: ti: use 'freq-table' in UFS node

Message ID 20220219184554.44887-1-krzysztof.kozlowski@canonical.com (mailing list archive)
State Superseded
Headers show
Series dt-bindings: ufs: add common platform bindings + fixes | expand

Commit Message

Krzysztof Kozlowski Feb. 19, 2022, 6:45 p.m. UTC
The 'freq-table-hz' property is deprecated by UFS bindings.
The uint32-array requires also element to be passed within one <> block.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Nishanth Menon Feb. 21, 2022, 1:13 p.m. UTC | #1
On 19:45-20220219, Krzysztof Kozlowski wrote:
> The 'freq-table-hz' property is deprecated by UFS bindings.
> The uint32-array requires also element to be passed within one <> block.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
>  arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
> index 599861259a30..c3afef0321ae 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
> @@ -1257,7 +1257,9 @@ ufs@4e84000 {
>  			compatible = "cdns,ufshc-m31-16nm", "jedec,ufs-2.0";
>  			reg = <0x0 0x4e84000 0x0 0x10000>;
>  			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
> -			freq-table-hz = <250000000 250000000>, <19200000 19200000>, <19200000 19200000>;
> +			freq-table = <250000000 250000000

<min max> is much more readable and less error prone in case of a large
set.

> +				      19200000 19200000
> +				      19200000 19200000>;

are you sure the removal of the tuple adds value?

>  			clocks = <&k3_clks 277 0>, <&k3_clks 277 1>, <&k3_clks 277 1>;
>  			clock-names = "core_clk", "phy_clk", "ref_clk";
>  			dma-coherent;
> -- 
> 2.32.0
>
Krzysztof Kozlowski Feb. 21, 2022, 1:20 p.m. UTC | #2
On 21/02/2022 14:13, Nishanth Menon wrote:
> On 19:45-20220219, Krzysztof Kozlowski wrote:
>> The 'freq-table-hz' property is deprecated by UFS bindings.
>> The uint32-array requires also element to be passed within one <> block.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>> ---
>>  arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
>> index 599861259a30..c3afef0321ae 100644
>> --- a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
>> @@ -1257,7 +1257,9 @@ ufs@4e84000 {
>>  			compatible = "cdns,ufshc-m31-16nm", "jedec,ufs-2.0";
>>  			reg = <0x0 0x4e84000 0x0 0x10000>;
>>  			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
>> -			freq-table-hz = <250000000 250000000>, <19200000 19200000>, <19200000 19200000>;
>> +			freq-table = <250000000 250000000
> 
> <min max> is much more readable and less error prone in case of a large
> set.

Pairs are easily visible if split per line, so readability is similar.
Not much is lost.

> 
>> +				      19200000 19200000
>> +				      19200000 19200000>;
> 
> are you sure the removal of the tuple adds value?

DT schema requires it, or rather: I do not know how to express uint32
tuples in DT schema. All my tries failed.


Best regards,
Krzysztof
Nishanth Menon Feb. 22, 2022, 2:07 p.m. UTC | #3
On 14:20-20220221, Krzysztof Kozlowski wrote:
> On 21/02/2022 14:13, Nishanth Menon wrote:
> > On 19:45-20220219, Krzysztof Kozlowski wrote:
> >> The 'freq-table-hz' property is deprecated by UFS bindings.
> >> The uint32-array requires also element to be passed within one <> block.
> >>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> >> ---
> >>  arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 4 +++-
> >>  1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
> >> index 599861259a30..c3afef0321ae 100644
> >> --- a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
> >> +++ b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
> >> @@ -1257,7 +1257,9 @@ ufs@4e84000 {
> >>  			compatible = "cdns,ufshc-m31-16nm", "jedec,ufs-2.0";
> >>  			reg = <0x0 0x4e84000 0x0 0x10000>;
> >>  			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
> >> -			freq-table-hz = <250000000 250000000>, <19200000 19200000>, <19200000 19200000>;
> >> +			freq-table = <250000000 250000000
> > 
> > <min max> is much more readable and less error prone in case of a large
> > set.
> 
> Pairs are easily visible if split per line, so readability is similar.
> Not much is lost.
> 
> > 
> >> +				      19200000 19200000
> >> +				      19200000 19200000>;
> > 
> > are you sure the removal of the tuple adds value?
> 
> DT schema requires it, or rather: I do not know how to express uint32
> tuples in DT schema. All my tries failed.

https://www.kernel.org/doc/Documentation/devicetree/bindings/opp/opp-v1.yaml
comes to mind..
Krzysztof Kozlowski Feb. 22, 2022, 2:24 p.m. UTC | #4
On 22/02/2022 15:07, Nishanth Menon wrote:
> On 14:20-20220221, Krzysztof Kozlowski wrote:
>> On 21/02/2022 14:13, Nishanth Menon wrote:
>>> On 19:45-20220219, Krzysztof Kozlowski wrote:
>>>> The 'freq-table-hz' property is deprecated by UFS bindings.
>>>> The uint32-array requires also element to be passed within one <> block.
>>>>
>>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>>>> ---
>>>>  arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 4 +++-
>>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
>>>> index 599861259a30..c3afef0321ae 100644
>>>> --- a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
>>>> +++ b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
>>>> @@ -1257,7 +1257,9 @@ ufs@4e84000 {
>>>>  			compatible = "cdns,ufshc-m31-16nm", "jedec,ufs-2.0";
>>>>  			reg = <0x0 0x4e84000 0x0 0x10000>;
>>>>  			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
>>>> -			freq-table-hz = <250000000 250000000>, <19200000 19200000>, <19200000 19200000>;
>>>> +			freq-table = <250000000 250000000
>>>
>>> <min max> is much more readable and less error prone in case of a large
>>> set.
>>
>> Pairs are easily visible if split per line, so readability is similar.
>> Not much is lost.
>>
>>>
>>>> +				      19200000 19200000
>>>> +				      19200000 19200000>;
>>>
>>> are you sure the removal of the tuple adds value?
>>
>> DT schema requires it, or rather: I do not know how to express uint32
>> tuples in DT schema. All my tries failed.
> 
> https://www.kernel.org/doc/Documentation/devicetree/bindings/opp/opp-v1.yaml
> comes to mind..

This works nice, thanks!


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
index 599861259a30..c3afef0321ae 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
@@ -1257,7 +1257,9 @@  ufs@4e84000 {
 			compatible = "cdns,ufshc-m31-16nm", "jedec,ufs-2.0";
 			reg = <0x0 0x4e84000 0x0 0x10000>;
 			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
-			freq-table-hz = <250000000 250000000>, <19200000 19200000>, <19200000 19200000>;
+			freq-table = <250000000 250000000
+				      19200000 19200000
+				      19200000 19200000>;
 			clocks = <&k3_clks 277 0>, <&k3_clks 277 1>, <&k3_clks 277 1>;
 			clock-names = "core_clk", "phy_clk", "ref_clk";
 			dma-coherent;