2024-06-05 08:10:21

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 00/16] dt-bindings: clock: qcom: reference qcom-gcc.yaml

Hi,

Changes in v2:
- Rewrite commit msgs - don't mention there is hardware similarity
between clock controllers, because that is not certain.
- Link to v1: https://lore.kernel.org/r/[email protected]

Description:
============
Unify Qualcomm clock controllers by referencing qcom,gcc.yaml where
applicable. Several existing bindings for these display/GPU/CAM clock
controllers already do it.

No external dependencies, this CAN be applied independently. It is
aligned with Dmitry's approach here:
https://lore.kernel.org/all/[email protected]/
(but no dependency!)

Best regards,
Krzysztof

---
Krzysztof Kozlowski (16):
dt-bindings: clock: qcom,sm8450-videocc: reference qcom,gcc.yaml
dt-bindings: clock: qcom,videocc: reference qcom,gcc.yaml
dt-bindings: clock: qcom,dispcc-sc8280xp: reference qcom,gcc.yaml
dt-bindings: clock: qcom,dispcc-sm6350: reference qcom,gcc.yaml
dt-bindings: clock: qcom,dispcc-sm8x50: reference qcom,gcc.yaml
dt-bindings: clock: qcom,gpucc-sdm660: reference qcom,gcc.yaml
dt-bindings: clock: qcom,gpucc: reference qcom,gcc.yaml
dt-bindings: clock: qcom,msm8998-gpucc: reference qcom,gcc.yaml
dt-bindings: clock: qcom,qcm2290-dispcc: reference qcom,gcc.yaml
dt-bindings: clock: qcom,sc7180-dispcc: reference qcom,gcc.yaml
dt-bindings: clock: qcom,sc7280-dispcc: reference qcom,gcc.yaml
dt-bindings: clock: qcom,sdm845-dispcc: reference qcom,gcc.yaml
dt-bindings: clock: qcom,sm6115-dispcc: reference qcom,gcc.yaml
dt-bindings: clock: qcom,sm8450-dispcc: reference qcom,gcc.yaml
dt-bindings: clock: qcom,sm8550-dispcc: reference qcom,gcc.yaml
dt-bindings: clock: qcom,sm8450-gpucc: reference qcom,gcc.yaml

.../bindings/clock/qcom,dispcc-sc8280xp.yaml | 20 ++++----------------
.../bindings/clock/qcom,dispcc-sm6350.yaml | 20 ++++----------------
.../bindings/clock/qcom,dispcc-sm8x50.yaml | 18 ++----------------
.../devicetree/bindings/clock/qcom,gpucc-sdm660.yaml | 20 ++++----------------
.../devicetree/bindings/clock/qcom,gpucc.yaml | 20 ++++----------------
.../bindings/clock/qcom,msm8998-gpucc.yaml | 20 ++++----------------
.../bindings/clock/qcom,qcm2290-dispcc.yaml | 20 ++++----------------
.../bindings/clock/qcom,sc7180-dispcc.yaml | 20 ++++----------------
.../bindings/clock/qcom,sc7280-dispcc.yaml | 20 ++++----------------
.../bindings/clock/qcom,sdm845-dispcc.yaml | 20 ++++----------------
.../bindings/clock/qcom,sm6115-dispcc.yaml | 20 ++++----------------
.../bindings/clock/qcom,sm8450-dispcc.yaml | 20 ++++----------------
.../devicetree/bindings/clock/qcom,sm8450-gpucc.yaml | 20 ++++----------------
.../bindings/clock/qcom,sm8450-videocc.yaml | 20 ++++----------------
.../bindings/clock/qcom,sm8550-dispcc.yaml | 20 ++++----------------
.../devicetree/bindings/clock/qcom,videocc.yaml | 19 +++----------------
16 files changed, 61 insertions(+), 256 deletions(-)
---
base-commit: 861a3cb5a2a8480d361fa6708da24747d6fa72fe
change-id: 20240531-dt-bindings-qcom-gcc-e2955fd60004

Best regards,
--
Krzysztof Kozlowski <[email protected]>



2024-06-05 08:10:43

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 02/16] dt-bindings: clock: qcom,videocc: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/clock/qcom,videocc.yaml | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
index 6999e36ace1b..81c68039ac9e 100644
--- a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
@@ -37,18 +37,6 @@ properties:
minItems: 1
maxItems: 3

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
power-domains:
description:
A phandle and PM domain specifier for the MMCX power domain.
@@ -61,14 +49,13 @@ properties:

required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

allOf:
+ - $ref: qcom,gcc.yaml#
+
- if:
properties:
compatible:
@@ -119,7 +106,7 @@ allOf:
- const: bi_tcxo
- const: bi_tcxo_ao

