diff mbox series

[2/2] dt-bindings: i2c: qcom-cci: Document QCM2290 compatible

Message ID 20250401143619.2053739-2-loic.poulain@oss.qualcomm.com (mailing list archive)
State New
Headers show
Series [1/2] arm64: dts: qcom: qcm2290: Add CCI node | expand

Commit Message

Loic Poulain April 1, 2025, 2:36 p.m. UTC
The CCI on QCM2290 is the interface for controlling camera sensor over I2C.
It requires only two clocks.

Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
---
 .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 23 +++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski April 1, 2025, 2:59 p.m. UTC | #1
On 01/04/2025 16:36, Loic Poulain wrote:
> The CCI on QCM2290 is the interface for controlling camera sensor over I2C.
> It requires only two clocks.
> 
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---
>  .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 23 +++++++++++++++++--

Bindings patch goes before the user, usually.

>  1 file changed, 21 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> index 73144473b9b2..1632e3c01ed2 100644
> --- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> @@ -25,6 +25,7 @@ properties:
>  
>        - items:
>            - enum:
> +              - qcom,qcm2290-cci
>                - qcom,sc7280-cci
>                - qcom,sc8280xp-cci
>                - qcom,sdm670-cci
> @@ -44,11 +45,11 @@ properties:
>      const: 0
>  
>    clocks:
> -    minItems: 3
> +    minItems: 2
>      maxItems: 6
>  
>    clock-names:
> -    minItems: 3
> +    minItems: 2
>      maxItems: 6
>  
>    interrupts:
> @@ -119,6 +120,24 @@ allOf:
>              - const: camss_top_ahb
>              - const: cci_ahb
>              - const: cci
> +  - if:
> +      properties:
> +        compatible:
> +          oneOf:

That's odd syntax....

> +            - contains:
> +                enum:
> +                  - qcom,qcm2290-cci
> +
> +            - const: qcom,msm8996-cci

and not correct, which will be pointed out by tests. Are you sure this
was tested? I guess you wanted only the first part of oneOf (so the
contains and drop the oneOf).


Best regards,
Krzysztof
Konrad Dybcio April 1, 2025, 3:10 p.m. UTC | #2
On 4/1/25 4:36 PM, Loic Poulain wrote:
> The CCI on QCM2290 is the interface for controlling camera sensor over I2C.
> It requires only two clocks.
> 
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---

[...]

> +    then:
> +      properties:
> +        clocks:
> +          minItems: 2
> +          maxItems: 2
> +        clock-names:
> +          items:
> +            - const: camss_top_ahb
> +            - const: cci

Hm.. looks like (at least the pre-Titan) CCI only takes 2 clocks, according
to docs.. maybe the other entries could get revisited one day

Konrad
Krzysztof Kozlowski April 2, 2025, 8:12 a.m. UTC | #3
On Tue, Apr 01, 2025 at 04:59:49PM +0200, Krzysztof Kozlowski wrote:
> On 01/04/2025 16:36, Loic Poulain wrote:
> > The CCI on QCM2290 is the interface for controlling camera sensor over I2C.
> > It requires only two clocks.
> > 
> > Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > ---
> >  .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 23 +++++++++++++++++--
> 
> Bindings patch goes before the user, usually.
> 
> >  1 file changed, 21 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> > index 73144473b9b2..1632e3c01ed2 100644
> > --- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> > +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> > @@ -25,6 +25,7 @@ properties:
> >  
> >        - items:
> >            - enum:
> > +              - qcom,qcm2290-cci
> >                - qcom,sc7280-cci
> >                - qcom,sc8280xp-cci
> >                - qcom,sdm670-cci
> > @@ -44,11 +45,11 @@ properties:
> >      const: 0
> >  
> >    clocks:
> > -    minItems: 3
> > +    minItems: 2
> >      maxItems: 6
> >  
> >    clock-names:
> > -    minItems: 3
> > +    minItems: 2
> >      maxItems: 6
> >  
> >    interrupts:
> > @@ -119,6 +120,24 @@ allOf:
> >              - const: camss_top_ahb
> >              - const: cci_ahb
> >              - const: cci
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          oneOf:
> 
> That's odd syntax....
> 
> > +            - contains:
> > +                enum:
> > +                  - qcom,qcm2290-cci
> > +
> > +            - const: qcom,msm8996-cci
> 
> and not correct, which will be pointed out by tests. Are you sure this
> was tested? I guess you wanted only the first part of oneOf (so the
> contains and drop the oneOf).

As I expected, this wasn't tested and introduces several new warnings.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
index 73144473b9b2..1632e3c01ed2 100644
--- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
+++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
@@ -25,6 +25,7 @@  properties:
 
       - items:
           - enum:
+              - qcom,qcm2290-cci
               - qcom,sc7280-cci
               - qcom,sc8280xp-cci
               - qcom,sdm670-cci
@@ -44,11 +45,11 @@  properties:
     const: 0
 
   clocks:
-    minItems: 3
+    minItems: 2
     maxItems: 6
 
   clock-names:
-    minItems: 3
+    minItems: 2
     maxItems: 6
 
   interrupts:
@@ -119,6 +120,24 @@  allOf:
             - const: camss_top_ahb
             - const: cci_ahb
             - const: cci
+  - if:
+      properties:
+        compatible:
+          oneOf:
+            - contains:
+                enum:
+                  - qcom,qcm2290-cci
+
+            - const: qcom,msm8996-cci
+    then:
+      properties:
+        clocks:
+          minItems: 2
+          maxItems: 2
+        clock-names:
+          items:
+            - const: camss_top_ahb
+            - const: cci
 
   - if:
       properties: