diff mbox series

[v2,3/4] dt-bindings: remoteproc: qcom: wcnss: Add qcom,pronto compatible

Message ID 20220908184925.2714098-4-sireeshkodali1@gmail.com (mailing list archive)
State Superseded
Headers show
Series remoteproc: qcom: Add support for pronto-v3 | expand

Commit Message

Sireesh Kodali Sept. 8, 2022, 6:49 p.m. UTC
The qcom,pronto compatible is used in the wcn36xx driver to determine
which register to access. However, this compatible was not documented.
This patch documents the existing compatible as is, since it isn't
immediately clear why the wcn36xx driver uses this extra compatible,
rather than relying directly on the regular compatible string.

Signed-off-by: Sireesh Kodali <sireeshkodali1@gmail.com>
---
 .../bindings/remoteproc/qcom,wcnss-pil.yaml      | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

Comments

Krzysztof Kozlowski Sept. 9, 2022, 8 a.m. UTC | #1
On 08/09/2022 20:49, Sireesh Kodali wrote:
> The qcom,pronto compatible is used in the wcn36xx driver to determine
> which register to access. However, this compatible was not documented.
> This patch documents the existing compatible as is, since it isn't
> immediately clear why the wcn36xx driver uses this extra compatible,
> rather than relying directly on the regular compatible string.

The patch does much more - messes entirely all compatibles...

> 
> Signed-off-by: Sireesh Kodali <sireeshkodali1@gmail.com>
> ---
>  .../bindings/remoteproc/qcom,wcnss-pil.yaml      | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
> index bc18139fdb91..5e4a97e9d330 100644
> --- a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
> @@ -15,10 +15,18 @@ description:
>  
>  properties:
>    compatible:
> -    enum:
> -      - qcom,riva-pil
> -      - qcom,pronto-v1-pil
> -      - qcom,pronto-v2-pil
> +    description:
> +      Append "qcom,pronto" if the device is actually pronto, and not riva
> +    oneOf:
> +      - items:
> +          - enum:
> +              - qcom,pronto-v1-pil
> +              - qcom,pronto-v2-pil
> +          - enum:
> +              - qcom,pronto

It's const, not enum.

> +      - items:

No items.

> +          - enum:
> +              - qcom,riva-pil


Best regards,
Krzysztof
Sireesh Kodali Sept. 12, 2022, 3:33 a.m. UTC | #2
On Fri Sep 9, 2022 at 1:30 PM IST, Krzysztof Kozlowski wrote:
> On 08/09/2022 20:49, Sireesh Kodali wrote:
> > The qcom,pronto compatible is used in the wcn36xx driver to determine
> > which register to access. However, this compatible was not documented.
> > This patch documents the existing compatible as is, since it isn't
> > immediately clear why the wcn36xx driver uses this extra compatible,
> > rather than relying directly on the regular compatible string.
>
> The patch does much more - messes entirely all compatibles...

Is there another preferred way to handle this?
>
> > 
> > Signed-off-by: Sireesh Kodali <sireeshkodali1@gmail.com>
> > ---
> >  .../bindings/remoteproc/qcom,wcnss-pil.yaml      | 16 ++++++++++++----
> >  1 file changed, 12 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
> > index bc18139fdb91..5e4a97e9d330 100644
> > --- a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
> > +++ b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
> > @@ -15,10 +15,18 @@ description:
> >  
> >  properties:
> >    compatible:
> > -    enum:
> > -      - qcom,riva-pil
> > -      - qcom,pronto-v1-pil
> > -      - qcom,pronto-v2-pil
> > +    description:
> > +      Append "qcom,pronto" if the device is actually pronto, and not riva
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - qcom,pronto-v1-pil
> > +              - qcom,pronto-v2-pil
> > +          - enum:
> > +              - qcom,pronto
>
> It's const, not enum.
>
> > +      - items:
>
> No items.

Both these things will be fixed in v3
>
> > +          - enum:
> > +              - qcom,riva-pil
>
>
> Best regards,
> Krzysztof
Krzysztof Kozlowski Sept. 12, 2022, 10:47 a.m. UTC | #3
On 12/09/2022 05:33, Sireesh Kodali wrote:
> On Fri Sep 9, 2022 at 1:30 PM IST, Krzysztof Kozlowski wrote:
>> On 08/09/2022 20:49, Sireesh Kodali wrote:
>>> The qcom,pronto compatible is used in the wcn36xx driver to determine
>>> which register to access. However, this compatible was not documented.
>>> This patch documents the existing compatible as is, since it isn't
>>> immediately clear why the wcn36xx driver uses this extra compatible,
>>> rather than relying directly on the regular compatible string.
>>
>> The patch does much more - messes entirely all compatibles...
> 
> Is there another preferred way to handle this?

The one which does not introduces any other changes than what you wrote
here. You wrote here, that qcom,pronto is being added, so why some
things are changed to oneOf or to enums?

Best regards,
Krzysztof
Sireesh Kodali Sept. 13, 2022, 5:02 a.m. UTC | #4
On Mon Sep 12, 2022 at 4:17 PM IST, Krzysztof Kozlowski wrote:
> On 12/09/2022 05:33, Sireesh Kodali wrote:
> > On Fri Sep 9, 2022 at 1:30 PM IST, Krzysztof Kozlowski wrote:
> >> On 08/09/2022 20:49, Sireesh Kodali wrote:
> >>> The qcom,pronto compatible is used in the wcn36xx driver to determine
> >>> which register to access. However, this compatible was not documented.
> >>> This patch documents the existing compatible as is, since it isn't
> >>> immediately clear why the wcn36xx driver uses this extra compatible,
> >>> rather than relying directly on the regular compatible string.
> >>
> >> The patch does much more - messes entirely all compatibles...
> > 
> > Is there another preferred way to handle this?
>
> The one which does not introduces any other changes than what you wrote
> here. You wrote here, that qcom,pronto is being added, so why some
> things are changed to oneOf or to enums?

I think I didn't explain what the patch is doing properly..

Right now, the remoteproc driver expects "qcom,pronto-v2/v3" for pronto
devices, and "qcom,riva" for riva. This has been already documented
properly.

The wcn36xx driver expects "qcom,pronto" for pronto devices. I am not sure
why wcn36xx was written like this. But it is the current state of the
driver that I am documenting. So the device tree will have compatible
strings like "qcom,pronto-v2", "qcom,pronto"; Both need to be present.
For Riva it would just be compatible = "qcom,riva"; Hence the oneOf.
I will add a comment explaining this in v3
>
> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
index bc18139fdb91..5e4a97e9d330 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
@@ -15,10 +15,18 @@  description:
 
 properties:
   compatible:
-    enum:
-      - qcom,riva-pil
-      - qcom,pronto-v1-pil
-      - qcom,pronto-v2-pil
+    description:
+      Append "qcom,pronto" if the device is actually pronto, and not riva
+    oneOf:
+      - items:
+          - enum:
+              - qcom,pronto-v1-pil
+              - qcom,pronto-v2-pil
+          - enum:
+              - qcom,pronto
+      - items:
+          - enum:
+              - qcom,riva-pil
 
   reg:
     maxItems: 3