Re: [PATCH v6 1/4] dt-bindings: Introduce SoC sleep stats bindings
Hi, On 3/12/2021 10:45 PM, Bjorn Andersson wrote: On Thu 04 Feb 08:21 CST 2021, Maulik Shah wrote: From: Mahesh Sivasubramanian Add device binding documentation for Qualcomm Technologies, Inc. (QTI) SoC sleep stats driver. The driver is used for displaying SoC sleep statistic maintained by Always On Processor or Resource Power Manager. Cc: devicet...@vger.kernel.org Signed-off-by: Mahesh Sivasubramanian Signed-off-by: Lina Iyer Signed-off-by: Maulik Shah Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd --- .../bindings/soc/qcom/soc-sleep-stats.yaml | 46 ++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml diff --git a/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml b/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml new file mode 100644 index 000..1e012ba --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/qcom/soc-sleep-stats.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. (QTI) SoC sleep stats bindings + +maintainers: + - Maulik Shah + - Lina Iyer + +description: + Always On Processor/Resource Power Manager maintains statistics of the SoC + sleep modes involving powering down of the rails and oscillator clock. + + Statistics includes SoC sleep mode type, number of times low power mode were + entered, time of last entry, time of last exit and accumulated sleep duration. + +properties: + compatible: +enum: + - qcom,rpmh-sleep-stats + - qcom,rpm-sleep-stats + + reg: +maxItems: 1 + +required: + - compatible + - reg + +examples: + # Example of rpmh sleep stats + - | +rpmh-sleep-stats@c3f { + compatible = "qcom,rpmh-sleep-stats"; + reg = <0 0x0c3f 0 0x400>; The example is built with #address-cells = <1> and #size-cells = <1>, so this needs to be reg = <0x0c3f 0x400>. Regards, Bjorn Thanks, Fixed in v7. Thanks, Maulik +}; + # Example of rpm sleep stats + - | +rpm-sleep-stats@469 { + compatible = "qcom,rpm-sleep-stats"; + reg = <0 0x0469 0 0x400>; +}; +... -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH v6 1/4] dt-bindings: Introduce SoC sleep stats bindings
On Thu 04 Feb 08:21 CST 2021, Maulik Shah wrote: > From: Mahesh Sivasubramanian > > Add device binding documentation for Qualcomm Technologies, Inc. (QTI) > SoC sleep stats driver. The driver is used for displaying SoC sleep > statistic maintained by Always On Processor or Resource Power Manager. > > Cc: devicet...@vger.kernel.org > Signed-off-by: Mahesh Sivasubramanian > Signed-off-by: Lina Iyer > Signed-off-by: Maulik Shah > Reviewed-by: Rob Herring > Reviewed-by: Bjorn Andersson > Reviewed-by: Stephen Boyd > --- > .../bindings/soc/qcom/soc-sleep-stats.yaml | 46 > ++ > 1 file changed, 46 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml > > diff --git a/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml > b/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml > new file mode 100644 > index 000..1e012ba > --- /dev/null > +++ b/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml > @@ -0,0 +1,46 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/soc/qcom/soc-sleep-stats.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm Technologies, Inc. (QTI) SoC sleep stats bindings > + > +maintainers: > + - Maulik Shah > + - Lina Iyer > + > +description: > + Always On Processor/Resource Power Manager maintains statistics of the SoC > + sleep modes involving powering down of the rails and oscillator clock. > + > + Statistics includes SoC sleep mode type, number of times low power mode > were > + entered, time of last entry, time of last exit and accumulated sleep > duration. > + > +properties: > + compatible: > +enum: > + - qcom,rpmh-sleep-stats > + - qcom,rpm-sleep-stats > + > + reg: > +maxItems: 1 > + > +required: > + - compatible > + - reg > + > +examples: > + # Example of rpmh sleep stats > + - | > +rpmh-sleep-stats@c3f { > + compatible = "qcom,rpmh-sleep-stats"; > + reg = <0 0x0c3f 0 0x400>; The example is built with #address-cells = <1> and #size-cells = <1>, so this needs to be reg = <0x0c3f 0x400>. Regards, Bjorn > +}; > + # Example of rpm sleep stats > + - | > +rpm-sleep-stats@469 { > + compatible = "qcom,rpm-sleep-stats"; > + reg = <0 0x0469 0 0x400>; > +}; > +... > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of Code Aurora Forum, hosted by The Linux Foundation >
Re: [PATCH v6 1/4] dt-bindings: Introduce SoC sleep stats bindings
On Mon 08 Feb 18:23 CST 2021, Stephen Boyd wrote: > Quoting Maulik Shah (2021-02-04 06:21:45) > > + > > +description: > > + Always On Processor/Resource Power Manager maintains statistics of the > > SoC > > + sleep modes involving powering down of the rails and oscillator clock. > > + > > + Statistics includes SoC sleep mode type, number of times low power mode > > were > > + entered, time of last entry, time of last exit and accumulated sleep > > duration. > > + > > +properties: > > + compatible: > > +enum: > > + - qcom,rpmh-sleep-stats > > + - qcom,rpm-sleep-stats > > + > > + reg: > > +maxItems: 1 > > + > > +required: > > + - compatible > > + - reg > > + > > +examples: > > + # Example of rpmh sleep stats > > + - | > > +rpmh-sleep-stats@c3f { > > + compatible = "qcom,rpmh-sleep-stats"; > > + reg = <0 0x0c3f 0 0x400>; > > +}; > > Maybe it should just be another reg property of the rpmh or rpm node? > Then the rpmh driver can create the stats "device" at driver probe time, > or just roll it into the same thing. It looks pretty weird to have a > device in DT for this given that it's not really hardware, more like a > place that the processor writes some stuff about what's going on in the > SoC related to power management. > Given that there is some hardware (although just a chunk of sram) and that the same driver is used for RPM, which we don't represent on the mmio bus I think the proposed design makes sense. Regards, Bjorn > > + # Example of rpm sleep stats > > + - | > > +rpm-sleep-stats@469 { > > + compatible = "qcom,rpm-sleep-stats"; > > + reg = <0 0x0469 0 0x400>; > > +}; > > +...
Re: [PATCH v6 1/4] dt-bindings: Introduce SoC sleep stats bindings
Quoting Maulik Shah (2021-02-04 06:21:45) > + > +description: > + Always On Processor/Resource Power Manager maintains statistics of the SoC > + sleep modes involving powering down of the rails and oscillator clock. > + > + Statistics includes SoC sleep mode type, number of times low power mode > were > + entered, time of last entry, time of last exit and accumulated sleep > duration. > + > +properties: > + compatible: > +enum: > + - qcom,rpmh-sleep-stats > + - qcom,rpm-sleep-stats > + > + reg: > +maxItems: 1 > + > +required: > + - compatible > + - reg > + > +examples: > + # Example of rpmh sleep stats > + - | > +rpmh-sleep-stats@c3f { > + compatible = "qcom,rpmh-sleep-stats"; > + reg = <0 0x0c3f 0 0x400>; > +}; Maybe it should just be another reg property of the rpmh or rpm node? Then the rpmh driver can create the stats "device" at driver probe time, or just roll it into the same thing. It looks pretty weird to have a device in DT for this given that it's not really hardware, more like a place that the processor writes some stuff about what's going on in the SoC related to power management. > + # Example of rpm sleep stats > + - | > +rpm-sleep-stats@469 { > + compatible = "qcom,rpm-sleep-stats"; > + reg = <0 0x0469 0 0x400>; > +}; > +...
Re: [PATCH v6 1/4] dt-bindings: Introduce SoC sleep stats bindings
On Thu, 04 Feb 2021 19:51:45 +0530, Maulik Shah wrote: > From: Mahesh Sivasubramanian > > Add device binding documentation for Qualcomm Technologies, Inc. (QTI) > SoC sleep stats driver. The driver is used for displaying SoC sleep > statistic maintained by Always On Processor or Resource Power Manager. > > Cc: devicet...@vger.kernel.org > Signed-off-by: Mahesh Sivasubramanian > Signed-off-by: Lina Iyer > Signed-off-by: Maulik Shah > Reviewed-by: Rob Herring > Reviewed-by: Bjorn Andersson > Reviewed-by: Stephen Boyd > --- > .../bindings/soc/qcom/soc-sleep-stats.yaml | 46 > ++ > 1 file changed, 46 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml: 'additionalProperties' is a required property /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml: ignoring, error in schema: warning: no schema found in file: ./Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.example.dt.yaml: example-0: rpmh-sleep-stats@c3f:reg:0: [0, 205455360, 0, 1024] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.example.dt.yaml: example-1: rpm-sleep-stats@469:reg:0: [0, 73990144, 0, 1024] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml See https://patchwork.ozlabs.org/patch/1436034 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.
[PATCH v6 1/4] dt-bindings: Introduce SoC sleep stats bindings
From: Mahesh Sivasubramanian Add device binding documentation for Qualcomm Technologies, Inc. (QTI) SoC sleep stats driver. The driver is used for displaying SoC sleep statistic maintained by Always On Processor or Resource Power Manager. Cc: devicet...@vger.kernel.org Signed-off-by: Mahesh Sivasubramanian Signed-off-by: Lina Iyer Signed-off-by: Maulik Shah Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd --- .../bindings/soc/qcom/soc-sleep-stats.yaml | 46 ++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml diff --git a/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml b/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml new file mode 100644 index 000..1e012ba --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/soc-sleep-stats.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/qcom/soc-sleep-stats.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. (QTI) SoC sleep stats bindings + +maintainers: + - Maulik Shah + - Lina Iyer + +description: + Always On Processor/Resource Power Manager maintains statistics of the SoC + sleep modes involving powering down of the rails and oscillator clock. + + Statistics includes SoC sleep mode type, number of times low power mode were + entered, time of last entry, time of last exit and accumulated sleep duration. + +properties: + compatible: +enum: + - qcom,rpmh-sleep-stats + - qcom,rpm-sleep-stats + + reg: +maxItems: 1 + +required: + - compatible + - reg + +examples: + # Example of rpmh sleep stats + - | +rpmh-sleep-stats@c3f { + compatible = "qcom,rpmh-sleep-stats"; + reg = <0 0x0c3f 0 0x400>; +}; + # Example of rpm sleep stats + - | +rpm-sleep-stats@469 { + compatible = "qcom,rpm-sleep-stats"; + reg = <0 0x0469 0 0x400>; +}; +... -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation