devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/7] Krait Documentation conversion
@ 2023-01-16 20:47 Christian Marangi
  2023-01-16 20:47 ` [PATCH v7 1/7] dt-bindings: clock: Convert qcom,krait-cc to yaml Christian Marangi
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Christian Marangi @ 2023-01-16 20:47 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, Christian Marangi,
	devicetree, linux-kernel, linux-arm-msm, linux-clk

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.

Minor changes are done to the kpss-gcc driver and minor fixes are done to
the various affected dts to fix dtbs_check warning with the new introduced
schema.

Also fix kpss-acc dtbs_check warning.

v7:
- Split dt patches to compatible and missing clock
- Add Review tag by Rob
- Rename from power-controller to power-manager and drop extra binding
- Add Review tag by Dmitry
- Rework some patch to better commit title and description
v6:
- Split kpss-acc to separate v1 and v2 schema (thing changed from
  simple clock controller to a power domain in later SoCs)
- Fix whitespace error (extra new line at the end of the file)
- rebase on top of linux-next/master
v5:
- rebase on top of linux-next/master
v4:
- Fix error from kpss-acc schema
- Fix dtbs_check warning from kpss-acc
- Improve kpss-gcc for apq8064
v3:
- Update all Sob
- Rework kpss-gcc Documentation with the new finding
- Fix dtbs_check warning
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)

Christian Marangi (7):
  dt-bindings: clock: Convert qcom,krait-cc to yaml
  dt-bindings: arm: msm: Convert and split kpss-acc driver Documentation
    to yaml
  dt-bindings: arm: msm: Rework kpss-gcc driver Documentation to yaml
  ARM: dts: qcom: add per SoC compatible for qcom,kpss-gcc nodes
  ARM: dts: qcom: add and fix clock configuration for kpss-gcc nodes
  ARM: dts: qcom: add missing clock configuration for kpss-acc-v1
  ARM: dts: qcom: rename kpss-acc-v2 nodes to power-manager nodes

 .../bindings/arm/msm/qcom,kpss-acc.txt        | 49 -----------
 .../bindings/arm/msm/qcom,kpss-gcc.txt        | 44 ----------
 .../bindings/clock/qcom,kpss-acc-v1.yaml      | 72 +++++++++++++++
 .../bindings/clock/qcom,kpss-gcc.yaml         | 88 +++++++++++++++++++
 .../bindings/clock/qcom,krait-cc.txt          | 34 -------
 .../bindings/clock/qcom,krait-cc.yaml         | 59 +++++++++++++
 .../bindings/power/qcom,kpss-acc-v2.yaml      | 42 +++++++++
 arch/arm/boot/dts/qcom-apq8064.dtsi           | 21 ++++-
 arch/arm/boot/dts/qcom-apq8084.dtsi           |  8 +-
 arch/arm/boot/dts/qcom-ipq4019.dtsi           |  8 +-
 arch/arm/boot/dts/qcom-ipq8064.dtsi           | 12 ++-
 arch/arm/boot/dts/qcom-mdm9615.dtsi           |  2 +-
 arch/arm/boot/dts/qcom-msm8660.dtsi           |  2 +-
 arch/arm/boot/dts/qcom-msm8960.dtsi           | 13 ++-
 arch/arm/boot/dts/qcom-msm8974.dtsi           |  8 +-
 15 files changed, 317 insertions(+), 145 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt
 delete mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,kpss-acc-v1.yaml
 create mode 100644 Documentation/devicetree/bindings/clock/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
 create mode 100644 Documentation/devicetree/bindings/power/qcom,kpss-acc-v2.yaml

-- 
2.37.2


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v7 1/7] dt-bindings: clock: Convert qcom,krait-cc to yaml
  2023-01-16 20:47 [PATCH v7 0/7] Krait Documentation conversion Christian Marangi
@ 2023-01-16 20:47 ` Christian Marangi
  2023-01-16 21:14   ` Dmitry Baryshkov
  2023-01-16 20:47 ` [PATCH v7 2/7] dt-bindings: arm: msm: Convert and split kpss-acc driver Documentation " Christian Marangi
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Christian Marangi @ 2023-01-16 20:47 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, Christian Marangi,
	devicetree, linux-kernel, linux-arm-msm, linux-clk
  Cc: Krzysztof Kozlowski, Rob Herring

Convert qcom,krait-cc to yaml Documentation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
---
 .../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..8caa5a677394
--- /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:
+  - Christian Marangi <ansuelsmth@gmail.com>
+
+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.37.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v7 2/7] dt-bindings: arm: msm: Convert and split kpss-acc driver Documentation to yaml
  2023-01-16 20:47 [PATCH v7 0/7] Krait Documentation conversion Christian Marangi
  2023-01-16 20:47 ` [PATCH v7 1/7] dt-bindings: clock: Convert qcom,krait-cc to yaml Christian Marangi
@ 2023-01-16 20:47 ` Christian Marangi
  2023-01-18 16:05   ` Rob Herring
  2023-01-16 20:47 ` [PATCH v7 3/7] dt-bindings: arm: msm: Rework kpss-gcc " Christian Marangi
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Christian Marangi @ 2023-01-16 20:47 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, Christian Marangi,
	devicetree, linux-kernel, linux-arm-msm, linux-clk

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, split the Documentation
to 2 different schema, v1 as clock-controller and v2 for
power-manager as per msm-3.10 specification, the exposed regs handle
power manager.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 .../bindings/arm/msm/qcom,kpss-acc.txt        | 49 -------------
 .../bindings/clock/qcom,kpss-acc-v1.yaml      | 72 +++++++++++++++++++
 .../bindings/power/qcom,kpss-acc-v2.yaml      | 42 +++++++++++
 3 files changed, 114 insertions(+), 49 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,kpss-acc-v1.yaml
 create mode 100644 Documentation/devicetree/bindings/power/qcom,kpss-acc-v2.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/clock/qcom,kpss-acc-v1.yaml b/Documentation/devicetree/bindings/clock/qcom,kpss-acc-v1.yaml
