Message ID | 20230214162325.312057-1-robert.marko@sartura.hr (mailing list archive) |
---|---|
State | Accepted |
Commit | 78b1607cb6c92c70886de7824588af9803bea3dd |
Headers | show |
Series | [1/7] dt-bindings: clock: split qcom,gcc-ipq4019 to separate file | expand |
On 14/02/2023 17:23, Robert Marko wrote: > Move schema for the GCC on IPQ4019 platform to a separate file to be able > to allow passing XO and sleep clks directly to GCC. > > Signed-off-by: Robert Marko <robert.marko@sartura.hr> > --- > .../bindings/clock/qcom,gcc-ipq4019.yaml | 53 +++++++++++++++++++ > .../bindings/clock/qcom,gcc-other.yaml | 2 - > 2 files changed, 53 insertions(+), 2 deletions(-) > create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml > > diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml > new file mode 100644 > index 0000000000000..6ebaef2288fa3 > --- /dev/null > +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml > @@ -0,0 +1,53 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/clock/qcom,gcc-ipq4019.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm Global Clock & Reset Controller on IPQ4019 > + > +maintainers: > + - Stephen Boyd <sboyd@kernel.org> > + - Taniya Das <tdas@codeaurora.org> > + - Robert Marko <robert.markoo@sartura.hr> > + > +description: | > + Qualcomm global clock control module provides the clocks, resets and power > + domains on IPQ4019. > + > + See also:: include/dt-bindings/clock/qcom,gcc-ipq4019.h > + > +allOf: > + - $ref: qcom,gcc.yaml# > + > +properties: > + compatible: > + const: qcom,gcc-ipq4019 > + > + clocks: > + items: > + - description: board XO clock > + - description: sleep clock > + > + clock-names: > + items: > + - const: xo > + - const: sleep_clk > + > +required: > + - compatible Aren't the clocks now required? Will it keep working without them? Best regards, Krzysztof
On Thu, Feb 16, 2023 at 11:16 AM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 14/02/2023 17:23, Robert Marko wrote: > > Move schema for the GCC on IPQ4019 platform to a separate file to be able > > to allow passing XO and sleep clks directly to GCC. > > > > Signed-off-by: Robert Marko <robert.marko@sartura.hr> > > --- > > .../bindings/clock/qcom,gcc-ipq4019.yaml | 53 +++++++++++++++++++ > > .../bindings/clock/qcom,gcc-other.yaml | 2 - > > 2 files changed, 53 insertions(+), 2 deletions(-) > > create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml > > > > diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml > > new file mode 100644 > > index 0000000000000..6ebaef2288fa3 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml > > @@ -0,0 +1,53 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/clock/qcom,gcc-ipq4019.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Qualcomm Global Clock & Reset Controller on IPQ4019 > > + > > +maintainers: > > + - Stephen Boyd <sboyd@kernel.org> > > + - Taniya Das <tdas@codeaurora.org> > > + - Robert Marko <robert.markoo@sartura.hr> > > + > > +description: | > > + Qualcomm global clock control module provides the clocks, resets and power > > + domains on IPQ4019. > > + > > + See also:: include/dt-bindings/clock/qcom,gcc-ipq4019.h > > + > > +allOf: > > + - $ref: qcom,gcc.yaml# > > + > > +properties: > > + compatible: > > + const: qcom,gcc-ipq4019 > > + > > + clocks: > > + items: > > + - description: board XO clock > > + - description: sleep clock > > + > > + clock-names: > > + items: > > + - const: xo > > + - const: sleep_clk > > + > > +required: > > + - compatible > > Aren't the clocks now required? Will it keep working without them? There are not required, this just allows passing them but the driver is still using global matching until in patch 2 XO and sleep clocks are converted to use parent data and in patch 3 they are passed via phandles to GCC, however, even then global matching by name is preserved in the driver as a fallback to keep backward compatibility. However, I see your point, after parent data conversion they should be required by schema as that is preferred over global matching. I will wait for some time for feedback on other patches and then send v2 that includes that change. Regards, Robert > > Best regards, > Krzysztof >
On 16/02/2023 11:41, Robert Marko wrote: > On Thu, Feb 16, 2023 at 11:16 AM Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 14/02/2023 17:23, Robert Marko wrote: >>> Move schema for the GCC on IPQ4019 platform to a separate file to be able >>> to allow passing XO and sleep clks directly to GCC. >>> >>> Signed-off-by: Robert Marko <robert.marko@sartura.hr> >>> --- >>> .../bindings/clock/qcom,gcc-ipq4019.yaml | 53 +++++++++++++++++++ >>> .../bindings/clock/qcom,gcc-other.yaml | 2 - >>> 2 files changed, 53 insertions(+), 2 deletions(-) >>> create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml >>> >>> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml >>> new file mode 100644 >>> index 0000000000000..6ebaef2288fa3 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml >>> @@ -0,0 +1,53 @@ >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/clock/qcom,gcc-ipq4019.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: Qualcomm Global Clock & Reset Controller on IPQ4019 >>> + >>> +maintainers: >>> + - Stephen Boyd <sboyd@kernel.org> >>> + - Taniya Das <tdas@codeaurora.org> >>> + - Robert Marko <robert.markoo@sartura.hr> >>> + >>> +description: | >>> + Qualcomm global clock control module provides the clocks, resets and power >>> + domains on IPQ4019. >>> + >>> + See also:: include/dt-bindings/clock/qcom,gcc-ipq4019.h >>> + >>> +allOf: >>> + - $ref: qcom,gcc.yaml# >>> + >>> +properties: >>> + compatible: >>> + const: qcom,gcc-ipq4019 >>> + >>> + clocks: >>> + items: >>> + - description: board XO clock >>> + - description: sleep clock >>> + >>> + clock-names: >>> + items: >>> + - const: xo >>> + - const: sleep_clk >>> + >>> +required: >>> + - compatible >> >> Aren't the clocks now required? Will it keep working without them? > > There are not required, this just allows passing them but the driver is > still using global matching until in patch 2 XO and sleep clocks are converted > to use parent data and in patch 3 they are passed via phandles to GCC, > however, even then global matching by name is preserved in the driver > as a fallback > to keep backward compatibility. > > However, I see your point, after parent data conversion they should be > required by > schema as that is preferred over global matching. Yes. Especially that these clock inputs must be there for the device to operate, so regardless of how Linux implements this, the hardware requires them, I think. Best regards, Krzysztof
On Tue, 14 Feb 2023 17:23:19 +0100, Robert Marko wrote: > Move schema for the GCC on IPQ4019 platform to a separate file to be able > to allow passing XO and sleep clks directly to GCC. > > Applied, thanks! [3/7] ARM: dts: qcom: ipq4019: pass XO and sleep clocks to GCC commit: 66e4811ab3967332c52a72f04d615f0faabb145e [4/7] ARM: dts: qcom: ipq4019: remove clk-output-names for sleep clock commit: 2a41c611f21751150cf4c0132a02828700e58e2d Best regards,
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml new file mode 100644 index 0000000000000..6ebaef2288fa3 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,gcc-ipq4019.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Global Clock & Reset Controller on IPQ4019 + +maintainers: + - Stephen Boyd <sboyd@kernel.org> + - Taniya Das <tdas@codeaurora.org> + - Robert Marko <robert.markoo@sartura.hr> + +description: | + Qualcomm global clock control module provides the clocks, resets and power + domains on IPQ4019. + + See also:: include/dt-bindings/clock/qcom,gcc-ipq4019.h + +allOf: + - $ref: qcom,gcc.yaml# + +properties: + compatible: + const: qcom,gcc-ipq4019 + + clocks: + items: + - description: board XO clock + - description: sleep clock + + clock-names: + items: + - const: xo + - const: sleep_clk + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + clock-controller@1800000 { + compatible = "qcom,gcc-ipq4019"; + reg = <0x1800000 0x60000>; + #clock-cells = <1>; + #power-domain-cells = <1>; + #reset-cells = <1>; + clocks = <&xo>, <&sleep_clk>; + clock-names = "xo", "sleep_clk"; + }; +... diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml index 2e8acca64af1c..ae01e77495342 100644 --- a/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml @@ -15,7 +15,6 @@ description: | domains. See also:: - include/dt-bindings/clock/qcom,gcc-ipq4019.h include/dt-bindings/clock/qcom,gcc-ipq6018.h include/dt-bindings/reset/qcom,gcc-ipq6018.h include/dt-bindings/clock/qcom,gcc-msm8953.h @@ -29,7 +28,6 @@ allOf: properties: compatible: enum: - - qcom,gcc-ipq4019 - qcom,gcc-ipq6018 - qcom,gcc-mdm9607 - qcom,gcc-msm8953
Move schema for the GCC on IPQ4019 platform to a separate file to be able to allow passing XO and sleep clks directly to GCC. Signed-off-by: Robert Marko <robert.marko@sartura.hr> --- .../bindings/clock/qcom,gcc-ipq4019.yaml | 53 +++++++++++++++++++ .../bindings/clock/qcom,gcc-other.yaml | 2 - 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-ipq4019.yaml