diff mbox series

[4/6] dt-bindings: sram: qcom,ocmem: Add msm8226 support

Message ID 20230506-msm8226-ocmem-v1-4-3e24e2724f01@z3ntu.xyz
State Superseded, archived
Headers show
Series Add MSM8226 OCMEM support plus some extra OCMEM driver fixes | expand

Commit Message

Luca Weiss May 7, 2023, 9:12 a.m. UTC
Add the compatible for the OCMEM found on msm8226 which compared to
msm8974 only has a core clock and no iface clock.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 Documentation/devicetree/bindings/sram/qcom,ocmem.yaml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Konrad Dybcio May 8, 2023, 7:39 a.m. UTC | #1
On 7.05.2023 11:12, Luca Weiss wrote:
> Add the compatible for the OCMEM found on msm8226 which compared to
> msm8974 only has a core clock and no iface clock.
> 
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
>  Documentation/devicetree/bindings/sram/qcom,ocmem.yaml | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml b/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
> index 4bbf6db0b6bd..515f0d8ec641 100644
> --- a/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
> +++ b/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
> @@ -15,7 +15,9 @@ description: |
>  
>  properties:
>    compatible:
> -    const: qcom,msm8974-ocmem
> +    enum:
> +      - qcom,msm8226-ocmem
> +      - qcom,msm8974-ocmem
Any chance you could read the revision field on both and add comments
like:

- qcom,msm8974-ocmem # vX.Y

>  
>    reg:
>      items:
> @@ -28,11 +30,13 @@ properties:
>        - const: mem
>  
>    clocks:
> +    minItems: 1
>      items:
>        - description: Core clock
>        - description: Interface clock
allOf: if: properties: compatible: 8974 / then: clock(s|-names): minItems: 2

Konrad
>  
>    clock-names:
> +    minItems: 1
>      items:
>        - const: core
>        - const: iface
>
Luca Weiss May 9, 2023, 4:44 p.m. UTC | #2
On Montag, 8. Mai 2023 09:39:22 CEST Konrad Dybcio wrote:
> On 7.05.2023 11:12, Luca Weiss wrote:
> > Add the compatible for the OCMEM found on msm8226 which compared to
> > msm8974 only has a core clock and no iface clock.
> > 
> > Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> > ---
> > 
> >  Documentation/devicetree/bindings/sram/qcom,ocmem.yaml | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
> > b/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml index
> > 4bbf6db0b6bd..515f0d8ec641 100644
> > --- a/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
> > +++ b/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
> > @@ -15,7 +15,9 @@ description: |
> > 
> >  properties:
> >    compatible:
> > -    const: qcom,msm8974-ocmem
> > +    enum:
> > +      - qcom,msm8226-ocmem
> > +      - qcom,msm8974-ocmem
> 
> Any chance you could read the revision field on both and add comments
> like:
> 
> - qcom,msm8974-ocmem # vX.Y

Do you mean the OCMEM_REG_HW_VERSION register? It's currently not read in the 
driver so no idea what the value is - without adding some code.

> 
> >    reg:
> >      items:
> > @@ -28,11 +30,13 @@ properties:
> >        - const: mem
> >    
> >    clocks:
> > +    minItems: 1
> > 
> >      items:
> >        - description: Core clock
> >        - description: Interface clock
> 
> allOf: if: properties: compatible: 8974 / then: clock(s|-names): minItems: 2

Sure, can update

> 
> Konrad
> 
> >    clock-names:
> > +    minItems: 1
> > 
> >      items:
> >        - const: core
> >        - const: iface
Konrad Dybcio May 9, 2023, 8 p.m. UTC | #3
On 9.05.2023 18:44, Luca Weiss wrote:
> On Montag, 8. Mai 2023 09:39:22 CEST Konrad Dybcio wrote:
>> On 7.05.2023 11:12, Luca Weiss wrote:
>>> Add the compatible for the OCMEM found on msm8226 which compared to
>>> msm8974 only has a core clock and no iface clock.
>>>
>>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
>>> ---
>>>
>>>  Documentation/devicetree/bindings/sram/qcom,ocmem.yaml | 6 +++++-
>>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
>>> b/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml index
>>> 4bbf6db0b6bd..515f0d8ec641 100644
>>> --- a/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
>>> +++ b/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
>>> @@ -15,7 +15,9 @@ description: |
>>>
>>>  properties:
>>>    compatible:
>>> -    const: qcom,msm8974-ocmem
>>> +    enum:
>>> +      - qcom,msm8226-ocmem
>>> +      - qcom,msm8974-ocmem
>>
>> Any chance you could read the revision field on both and add comments
>> like:
>>
>> - qcom,msm8974-ocmem # vX.Y
> 
> Do you mean the OCMEM_REG_HW_VERSION register?
Yep

