[PATCH 1/2] dt-bindings: ufs: qcom: Use 'ufshc' as the node name for UFS controller nodes

Manivannan Sadhasivam posted 2 patches 1 year, 9 months ago
[PATCH 1/2] dt-bindings: ufs: qcom: Use 'ufshc' as the node name for UFS controller nodes
Posted by Manivannan Sadhasivam 1 year, 9 months ago
Devicetree binding has documented the node name for UFS controllers as
'ufshc'. So let's use it instead of 'ufs' which is for the UFS devices.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
index 10c146424baa..37112e17e474 100644
--- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
@@ -273,7 +273,7 @@ examples:
         #address-cells = <2>;
         #size-cells = <2>;
 
-        ufs@1d84000 {
+        ufshc@1d84000 {
             compatible = "qcom,sm8450-ufshc", "qcom,ufshc",
                          "jedec,ufs-2.0";
             reg = <0 0x01d84000 0 0x3000>;

-- 
2.25.1
Re: [PATCH 1/2] dt-bindings: ufs: qcom: Use 'ufshc' as the node name for UFS controller nodes
Posted by Stephen Boyd 1 year, 9 months ago
Quoting Manivannan Sadhasivam (2024-05-14 06:08:40)
> Devicetree binding has documented the node name for UFS controllers as
> 'ufshc'. So let's use it instead of 'ufs' which is for the UFS devices.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Re: [PATCH 1/2] dt-bindings: ufs: qcom: Use 'ufshc' as the node name for UFS controller nodes
Posted by Conor Dooley 1 year, 9 months ago
On Tue, May 14, 2024 at 03:08:40PM +0200, Manivannan Sadhasivam wrote:
> Devicetree binding has documented the node name for UFS controllers as
> 'ufshc'. So let's use it instead of 'ufs' which is for the UFS devices.

Can you point out where that's been documented?
Thanks,
Conor.

> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> index 10c146424baa..37112e17e474 100644
> --- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> +++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> @@ -273,7 +273,7 @@ examples:
>          #address-cells = <2>;
>          #size-cells = <2>;
>  
> -        ufs@1d84000 {
> +        ufshc@1d84000 {
>              compatible = "qcom,sm8450-ufshc", "qcom,ufshc",
>                           "jedec,ufs-2.0";
>              reg = <0 0x01d84000 0 0x3000>;
> 
> -- 
> 2.25.1
> 
Re: [PATCH 1/2] dt-bindings: ufs: qcom: Use 'ufshc' as the node name for UFS controller nodes
Posted by Manivannan Sadhasivam 1 year, 9 months ago
On Tue, May 14, 2024 at 07:50:15PM +0100, Conor Dooley wrote:
> On Tue, May 14, 2024 at 03:08:40PM +0200, Manivannan Sadhasivam wrote:
> > Devicetree binding has documented the node name for UFS controllers as
> > 'ufshc'. So let's use it instead of 'ufs' which is for the UFS devices.
> 
> Can you point out where that's been documented?

Typo here. s/Devicetree binding/Devicetree spec

https://github.com/devicetree-org/devicetree-specification/blob/main/source/chapter2-devicetree-basics.rst#generic-names-recommendation

- Mani

> Thanks,
> Conor.
> 
> > 
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> >  Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> > index 10c146424baa..37112e17e474 100644
> > --- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> > +++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> > @@ -273,7 +273,7 @@ examples:
> >          #address-cells = <2>;
> >          #size-cells = <2>;
> >  
> > -        ufs@1d84000 {
> > +        ufshc@1d84000 {
> >              compatible = "qcom,sm8450-ufshc", "qcom,ufshc",
> >                           "jedec,ufs-2.0";
> >              reg = <0 0x01d84000 0 0x3000>;
> > 
> > -- 
> > 2.25.1
> > 



-- 
மணிவண்ணன் சதாசிவம்
Re: [PATCH 1/2] dt-bindings: ufs: qcom: Use 'ufshc' as the node name for UFS controller nodes
Posted by Conor Dooley 1 year, 9 months ago
On Wed, May 15, 2024 at 09:50:05AM +0200, Manivannan Sadhasivam wrote:
> On Tue, May 14, 2024 at 07:50:15PM +0100, Conor Dooley wrote:
> > On Tue, May 14, 2024 at 03:08:40PM +0200, Manivannan Sadhasivam wrote:
> > > Devicetree binding has documented the node name for UFS controllers as
> > > 'ufshc'. So let's use it instead of 'ufs' which is for the UFS devices.
> > 
> > Can you point out where that's been documented?
> 
> Typo here. s/Devicetree binding/Devicetree spec
> 
> https://github.com/devicetree-org/devicetree-specification/blob/main/source/chapter2-devicetree-basics.rst#generic-names-recommendation

Ah, that makes sense. I grepped for it in the kernel tree and didn't see
anything so I was a bit confused..
Re: [PATCH 1/2] dt-bindings: ufs: qcom: Use 'ufshc' as the node name for UFS controller nodes
Posted by Krzysztof Kozlowski 1 year, 9 months ago
On 15/05/2024 09:50, Manivannan Sadhasivam wrote:
> On Tue, May 14, 2024 at 07:50:15PM +0100, Conor Dooley wrote:
>> On Tue, May 14, 2024 at 03:08:40PM +0200, Manivannan Sadhasivam wrote:
>>> Devicetree binding has documented the node name for UFS controllers as
>>> 'ufshc'. So let's use it instead of 'ufs' which is for the UFS devices.
>>
>> Can you point out where that's been documented?
> 
> Typo here. s/Devicetree binding/Devicetree spec
> 
> https://github.com/devicetree-org/devicetree-specification/blob/main/source/chapter2-devicetree-basics.rst#generic-names-recommendation

I read your explanation in DT spec commit:

"In a lot of places, 'ufs' is used as the node name to identify the host
    controller, but it is wrong since 'ufs' denotes 'UFS device'."

but isn't this the same as with MMC? We do not call the nodes "mmchc" or
"mmch", even though all of them are hosts, because "mmc" is the card.
The same for most of other storage devices. Or USB. The term
"controller" appears only for few cases like clocks, resets and power.

When looking at storage nodes, ufsHC is an exception here.

Best regards,
Krzysztof
Re: [PATCH 1/2] dt-bindings: ufs: qcom: Use 'ufshc' as the node name for UFS controller nodes
Posted by Manivannan Sadhasivam 1 year, 9 months ago
On Wed, May 15, 2024 at 10:03:36AM +0200, Krzysztof Kozlowski wrote:
> On 15/05/2024 09:50, Manivannan Sadhasivam wrote:
> > On Tue, May 14, 2024 at 07:50:15PM +0100, Conor Dooley wrote:
> >> On Tue, May 14, 2024 at 03:08:40PM +0200, Manivannan Sadhasivam wrote:
> >>> Devicetree binding has documented the node name for UFS controllers as
> >>> 'ufshc'. So let's use it instead of 'ufs' which is for the UFS devices.
> >>
> >> Can you point out where that's been documented?
> > 
> > Typo here. s/Devicetree binding/Devicetree spec
> > 
> > https://github.com/devicetree-org/devicetree-specification/blob/main/source/chapter2-devicetree-basics.rst#generic-names-recommendation
> 
> I read your explanation in DT spec commit:
> 
> "In a lot of places, 'ufs' is used as the node name to identify the host
>     controller, but it is wrong since 'ufs' denotes 'UFS device'."
> 
> but isn't this the same as with MMC? We do not call the nodes "mmchc" or
> "mmch", even though all of them are hosts, because "mmc" is the card.
> The same for most of other storage devices. Or USB. The term
> "controller" appears only for few cases like clocks, resets and power.
> 

The compatible for UFS HC is '*-ufshc', so it makes sense to use 'ufshc' as the
node name. But for other bus controllers like MMC, compatible just mentions
'mmc'.

And there were already nodes using both 'ufshc' and 'ufs', so I wanted to avoid
the confusion and just use 'ufshc'.

- Mani

-- 
மணிவண்ணன் சதாசிவம்