mbox series

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

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

Message

Leo Yan July 4, 2022, 9:30 a.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.

Changes from v2:
- Fixed for DT checker error for command ''make DT_CHECKER_FLAGS=-m
  dt_binding_check' (Rob Herring).

Changes from v1:
- Added description for property "#interconnect-cells" (Rob Herring);
- Added Dimtry's reviewed tags for patches 02 and 03 (Dmitry Baryshkov);
- Rebased on the latest mainline kernel and resolved conflict.


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       |   7 +-
 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, 183 insertions(+), 42 deletions(-)
 create mode 100644 drivers/interconnect/qcom/icc-common.c
 create mode 100644 drivers/interconnect/qcom/icc-common.h

Comments

Krzysztof Kozlowski July 4, 2022, 12:46 p.m. UTC | #1
On 04/07/2022 11:30, 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 only
> contains node id; if set to 2 for "#interconnect-cells" property, then
> the second specifier is used as a tag (e.g. vote for which buckets).
> 
> Signed-off-by: Leo Yan <leo.yan@linaro.org>
> ---
>  .../devicetree/bindings/interconnect/qcom,rpm.yaml         | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> index 8a676fef8c1d..cdfe419e7339 100644
> --- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> @@ -45,7 +45,12 @@ properties:
>        - qcom,sdm660-snoc
>  
>    '#interconnect-cells':
> -    const: 1
> +    description: |
> +      Number of interconnect specifier. 

Isn't this sentence obvious (common for every bindings)? Just skip it.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

> Value: <1> is one cell in a
> +      interconnect specifier for the interconnect node id, <2> requires
> +      the interconnect node id and an extra path tag.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [ 1, 2 ]
>  
>    clocks:
>      minItems: 2


Best regards,
Krzysztof
Leo Yan July 4, 2022, 1:07 p.m. UTC | #2
On Mon, Jul 04, 2022 at 02:47:13PM +0200, Krzysztof Kozlowski wrote:
> On 04/07/2022 11:30, 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 only
> > contains node id; if set to 2 for "#interconnect-cells" property, then
> > the second specifier is used as a tag (e.g. vote for which buckets).
> > 
> > Signed-off-by: Leo Yan <leo.yan@linaro.org>
> > ---
> >  .../devicetree/bindings/interconnect/qcom,rpm.yaml         | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> > index 8a676fef8c1d..cdfe419e7339 100644
> > --- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> > +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> > @@ -45,7 +45,12 @@ properties:
> >        - qcom,sdm660-snoc
> >  
> >    '#interconnect-cells':
> > -    const: 1
> > +    description: |
> > +      Number of interconnect specifier. Value: <1> is one cell in a
> > +      interconnect specifier for the interconnect node id, <2> requires
> > +      the interconnect node id and an extra path tag.
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> 
> Ah, too fast.  No ack. This ref is also pointless and not explained in
> commit msg.

I referred other DT binding file for adding $ref to specify property
type [1], so it's confused why it's pointless, anyway, I can drop $ref
in next spin.

Thanks a lot for the review!

Leo

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/arm/l2c2x0.yaml#n153
Leo Yan July 4, 2022, 2:12 p.m. UTC | #3
On Mon, Jul 04, 2022 at 03:50:41PM +0200, Krzysztof Kozlowski wrote:

[...]

> >>>    '#interconnect-cells':
> >>> -    const: 1
> >>> +    description: |
> >>> +      Number of interconnect specifier. Value: <1> is one cell in a
> >>> +      interconnect specifier for the interconnect node id, <2> requires
> >>> +      the interconnect node id and an extra path tag.
> >>> +    $ref: /schemas/types.yaml#/definitions/uint32
> >>
> >> Ah, too fast.  No ack. This ref is also pointless and not explained in
> >> commit msg.
> > 
> > I referred other DT binding file for adding $ref to specify property
> > type [1], so it's confused why it's pointless, anyway, I can drop $ref
> > in next spin.
> > 
> > Thanks a lot for the review!
> 
> The "arm,prefetch-offset" is not a cells property.

Understand.  Will drop $ref for in new patch.

Thanks,
Leo