2022-05-02 16:38:59

by Christian Marangi

[permalink] [raw]
Subject: [PATCH v2 0/3] Krait Documentation conversion

This series convert the krait-cc and the kpps-acc/gcc Documentation to
yaml.

This series comes form a split of a bigger series that got too big and
now hard to review.

While they are still more or less wrong and doesn't really reflect real
driver implementation, they are converted to prepare for a fixup later
when dts and driver are finally fixed. For now make a 1:1 conversion.
The only change is an additional binding for the kpss-gcc Documentation
that require the #clock-cells when clock-output-names is used.

v2:
- Fix bot error by adding missing #clock-cells

Changelog for previous series "Modernize rest of the krait drivers"
that was split to smaller series (only Documentation changes):
v7:
- Rework kpss-gcc Documentation (split patch for pure conversion and
tweaks)
v6:
- Address comments from Rob
- Fix warning from make dtbs_check
v5:
- Address comments from Krzysztof
v4:
- Fix more dt-bindings bug errors
v3:
- Split Documentation files for kpss and krait-cc
v2:
- fix missing new line on patch 16 (krait-cc patch)

Ansuel Smith (3):
dt-bindings: clock: Convert qcom,krait-cc to yaml
dt-bindings: arm: msm: Convert kpss-acc driver Documentation to yaml
dt-bindings: arm: msm: Convert kpss-gcc driver Documentation to yaml

.../bindings/arm/msm/qcom,kpss-acc.txt | 49 ----------
.../bindings/arm/msm/qcom,kpss-acc.yaml | 94 +++++++++++++++++++
.../bindings/arm/msm/qcom,kpss-gcc.txt | 44 ---------
.../bindings/arm/msm/qcom,kpss-gcc.yaml | 68 ++++++++++++++
.../bindings/clock/qcom,krait-cc.txt | 34 -------
.../bindings/clock/qcom,krait-cc.yaml | 59 ++++++++++++
6 files changed, 221 insertions(+), 127 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt
create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml
delete mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt
create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.yaml
delete mode 100644 Documentation/devicetree/bindings/clock/qcom,krait-cc.txt
create mode 100644 Documentation/devicetree/bindings/clock/qcom,krait-cc.yaml

--
2.34.1


2022-05-02 23:27:35

by Christian Marangi

[permalink] [raw]
Subject: [PATCH v2 1/3] dt-bindings: clock: Convert qcom,krait-cc to yaml

Convert qcom,krait-cc to yaml Documentation.

Signed-off-by: Ansuel Smith <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Rob Herring <[email protected]>
---
.../bindings/clock/qcom,krait-cc.txt | 34 -----------
.../bindings/clock/qcom,krait-cc.yaml | 59 +++++++++++++++++++
2 files changed, 59 insertions(+), 34 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/clock/qcom,krait-cc.txt
create mode 100644 Documentation/devicetree/bindings/clock/qcom,krait-cc.yaml

diff --git a/Documentation/devicetree/bindings/clock/qcom,krait-cc.txt b/Documentation/devicetree/bindings/clock/qcom,krait-cc.txt
deleted file mode 100644
index 030ba60dab08..000000000000
--- a/Documentation/devicetree/bindings/clock/qcom,krait-cc.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-Krait Clock Controller
-
-PROPERTIES
-
-- compatible:
- Usage: required
- Value type: <string>
- Definition: must be one of:
- "qcom,krait-cc-v1"
- "qcom,krait-cc-v2"
-
-- #clock-cells:
- Usage: required
- Value type: <u32>
- Definition: must be 1
-
-- clocks:
- Usage: required
- Value type: <prop-encoded-array>
- Definition: reference to the clock parents of hfpll, secondary muxes.
-
-- clock-names:
- Usage: required
- Value type: <stringlist>
- Definition: must be "hfpll0", "hfpll1", "acpu0_aux", "acpu1_aux", "qsb".
-
-Example:
-
- kraitcc: clock-controller {
- compatible = "qcom,krait-cc-v1";
- clocks = <&hfpll0>, <&hfpll1>, <&acpu0_aux>, <&acpu1_aux>, <qsb>;
- clock-names = "hfpll0", "hfpll1", "acpu0_aux", "acpu1_aux", "qsb";
- #clock-cells = <1>;
- };
diff --git a/Documentation/devicetree/bindings/clock/qcom,krait-cc.yaml b/Documentation/devicetree/bindings/clock/qcom,krait-cc.yaml
new file mode 100644
index 000000000000..e879bfbe67ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,krait-cc.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,krait-cc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Krait Clock Controller
+
+maintainers:
+ - Ansuel Smith <[email protected]>
+
+description: |
+ Qualcomm Krait Clock Controller used to correctly scale the CPU and the L2
+ rates.
+
+properties:
+ compatible:
+ enum:
+ - qcom,krait-cc-v1
+ - qcom,krait-cc-v2
+
+ clocks:
+ items:
+ - description: phandle to hfpll for CPU0 mux
+ - description: phandle to hfpll for CPU1 mux
+ - description: phandle to CPU0 aux clock
+ - description: phandle to CPU1 aux clock
+ - description: phandle to QSB fixed clk
+
+ clock-names:
+ items:
+ - const: hfpll0
+ - const: hfpll1
+ - const: acpu0_aux
+ - const: acpu1_aux
+ - const: qsb
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - clocks
+ - clock-names
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller {
+ compatible = "qcom,krait-cc-v1";
+ clocks = <&hfpll0>, <&hfpll1>,
+ <&acpu0_aux>, <&acpu1_aux>, <&qsb>;
+ clock-names = "hfpll0", "hfpll1",
+ "acpu0_aux", "acpu1_aux", "qsb";
+ #clock-cells = <1>;
+ };
+...
--
2.34.1

2022-05-02 23:27:36

by Christian Marangi

[permalink] [raw]
Subject: [PATCH v2 3/3] dt-bindings: arm: msm: Convert kpss-gcc driver Documentation to yaml

Convert kpss-gcc driver Documentation to yaml.
Add #clock-cells additional binding to required bindings and example
as it's a required binding for clock-output-names.

Signed-off-by: Ansuel Smith <[email protected]>
---
.../bindings/arm/msm/qcom,kpss-gcc.txt | 44 ------------
.../bindings/arm/msm/qcom,kpss-gcc.yaml | 68 +++++++++++++++++++
2 files changed, 68 insertions(+), 44 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt
create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.yaml

diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt
deleted file mode 100644
index e628758950e1..000000000000
--- a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-Krait Processor Sub-system (KPSS) Global Clock Controller (GCC)
-
-PROPERTIES
-
-- compatible:
- Usage: required
- Value type: <string>
- Definition: should be one of the following. The generic compatible
- "qcom,kpss-gcc" should also be included.
- "qcom,kpss-gcc-ipq8064", "qcom,kpss-gcc"
- "qcom,kpss-gcc-apq8064", "qcom,kpss-gcc"
- "qcom,kpss-gcc-msm8974", "qcom,kpss-gcc"
- "qcom,kpss-gcc-msm8960", "qcom,kpss-gcc"
-
-- reg:
- Usage: required
- Value type: <prop-encoded-array>
- Definition: base address and size of the register region
-
-- clocks:
- Usage: required
- Value type: <prop-encoded-array>
- Definition: reference to the pll parents.
-
-- clock-names:
- Usage: required
- Value type: <stringlist>
- Definition: must be "pll8_vote", "pxo".
-
-- clock-output-names:
- Usage: required
- Value type: <string>
- Definition: Name of the output clock. Typically acpu_l2_aux indicating
- an L2 cache auxiliary clock.
-
-Example:
-
- l2cc: clock-controller@2011000 {
- compatible = "qcom,kpss-gcc-ipq8064", "qcom,kpss-gcc";
- reg = <0x2011000 0x1000>;
- clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
- clock-names = "pll8_vote", "pxo";
- clock-output-names = "acpu_l2_aux";
- };
diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.yaml b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.yaml
new file mode 100644
index 000000000000..20ee182eb16f
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/msm/qcom,kpss-gcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Krait Processor Sub-system (KPSS) Global Clock Controller (GCC)
+
+maintainers:
+ - Ansuel Smith <[email protected]>
+
+description: |
+ Krait Processor Sub-system (KPSS) Global Clock Controller (GCC). Used
+ to control L2 mux (in the current implementation).
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - qcom,kpss-gcc-ipq8064
+ - qcom,kpss-gcc-apq8064
+ - qcom,kpss-gcc-msm8974
+ - qcom,kpss-gcc-msm8960
+ - const: qcom,kpss-gcc
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: phandle to pll8_vote
+ - description: phandle to pxo_board
+
+ clock-names:
+ items:
+ - const: pll8_vote
+ - const: pxo
+
+ clock-output-names:
+ const: acpu_l2_aux
+
+ '#clock-cells':
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - clock-output-names
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-ipq806x.h>
+
+ clock-controller@2011000 {
+ compatible = "qcom,kpss-gcc-ipq8064", "qcom,kpss-gcc";
+ reg = <0x2011000 0x1000>;
+ clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
+ clock-names = "pll8_vote", "pxo";
+ clock-output-names = "acpu_l2_aux";
+ #clock-cells = <0>;
+ };
+...
+
--
2.34.1

2022-05-03 00:18:52

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] dt-bindings: arm: msm: Convert kpss-gcc driver Documentation to yaml

On Sat, 30 Apr 2022 08:01:25 +0200, Ansuel Smith wrote:
> Convert kpss-gcc driver Documentation to yaml.
> Add #clock-cells additional binding to required bindings and example
> as it's a required binding for clock-output-names.
>
> Signed-off-by: Ansuel Smith <[email protected]>
> ---
> .../bindings/arm/msm/qcom,kpss-gcc.txt | 44 ------------
> .../bindings/arm/msm/qcom,kpss-gcc.yaml | 68 +++++++++++++++++++
> 2 files changed, 68 insertions(+), 44 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt
> create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.yaml
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


clock-controller@2011000: '#clock-cells' is a required property
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dtb
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dtb
arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dtb
arch/arm/boot/dts/qcom-ipq8064-ap148.dtb
arch/arm/boot/dts/qcom-ipq8064-rb3011.dtb
arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dtb
arch/arm/boot/dts/qcom-msm8960-cdp.dtb

clock-controller@2011000: 'clock-names' is a required property
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dtb
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dtb
arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dtb
arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dtb
arch/arm/boot/dts/qcom-msm8960-cdp.dtb

clock-controller@2011000: 'clock-output-names' is a required property
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dtb
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dtb
arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dtb
arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dtb
arch/arm/boot/dts/qcom-msm8960-cdp.dtb

clock-controller@2011000: 'clocks' is a required property
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dtb
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dtb
arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dtb
arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dtb
arch/arm/boot/dts/qcom-msm8960-cdp.dtb

clock-controller@2011000: compatible:0: 'qcom,kpss-gcc' is not one of ['qcom,kpss-gcc-ipq8064', 'qcom,kpss-gcc-apq8064', 'qcom,kpss-gcc-msm8974', 'qcom,kpss-gcc-msm8960']
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dtb
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dtb
arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dtb
arch/arm/boot/dts/qcom-ipq8064-ap148.dtb
arch/arm/boot/dts/qcom-ipq8064-rb3011.dtb
arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dtb
arch/arm/boot/dts/qcom-msm8960-cdp.dtb

clock-controller@2011000: compatible:1: 'qcom,kpss-gcc' was expected
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dtb
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dtb
arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dtb
arch/arm/boot/dts/qcom-ipq8064-ap148.dtb
arch/arm/boot/dts/qcom-ipq8064-rb3011.dtb
arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dtb
arch/arm/boot/dts/qcom-msm8960-cdp.dtb

clock-controller@2082000: '#clock-cells' is a required property
arch/arm/boot/dts/qcom-apq8060-dragonboard.dtb
arch/arm/boot/dts/qcom-msm8660-surf.dtb

clock-controller@2082000: 'clock-names' is a required property
arch/arm/boot/dts/qcom-apq8060-dragonboard.dtb
arch/arm/boot/dts/qcom-msm8660-surf.dtb

clock-controller@2082000: 'clock-output-names' is a required property
arch/arm/boot/dts/qcom-apq8060-dragonboard.dtb
arch/arm/boot/dts/qcom-msm8660-surf.dtb

clock-controller@2082000: 'clocks' is a required property
arch/arm/boot/dts/qcom-apq8060-dragonboard.dtb
arch/arm/boot/dts/qcom-msm8660-surf.dtb

