Message ID | 20240528-qcom-gdscs-v1-1-03cf1b102a4f@linaro.org |
---|---|
State | New |
Headers | show |
Series | dt-bindings: clock: qcom,gcc: handle the controllers without power domains | expand |
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 <dmitry.baryshkov@linaro.org> > --- > 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
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
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 <sboyd@kernel.org> + - Taniya Das <quic_tdas@quicinc.com> + +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
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 <dmitry.baryshkov@linaro.org> --- .../devicetree/bindings/clock/qcom,gcc-nopd.yaml | 38 ++++++++++++++++++++++ .../devicetree/bindings/clock/qcom,gcc.yaml | 19 ++--------- 2 files changed, 41 insertions(+), 16 deletions(-)