-additionalProperties: false
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:11:07

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 03/16] dt-bindings: clock: qcom,dispcc-sc8280xp: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/clock/qcom,dispcc-sc8280xp.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,dispcc-sc8280xp.yaml b/Documentation/devicetree/bindings/clock/qcom,dispcc-sc8280xp.yaml
index 3cb996b2c9d5..ffae037779a1 100644
--- a/Documentation/devicetree/bindings/clock/qcom,dispcc-sc8280xp.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,dispcc-sc8280xp.yaml
@@ -40,31 +40,19 @@ properties:
- description: DSI 1 PLL byte clock
- description: DSI 1 PLL DSI clock

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
power-domains:
items:
- description: MMCX power domain

required:
- compatible
- - reg
- clocks
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:11:14

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 04/16] dt-bindings: clock: qcom,dispcc-sm6350: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/clock/qcom,dispcc-sm6350.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6350.yaml b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6350.yaml
index 8efac3fb159f..a584b4953e68 100644
--- a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6350.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6350.yaml
@@ -37,28 +37,16 @@ properties:
- const: dp_phy_pll_link_clk
- const: dp_phy_pll_vco_div_clk

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:12:07

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 06/16] dt-bindings: clock: qcom,gpucc-sdm660: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/clock/qcom,gpucc-sdm660.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,gpucc-sdm660.yaml b/Documentation/devicetree/bindings/clock/qcom,gpucc-sdm660.yaml
index 0518ea963cdd..79bb90dbe4c1 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gpucc-sdm660.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gpucc-sdm660.yaml
@@ -33,28 +33,16 @@ properties:
- const: gcc_gpu_gpll0_clk
- const: gcc_gpu_gpll0_div_clk

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:12:31

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 07/16] dt-bindings: clock: qcom,gpucc: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/clock/qcom,gpucc.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
index f57aceddac6b..0858fd635282 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
@@ -56,25 +56,10 @@ properties:
vdd-gfx-supply:
description: Regulator supply for the VDD_GFX pads

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

# Require that power-domains and vdd-gfx-supply are not both present
@@ -83,7 +68,10 @@ not:
- power-domains
- vdd-gfx-supply

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:13:03

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 08/16] dt-bindings: clock: qcom,msm8998-gpucc: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/clock/qcom,msm8998-gpucc.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,msm8998-gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,msm8998-gpucc.yaml
index 7b271ae210a3..b9b218ef9b68 100644
--- a/Documentation/devicetree/bindings/clock/qcom,msm8998-gpucc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,msm8998-gpucc.yaml
@@ -29,28 +29,16 @@ properties:
- const: xo
- const: gpll0

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:13:08

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 09/16] dt-bindings: clock: qcom,qcm2290-dispcc: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/clock/qcom,qcm2290-dispcc.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
index 4a00f2d41684..243be4f76db3 100644
--- a/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
@@ -37,28 +37,16 @@ properties:
- const: dsi0_phy_pll_out_byteclk
- const: dsi0_phy_pll_out_dsiclk

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:13:17

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 10/16] dt-bindings: clock: qcom,sc7180-dispcc: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/clock/qcom,sc7180-dispcc.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sc7180-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sc7180-dispcc.yaml
index 1c9ce300a435..0d8ea44d8141 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sc7180-dispcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sc7180-dispcc.yaml
@@ -37,28 +37,16 @@ properties:
- const: dp_phy_pll_link_clk
- const: dp_phy_pll_vco_div_clk

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:13:49

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 11/16] dt-bindings: clock: qcom,sc7280-dispcc: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/clock/qcom,sc7280-dispcc.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sc7280-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sc7280-dispcc.yaml
index c42b0ef61385..23177661be40 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sc7280-dispcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sc7280-dispcc.yaml
@@ -41,28 +41,16 @@ properties:
- const: edp_phy_pll_link_clk
- const: edp_phy_pll_vco_div_clk

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:13:54

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 12/16] dt-bindings: clock: qcom,sdm845-dispcc: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/clock/qcom,sdm845-dispcc.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml
index 719844d7ea11..220f4004f7fd 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml
@@ -46,28 +46,16 @@ properties:
- const: dp_link_clk_divsel_ten
- const: dp_vco_divided_clk_src_mux

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:14:07

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 13/16] dt-bindings: clock: qcom,sm6115-dispcc: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/clock/qcom,sm6115-dispcc.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sm6115-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm6115-dispcc.yaml
index f802a2e7f818..00be36683eb5 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm6115-dispcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm6115-dispcc.yaml
@@ -28,27 +28,15 @@ properties:
- description: Pixel clock from DSI PHY0
- description: GPLL0 DISP DIV clock from GCC

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
required:
- compatible
- - reg
- clocks
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:15:08

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 16/16] dt-bindings: clock: qcom,sm8450-gpucc: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/clock/qcom,sm8450-gpucc.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-gpucc.yaml
index 36974309cf69..3c2cac14e6c3 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8450-gpucc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-gpucc.yaml
@@ -34,27 +34,15 @@ properties:
- description: GPLL0 main branch source
- description: GPLL0 div branch source

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
required:
- compatible
- - reg
- clocks
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:25:05

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 01/16] dt-bindings: clock: qcom,sm8450-videocc: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/clock/qcom,sm8450-videocc.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml
index bad8f019a8d3..74034e3f79b7 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml
@@ -21,9 +21,6 @@ properties:
- qcom,sm8450-videocc
- qcom,sm8550-videocc