clock-controller@2082000: compatible:0: 'qcom,kpss-gcc' is not one of ['qcom,kpss-gcc-ipq8064', 'qcom,kpss-gcc-apq8064', 'qcom,kpss-gcc-msm8974', 'qcom,kpss-gcc-msm8960']
arch/arm/boot/dts/qcom-apq8060-dragonboard.dtb
arch/arm/boot/dts/qcom-msm8660-surf.dtb

clock-controller@2082000: compatible:1: 'qcom,kpss-gcc' was expected
arch/arm/boot/dts/qcom-apq8060-dragonboard.dtb
arch/arm/boot/dts/qcom-msm8660-surf.dtb

2022-05-03 00:19:20

by Christian Marangi

[permalink] [raw]
Subject: [PATCH v2 2/3] dt-bindings: arm: msm: Convert kpss-acc driver Documentation to yaml

Convert kpss-acc driver Documentation to yaml.
The original Documentation was wrong all along. Fix it while we are
converting it.
The example was wrong as kpss-acc-v2 should only expose the regs but we
don't have any driver that expose additional clocks. The kpss-acc driver
is only specific to v1. For this exact reason, limit all the additional
bindings (clocks, clock-names, clock-output-names and #clock-cells) to
v1 and also flag that these bindings should NOT be used for v2.

Signed-off-by: Ansuel Smith <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/arm/msm/qcom,kpss-acc.txt | 49 ----------
.../bindings/arm/msm/qcom,kpss-acc.yaml | 94 +++++++++++++++++++
2 files changed, 94 insertions(+), 49 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt
create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml

diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt
deleted file mode 100644
index 7f696362a4a1..000000000000
--- a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-Krait Processor Sub-system (KPSS) Application Clock Controller (ACC)
-
-The KPSS ACC provides clock, power domain, and reset control to a Krait CPU.
-There is one ACC register region per CPU within the KPSS remapped region as
-well as an alias register region that remaps accesses to the ACC associated
-with the CPU accessing the region.
-
-PROPERTIES
-
-- compatible:
- Usage: required
- Value type: <string>
- Definition: should be one of:
- "qcom,kpss-acc-v1"
- "qcom,kpss-acc-v2"
-
-- reg:
- Usage: required
- Value type: <prop-encoded-array>
- Definition: the first element specifies the base address and size of
- the register region. An optional second element specifies
- the base address and size of the alias register region.
-
-- clocks:
- Usage: required
- Value type: <prop-encoded-array>
- Definition: reference to the pll parents.
-
-- clock-names:
- Usage: required
- Value type: <stringlist>
- Definition: must be "pll8_vote", "pxo".
-
-- clock-output-names:
- Usage: optional
- Value type: <string>
- Definition: Name of the output clock. Typically acpuX_aux where X is a
- CPU number starting at 0.
-
-Example:
-
- clock-controller@2088000 {
- compatible = "qcom,kpss-acc-v2";
- reg = <0x02088000 0x1000>,
- <0x02008000 0x1000>;
- clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
- clock-names = "pll8_vote", "pxo";
- clock-output-names = "acpu0_aux";
- };
diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml
new file mode 100644
index 000000000000..707a81a6c30e
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml
@@ -0,0 +1,94 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/msm/qcom,kpss-acc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Krait Processor Sub-system (KPSS) Application Clock Controller (ACC)
+
+maintainers:
+ - Ansuel Smith <[email protected]>
+
+description: |
+ The KPSS ACC provides clock, power domain, and reset control to a Krait CPU.
+ There is one ACC register region per CPU within the KPSS remapped region as
+ well as an alias register region that remaps accesses to the ACC associated
+ with the CPU accessing the region.
+
+properties:
+ compatible:
+ enum:
+ - qcom,kpss-acc-v1
+ - qcom,kpss-acc-v2
+
+ reg:
+ items:
+ - description: Base address and size of the register region
+ - description: Optional base address and size of the alias register region
+
+ clocks:
+ items:
+ - description: phandle to pll8_vote
+ - description: phandle to pxo_board
+
+ clock-names:
+ items:
+ - const: pll8_vote
+ - const: pxo
+
+ clock-output-names:
+ description: Name of the aux clock. Krait can have at most 4 cpu.
+ enum:
+ - acpu0_aux
+ - acpu1_aux
+ - acpu2_aux
+ - acpu3_aux
+
+ '#clock-cells':
+ const: 0
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: qcom,kpss-acc-v1
+ then:
+ required:
+ - clocks
+ - clock-names
+ - clock-output-names
+ - '#clock-cells'
+ else:
+ properties:
+ clocks: false
+ clock-names: false
+ clock-output-names: false
+ '#clock-cells': false
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-ipq806x.h>
+
+ clock-controller@2088000 {
+ compatible = "qcom,kpss-acc-v1";
+ reg = <0x02088000 0x1000>, <0x02008000 0x1000>;
+ clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
+ clock-names = "pll8_vote", "pxo";
+ clock-output-names = "acpu0_aux";
+ #clock-cells = <0>;
+ };
+
+ - |
+ clock-controller@f9088000 {
+ compatible = "qcom,kpss-acc-v2";
+ reg = <0xf9088000 0x1000>,
+ <0xf9008000 0x1000>;
+ };
+...
--
2.34.1

2022-05-03 00:41:27

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] dt-bindings: arm: msm: Convert kpss-gcc driver Documentation to yaml