new file mode 100644
index 000000000000..a466e4e8aacd
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,kpss-acc-v1.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,kpss-acc-v1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Krait Processor Sub-system (KPSS) Application Clock Controller (ACC) v1
+
+maintainers:
+  - Christian Marangi <ansuelsmth@gmail.com>
+
+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. ACC v1 is currently used as a
+  clock-controller for enabling the cpu and hanling the aux clocks.
+
+properties:
+  compatible:
+    const: qcom,kpss-acc-v1
+
+  reg:
+    items:
+      - description: Base address and size of the register region
+      - description: Optional base address and size of the alias register region
+    minItems: 1
+
+  clocks:
+    minItems: 2
+    maxItems: 2
+
+  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
+  - clocks
+  - clock-names
+  - clock-output-names
+  - '#clock-cells'
+
+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>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/power/qcom,kpss-acc-v2.yaml b/Documentation/devicetree/bindings/power/qcom,kpss-acc-v2.yaml
new file mode 100644
index 000000000000..202a5d51ee88
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/qcom,kpss-acc-v2.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/qcom,kpss-acc-v2.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Krait Processor Sub-system (KPSS) Application Clock Controller (ACC) v2
+
+maintainers:
+  - Christian Marangi <ansuelsmth@gmail.com>
+
+description:
+  The KPSS ACC provides clock, power manager, 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. ACC v2 is currently used as a
+  power-manager for enabling the cpu.
+
+properties:
+  compatible:
+    const: 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
+    minItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    power-manager@f9088000 {
+      compatible = "qcom,kpss-acc-v2";
+      reg = <0xf9088000 0x1000>,
+            <0xf9008000 0x1000>;
+    };
+...
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v7 3/7] dt-bindings: arm: msm: Rework kpss-gcc driver Documentation to yaml
  2023-01-16 20:47 [PATCH v7 0/7] Krait Documentation conversion Christian Marangi
  2023-01-16 20:47 ` [PATCH v7 1/7] dt-bindings: clock: Convert qcom,krait-cc to yaml Christian Marangi
  2023-01-16 20:47 ` [PATCH v7 2/7] dt-bindings: arm: msm: Convert and split kpss-acc driver Documentation " Christian Marangi
@ 2023-01-16 20:47 ` Christian Marangi
  2023-01-16 20:47 ` [PATCH v7 4/7] ARM: dts: qcom: add per SoC compatible for qcom,kpss-gcc nodes Christian Marangi
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Christian Marangi @ 2023-01-16 20:47 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, Christian Marangi,
	devicetree, linux-kernel, linux-arm-msm, linux-clk
  Cc: Rob Herring

Rework kpss-gcc driver Documentation to yaml Documentation and move it
to clock as it's a clock-controller.
The current kpss-gcc Documentation have major problems and can't be
converted directly. Introduce various changes to the original
Documentation.

Add #clock-cells additional binding as this clock outputs a static clk
named acpu_l2_aux with supported compatible.
Only some compatible require and outputs a clock, for the others, set
only the reg as a required binding to correctly export the kpss-gcc
registers. As the reg is shared also add the required syscon compatible.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../bindings/arm/msm/qcom,kpss-gcc.txt        | 44 ----------
 .../bindings/clock/qcom,kpss-gcc.yaml         | 88 +++++++++++++++++++
 2 files changed, 88 insertions(+), 44 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt
 create mode 100644 Documentation/devicetree/bindings/clock/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/clock/qcom,kpss-gcc.yaml b/Documentation/devicetree/bindings/clock/qcom,kpss-gcc.yaml
new file mode 100644
index 000000000000..88b7672123a0
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,kpss-gcc.yaml
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,kpss-gcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Krait Processor Sub-system (KPSS) Global Clock Controller (GCC)
+
+maintainers:
+  - Christian Marangi <ansuelsmth@gmail.com>
+
+description:
+  Krait Processor Sub-system (KPSS) Global Clock Controller (GCC). Used
+  to control L2 mux (in the current implementation) and provide access
+  to the kpss-gcc registers.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - qcom,kpss-gcc-ipq8064
+          - qcom,kpss-gcc-apq8064
+          - qcom,kpss-gcc-msm8974
+          - qcom,kpss-gcc-msm8960
+          - qcom,kpss-gcc-msm8660
+          - qcom,kpss-gcc-mdm9615
+      - const: qcom,kpss-gcc
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    minItems: 2
+    maxItems: 2
+
+  clock-names:
+    items:
+      - const: pll8_vote
+      - const: pxo
+
+  '#clock-cells':
+    const: 0
+
+required:
+  - compatible
+  - reg
+
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - qcom,kpss-gcc-ipq8064
+          - qcom,kpss-gcc-apq8064
+          - qcom,kpss-gcc-msm8974
+          - qcom,kpss-gcc-msm8960
+then:
+  required:
+    - clocks
+    - clock-names
+    - '#clock-cells'
+else:
+  properties:
+    clock: false
+    clock-names: false
+    '#clock-cells': false
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-ipq806x.h>
+
+    clock-controller@2011000 {
+      compatible = "qcom,kpss-gcc-ipq8064", "qcom,kpss-gcc", "syscon";
+      reg = <0x2011000 0x1000>;
+      clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
+      clock-names = "pll8_vote", "pxo";
+      #clock-cells = <0>;
+    };
+
+  - |
+    clock-controller@2011000 {
+      compatible = "qcom,kpss-gcc-mdm9615", "qcom,kpss-gcc", "syscon";
+      reg = <0x02011000 0x1000>;
+    };
+...
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v7 4/7] ARM: dts: qcom: add per SoC compatible for qcom,kpss-gcc nodes
  2023-01-16 20:47 [PATCH v7 0/7] Krait Documentation conversion Christian Marangi
                   ` (2 preceding siblings ...)
  2023-01-16 20:47 ` [PATCH v7 3/7] dt-bindings: arm: msm: Rework kpss-gcc " Christian Marangi