- reg:
- maxItems: 1
-
clocks:
items:
- description: Board XO source
@@ -39,26 +36,17 @@ properties:
description:
A phandle to an OPP node describing required MMCX performance point.

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
required:
- compatible
- - reg
- clocks
- power-domains
- required-opps
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:29:16

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 05/16] dt-bindings: clock: qcom,dispcc-sm8x50: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml
index 0d82521a5433..53a5ab319159 100644
--- a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml
@@ -60,18 +60,6 @@ properties:
- const: dptx2_phy_pll_link_clk
- const: dptx2_phy_pll_vco_div_clk

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
power-domains:
description:
A phandle and PM domain specifier for the MMCX power domain.
@@ -84,14 +72,12 @@ properties:

required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

allOf:
+ - $ref: qcom,gcc.yaml#
- if:
not:
properties:
@@ -105,7 +91,7 @@ allOf:
clock-names:
maxItems: 7

-additionalProperties: false
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:32:24

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 14/16] dt-bindings: clock: qcom,sm8450-dispcc: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/clock/qcom,sm8450-dispcc.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-dispcc.yaml
index 2f22310b08a9..4794c53793a8 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8450-dispcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-dispcc.yaml
@@ -40,18 +40,6 @@ properties:
- description: Link clock from DP PHY3
- description: VCO DIV clock from DP PHY3

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
power-domains:
description:
A phandle and PM domain specifier for the MMCX power domain.
@@ -64,13 +52,13 @@ properties:

required:
- compatible
- - reg
- clocks
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 08:32:40

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v2 15/16] dt-bindings: clock: qcom,sm8550-dispcc: reference qcom,gcc.yaml

Just like most of Qualcomm clock controllers, we can reference common
qcom,gcc.yaml schema to unify the common parts of the binding.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/clock/qcom,sm8550-dispcc.yaml | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8550-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8550-dispcc.yaml
index bad0260764d4..c17035a180db 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8550-dispcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8550-dispcc.yaml
@@ -45,18 +45,6 @@ properties:
- description: Link clock from DP PHY3
- description: VCO DIV clock from DP PHY3

- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
- reg:
- maxItems: 1
-
power-domains:
description:
A phandle and PM domain specifier for the MMCX power domain.
@@ -69,13 +57,13 @@ properties:

required:
- compatible
- - reg
- clocks
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

-additionalProperties: false
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false

examples:
- |

--
2.43.0


2024-06-05 15:08:01

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH v2 01/16] dt-bindings: clock: qcom,sm8450-videocc: reference qcom,gcc.yaml

Quoting Krzysztof Kozlowski (2024-06-05 01:09:28)
> diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml
> index bad8f019a8d3..74034e3f79b7 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml
> @@ -39,26 +36,17 @@ properties:
> description:
> A phandle to an OPP node describing required MMCX performance point.
>
> - '#clock-cells':
> - const: 1
> -
> - '#reset-cells':
> - const: 1
> -
> - '#power-domain-cells':
> - const: 1
> -
> required:
> - compatible
> - - reg
> - clocks
> - power-domains
> - required-opps
> - - '#clock-cells'
> - - '#reset-cells'
> - '#power-domain-cells'

Missed removing this one?

>
> -additionalProperties: false
> +allOf:
> + - $ref: qcom,gcc.yaml#

Why not have a one-cell-clock-reset-power-domain.yaml binding that
combines all these things? It's quite common even outside of qcom.

2024-06-05 15:45:36

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 01/16] dt-bindings: clock: qcom,sm8450-videocc: reference qcom,gcc.yaml