On 02/05/2022 12:40, Ansuel Smith wrote:
>
> The idea is that you put the clk name in 'clock-output-names' and the
> driver needs to have support for it (and set the clk name based on the
> name defined in the dts)
>
> This driver doesn't have support for it and is actually hardcoded.
> So you are right and I should just drop it.
>
> But now another question... Since #clock-cells was added as a
> requirement for clock-output-names, should I drop also that?
>
> In theory #clock-cells should always be declared for clock providers, is
> it right to add it in the conversion commit or I should put this change
> in another commit? (since it's now an addition and now something required
> to fix a bot warning)

These are not the best bindings to convert, if you are not into the qcom
DTS and drivers. :)

It looks like the bindings were added to match current Linux
implementation and in this implementation the device is not used in DTS
as a clock provider (even though it registers a clock) but as a syscon.
I am not even sure if it is used as a clock provider outside of DTS
(through using a fixed clock name in some clock consumer).

Probably this should be made either a proper clock controller or
something stripped down to the point matching current usage (accepting
the fact that bindings are incomplete). Anyway your choice should be
made according to how this device and its driver fit to entire system.
IOW, it's not a simple binding conversion and you should not just
convert it to make dtbs_check happy.

Best regards,
Krzysztof

2022-05-03 00:43:50

by Christian Marangi

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] dt-bindings: arm: msm: Convert kpss-gcc driver Documentation to yaml

On Mon, May 02, 2022 at 10:18:31PM +0200, Krzysztof Kozlowski wrote:
> On 02/05/2022 12:40, Ansuel Smith wrote:
> >
> > The idea is that you put the clk name in 'clock-output-names' and the
> > driver needs to have support for it (and set the clk name based on the
> > name defined in the dts)
> >
> > This driver doesn't have support for it and is actually hardcoded.
> > So you are right and I should just drop it.
> >
> > But now another question... Since #clock-cells was added as a
> > requirement for clock-output-names, should I drop also that?
> >
> > In theory #clock-cells should always be declared for clock providers, is
> > it right to add it in the conversion commit or I should put this change
> > in another commit? (since it's now an addition and now something required
> > to fix a bot warning)
>
> These are not the best bindings to convert, if you are not into the qcom
> DTS and drivers. :)
>

As I said some times ago main problem of these thing is that they are
ancient and they were not in a good state from the start. So it's hard
to fix this in a sane way. (i'm trying tho so sorry for any mess i'm
making in the process)

> It looks like the bindings were added to match current Linux
> implementation and in this implementation the device is not used in DTS
> as a clock provider (even though it registers a clock) but as a syscon.
> I am not even sure if it is used as a clock provider outside of DTS
> (through using a fixed clock name in some clock consumer).
>
> Probably this should be made either a proper clock controller or
> something stripped down to the point matching current usage (accepting
> the fact that bindings are incomplete). Anyway your choice should be
> made according to how this device and its driver fit to entire system.
> IOW, it's not a simple binding conversion and you should not just
> convert it to make dtbs_check happy.

I wonder if I should just drop this patch from the series and push it
later in another series as a rework directly (with also the other
relevant changes to fix the current problem we have with all the dts).

The intention of this series was to try to push small changes that could
be merged in a short time.

>
> Best regards,
> Krzysztof

--
Ansuel