mbox series

[v1,0/5] interconnect: qcom: icc-rpm: Support voting bucket

Message ID 20220416154013.1357444-1-leo.yan@linaro.org
Headers show
Series interconnect: qcom: icc-rpm: Support voting bucket | expand

Message

Leo Yan April 16, 2022, 3:40 p.m. UTC
This patch set is to support bucket in icc-rpm driver, so it implements
the similar mechanism in the icc-rpmh driver.

We can use interconnect path tag to indicate the bandwidth voting is for
which buckets, and there have three kinds of buckets: AWC, wake and
sleep, finally the wake and sleep bucket values are used to set the
corresponding clock (active and sleep clocks).  So far, we keep the AWC
bucket but doesn't really use it.

Patches 01, 02, 03 enable interconnect path tag and update the DT
binding document; patches 04 and 05 support bucket and use bucket values
to set the bandwidth and clock rates.

This patch set is dependent on another patch set "interconnect: qcom:
icc-rpm: Fix setting clock rate" [1], and it has been tested on QCOM
msm8939 platform.

[1] https://lore.kernel.org/lkml/20220416031029.693211-1-leo.yan@linaro.org/


Leo Yan (5):
  dt-bindings: interconnect: Update property for icc-rpm path tag
  interconnect: qcom: Move qcom_icc_xlate_extended() to a common file
  interconnect: qcom: icc-rpm: Change to use qcom_icc_xlate_extended()
  interconnect: qcom: icc-rpm: Support multiple buckets
  interconnect: qcom: icc-rpm: Set bandwidth and clock for bucket values

 .../bindings/interconnect/qcom,rpm.yaml       |   2 +-
 drivers/interconnect/qcom/Makefile            |   3 +
 drivers/interconnect/qcom/icc-common.c        |  34 +++++
 drivers/interconnect/qcom/icc-common.h        |  13 ++
 drivers/interconnect/qcom/icc-rpm.c           | 134 ++++++++++++++++--
 drivers/interconnect/qcom/icc-rpm.h           |   6 +
 drivers/interconnect/qcom/icc-rpmh.c          |  26 +---
 drivers/interconnect/qcom/icc-rpmh.h          |   1 -
 drivers/interconnect/qcom/sm8450.c            |   1 +
 9 files changed, 178 insertions(+), 42 deletions(-)
 create mode 100644 drivers/interconnect/qcom/icc-common.c
 create mode 100644 drivers/interconnect/qcom/icc-common.h

Comments

Rob Herring April 26, 2022, 6:59 p.m. UTC | #1
On Sat, Apr 16, 2022 at 11:40:09PM +0800, Leo Yan wrote:
> To support path tag in icc-rpm driver, the "#interconnect-cells"
> property is updated as enumerate values: 1 or 2.  Setting to 1 means
> it is compatible with old DT binding that interconnect path doesn't
> contain tag, if set to 2 for "#interconnect-cells" property, then the
> second specifier in the interconnect path indicates the voting is for
> which buckets.
> 
> Signed-off-by: Leo Yan <leo.yan@linaro.org>
> ---
>  Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> index 89853b482513..7464a50804db 100644
> --- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> @@ -118,7 +118,7 @@ allOf:
>                    - qcom,msm8939-snoc-mm
>  
>                '#interconnect-cells':
> -                const: 1
> +                enum: [ 1, 2 ]

Describe what each cell value is here.

>  
>                clock-names:
>                  items:
> -- 
> 2.25.1
> 
>