On 05/06/2024 17:07, Stephen Boyd wrote:
> Quoting Krzysztof Kozlowski (2024-06-05 01:09:28)
>> diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml
>> index bad8f019a8d3..74034e3f79b7 100644
>> --- a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml
>> +++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml
>> @@ -39,26 +36,17 @@ properties:
>> description:
>> A phandle to an OPP node describing required MMCX performance point.
>>
>> - '#clock-cells':
>> - const: 1
>> -
>> - '#reset-cells':
>> - const: 1
>> -
>> - '#power-domain-cells':
>> - const: 1
>> -
>> required:
>> - compatible
>> - - reg
>> - clocks
>> - power-domains
>> - required-opps
>> - - '#clock-cells'
>> - - '#reset-cells'
>> - '#power-domain-cells'
>
> Missed removing this one?

No, as explained in cover letter this aligns code with Dmitry's
approach. power-domain-cells must stay.

>
>>
>> -additionalProperties: false
>> +allOf:
>> + - $ref: qcom,gcc.yaml#
>
> Why not have a one-cell-clock-reset-power-domain.yaml binding that
> combines all these things? It's quite common even outside of qcom.

We also have required-opps and power-domains... I am afraid that after
such simplification someone will come with some differences and not much
of code will be saved.

Best regards,
Krzysztof


2024-06-14 22:49:44

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v2 00/16] dt-bindings: clock: qcom: reference qcom-gcc.yaml


On Wed, 05 Jun 2024 10:09:27 +0200, Krzysztof Kozlowski wrote:
> Changes in v2:
> - Rewrite commit msgs - don't mention there is hardware similarity
> between clock controllers, because that is not certain.
> - Link to v1: https://lore.kernel.org/r/[email protected]
>
> Description:
> ============
> Unify Qualcomm clock controllers by referencing qcom,gcc.yaml where
> applicable. Several existing bindings for these display/GPU/CAM clock
> controllers already do it.
>
> [...]

Applied, thanks!

[01/16] dt-bindings: clock: qcom,sm8450-videocc: reference qcom,gcc.yaml
commit: acc41014661cf424c262e8d532e461376bacbd90
[02/16] dt-bindings: clock: qcom,videocc: reference qcom,gcc.yaml
commit: 3b39fb00be1c5bd0c0c8855444a3b17d04bed667
[03/16] dt-bindings: clock: qcom,dispcc-sc8280xp: reference qcom,gcc.yaml
commit: cc9d138fffbaebe7c3f37f9e03b2d1840efa2af6
[04/16] dt-bindings: clock: qcom,dispcc-sm6350: reference qcom,gcc.yaml
commit: f168430195ff37d1b075d70db95c9bf430ab208b
[05/16] dt-bindings: clock: qcom,dispcc-sm8x50: reference qcom,gcc.yaml
commit: 5576b6f8e91fa4b2ff6c48b2810cb8fbe9242142
[06/16] dt-bindings: clock: qcom,gpucc-sdm660: reference qcom,gcc.yaml
commit: b20b9a762695835016c2ccc26cf1447dca354c10
[07/16] dt-bindings: clock: qcom,gpucc: reference qcom,gcc.yaml
commit: f68872fe10193bb1b033aec0edaadcaab9de2935
[08/16] dt-bindings: clock: qcom,msm8998-gpucc: reference qcom,gcc.yaml
commit: fa02399d69377a38ce49b7e77ece720c114265bf
[09/16] dt-bindings: clock: qcom,qcm2290-dispcc: reference qcom,gcc.yaml
commit: a8197afc44a6542631ec999f4b332643c91c79b3
[10/16] dt-bindings: clock: qcom,sc7180-dispcc: reference qcom,gcc.yaml
commit: e68a21bd186b2f15bb1106b6fd9ad697b3307ca9
[11/16] dt-bindings: clock: qcom,sc7280-dispcc: reference qcom,gcc.yaml
commit: c9ae35ace8c420ebcc7bf868a4f0feca142cb5cb
[12/16] dt-bindings: clock: qcom,sdm845-dispcc: reference qcom,gcc.yaml
commit: 4ef61bcf1aa9cdb3d4bb588ed591bbd4e96c3eaf
[13/16] dt-bindings: clock: qcom,sm6115-dispcc: reference qcom,gcc.yaml
commit: 7b69a903fc73188c50577565093a5b3680448c57
[14/16] dt-bindings: clock: qcom,sm8450-dispcc: reference qcom,gcc.yaml
commit: 8acff345c3e6b0c258177ba1db18d07ebd83183c
[15/16] dt-bindings: clock: qcom,sm8550-dispcc: reference qcom,gcc.yaml
commit: 4da364c759dc66a23a4ea69cb85e038c847b9f0e
[16/16] dt-bindings: clock: qcom,sm8450-gpucc: reference qcom,gcc.yaml
commit: 7e828d77d202f59d4f9b59c1930b82433cce1356

Best regards,
--
Bjorn Andersson <[email protected]>