It's currently not read in the 
> driver so no idea what the value is - without adding some code.
Would be appreciated!

Konrad
> 
>>
>>>    reg:
>>>      items:
>>> @@ -28,11 +30,13 @@ properties:
>>>        - const: mem
>>>    
>>>    clocks:
>>> +    minItems: 1
>>>
>>>      items:
>>>        - description: Core clock
>>>        - description: Interface clock
>>
>> allOf: if: properties: compatible: 8974 / then: clock(s|-names): minItems: 2
> 
> Sure, can update
> 
>>
>> Konrad
>>
>>>    clock-names:
>>> +    minItems: 1
>>>
>>>      items:
>>>        - const: core
>>>        - const: iface
> 
> 
> 
>
Luca Weiss May 9, 2023, 9:10 p.m. UTC | #4
On Dienstag, 9. Mai 2023 22:00:03 CEST Konrad Dybcio wrote:
> On 9.05.2023 18:44, Luca Weiss wrote:
> > On Montag, 8. Mai 2023 09:39:22 CEST Konrad Dybcio wrote:
> >> On 7.05.2023 11:12, Luca Weiss wrote:
> >>> Add the compatible for the OCMEM found on msm8226 which compared to
> >>> msm8974 only has a core clock and no iface clock.
> >>> 
> >>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> >>> ---
> >>> 
> >>>  Documentation/devicetree/bindings/sram/qcom,ocmem.yaml | 6 +++++-
> >>>  1 file changed, 5 insertions(+), 1 deletion(-)
> >>> 
> >>> diff --git a/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
> >>> b/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml index
> >>> 4bbf6db0b6bd..515f0d8ec641 100644
> >>> --- a/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
> >>> +++ b/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
> >>> @@ -15,7 +15,9 @@ description: |
> >>> 
> >>>  properties:
> >>>    compatible:
> >>> -    const: qcom,msm8974-ocmem
> >>> +    enum:
> >>> +      - qcom,msm8226-ocmem
> >>> +      - qcom,msm8974-ocmem
> >> 
> >> Any chance you could read the revision field on both and add comments
> >> like:
> >> 
> >> - qcom,msm8974-ocmem # vX.Y
> > 
> > Do you mean the OCMEM_REG_HW_VERSION register?
> 
> Yep
> 
> It's currently not read in the
> 
> > driver so no idea what the value is - without adding some code.
> 
> Would be appreciated!

Appears msm8974 has v1.4.0 and msm8226 has v1.1.0. Will include this in the
next revision.

Regards
Luca

> 
> Konrad
> 
> >>>    reg:
> >>>      items:
> >>> @@ -28,11 +30,13 @@ properties:
> >>>        - const: mem
> >>>    
> >>>    clocks:
> >>> +    minItems: 1
> >>> 
> >>>      items:
> >>>        - description: Core clock
> >>>        - description: Interface clock
> >> 
> >> allOf: if: properties: compatible: 8974 / then: clock(s|-names):
> >> minItems: 2> 
> > Sure, can update
> > 
> >> Konrad
> >> 
> >>>    clock-names:
> >>> +    minItems: 1
> >>> 
> >>>      items:
> >>>        - const: core
> >>>        - const: iface
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml b/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
index 4bbf6db0b6bd..515f0d8ec641 100644
--- a/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
+++ b/Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
@@ -15,7 +15,9 @@  description: |
 
 properties:
   compatible:
-    const: qcom,msm8974-ocmem
+    enum:
+      - qcom,msm8226-ocmem
+      - qcom,msm8974-ocmem
 
   reg:
     items:
@@ -28,11 +30,13 @@  properties:
       - const: mem
 
   clocks:
+    minItems: 1
     items:
       - description: Core clock
       - description: Interface clock
 
   clock-names:
+    minItems: 1
     items:
       - const: core
       - const: iface