@ 2023-01-16 20:47 ` Christian Marangi
  2023-01-16 20:47 ` [PATCH v7 5/7] ARM: dts: qcom: add and fix clock configuration for kpss-gcc nodes Christian Marangi
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Christian Marangi @ 2023-01-16 20:47 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, Christian Marangi,
	devicetree, linux-kernel, linux-arm-msm, linux-clk

Add per Soc compatible for qcom,kpss-gcc nodes. While currently not used
by the kpss driver they can serve further customization and they are
required to be defined per Documentation schema.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +-
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 2 +-
 arch/arm/boot/dts/qcom-mdm9615.dtsi | 2 +-
 arch/arm/boot/dts/qcom-msm8660.dtsi | 2 +-
 arch/arm/boot/dts/qcom-msm8960.dtsi | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 1f3e0aa9ab0c..7065f6e88dcf 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -880,7 +880,7 @@ mmcc: clock-controller@4000000 {
 		};
 
 		l2cc: clock-controller@2011000 {
-			compatible = "qcom,kpss-gcc", "syscon";
+			compatible = "qcom,kpss-gcc-apq8064", "qcom,kpss-gcc", "syscon";
 			reg = <0x2011000 0x1000>;
 		};
 
diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index 7e784b0995da..bd0728c57eab 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -570,7 +570,7 @@ IRQ_TYPE_EDGE_RISING)>,
 		};
 
 		l2cc: clock-controller@2011000 {
-			compatible = "qcom,kpss-gcc", "syscon";
+			compatible = "qcom,kpss-gcc-ipq8064", "qcom,kpss-gcc", "syscon";
 			reg = <0x02011000 0x1000>;
 			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
 			clock-names = "pll8_vote", "pxo";
diff --git a/arch/arm/boot/dts/qcom-mdm9615.dtsi b/arch/arm/boot/dts/qcom-mdm9615.dtsi
index b0fe1d95d88f..61dfec3b9037 100644
--- a/arch/arm/boot/dts/qcom-mdm9615.dtsi
+++ b/arch/arm/boot/dts/qcom-mdm9615.dtsi
@@ -116,7 +116,7 @@ lcc: clock-controller@28000000 {
 		};
 
 		l2cc: clock-controller@2011000 {
-			compatible = "qcom,kpss-gcc", "syscon";
+			compatible = "qcom,kpss-gcc-mdm9615", "qcom,kpss-gcc", "syscon";
 			reg = <0x02011000 0x1000>;
 		};
 
diff --git a/arch/arm/boot/dts/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom-msm8660.dtsi
index 86f76d0feff4..f601b40ebcf4 100644
--- a/arch/arm/boot/dts/qcom-msm8660.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8660.dtsi
@@ -473,7 +473,7 @@ pm8058_led133: led@133 {
 		};
 
 		l2cc: clock-controller@2082000 {
-			compatible = "qcom,kpss-gcc", "syscon";
+			compatible = "qcom,kpss-gcc-msm8660", "qcom,kpss-gcc", "syscon";
 			reg = <0x02082000 0x1000>;
 		};
 
diff --git a/arch/arm/boot/dts/qcom-msm8960.dtsi b/arch/arm/boot/dts/qcom-msm8960.dtsi
index 7debf9db7cb1..2dd90e57929a 100644
--- a/arch/arm/boot/dts/qcom-msm8960.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8960.dtsi
@@ -183,7 +183,7 @@ clock-controller@4000000 {
 		};
 
 		l2cc: clock-controller@2011000 {
-			compatible = "qcom,kpss-gcc", "syscon";
+			compatible = "qcom,kpss-gcc-msm8960", "qcom,kpss-gcc", "syscon";
 			reg = <0x2011000 0x1000>;
 		};
 
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v7 5/7] ARM: dts: qcom: add and fix clock configuration for kpss-gcc nodes
  2023-01-16 20:47 [PATCH v7 0/7] Krait Documentation conversion Christian Marangi
                   ` (3 preceding siblings ...)
  2023-01-16 20:47 ` [PATCH v7 4/7] ARM: dts: qcom: add per SoC compatible for qcom,kpss-gcc nodes Christian Marangi
