devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles
@ 2022-12-13 11:56 Konrad Dybcio
  2022-12-13 11:56 ` [PATCH 2/4] arm64: dts: qcom: msm8916: Add fallback CCI compatible Konrad Dybcio
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Konrad Dybcio @ 2022-12-13 11:56 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: marijn.suijten, Konrad Dybcio, Loic Poulain, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, linux-i2c, devicetree,
	linux-kernel

Almost every compatible string in the CCI driver is a duplicate. Adjust
the bindings to include a common (first-soc-implementing-vX) compatible
to remove the need to keep adding superfluous compatible strings.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 25 +++++++++++++------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
index cf9f8fda595f..65cf7860a9a0 100644
--- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
+++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
@@ -12,14 +12,23 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - qcom,msm8226-cci
-      - qcom,msm8916-cci
-      - qcom,msm8974-cci
-      - qcom,msm8996-cci
-      - qcom,sdm845-cci
-      - qcom,sm8250-cci
-      - qcom,sm8450-cci
+    oneOf:
+      - enum:
+          - qcom,msm8226-cci
+          - qcom,msm8974-cci
+          - qcom,msm8996-cci
+
+      - items:
+          - enum:
+              - qcom,msm8916-cci
+          - const: qcom,msm8226-cci # CCI v1
+
+      - items:
+          - enum:
+              - qcom,sdm845-cci
+              - qcom,sm8250-cci
+              - qcom,sm8450-cci
+          - const: qcom,msm8996-cci # CCI v2
 
   "#address-cells":
     const: 1
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/4] arm64: dts: qcom: msm8916: Add fallback CCI compatible
  2022-12-13 11:56 [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
@ 2022-12-13 11:56 ` Konrad Dybcio
  2022-12-13 11:56 ` [PATCH 3/4] arm64: dts: qcom: sdm845: " Konrad Dybcio
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2022-12-13 11:56 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: marijn.suijten, Konrad Dybcio, Loic Poulain, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, linux-i2c, devicetree,
	linux-kernel

Add a fallback CCI compatible, as required by bindings.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 2ca8e977fc2a..4c0a0078adb5 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1167,7 +1167,7 @@ ports {
 		};
 
 		cci: cci@1b0c000 {
-			compatible = "qcom,msm8916-cci";
+			compatible = "qcom,msm8916-cci", "qcom,msm8226-cci";
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <0x01b0c000 0x1000>;
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/4] arm64: dts: qcom: sdm845: Add fallback CCI compatible
  2022-12-13 11:56 [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
  2022-12-13 11:56 ` [PATCH 2/4] arm64: dts: qcom: msm8916: Add fallback CCI compatible Konrad Dybcio
@ 2022-12-13 11:56 ` Konrad Dybcio
  2022-12-13 11:56 ` [PATCH 4/4] arm64: dts: qcom: sm8250: " Konrad Dybcio
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2022-12-13 11:56 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: marijn.suijten, Konrad Dybcio, Loic Poulain, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, linux-i2c, devicetree,
	linux-kernel

