* [PATCH v3 1/4] dt-bindings: clock: Convert qcom,krait-cc to yaml
2022-06-28 18:41 [PATCH v3 0/4] Krait Documentation conversion Christian Marangi
@ 2022-06-28 18:41 ` Christian Marangi
2022-06-29 2:09 ` Rob Herring
2022-06-28 18:41 ` [PATCH v3 2/4] dt-bindings: arm: msm: Convert kpss-acc driver Documentation " Christian Marangi
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Christian Marangi @ 2022-06-28 18:41 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Bjorn Andersson, Andy Gross,
Michael Turquette, Stephen Boyd, Jens Axboe, Greg Kroah-Hartman,
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.36.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v3 1/4] dt-bindings: clock: Convert qcom,krait-cc to yaml
2022-06-28 18:41 ` [PATCH v3 1/4] dt-bindings: clock: Convert qcom,krait-cc to yaml Christian Marangi
@ 2022-06-29 2:09 ` Rob Herring
0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2022-06-29 2:09 UTC (permalink / raw)
To: Christian Marangi
Cc: Rob Herring, Krzysztof Kozlowski, Jens Axboe, Andy Gross,
Michael Turquette, linux-arm-msm, Greg Kroah-Hartman,
Stephen Boyd, linux-clk, devicetree, Bjorn Andersson,
Krzysztof Kozlowski, linux-kernel
On Tue, 28 Jun 2022 20:41:34 +0200, Christian Marangi 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>
> ---
> .../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
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml: patternProperties:^thermistor@:properties:adi,excitation-current-nanoamp: '$ref' should not be valid under {'const': '$ref'}
hint: Standard unit suffix properties don't need a type $ref
from schema $id: http://devicetree.org/meta-schemas/core.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml: ignoring, error in schema: patternProperties: ^thermistor@: properties: adi,excitation-current-nanoamp
Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.example.dtb:0:0: /example-0/spi/ltc2983@0: failed to match any schema with compatible: ['adi,ltc2983']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 2/4] dt-bindings: arm: msm: Convert kpss-acc driver Documentation to yaml
2022-06-28 18:41 [PATCH v3 0/4] Krait Documentation conversion Christian Marangi
2022-06-28 18:41 ` [PATCH v3 1/4] dt-bindings: clock: Convert qcom,krait-cc to yaml Christian Marangi
@ 2022-06-28 18:41 ` Christian Marangi
2022-06-29 2:09 ` Rob Herring
2022-06-29 6:14 ` Krzysztof Kozlowski
2022-06-28 18:41 ` [PATCH v3 3/4] dt-bindings: arm: msm: Rework kpss-gcc " Christian Marangi
2022-06-28 18:41 ` [PATCH v3 4/4] ARM: dts: qcom: fix various wrong definition for kpss-gcc node Christian Marangi
3 siblings, 2 replies; 12+ messages in thread
From: Christian Marangi @ 2022-06-28 18:41 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Bjorn Andersson, Andy Gross,
Michael Turquette, Stephen Boyd, Jens Axboe, Greg Kroah-Hartman,
Christian Marangi, devicetree, linux-kernel, linux-arm-msm,
linux-clk
Cc: Krzysztof Kozlowski
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: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
---
.../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..3e7de44e7c74
--- /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:
+ - 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.
+
+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.36.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/4] dt-bindings: arm: msm: Convert kpss-acc driver Documentation to yaml
2022-06-28 18:41 ` [PATCH v3 2/4] dt-bindings: arm: msm: Convert kpss-acc driver Documentation " Christian Marangi
@ 2022-06-29 2:09 ` Rob Herring
2022-06-29 6:14 ` Krzysztof Kozlowski
1 sibling, 0 replies; 12+ messages in thread
From: Rob Herring @ 2022-06-29 2:09 UTC (permalink / raw)
To: Christian Marangi
Cc: Jens Axboe, linux-kernel, Michael Turquette, devicetree,
Stephen Boyd, Krzysztof Kozlowski, Greg Kroah-Hartman,
Andy Gross, Bjorn Andersson, linux-arm-msm, Rob Herring,
Krzysztof Kozlowski, linux-clk
On Tue, 28 Jun 2022 20:41:35 +0200, 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, 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: Christian Marangi <ansuelsmth@gmail.com>
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
> .../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
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml: allOf:0: 'then' is a dependency of 'if'
hint: Keywords must be a subset of known json-schema keywords
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml: allOf:0: 'then' is a dependency of 'else'
hint: Keywords must be a subset of known json-schema keywords
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml: allOf:0:if: 'if' is a dependency of 'then'
hint: Keywords must be a subset of known json-schema keywords
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml: patternProperties:^thermistor@:properties:adi,excitation-current-nanoamp: '$ref' should not be valid under {'const': '$ref'}
hint: Standard unit suffix properties don't need a type $ref
from schema $id: http://devicetree.org/meta-schemas/core.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml: ignoring, error in schema: allOf: 0
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml: ignoring, error in schema: patternProperties: ^thermistor@: properties: adi,excitation-current-nanoamp
Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.example.dtb:0:0: /example-0/spi/ltc2983@0: failed to match any schema with compatible: ['adi,ltc2983']
Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.example.dtb:0:0: /example-0/clock-controller@2088000: failed to match any schema with compatible: ['qcom,kpss-acc-v1']
Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.example.dtb:0:0: /example-1/clock-controller@f9088000: failed to match any schema with compatible: ['qcom,kpss-acc-v2']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/4] dt-bindings: arm: msm: Convert kpss-acc driver Documentation to yaml
2022-06-28 18:41 ` [PATCH v3 2/4] dt-bindings: arm: msm: Convert kpss-acc driver Documentation " Christian Marangi
2022-06-29 2:09 ` Rob Herring
@ 2022-06-29 6:14 ` Krzysztof Kozlowski
2022-06-29 10:40 ` Christian Marangi
1 sibling, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-29 6:14 UTC (permalink / raw)
To: Christian Marangi, Rob Herring, Krzysztof Kozlowski,
Bjorn Andersson, Andy Gross, Michael Turquette, Stephen Boyd,
Jens Axboe, Greg Kroah-Hartman, devicetree, linux-kernel,
linux-arm-msm, linux-clk
Cc: Krzysztof Kozlowski
On 28/06/2022 20:41, 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, 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: Christian Marangi <ansuelsmth@gmail.com>
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
This is still not fixed and not tested. Since 4 versions of this
patchset (previously was part of other set).
I retract my review. Please test the bindings.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/4] dt-bindings: arm: msm: Convert kpss-acc driver Documentation to yaml
2022-06-29 6:14 ` Krzysztof Kozlowski
@ 2022-06-29 10:40 ` Christian Marangi
2022-06-29 11:12 ` Krzysztof Kozlowski
0 siblings, 1 reply; 12+ messages in thread
From: Christian Marangi @ 2022-06-29 10:40 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rob Herring, Krzysztof Kozlowski, Bjorn Andersson, Andy Gross,
Michael Turquette, Stephen Boyd, Jens Axboe, Greg Kroah-Hartman,
devicetree, linux-kernel, linux-arm-msm, linux-clk,
Krzysztof Kozlowski
On Wed, Jun 29, 2022 at 08:14:12AM +0200, Krzysztof Kozlowski wrote:
> On 28/06/2022 20:41, 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, 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: Christian Marangi <ansuelsmth@gmail.com>
> > Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> This is still not fixed and not tested. Since 4 versions of this
> patchset (previously was part of other set).
>
> I retract my review. Please test the bindings.
>
> Best regards,
> Krzysztof
Thing is that I tested them and on my side I don't have such errors.
I'm using the linux-next branch. Should I use something else that have
newer schema files?
Also on other patch there are some error reported that are unrelated to
my change and that looks strange.
--
Ansuel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/4] dt-bindings: arm: msm: Convert kpss-acc driver Documentation to yaml
2022-06-29 10:40 ` Christian Marangi
@ 2022-06-29 11:12 ` Krzysztof Kozlowski
2022-06-29 12:00 ` Christian Marangi
0 siblings, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-29 11:12 UTC (permalink / raw)
To: Christian Marangi
Cc: Rob Herring, Krzysztof Kozlowski, Bjorn Andersson, Andy Gross,
Michael Turquette, Stephen Boyd, Jens Axboe, Greg Kroah-Hartman,
devicetree, linux-kernel, linux-arm-msm, linux-clk,
Krzysztof Kozlowski
On 29/06/2022 12:40, Christian Marangi wrote:
> On Wed, Jun 29, 2022 at 08:14:12AM +0200, Krzysztof Kozlowski wrote:
>> On 28/06/2022 20:41, 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, 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: Christian Marangi <ansuelsmth@gmail.com>
>>> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
>>
>> This is still not fixed and not tested. Since 4 versions of this
>> patchset (previously was part of other set).
>>
>> I retract my review. Please test the bindings.
>>
>> Best regards,
>> Krzysztof
>
> Thing is that I tested them and on my side I don't have such errors.
Then maybe update your dtschema because I can easily see them.
>
> I'm using the linux-next branch. Should I use something else that have
> newer schema files?
>
> Also on other patch there are some error reported that are unrelated to
> my change and that looks strange.
The other might be not be relevant, but this one is real and reproducible.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/4] dt-bindings: arm: msm: Convert kpss-acc driver Documentation to yaml
2022-06-29 11:12 ` Krzysztof Kozlowski
@ 2022-06-29 12:00 ` Christian Marangi
0 siblings, 0 replies; 12+ messages in thread
From: Christian Marangi @ 2022-06-29 12:00 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rob Herring, Krzysztof Kozlowski, Bjorn Andersson, Andy Gross,
Michael Turquette, Stephen Boyd, Jens Axboe, Greg Kroah-Hartman,
devicetree, linux-kernel, linux-arm-msm, linux-clk,
Krzysztof Kozlowski
On Wed, Jun 29, 2022 at 01:12:37PM +0200, Krzysztof Kozlowski wrote:
> On 29/06/2022 12:40, Christian Marangi wrote:
> > On Wed, Jun 29, 2022 at 08:14:12AM +0200, Krzysztof Kozlowski wrote:
> >> On 28/06/2022 20:41, 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, 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: Christian Marangi <ansuelsmth@gmail.com>
> >>> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> >>
> >> This is still not fixed and not tested. Since 4 versions of this
> >> patchset (previously was part of other set).
> >>
> >> I retract my review. Please test the bindings.
> >>
> >> Best regards,
> >> Krzysztof
> >
> > Thing is that I tested them and on my side I don't have such errors.
>
> Then maybe update your dtschema because I can easily see them.
>
You are totally right. I didn't had the problem as I was updating the
dtschema with sudo pip3... and it wasn't updating the dtschema local to
the linux repo. Didn't know that and I could't understand why I didn't
had the error.
> >
> > I'm using the linux-next branch. Should I use something else that have
> > newer schema files?
> >
> > Also on other patch there are some error reported that are unrelated to
> > my change and that looks strange.
>
> The other might be not be relevant, but this one is real and reproducible.
>
> Best regards,
> Krzysztof
--
Ansuel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 3/4] dt-bindings: arm: msm: Rework kpss-gcc driver Documentation to yaml
2022-06-28 18:41 [PATCH v3 0/4] Krait Documentation conversion Christian Marangi
2022-06-28 18:41 ` [PATCH v3 1/4] dt-bindings: clock: Convert qcom,krait-cc to yaml Christian Marangi
2022-06-28 18:41 ` [PATCH v3 2/4] dt-bindings: arm: msm: Convert kpss-acc driver Documentation " Christian Marangi
@ 2022-06-28 18:41 ` Christian Marangi
2022-06-29 2:09 ` Rob Herring
2022-06-28 18:41 ` [PATCH v3 4/4] ARM: dts: qcom: fix various wrong definition for kpss-gcc node Christian Marangi
3 siblings, 1 reply; 12+ messages in thread
From: Christian Marangi @ 2022-06-28 18:41 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Bjorn Andersson, Andy Gross,
Michael Turquette, Stephen Boyd, Jens Axboe, Greg Kroah-Hartman,
Christian Marangi, devicetree, linux-kernel, linux-arm-msm,
linux-clk
Rework kpss-gcc driver Documentation to yaml Documentation.
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>
---
.../bindings/arm/msm/qcom,kpss-gcc.txt | 44 ---------
.../bindings/arm/msm/qcom,kpss-gcc.yaml | 89 +++++++++++++++++++
2 files changed, 89 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..04db9aca5ca3
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.yaml
@@ -0,0 +1,89 @@
+# 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:
+ - 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:
+ items:
+ - description: phandle to pll8_vote
+ - description: phandle to pxo_board
+
+ 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-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.36.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/4] dt-bindings: arm: msm: Rework kpss-gcc driver Documentation to yaml
2022-06-28 18:41 ` [PATCH v3 3/4] dt-bindings: arm: msm: Rework kpss-gcc " Christian Marangi
@ 2022-06-29 2:09 ` Rob Herring
0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2022-06-29 2:09 UTC (permalink / raw)
To: Christian Marangi
Cc: Jens Axboe, linux-clk, Michael Turquette, Krzysztof Kozlowski,
Andy Gross, devicetree, linux-arm-msm, Stephen Boyd,
Greg Kroah-Hartman, Rob Herring, linux-kernel, Bjorn Andersson
On Tue, 28 Jun 2022 20:41:36 +0200, Christian Marangi wrote:
> Rework kpss-gcc driver Documentation to yaml Documentation.
> 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>
> ---
> .../bindings/arm/msm/qcom,kpss-gcc.txt | 44 ---------
> .../bindings/arm/msm/qcom,kpss-gcc.yaml | 89 +++++++++++++++++++
> 2 files changed, 89 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
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml: patternProperties:^thermistor@:properties:adi,excitation-current-nanoamp: '$ref' should not be valid under {'const': '$ref'}
hint: Standard unit suffix properties don't need a type $ref
from schema $id: http://devicetree.org/meta-schemas/core.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml: ignoring, error in schema: patternProperties: ^thermistor@: properties: adi,excitation-current-nanoamp
Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.example.dtb:0:0: /example-0/spi/ltc2983@0: failed to match any schema with compatible: ['adi,ltc2983']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 4/4] ARM: dts: qcom: fix various wrong definition for kpss-gcc node
2022-06-28 18:41 [PATCH v3 0/4] Krait Documentation conversion Christian Marangi
` (2 preceding siblings ...)
2022-06-28 18:41 ` [PATCH v3 3/4] dt-bindings: arm: msm: Rework kpss-gcc " Christian Marangi
@ 2022-06-28 18:41 ` Christian Marangi
3 siblings, 0 replies; 12+ messages in thread
From: Christian Marangi @ 2022-06-28 18:41 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Bjorn Andersson, Andy Gross,
Michael Turquette, Stephen Boyd, Jens Axboe, Greg Kroah-Hartman,
Christian Marangi, devicetree, linux-kernel, linux-arm-msm,
linux-clk
Fix dtbs_check warning now that we have a correct kpss-gcc yaml
schema. Add additional qcom,kpss-gcc compatible to differentiate
devices where kpss-gcc should provide a clk and where kpss-gcc should
just provide the registers and the syscon phandle.
Add missing #clock-cells and remove useless clock-output-names for
ipq806x.
Add missing binding for msm8090 kpss-gcc node.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +-
arch/arm/boot/dts/qcom-ipq8064.dtsi | 4 ++--
arch/arm/boot/dts/qcom-mdm9615.dtsi | 2 +-
arch/arm/boot/dts/qcom-msm8660.dtsi | 2 +-
arch/arm/boot/dts/qcom-msm8960.dtsi | 7 +++++--
5 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index a1c8ae516d21..a79eda05a7c2 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -836,7 +836,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 996f4458d9fc..34b20b3d2243 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -780,11 +780,11 @@ tcsr: syscon@1a400000 {
};
l2cc: clock-controller@2011000 {
- compatible = "qcom,kpss-gcc", "syscon";
+ compatible = "qcom,kpss-gcc-ipq8064", "qcom,kpss-gcc", "syscon";
reg = <0x2011000 0x1000>;
clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
clock-names = "pll8_vote", "pxo";
- clock-output-names = "acpu_l2_aux";
+ #clock-cells = <0>;
};
lcc: clock-controller@28000000 {
diff --git a/arch/arm/boot/dts/qcom-mdm9615.dtsi b/arch/arm/boot/dts/qcom-mdm9615.dtsi
index 4d4f37cebf21..216668b4f274 100644
--- a/arch/arm/boot/dts/qcom-mdm9615.dtsi
+++ b/arch/arm/boot/dts/qcom-mdm9615.dtsi
@@ -152,7 +152,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 a258abb23a64..db90f336f029 100644
--- a/arch/arm/boot/dts/qcom-msm8660.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8660.dtsi
@@ -391,7 +391,7 @@ vibrator@4a {
};
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 4a2d74cf01d2..a11a0fe7e0a9 100644
--- a/arch/arm/boot/dts/qcom-msm8960.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8960.dtsi
@@ -63,7 +63,7 @@ cxo_board {
clock-output-names = "cxo_board";
};
- pxo_board {
+ pxo_board: pxo_board {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <27000000>;
@@ -148,8 +148,11 @@ clock-controller@4000000 {
};
l2cc: clock-controller@2011000 {
- compatible = "qcom,kpss-gcc", "syscon";
+ 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@108000 {
--
2.36.1
^ permalink raw reply related [flat|nested] 12+ messages in thread