@ 2023-01-16 20:47 ` Christian Marangi
  2023-01-16 21:05   ` Dmitry Baryshkov
  2023-01-16 20:47 ` [PATCH v7 6/7] ARM: dts: qcom: add missing clock configuration for kpss-acc-v1 Christian Marangi
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Christian Marangi @ 2023-01-16 20:47 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, Christian Marangi,
	devicetree, linux-kernel, linux-arm-msm, linux-clk

Add missing clock configuration by adding clocks, clock-names
and #clock-cells bindings for each kpss-acc-v1 clock-controller
node for apq8064 and msm8960 to reflect Documentation schema.
Add missing #clock-cells binding and remove useless clock-output-names for
ipq806x dtsi.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 3 +++
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 2 +-
 arch/arm/boot/dts/qcom-msm8960.dtsi | 3 +++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 7065f6e88dcf..1e68b42acb91 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -882,6 +882,9 @@ mmcc: clock-controller@4000000 {
 		l2cc: clock-controller@2011000 {
 			compatible = "qcom,kpss-gcc-apq8064", "qcom,kpss-gcc", "syscon";
 			reg = <0x2011000 0x1000>;
+			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
+			clock-names = "pll8_vote", "pxo";
+			#clock-cells = <0>;
 		};
 
 		rpm: rpm@108000 {
diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index bd0728c57eab..de87fcaaa836 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -574,7 +574,7 @@ l2cc: clock-controller@2011000 {
 			reg = <0x02011000 0x1000>;
 			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
 			clock-names = "pll8_vote", "pxo";
-			clock-output-names = "acpu_l2_aux";
+			#clock-cells = <0>;
 		};
 
 		acc0: clock-controller@2088000 {
diff --git a/arch/arm/boot/dts/qcom-msm8960.dtsi b/arch/arm/boot/dts/qcom-msm8960.dtsi
index 2dd90e57929a..3bd07cac315b 100644
--- a/arch/arm/boot/dts/qcom-msm8960.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8960.dtsi
@@ -185,6 +185,9 @@ clock-controller@4000000 {
 		l2cc: clock-controller@2011000 {
 			compatible = "qcom,kpss-gcc-msm8960", "qcom,kpss-gcc", "syscon";
 			reg = <0x2011000 0x1000>;
+			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
+			clock-names = "pll8_vote", "pxo";
+			#clock-cells = <0>;
 		};
 
 		rpm: rpm@108000 {
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v7 6/7] ARM: dts: qcom: add missing clock configuration for kpss-acc-v1
  2023-01-16 20:47 [PATCH v7 0/7] Krait Documentation conversion Christian Marangi
                   ` (4 preceding siblings ...)
  2023-01-16 20:47 ` [PATCH v7 5/7] ARM: dts: qcom: add and fix clock configuration for kpss-gcc nodes Christian Marangi
@ 2023-01-16 20:47 ` Christian Marangi
  2023-01-16 20:47 ` [PATCH v7 7/7] ARM: dts: qcom: rename kpss-acc-v2 nodes to power-manager nodes Christian Marangi
  2023-03-16  3:20 ` (subset) [PATCH v7 0/7] Krait Documentation conversion Bjorn Andersson
  7 siblings, 0 replies; 16+ messages in thread
From: Christian Marangi @ 2023-01-16 20:47 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, Christian Marangi,
	devicetree, linux-kernel, linux-arm-msm, linux-clk
  Cc: Dmitry Baryshkov