Add a fallback CCI compatible, as required by bindings.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 9eecf1b4ebf9..154f5054a200 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4386,7 +4386,7 @@ port@3 {
 		};
 
 		cci: cci@ac4a000 {
-			compatible = "qcom,sdm845-cci";
+			compatible = "qcom,sdm845-cci", "qcom,msm8996-cci";
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/4] arm64: dts: qcom: sm8250: Add fallback CCI compatible
  2022-12-13 11:56 [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
  2022-12-13 11:56 ` [PATCH 2/4] arm64: dts: qcom: msm8916: Add fallback CCI compatible Konrad Dybcio
  2022-12-13 11:56 ` [PATCH 3/4] arm64: dts: qcom: sdm845: " Konrad Dybcio
@ 2022-12-13 11:56 ` Konrad Dybcio
  2022-12-13 13:46 ` [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Rob Herring
  2022-12-13 16:58 ` Krzysztof Kozlowski
  4 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2022-12-13 11:56 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: marijn.suijten, Konrad Dybcio, Loic Poulain, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, linux-i2c, devicetree,
	linux-kernel

Add a fallback CCI compatible, as required by bindings.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 0c4ecdab1244..6d16857fed26 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -3723,7 +3723,7 @@ videocc: clock-controller@abf0000 {
 		};
 
 		cci0: cci@ac4f000 {
-			compatible = "qcom,sm8250-cci";
+			compatible = "qcom,sm8250-cci", "qcom,msm8996-cci";
 			#address-cells = <1>;
 			#size-cells = <0>;
 
@@ -3764,7 +3764,7 @@ cci0_i2c1: i2c-bus@1 {
 		};
 
 		cci1: cci@ac50000 {
-			compatible = "qcom,sm8250-cci";
+			compatible = "qcom,sm8250-cci", "qcom,msm8996-cci";
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles
  2022-12-13 11:56 [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
                   ` (2 preceding siblings ...)
  2022-12-13 11:56 ` [PATCH 4/4] arm64: dts: qcom: sm8250: " Konrad Dybcio
@ 2022-12-13 13:46 ` Rob Herring
  2022-12-13 16:58 ` Krzysztof Kozlowski
  4 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2022-12-13 13:46 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: linux-arm-msm, Rob Herring, devicetree, Robert Foss, Loic Poulain,
	krzysztof.kozlowski, linux-i2c, marijn.suijten, andersson, agross,
	Krzysztof Kozlowski, linux-kernel


On Tue, 13 Dec 2022 12:56:25 +0100, Konrad Dybcio wrote:
> Almost every compatible string in the CCI driver is a duplicate. Adjust
> the bindings to include a common (first-soc-implementing-vX) compatible
> to remove the need to keep adding superfluous compatible strings.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 25 +++++++++++++------
>  1 file changed, 17 insertions(+), 8 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.example.dtb: cci@ac4a000: compatible: 'oneOf' conditional failed, one must be fixed:
	['qcom,sdm845-cci'] is too short
	'qcom,sdm845-cci' is not one of ['qcom,msm8226-cci', 'qcom,msm8974-cci', 'qcom,msm8996-cci']
	'qcom,sdm845-cci' is not one of ['qcom,msm8916-cci']
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221213115628.105149-1-konrad.dybcio@linaro.org

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles
  2022-12-13 11:56 [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
                   ` (3 preceding siblings ...)
  2022-12-13 13:46 ` [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Rob Herring
@ 2022-12-13 16:58 ` Krzysztof Kozlowski
  2022-12-13 17:01   ` Konrad Dybcio
  4 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-13 16:58 UTC (permalink / raw)
  To: Konrad Dybcio, linux-arm-msm, andersson, agross
  Cc: marijn.suijten, Loic Poulain, Robert Foss, Rob Herring,
	Krzysztof Kozlowski, linux-i2c, devicetree, linux-kernel

On 13/12/2022 12:56, Konrad Dybcio wrote:
> Almost every compatible string in the CCI driver is a duplicate. Adjust
> the bindings to include a common (first-soc-implementing-vX) compatible
> to remove the need to keep adding superfluous compatible strings.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 25 +++++++++++++------
>  1 file changed, 17 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> index cf9f8fda595f..65cf7860a9a0 100644
> --- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> @@ -12,14 +12,23 @@ maintainers:
>  
>  properties:
>    compatible:
> -    enum:
> -      - qcom,msm8226-cci
> -      - qcom,msm8916-cci
> -      - qcom,msm8974-cci
> -      - qcom,msm8996-cci
> -      - qcom,sdm845-cci
> -      - qcom,sm8250-cci
> -      - qcom,sm8450-cci
> +    oneOf:

Except missing test, how about also adding a comment to the driver, that
list of compatibles should not grow when not needed?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles
  2022-12-13 16:58 ` Krzysztof Kozlowski
@ 2022-12-13 17:01   ` Konrad Dybcio
  2022-12-13 18:06     ` Konrad Dybcio
  0 siblings, 1 reply; 8+ messages in thread
From: Konrad Dybcio @ 2022-12-13 17:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski, linux-arm-msm, andersson, agross
  Cc: marijn.suijten, Loic Poulain, Robert Foss, Rob Herring,
	Krzysztof Kozlowski, linux-i2c, devicetree, linux-kernel



On 13.12.2022 17:58, Krzysztof Kozlowski wrote:
> On 13/12/2022 12:56, Konrad Dybcio wrote:
>> Almost every compatible string in the CCI driver is a duplicate. Adjust
>> the bindings to include a common (first-soc-implementing-vX) compatible
>> to remove the need to keep adding superfluous compatible strings.
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 25 +++++++++++++------
>>  1 file changed, 17 insertions(+), 8 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
>> index cf9f8fda595f..65cf7860a9a0 100644
>> --- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
>> +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
>> @@ -12,14 +12,23 @@ maintainers:
>>  
>>  properties:
>>    compatible:
>> -    enum:
>> -      - qcom,msm8226-cci
>> -      - qcom,msm8916-cci
>> -      - qcom,msm8974-cci
>> -      - qcom,msm8996-cci
>> -      - qcom,sdm845-cci
>> -      - qcom,sm8250-cci
>> -      - qcom,sm8450-cci
>> +    oneOf:
> 
> Except missing test,
Hm? I tested this locally with dt_binding_check and it passed..

how about also adding a comment to the driver, that
> list of compatibles should not grow when not needed?
Sure.

Konrad
> 
> Best regards,
> Krzysztof
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles
  2022-12-13 17:01   ` Konrad Dybcio
@ 2022-12-13 18:06     ` Konrad Dybcio
  0 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2022-12-13 18:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski, linux-arm-msm, andersson, agross
  Cc: marijn.suijten, Loic Poulain, Robert Foss, Rob Herring,
	Krzysztof Kozlowski, linux-i2c, devicetree, linux-kernel



On 13.12.2022 18:01, Konrad Dybcio wrote:
> 
> 
> On 13.12.2022 17:58, Krzysztof Kozlowski wrote:
>> On 13/12/2022 12:56, Konrad Dybcio wrote:
>>> Almost every compatible string in the CCI driver is a duplicate. Adjust
>>> the bindings to include a common (first-soc-implementing-vX) compatible
>>> to remove the need to keep adding superfluous compatible strings.
>>>
>>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>>> ---
>>>  .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 25 +++++++++++++------
>>>  1 file changed, 17 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
>>> index cf9f8fda595f..65cf7860a9a0 100644
>>> --- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
>>> +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
>>> @@ -12,14 +12,23 @@ maintainers:
>>>  
>>>  properties:
>>>    compatible:
>>> -    enum:
>>> -      - qcom,msm8226-cci
>>> -      - qcom,msm8916-cci
>>> -      - qcom,msm8974-cci
>>> -      - qcom,msm8996-cci
>>> -      - qcom,sdm845-cci
>>> -      - qcom,sm8250-cci
>>> -      - qcom,sm8450-cci
>>> +    oneOf:
>>
>> Except missing test,
> Hm? I tested this locally with dt_binding_check and it passed..
Eh, looks like I didn't hit save before running it or something,
I see it now, sorry bout that..

Konrad
> 
> how about also adding a comment to the driver, that
>> list of compatibles should not grow when not needed?
> Sure.
> 
> Konrad
>>
>> Best regards,
>> Krzysztof
>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-12-13 18:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-13 11:56 [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
2022-12-13 11:56 ` [PATCH 2/4] arm64: dts: qcom: msm8916: Add fallback CCI compatible Konrad Dybcio
2022-12-13 11:56 ` [PATCH 3/4] arm64: dts: qcom: sdm845: " Konrad Dybcio
2022-12-13 11:56 ` [PATCH 4/4] arm64: dts: qcom: sm8250: " Konrad Dybcio
2022-12-13 13:46 ` [PATCH 1/4] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Rob Herring
2022-12-13 16:58 ` Krzysztof Kozlowski
2022-12-13 17:01   ` Konrad Dybcio
2022-12-13 18:06     ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).