2024-05-28 20:54:12

by Dmitry Baryshkov

[permalink] [raw]
Subject: [PATCH 01/10] dt-bindings: clock: qcom: split the non-PD schema for GCC

On some of Qualcomm platforms the Global Clock Controller (GCC) doesn't
provide power domains. Split no-PD version from the common qcom,gcc schema.

Signed-off-by: Dmitry Baryshkov <[email protected]>
---
.../devicetree/bindings/clock/qcom,gcc-nopd.yaml | 38 ++++++++++++++++++++++
.../devicetree/bindings/clock/qcom,gcc.yaml | 19 ++---------
2 files changed, 41 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-nopd.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-nopd.yaml
new file mode 100644
index 000000000000..a941e75a930a
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-nopd.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,gcc-nopd.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Global Clock & Reset Controller Common Properties
+
+maintainers:
+ - Stephen Boyd <[email protected]>
+ - Taniya Das <[email protected]>
+
+description: |
+ Common bindings for Qualcomm global clock control module providing the
+ clocks and resets.
+
+properties:
+ '#clock-cells':
+ const: 1
+
+ '#reset-cells':
+ const: 1
+
+ reg:
+ maxItems: 1
+
+ protected-clocks:
+ description:
+ Protected clock specifier list as per common clock binding.
+
+required:
+ - reg
+ - '#clock-cells'
+ - '#reset-cells'
+
+additionalProperties: true
+
+...
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
index 788825105f24..e7ec15b1780d 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
@@ -14,27 +14,14 @@ description: |
Common bindings for Qualcomm global clock control module providing the
clocks, resets and power domains.

-properties:
- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
+allOf:
+ - $ref: qcom,gcc-nopd.yaml

+properties:
'#power-domain-cells':
const: 1

- reg:
- maxItems: 1
-
- protected-clocks:
- description:
- Protected clock specifier list as per common clock binding.
-
required:
- - reg
- - '#clock-cells'
- - '#reset-cells'
- '#power-domain-cells'

additionalProperties: true

--
2.39.2



2024-05-29 07:37:44

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 01/10] dt-bindings: clock: qcom: split the non-PD schema for GCC

On 28/05/2024 22:43, Dmitry Baryshkov wrote:
> On some of Qualcomm platforms the Global Clock Controller (GCC) doesn't
> provide power domains. Split no-PD version from the common qcom,gcc schema.
>
> Signed-off-by: Dmitry Baryshkov <[email protected]>
> ---


> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
> index 788825105f24..e7ec15b1780d 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
> @@ -14,27 +14,14 @@ description: |
> Common bindings for Qualcomm global clock control module providing the
> clocks, resets and power domains.
>
> -properties:
> - '#clock-cells':
> - const: 1
> -
> - '#reset-cells':
> - const: 1
> +allOf:
> + - $ref: qcom,gcc-nopd.yaml
>
> +properties:
> '#power-domain-cells':
> const: 1

So what's left here? One property? Not much benefit. Triple-schema
(include something to include something) does not make it readable. Just
do not require power-domain-cells in qcom,gcc.yaml.


Best regards,
Krzysztof


2024-05-29 07:59:34

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH 01/10] dt-bindings: clock: qcom: split the non-PD schema for GCC

On Wed, 29 May 2024 at 10:34, Krzysztof Kozlowski <[email protected]> wrote:
>
> On 28/05/2024 22:43, Dmitry Baryshkov wrote:
> > On some of Qualcomm platforms the Global Clock Controller (GCC) doesn't
> > provide power domains. Split no-PD version from the common qcom,gcc schema.
> >
> > Signed-off-by: Dmitry Baryshkov <[email protected]>
> > ---
>
>
> > diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
> > index 788825105f24..e7ec15b1780d 100644
> > --- a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
> > +++ b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
> > @@ -14,27 +14,14 @@ description: |
> > Common bindings for Qualcomm global clock control module providing the
> > clocks, resets and power domains.
> >
> > -properties:
> > - '#clock-cells':
> > - const: 1
> > -
> > - '#reset-cells':
> > - const: 1
> > +allOf:
> > + - $ref: qcom,gcc-nopd.yaml
> >
> > +properties:
> > '#power-domain-cells':
> > const: 1
>
> So what's left here? One property? Not much benefit. Triple-schema
> (include something to include something) does not make it readable. Just
> do not require power-domain-cells in qcom,gcc.yaml.

And add it to the required list on all relevant platforms? Ack, sounds
fine to me.


--
With best wishes
Dmitry

2024-05-29 12:30:55

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 01/10] dt-bindings: clock: qcom: split the non-PD schema for GCC

On 29/05/2024 09:58, Dmitry Baryshkov wrote:
>>> - const: 1
>>> -
>>> - '#reset-cells':
>>> - const: 1
>>> +allOf:
>>> + - $ref: qcom,gcc-nopd.yaml
>>>
>>> +properties:
>>> '#power-domain-cells':
>>> const: 1
>>
>> So what's left here? One property? Not much benefit. Triple-schema
>> (include something to include something) does not make it readable. Just
>> do not require power-domain-cells in qcom,gcc.yaml.
>
> And add it to the required list on all relevant platforms? Ack, sounds
> fine to me.

Yes.

Best regards,
Krzysztof