Add missing clock configuration by adding clocks, clock-names,
clock-output-names and #clock-cells bindings for each kpss-acc-v1
clock-controller to reflect Documentation schema.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 16 ++++++++++++++++
 arch/arm/boot/dts/qcom-ipq8064.dtsi |  8 ++++++++
 arch/arm/boot/dts/qcom-msm8960.dtsi |  8 ++++++++
 3 files changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 1e68b42acb91..af84f2d350ef 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -389,21 +389,37 @@ timer@200a000 {
 		acc0: 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>;
 		};
 
 		acc1: clock-controller@2098000 {
 			compatible = "qcom,kpss-acc-v1";
 			reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
+			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
+			clock-names = "pll8_vote", "pxo";
+			clock-output-names = "acpu1_aux";
+			#clock-cells = <0>;
 		};
 
 		acc2: clock-controller@20a8000 {
 			compatible = "qcom,kpss-acc-v1";
 			reg = <0x020a8000 0x1000>, <0x02008000 0x1000>;
+			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
+			clock-names = "pll8_vote", "pxo";
+			clock-output-names = "acpu2_aux";
+			#clock-cells = <0>;
 		};
 
 		acc3: clock-controller@20b8000 {
 			compatible = "qcom,kpss-acc-v1";
 			reg = <0x020b8000 0x1000>, <0x02008000 0x1000>;
+			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
+			clock-names = "pll8_vote", "pxo";
+			clock-output-names = "acpu3_aux";
+			#clock-cells = <0>;
 		};
 
 		saw0: power-controller@2089000 {
diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index de87fcaaa836..e796094a7af5 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -580,6 +580,10 @@ l2cc: clock-controller@2011000 {
 		acc0: 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>;
 		};
 
 		saw0: regulator@2089000 {
@@ -591,6 +595,10 @@ saw0: regulator@2089000 {
 		acc1: clock-controller@2098000 {
 			compatible = "qcom,kpss-acc-v1";
 			reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
+			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
+			clock-names = "pll8_vote", "pxo";
+			clock-output-names = "acpu1_aux";
+			#clock-cells = <0>;
 		};
 
 		saw1: regulator@2099000 {
diff --git a/arch/arm/boot/dts/qcom-msm8960.dtsi b/arch/arm/boot/dts/qcom-msm8960.dtsi
index 3bd07cac315b..4fd56d85be3f 100644
--- a/arch/arm/boot/dts/qcom-msm8960.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8960.dtsi
@@ -208,11 +208,19 @@ regulators {
 		acc0: 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>;
 		};
 
 		acc1: clock-controller@2098000 {
 			compatible = "qcom,kpss-acc-v1";
 			reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
+			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
+			clock-names = "pll8_vote", "pxo";
+			clock-output-names = "acpu1_aux";
+			#clock-cells = <0>;
 		};
 
 		saw0: regulator@2089000 {
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v7 7/7] ARM: dts: qcom: rename kpss-acc-v2 nodes to power-manager nodes
  2023-01-16 20:47 [PATCH v7 0/7] Krait Documentation conversion Christian Marangi
                   ` (5 preceding siblings ...)
  2023-01-16 20:47 ` [PATCH v7 6/7] ARM: dts: qcom: add missing clock configuration for kpss-acc-v1 Christian Marangi
@ 2023-01-16 20:47 ` Christian Marangi
  2023-01-16 21:05   ` Dmitry Baryshkov
  2023-03-16  3:20 ` (subset) [PATCH v7 0/7] Krait Documentation conversion Bjorn Andersson
  7 siblings, 1 reply; 16+ messages in thread
From: Christian Marangi @ 2023-01-16 20:47 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, Christian Marangi,
	devicetree, linux-kernel, linux-arm-msm, linux-clk

Change kpss-acc-v2 nodes naming to power-manager to reflect Documentation
schema.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 arch/arm/boot/dts/qcom-apq8084.dtsi | 8 ++++----
 arch/arm/boot/dts/qcom-ipq4019.dtsi | 8 ++++----
 arch/arm/boot/dts/qcom-msm8974.dtsi | 8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-apq8084.dtsi b/arch/arm/boot/dts/qcom-apq8084.dtsi
index 4b0d2b4f4b6a..e70ab70b6697 100644
--- a/arch/arm/boot/dts/qcom-apq8084.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8084.dtsi
@@ -353,25 +353,25 @@ saw_l2: power-controller@f9012000 {
 			regulator;
 		};
 
-		acc0: clock-controller@f9088000 {
+		acc0: power-manager@f9088000 {
 			compatible = "qcom,kpss-acc-v2";
 			reg = <0xf9088000 0x1000>,
 			      <0xf9008000 0x1000>;
 		};
 
-		acc1: clock-controller@f9098000 {
+		acc1: power-manager@f9098000 {
 			compatible = "qcom,kpss-acc-v2";
 			reg = <0xf9098000 0x1000>,
 			      <0xf9008000 0x1000>;
 		};
 
-		acc2: clock-controller@f90a8000 {
+		acc2: power-manager@f90a8000 {
 			compatible = "qcom,kpss-acc-v2";
 			reg = <0xf90a8000 0x1000>,
 			      <0xf9008000 0x1000>;
 		};
 
-		acc3: clock-controller@f90b8000 {
+		acc3: power-manager@f90b8000 {
 			compatible = "qcom,kpss-acc-v2";
 			reg = <0xf90b8000 0x1000>,
 			      <0xf9008000 0x1000>;
diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
index acb08dcf9442..442062b433fc 100644
--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
@@ -325,22 +325,22 @@ crypto: crypto@8e3a000 {
 			status = "disabled";
 		};
 
-		acc0: clock-controller@b088000 {
+		acc0: power-manager@b088000 {
 			compatible = "qcom,kpss-acc-v2";
 			reg = <0x0b088000 0x1000>, <0xb008000 0x1000>;
 		};
 
-		acc1: clock-controller@b098000 {
+		acc1: power-manager@b098000 {
 			compatible = "qcom,kpss-acc-v2";
 			reg = <0x0b098000 0x1000>, <0xb008000 0x1000>;
 		};
 
-		acc2: clock-controller@b0a8000 {
+		acc2: power-manager@b0a8000 {
 			compatible = "qcom,kpss-acc-v2";
 			reg = <0x0b0a8000 0x1000>, <0xb008000 0x1000>;
 		};
 
-		acc3: clock-controller@b0b8000 {
+		acc3: power-manager@b0b8000 {
 			compatible = "qcom,kpss-acc-v2";
 			reg = <0x0b0b8000 0x1000>, <0xb008000 0x1000>;
 		};
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 4b485f5612c4..705ae61ee35c 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -416,22 +416,22 @@ saw_l2: power-controller@f9012000 {
 			regulator;
 		};
 
-		acc0: clock-controller@f9088000 {
+		acc0: power-manager@f9088000 {
 			compatible = "qcom,kpss-acc-v2";
 			reg = <0xf9088000 0x1000>, <0xf9008000 0x1000>;
 		};
 
-		acc1: clock-controller@f9098000 {
+		acc1: power-manager@f9098000 {
 			compatible = "qcom,kpss-acc-v2";
 			reg = <0xf9098000 0x1000>, <0xf9008000 0x1000>;
 		};
 
-		acc2: clock-controller@f90a8000 {
+		acc2: power-manager@f90a8000 {
 			compatible = "qcom,kpss-acc-v2";
 			reg = <0xf90a8000 0x1000>, <0xf9008000 0x1000>;
 		};
 
-		acc3: clock-controller@f90b8000 {
+		acc3: power-manager@f90b8000 {
 			compatible = "qcom,kpss-acc-v2";
 			reg = <0xf90b8000 0x1000>, <0xf9008000 0x1000>;
 		};
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v7 5/7] ARM: dts: qcom: add and fix clock configuration for kpss-gcc nodes
  2023-01-16 20:47 ` [PATCH v7 5/7] ARM: dts: qcom: add and fix clock configuration for kpss-gcc nodes Christian Marangi
@ 2023-01-16 21:05   ` Dmitry Baryshkov
  0 siblings, 0 replies; 16+ messages in thread
From: Dmitry Baryshkov @ 2023-01-16 21:05 UTC (permalink / raw)
  To: Christian Marangi
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, devicetree,
	linux-kernel, linux-arm-msm, linux-clk

On Mon, 16 Jan 2023 at 22:48, Christian Marangi <ansuelsmth@gmail.com> wrote:
>
> Add missing clock configuration by adding clocks, clock-names
> and #clock-cells bindings for each kpss-acc-v1 clock-controller
> node for apq8064 and msm8960 to reflect Documentation schema.
> Add missing #clock-cells binding and remove useless clock-output-names for
> ipq806x dtsi.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>




-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v7 7/7] ARM: dts: qcom: rename kpss-acc-v2 nodes to power-manager nodes
  2023-01-16 20:47 ` [PATCH v7 7/7] ARM: dts: qcom: rename kpss-acc-v2 nodes to power-manager nodes Christian Marangi
@ 2023-01-16 21:05   ` Dmitry Baryshkov
  0 siblings, 0 replies; 16+ messages in thread
From: Dmitry Baryshkov @ 2023-01-16 21:05 UTC (permalink / raw)
  To: Christian Marangi
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, devicetree,
	linux-kernel, linux-arm-msm, linux-clk

On Mon, 16 Jan 2023 at 22:48, Christian Marangi <ansuelsmth@gmail.com> wrote:
>
> Change kpss-acc-v2 nodes naming to power-manager to reflect Documentation
> schema.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
>  arch/arm/boot/dts/qcom-apq8084.dtsi | 8 ++++----
>  arch/arm/boot/dts/qcom-ipq4019.dtsi | 8 ++++----
>  arch/arm/boot/dts/qcom-msm8974.dtsi | 8 ++++----
>  3 files changed, 12 insertions(+), 12 deletions(-)


Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v7 1/7] dt-bindings: clock: Convert qcom,krait-cc to yaml
  2023-01-16 20:47 ` [PATCH v7 1/7] dt-bindings: clock: Convert qcom,krait-cc to yaml Christian Marangi
@ 2023-01-16 21:14   ` Dmitry Baryshkov
  2023-01-16 21:20     ` Christian Marangi
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Baryshkov @ 2023-01-16 21:14 UTC (permalink / raw)
  To: Christian Marangi
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, devicetree,
	linux-kernel, linux-arm-msm, linux-clk, Krzysztof Kozlowski,
	Rob Herring

On Mon, 16 Jan 2023 at 22:48, Christian Marangi <ansuelsmth@gmail.com> wrote:
>
> Convert qcom,krait-cc to yaml Documentation.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> Acked-by: Rob Herring <robh@kernel.org>

I know this has been reviewed already. I checked again my apq8064
branch and noticed that the bindings are not compatible with the
apq8064. The SoC in question is a 4-core device, so this is what I had
in mind:

       kraitcc: clock-controller {
               compatible = "qcom,krait-cc-v1";
               clocks = <&gcc PLL9>, /* hfpll0 */
                        <&gcc PLL10>, /* hfpll1 */
                        <&gcc PLL16>, /* hfpll2 */
                        <&gcc PLL17>, /* hfpll3 */
                        <&gcc PLL12>, /* hfpll_l2 */
                        <&acc0>,
                        <&acc1>,
                        <&acc2>,
                        <&acc3>,
                        <&l2cc>;
               clock-names = "hfpll0",
                             "hfpll1",
                             "hfpll2",
                             "hfpll3",
                             "hfpll_l2",
                             "acpu0_aux",
                             "acpu1_aux",
                             "acpu2_aux",
                             "acpu3_aux",
                             "acpu_l2_aux";
               #clock-cells = <1>;
       };

> ---
>  .../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..8caa5a677394
> --- /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:
> +  - Christian Marangi <ansuelsmth@gmail.com>
> +
> +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.37.2
>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v7 1/7] dt-bindings: clock: Convert qcom,krait-cc to yaml
  2023-01-16 21:14   ` Dmitry Baryshkov
@ 2023-01-16 21:20     ` Christian Marangi
  2023-01-16 21:29       ` Dmitry Baryshkov
  0 siblings, 1 reply; 16+ messages in thread
From: Christian Marangi @ 2023-01-16 21:20 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, devicetree,
	linux-kernel, linux-arm-msm, linux-clk, Krzysztof Kozlowski,
	Rob Herring

On Mon, Jan 16, 2023 at 11:14:10PM +0200, Dmitry Baryshkov wrote:
> On Mon, 16 Jan 2023 at 22:48, Christian Marangi <ansuelsmth@gmail.com> wrote:
> >
> > Convert qcom,krait-cc to yaml Documentation.
> >
> > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> > Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> > Acked-by: Rob Herring <robh@kernel.org>
> 
> I know this has been reviewed already. I checked again my apq8064
> branch and noticed that the bindings are not compatible with the
> apq8064. The SoC in question is a 4-core device, so this is what I had
> in mind:
> 
>        kraitcc: clock-controller {
>                compatible = "qcom,krait-cc-v1";
>                clocks = <&gcc PLL9>, /* hfpll0 */
>                         <&gcc PLL10>, /* hfpll1 */
>                         <&gcc PLL16>, /* hfpll2 */
>                         <&gcc PLL17>, /* hfpll3 */
>                         <&gcc PLL12>, /* hfpll_l2 */
>                         <&acc0>,
>                         <&acc1>,
>                         <&acc2>,
>                         <&acc3>,
>                         <&l2cc>;
>                clock-names = "hfpll0",
>                              "hfpll1",
>                              "hfpll2",
>                              "hfpll3",
>                              "hfpll_l2",
>                              "acpu0_aux",
>                              "acpu1_aux",
>                              "acpu2_aux",
>                              "acpu3_aux",
>                              "acpu_l2_aux";
>                #clock-cells = <1>;
>        };
> 

Oh wow... Wasn't aware, but I wonder if a good idea would be to patch
the yaml if and when this series is merged? This is a direct conversion
of the krait-cc txt...

If we really want I can send a v8 with adding these extra stuff to the
just converted yaml in a different commit? (afaik conversion should not
add more info if the documentation is not broken enough and can be
converted)

> > ---
> >  .../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..8caa5a677394
> > --- /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:
> > +  - Christian Marangi <ansuelsmth@gmail.com>
> > +
> > +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.37.2
> >
> 
> 
> -- 
> With best wishes
> Dmitry

-- 
	Ansuel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v7 1/7] dt-bindings: clock: Convert qcom,krait-cc to yaml
  2023-01-16 21:20     ` Christian Marangi
@ 2023-01-16 21:29       ` Dmitry Baryshkov
  2023-01-16 21:39         ` Christian Marangi
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Baryshkov @ 2023-01-16 21:29 UTC (permalink / raw)
  To: Christian Marangi
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, devicetree,
	linux-kernel, linux-arm-msm, linux-clk, Krzysztof Kozlowski,
	Rob Herring

16 января 2023 г. 23:20:17 GMT+02:00, Christian Marangi <ansuelsmth@gmail.com> пишет:
>On Mon, Jan 16, 2023 at 11:14:10PM +0200, Dmitry Baryshkov wrote:
>> On Mon, 16 Jan 2023 at 22:48, Christian Marangi <ansuelsmth@gmail.com> wrote:
>> >
>> > Convert qcom,krait-cc to yaml Documentation.
>> >
>> > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
>> > Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
>> > Acked-by: Rob Herring <robh@kernel.org>
>> 
>> I know this has been reviewed already. I checked again my apq8064
>> branch and noticed that the bindings are not compatible with the
>> apq8064. The SoC in question is a 4-core device, so this is what I had
>> in mind:
>> 
>>        kraitcc: clock-controller {
>>                compatible = "qcom,krait-cc-v1";
>>                clocks = <&gcc PLL9>, /* hfpll0 */
>>                         <&gcc PLL10>, /* hfpll1 */
>>                         <&gcc PLL16>, /* hfpll2 */
>>                         <&gcc PLL17>, /* hfpll3 */
>>                         <&gcc PLL12>, /* hfpll_l2 */
>>                         <&acc0>,
>>                         <&acc1>,
>>                         <&acc2>,
>>                         <&acc3>,
>>                         <&l2cc>;
>>                clock-names = "hfpll0",
>>                              "hfpll1",
>>                              "hfpll2",
>>                              "hfpll3",
>>                              "hfpll_l2",
>>                              "acpu0_aux",
>>                              "acpu1_aux",
>>                              "acpu2_aux",
>>                              "acpu3_aux",
>>                              "acpu_l2_aux";
>>                #clock-cells = <1>;
>>        };
>> 
>
>Oh wow... Wasn't aware, but I wonder if a good idea would be to patch
>the yaml if and when this series is merged? This is a direct conversion
>of the krait-cc txt...
>
>If we really want I can send a v8 with adding these extra stuff to the
>just converted yaml in a different commit? (afaik conversion should not
>add more info if the documentation is not broken enough and can be
>converted)

I think we can ask Bjorn to pick the rest of the patches (if they are acked/reviewed, they look good to me) and work on this one. It might make sense to add per-SoC compatibles. Also note, the qsb clock. Which block generates it on ipq8064?

>
>> > ---
>> >  .../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..8caa5a677394
>> > --- /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:
>> > +  - Christian Marangi <ansuelsmth@gmail.com>
>> > +
>> > +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.37.2
>> >
>> 
>> 
>> -- 
>> With best wishes
>> Dmitry
>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v7 1/7] dt-bindings: clock: Convert qcom,krait-cc to yaml
  2023-01-16 21:29       ` Dmitry Baryshkov
@ 2023-01-16 21:39         ` Christian Marangi
  0 siblings, 0 replies; 16+ messages in thread
From: Christian Marangi @ 2023-01-16 21:39 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Michael Turquette, Stephen Boyd, devicetree,
	linux-kernel, linux-arm-msm, linux-clk, Krzysztof Kozlowski,
	Rob Herring

On Mon, Jan 16, 2023 at 11:29:04PM +0200, Dmitry Baryshkov wrote:
> 16 января 2023 г. 23:20:17 GMT+02:00, Christian Marangi <ansuelsmth@gmail.com> пишет:
> >On Mon, Jan 16, 2023 at 11:14:10PM +0200, Dmitry Baryshkov wrote:
> >> On Mon, 16 Jan 2023 at 22:48, Christian Marangi <ansuelsmth@gmail.com> wrote:
> >> >
> >> > Convert qcom,krait-cc to yaml Documentation.
> >> >
> >> > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> >> > Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> >> > Acked-by: Rob Herring <robh@kernel.org>
> >> 
> >> I know this has been reviewed already. I checked again my apq8064
> >> branch and noticed that the bindings are not compatible with the
> >> apq8064. The SoC in question is a 4-core device, so this is what I had
> >> in mind:
> >> 
> >>        kraitcc: clock-controller {
> >>                compatible = "qcom,krait-cc-v1";
> >>                clocks = <&gcc PLL9>, /* hfpll0 */
> >>                         <&gcc PLL10>, /* hfpll1 */
> >>                         <&gcc PLL16>, /* hfpll2 */
> >>                         <&gcc PLL17>, /* hfpll3 */
> >>                         <&gcc PLL12>, /* hfpll_l2 */
> >>                         <&acc0>,
> >>                         <&acc1>,
> >>                         <&acc2>,
> >>                         <&acc3>,
> >>                         <&l2cc>;
> >>                clock-names = "hfpll0",
> >>                              "hfpll1",
> >>                              "hfpll2",
> >>                              "hfpll3",
> >>                              "hfpll_l2",
> >>                              "acpu0_aux",
> >>                              "acpu1_aux",
> >>                              "acpu2_aux",
> >>                              "acpu3_aux",
> >>                              "acpu_l2_aux";
> >>                #clock-cells = <1>;
> >>        };
> >> 
> >
> >Oh wow... Wasn't aware, but I wonder if a good idea would be to patch
> >the yaml if and when this series is merged? This is a direct conversion
> >of the krait-cc txt...
> >
> >If we really want I can send a v8 with adding these extra stuff to the
> >just converted yaml in a different commit? (afaik conversion should not
> >add more info if the documentation is not broken enough and can be
> >converted)
> 
> I think we can ask Bjorn to pick the rest of the patches (if they are acked/reviewed, they look good to me) and work on this one. It might make sense to add per-SoC compatibles. Also note, the qsb clock. Which block generates it on ipq8064?
>

The krait-cc driver is really very generic and modular so IMHO it
doesn't require different compatibiles... But now that I think about
it... It may be problematic to differentiate them for the clock
configuration...

Btw the qsb clk from krait-cc driver is still a fixed clock set to 1.
In hw side it's the bus clk and it's driven by rpm... (this link is
totally lacking from krait-cc and I think nobody was aware of this
(except old qcom)... To find out this I had to resurrect a pre-DT
migration driver that use the cxo clk to perform hw measurement of the
clk and I discovered that. (cpu and l2 clk can be measured and by
setting the mux to sourcing out of qsb you can notice that the freq will
always match the bus frequency)

But I got sidetracked by too much discoveries... ipq806x simply don't
have a krait-cc driver currently so the qsb doesn't apply...

My idea is to push kriat-cc node + opp node.

> >
> >> > ---
> >> >  .../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..8caa5a677394
> >> > --- /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:
> >> > +  - Christian Marangi <ansuelsmth@gmail.com>
> >> > +
> >> > +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.37.2
> >> >
> >> 
> >> 
> >> -- 
> >> With best wishes
> >> Dmitry
> >
> 

-- 
	Ansuel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v7 2/7] dt-bindings: arm: msm: Convert and split kpss-acc driver Documentation to yaml
  2023-01-16 20:47 ` [PATCH v7 2/7] dt-bindings: arm: msm: Convert and split kpss-acc driver Documentation " Christian Marangi
@ 2023-01-18 16:05   ` Rob Herring
  0 siblings, 0 replies; 16+ messages in thread
From: Rob Herring @ 2023-01-18 16:05 UTC (permalink / raw)
  To: Christian Marangi
  Cc: linux-kernel, linux-arm-msm, Konrad Dybcio, Bjorn Andersson,
	Michael Turquette, linux-clk, Andy Gross, Stephen Boyd,
	Krzysztof Kozlowski, devicetree, Rob Herring


On Mon, 16 Jan 2023 21:47:46 +0100, Christian Marangi wrote:
> 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, split the Documentation
> to 2 different schema, v1 as clock-controller and v2 for
> power-manager as per msm-3.10 specification, the exposed regs handle
> power manager.
> 
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
>  .../bindings/arm/msm/qcom,kpss-acc.txt        | 49 -------------
>  .../bindings/clock/qcom,kpss-acc-v1.yaml      | 72 +++++++++++++++++++
>  .../bindings/power/qcom,kpss-acc-v2.yaml      | 42 +++++++++++
>  3 files changed, 114 insertions(+), 49 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt
>  create mode 100644 Documentation/devicetree/bindings/clock/qcom,kpss-acc-v1.yaml
>  create mode 100644 Documentation/devicetree/bindings/power/qcom,kpss-acc-v2.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: (subset) [PATCH v7 0/7] Krait Documentation conversion
  2023-01-16 20:47 [PATCH v7 0/7] Krait Documentation conversion Christian Marangi
                   ` (6 preceding siblings ...)
  2023-01-16 20:47 ` [PATCH v7 7/7] ARM: dts: qcom: rename kpss-acc-v2 nodes to power-manager nodes Christian Marangi
@ 2023-03-16  3:20 ` Bjorn Andersson
  7 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2023-03-16  3:20 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, linux-clk, devicetree, Rob Herring,
	Konrad Dybcio, Andy Gross, Krzysztof Kozlowski, Stephen Boyd,
	Michael Turquette, Christian Marangi

On Mon, 16 Jan 2023 21:47:44 +0100, Christian Marangi wrote:
> 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.
> 
> [...]

Applied, thanks!

[4/7] ARM: dts: qcom: add per SoC compatible for qcom,kpss-gcc nodes
      commit: b74ca4a0e3043af06819905306e05189f337466a
[5/7] ARM: dts: qcom: add and fix clock configuration for kpss-gcc nodes
      commit: a9e6d16ad493529da4a48d7ae474ecdc399ee884
[6/7] ARM: dts: qcom: add missing clock configuration for kpss-acc-v1
      commit: 6b20edd72930d83e9c2c2017df883b3c5c1502fd
[7/7] ARM: dts: qcom: rename kpss-acc-v2 nodes to power-manager nodes
      commit: 158ce4b3e1dfcf3e38c0dbfd626aee0f1bbfa3d1

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-03-16  3:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-16 20:47 [PATCH v7 0/7] Krait Documentation conversion Christian Marangi
2023-01-16 20:47 ` [PATCH v7 1/7] dt-bindings: clock: Convert qcom,krait-cc to yaml Christian Marangi
2023-01-16 21:14   ` Dmitry Baryshkov
2023-01-16 21:20     ` Christian Marangi
2023-01-16 21:29       ` Dmitry Baryshkov
2023-01-16 21:39         ` Christian Marangi
2023-01-16 20:47 ` [PATCH v7 2/7] dt-bindings: arm: msm: Convert and split kpss-acc driver Documentation " Christian Marangi
2023-01-18 16:05   ` Rob Herring
2023-01-16 20:47 ` [PATCH v7 3/7] dt-bindings: arm: msm: Rework kpss-gcc " Christian Marangi
2023-01-16 20:47 ` [PATCH v7 4/7] ARM: dts: qcom: add per SoC compatible for qcom,kpss-gcc nodes Christian Marangi
2023-01-16 20:47 ` [PATCH v7 5/7] ARM: dts: qcom: add and fix clock configuration for kpss-gcc nodes Christian Marangi
2023-01-16 21:05   ` Dmitry Baryshkov
2023-01-16 20:47 ` [PATCH v7 6/7] ARM: dts: qcom: add missing clock configuration for kpss-acc-v1 Christian Marangi
2023-01-16 20:47 ` [PATCH v7 7/7] ARM: dts: qcom: rename kpss-acc-v2 nodes to power-manager nodes Christian Marangi
2023-01-16 21:05   ` Dmitry Baryshkov
2023-03-16  3:20 ` (subset) [PATCH v7 0/7] Krait Documentation conversion Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).