diff mbox series

[1/2] dt-bindings: interconnect: Update Qualcomm SDM845 DT bindings

Message ID 1563568344-1274-2-git-send-email-daidavid1@codeaurora.org
State Changes Requested, archived
Headers show
Series Redefine interconnect provider DT nodes for SDM845 | expand

Checks

Context Check Description
robh/checkpatch success

Commit Message

David Dai July 19, 2019, 8:32 p.m. UTC
Redefine the Network-on-Chip devices to more accurately describe
the interconnect topology on Qualcomm's SDM845 platform. Each
interconnect device can communicate with different instances of the
RPMh hardware which are described as RSCs(Resource State Coordinators).

Signed-off-by: David Dai <daidavid1@codeaurora.org>
---
 .../bindings/interconnect/qcom,bcm-voter.txt       | 32 +++++++++++++++++
 .../bindings/interconnect/qcom,sdm845.txt          | 40 +++++++++++++++++-----
 2 files changed, 63 insertions(+), 9 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt

Comments

Bjorn Andersson July 21, 2019, 7:10 p.m. UTC | #1
On Fri 19 Jul 13:32 PDT 2019, David Dai wrote:

> Redefine the Network-on-Chip devices to more accurately describe
> the interconnect topology on Qualcomm's SDM845 platform. Each
> interconnect device can communicate with different instances of the
> RPMh hardware which are described as RSCs(Resource State Coordinators).
> 
> Signed-off-by: David Dai <daidavid1@codeaurora.org>

I like this and we don't have any consumers in DT yet, so I think this
is good.

But we need a patch to the implementation as well, to have the
provider(s) registered with the new compatibles.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  .../bindings/interconnect/qcom,bcm-voter.txt       | 32 +++++++++++++++++
>  .../bindings/interconnect/qcom,sdm845.txt          | 40 +++++++++++++++++-----
>  2 files changed, 63 insertions(+), 9 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt
> 
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt b/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt
> new file mode 100644
> index 0000000..2cf7da2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt
> @@ -0,0 +1,32 @@
> +Qualcomm BCM-Voter interconnect driver binding
> +-----------------------------------------------------------
> +
> +The Bus Clock Manager (BCM) is a dedicated hardware accelerator
> +that manages shared system resources by aggregating requests
> +from multiple Resource State Coordinators (RSC). Interconnect
> +providers are able to vote for aggregated thresholds values from
> +consumers by communicating through their respective RSCs.
> +
> +Required properties :
> +- compatible : shall contain only one of the following:
> +			"qcom,sdm845-bcm-voter",
> +
> +Examples:
> +
> +apps_rsc: rsc@179c0000 {
> +	label = "apps_rsc";
> +	compatible = "qcom,rpmh-rsc";
> +
> +	apps_bcm_voter: bcm_voter {
> +		compatible = "qcom,sdm845-bcm-voter";
> +	};
> +}
> +
> +disp_rsc: rsc@179d0000 {
> +	label = "disp_rsc";
> +	compatible = "qcom,rpmh-rsc";
> +
> +	disp_bcm_voter: bcm_voter {
> +		compatible = "qcom,sdm845-bcm-voter";
> +	};
> +}
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt b/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
> index 5c4f1d9..27f9ed9 100644
> --- a/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
> @@ -4,21 +4,43 @@ Qualcomm SDM845 Network-On-Chip interconnect driver binding
>  SDM845 interconnect providers support system bandwidth requirements through
>  RPMh hardware accelerators known as Bus Clock Manager (BCM). The provider is
>  able to communicate with the BCM through the Resource State Coordinator (RSC)
> -associated with each execution environment. Provider nodes must reside within
> -an RPMh device node pertaining to their RSC and each provider maps to a single
> -RPMh resource.
> +associated with each execution environment. Provider nodes must point to at
> +least one RPMh device child node pertaining to their RSC and each provider
> +can map to multiple RPMh resources.
>  
>  Required properties :
>  - compatible : shall contain only one of the following:
> -			"qcom,sdm845-rsc-hlos"
> +			"qcom,sdm845-aggre1_noc",
> +			"qcom,sdm845-aggre2_noc",
> +			"qcom,sdm845-config_noc",
> +			"qcom,sdm845-dc_noc",
> +			"qcom,sdm845-gladiator_noc",
> +			"qcom,sdm845-mem_noc",
> +			"qcom,sdm845-mmss_noc",
> +			"qcom,sdm845-system_noc",
>  - #interconnect-cells : should contain 1
> +- reg : shall contain base register location and length
> +- qcom,bcm-voter : shall contain phandles to bcm voters
>  
>  Examples:
>  
> -apps_rsc: rsc {
> -	rsc_hlos: interconnect {
> -		compatible = "qcom,sdm845-rsc-hlos";
> -		#interconnect-cells = <1>;
> -	};
> +aggre1_noc: interconnect@16e0000 {
> +	compatible = "qcom,sdm845-aggre1_noc";
> +	reg = <0x16e0000 0xd080>;
> +	interconnect-cells = <1>;
> +	qcom,bcm-voter = <&apps_bcm_voter>;
>  };
>  
> +mmss_noc: interconnect@1740000 {
> +	compatible = "qcom,sdm845-mmss_noc";
> +	reg = <0x1740000 0x1c1000>;
> +	interconnect-cells = <1>;
> +	qcom,bcm-voter = <&apps_bcm_voter>, <&disp_bcm_voter>;
> +};
> +
> +mem_noc: interconnect@1380000 {
> +	compatible = "qcom,sdm845-mem_noc";
> +	reg = <0 0x1380000 0 0x27200>;
> +	#interconnect-cells = <1>;
> +	qcom,bcm-voter = <&apps_bcm_voter>, <&disp_bcm_voter>;
> +};
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
Stephen Boyd July 23, 2019, 2:42 p.m. UTC | #2
Quoting David Dai (2019-07-19 13:32:23)
> Redefine the Network-on-Chip devices to more accurately describe
> the interconnect topology on Qualcomm's SDM845 platform. Each
> interconnect device can communicate with different instances of the
> RPMh hardware which are described as RSCs(Resource State Coordinators).
> 
> Signed-off-by: David Dai <daidavid1@codeaurora.org>
> ---
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt b/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt
> new file mode 100644
> index 0000000..2cf7da2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt
> @@ -0,0 +1,32 @@
> +Qualcomm BCM-Voter interconnect driver binding
> +-----------------------------------------------------------
> +
> +The Bus Clock Manager (BCM) is a dedicated hardware accelerator
> +that manages shared system resources by aggregating requests
> +from multiple Resource State Coordinators (RSC). Interconnect
> +providers are able to vote for aggregated thresholds values from
> +consumers by communicating through their respective RSCs.
> +
> +Required properties :
> +- compatible : shall contain only one of the following:
> +                       "qcom,sdm845-bcm-voter",
> +
> +Examples:
> +
> +apps_rsc: rsc@179c0000 {

But there isn't a reg property.

> +       label = "apps_rsc";

Is label required?

> +       compatible = "qcom,rpmh-rsc";
> +
> +       apps_bcm_voter: bcm_voter {
> +               compatible = "qcom,sdm845-bcm-voter";
> +       };
> +}
> +
> +disp_rsc: rsc@179d0000 {
> +       label = "disp_rsc";
> +       compatible = "qcom,rpmh-rsc";
> +
> +       disp_bcm_voter: bcm_voter {
> +               compatible = "qcom,sdm845-bcm-voter";
> +       };
> +}
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt b/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
> index 5c4f1d9..27f9ed9 100644
> --- a/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
> @@ -4,21 +4,43 @@ Qualcomm SDM845 Network-On-Chip interconnect driver binding
>  SDM845 interconnect providers support system bandwidth requirements through
>  RPMh hardware accelerators known as Bus Clock Manager (BCM). The provider is
>  able to communicate with the BCM through the Resource State Coordinator (RSC)
> -associated with each execution environment. Provider nodes must reside within
> -an RPMh device node pertaining to their RSC and each provider maps to a single
> -RPMh resource.
> +associated with each execution environment. Provider nodes must point to at
> +least one RPMh device child node pertaining to their RSC and each provider
> +can map to multiple RPMh resources.
>  
>  Required properties :
>  - compatible : shall contain only one of the following:
> -                       "qcom,sdm845-rsc-hlos"
> +                       "qcom,sdm845-aggre1_noc",
> +                       "qcom,sdm845-aggre2_noc",
> +                       "qcom,sdm845-config_noc",
> +                       "qcom,sdm845-dc_noc",
> +                       "qcom,sdm845-gladiator_noc",
> +                       "qcom,sdm845-mem_noc",
> +                       "qcom,sdm845-mmss_noc",
> +                       "qcom,sdm845-system_noc",
>  - #interconnect-cells : should contain 1
> +- reg : shall contain base register location and length
> +- qcom,bcm-voter : shall contain phandles to bcm voters
>  
>  Examples:
>  
> -apps_rsc: rsc {
> -       rsc_hlos: interconnect {
> -               compatible = "qcom,sdm845-rsc-hlos";
> -               #interconnect-cells = <1>;
> -       };
> +aggre1_noc: interconnect@16e0000 {
> +       compatible = "qcom,sdm845-aggre1_noc";
> +       reg = <0x16e0000 0xd080>;
> +       interconnect-cells = <1>;
> +       qcom,bcm-voter = <&apps_bcm_voter>;
>  };
>  
> +mmss_noc: interconnect@1740000 {
> +       compatible = "qcom,sdm845-mmss_noc";
> +       reg = <0x1740000 0x1c1000>;
> +       interconnect-cells = <1>;
> +       qcom,bcm-voter = <&apps_bcm_voter>, <&disp_bcm_voter>;
> +};
> +
> +mem_noc: interconnect@1380000 {
> +       compatible = "qcom,sdm845-mem_noc";
> +       reg = <0 0x1380000 0 0x27200>;
> +       #interconnect-cells = <1>;
> +       qcom,bcm-voter = <&apps_bcm_voter>, <&disp_bcm_voter>;
> +};

How does a consumer target a particular RSC? For example, how can
display decide to use the disp_bcm_voter node from mem_noc here? Maybe
you can add that consumer to the example?
David Dai July 23, 2019, 9:48 p.m. UTC | #3
Thanks for the feedback Stephen, much appreciated!

On 7/23/2019 7:42 AM, Stephen Boyd wrote:
> Quoting David Dai (2019-07-19 13:32:23)
>> Redefine the Network-on-Chip devices to more accurately describe
>> the interconnect topology on Qualcomm's SDM845 platform. Each
>> interconnect device can communicate with different instances of the
>> RPMh hardware which are described as RSCs(Resource State Coordinators).
>>
>> Signed-off-by: David Dai <daidavid1@codeaurora.org>
>> ---
>> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt b/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt
>> new file mode 100644
>> index 0000000..2cf7da2
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt
>> @@ -0,0 +1,32 @@
>> +Qualcomm BCM-Voter interconnect driver binding
>> +-----------------------------------------------------------
>> +
>> +The Bus Clock Manager (BCM) is a dedicated hardware accelerator
>> +that manages shared system resources by aggregating requests
>> +from multiple Resource State Coordinators (RSC). Interconnect
>> +providers are able to vote for aggregated thresholds values from
>> +consumers by communicating through their respective RSCs.
>> +
>> +Required properties :
>> +- compatible : shall contain only one of the following:
>> +                       "qcom,sdm845-bcm-voter",
>> +
>> +Examples:
>> +
>> +apps_rsc: rsc@179c0000 {
> But there isn't a reg property.
I'll change this to the generic example with just apps_rsc: rsc {
>
>> +       label = "apps_rsc";
> Is label required?
>
>> +       compatible = "qcom,rpmh-rsc";
>> +
>> +       apps_bcm_voter: bcm_voter {
>> +               compatible = "qcom,sdm845-bcm-voter";
>> +       };
>> +}
>> +
>> +disp_rsc: rsc@179d0000 {
>> +       label = "disp_rsc";
>> +       compatible = "qcom,rpmh-rsc";
>> +
>> +       disp_bcm_voter: bcm_voter {
>> +               compatible = "qcom,sdm845-bcm-voter";
>> +       };
>> +}
>> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt b/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
>> index 5c4f1d9..27f9ed9 100644
>> --- a/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
>> +++ b/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
>> @@ -4,21 +4,43 @@ Qualcomm SDM845 Network-On-Chip interconnect driver binding
>>   SDM845 interconnect providers support system bandwidth requirements through
>>   RPMh hardware accelerators known as Bus Clock Manager (BCM). The provider is
>>   able to communicate with the BCM through the Resource State Coordinator (RSC)
>> -associated with each execution environment. Provider nodes must reside within
>> -an RPMh device node pertaining to their RSC and each provider maps to a single
>> -RPMh resource.
>> +associated with each execution environment. Provider nodes must point to at
>> +least one RPMh device child node pertaining to their RSC and each provider
>> +can map to multiple RPMh resources.
>>   
>>   Required properties :
>>   - compatible : shall contain only one of the following:
>> -                       "qcom,sdm845-rsc-hlos"
>> +                       "qcom,sdm845-aggre1_noc",
>> +                       "qcom,sdm845-aggre2_noc",
>> +                       "qcom,sdm845-config_noc",
>> +                       "qcom,sdm845-dc_noc",
>> +                       "qcom,sdm845-gladiator_noc",
>> +                       "qcom,sdm845-mem_noc",
>> +                       "qcom,sdm845-mmss_noc",
>> +                       "qcom,sdm845-system_noc",
>>   - #interconnect-cells : should contain 1
>> +- reg : shall contain base register location and length
>> +- qcom,bcm-voter : shall contain phandles to bcm voters
>>   
>>   Examples:
>>   
>> -apps_rsc: rsc {
>> -       rsc_hlos: interconnect {
>> -               compatible = "qcom,sdm845-rsc-hlos";
>> -               #interconnect-cells = <1>;
>> -       };
>> +aggre1_noc: interconnect@16e0000 {
>> +       compatible = "qcom,sdm845-aggre1_noc";
>> +       reg = <0x16e0000 0xd080>;
>> +       interconnect-cells = <1>;
>> +       qcom,bcm-voter = <&apps_bcm_voter>;
>>   };
>>   
>> +mmss_noc: interconnect@1740000 {
>> +       compatible = "qcom,sdm845-mmss_noc";
>> +       reg = <0x1740000 0x1c1000>;
>> +       interconnect-cells = <1>;
>> +       qcom,bcm-voter = <&apps_bcm_voter>, <&disp_bcm_voter>;
>> +};
>> +
>> +mem_noc: interconnect@1380000 {
>> +       compatible = "qcom,sdm845-mem_noc";
>> +       reg = <0 0x1380000 0 0x27200>;
>> +       #interconnect-cells = <1>;
>> +       qcom,bcm-voter = <&apps_bcm_voter>, <&disp_bcm_voter>;
>> +};
> How does a consumer target a particular RSC? For example, how can
> display decide to use the disp_bcm_voter node from mem_noc here? Maybe
> you can add that consumer to the example?

I was thinking that the association between the bcm voters and the icc 
nodes would be handled by the interconnect provider, and that there 
would be a set of display specific icc nodes with their own unique IDs 
that the consumers could reference. I will mention this as part of the 
description and provide an example.

Ex: interconnects = <&mmss_noc MASTER_MDP0_DISP &mem_noc SLAVE_EBI_DISP>;
Stephen Boyd July 24, 2019, 2:18 p.m. UTC | #4
Quoting David Dai (2019-07-23 14:48:42)
> On 7/23/2019 7:42 AM, Stephen Boyd wrote:
> > Quoting David Dai (2019-07-19 13:32:23)
> >> +- compatible : shall contain only one of the following:
> >> +                       "qcom,sdm845-bcm-voter",
> >> +
> >> +Examples:
> >> +
> >> +apps_rsc: rsc@179c0000 {
> > But there isn't a reg property.
> I'll change this to the generic example with just apps_rsc: rsc {
> >
> >> +       label = "apps_rsc";
> > Is label required?

Any answer?

> >
> >> +       compatible = "qcom,rpmh-rsc";
> >> +
> >> +       apps_bcm_voter: bcm_voter {
> >> +               compatible = "qcom,sdm845-bcm-voter";
> >> +       };
> >> +}
> >> +
> >> +disp_rsc: rsc@179d0000 {
> >> +       label = "disp_rsc";
> >> +       compatible = "qcom,rpmh-rsc";
> >> +
> >> +       disp_bcm_voter: bcm_voter {
> >> +               compatible = "qcom,sdm845-bcm-voter";
> >> +       };
> >> +}
> >> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt b/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
> >> index 5c4f1d9..27f9ed9 100644
> >> --- a/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
> >> +++ b/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
[...]
> >> +
> >> +mem_noc: interconnect@1380000 {
> >> +       compatible = "qcom,sdm845-mem_noc";
> >> +       reg = <0 0x1380000 0 0x27200>;
> >> +       #interconnect-cells = <1>;
> >> +       qcom,bcm-voter = <&apps_bcm_voter>, <&disp_bcm_voter>;
> >> +};
> > How does a consumer target a particular RSC? For example, how can
> > display decide to use the disp_bcm_voter node from mem_noc here? Maybe
> > you can add that consumer to the example?
> 
> I was thinking that the association between the bcm voters and the icc 
> nodes would be handled by the interconnect provider, and that there 
> would be a set of display specific icc nodes with their own unique IDs 
> that the consumers could reference. I will mention this as part of the 
> description and provide an example.
> 
> Ex: interconnects = <&mmss_noc MASTER_MDP0_DISP &mem_noc SLAVE_EBI_DISP>;
> 

It looks backwards to me. Don't the consumers want to consume a
particular RSC, i.e. apps or display RSC, so they can choose where to
put the bcm vote and then those RSCs want to find MMIO registers for
mmss_noc or mem_noc that they have to write to tune something else like
QoS? If the MMIO space is the provider then I'm lost how it can
differentiate between the RSCs that may be targetting the particular
NoC. 

Maybe I've just completely missed something and this is all decided
already. If so, sorry, I'm just trying to understand.
David Dai July 24, 2019, 5:22 p.m. UTC | #5
On 7/24/2019 7:18 AM, Stephen Boyd wrote:
> Quoting David Dai (2019-07-23 14:48:42)
>> On 7/23/2019 7:42 AM, Stephen Boyd wrote:
>>> Quoting David Dai (2019-07-19 13:32:23)
>>>> +- compatible : shall contain only one of the following:
>>>> +                       "qcom,sdm845-bcm-voter",
>>>> +
>>>> +Examples:
>>>> +
>>>> +apps_rsc: rsc@179c0000 {
>>> But there isn't a reg property.
>> I'll change this to the generic example with just apps_rsc: rsc {
>>>> +       label = "apps_rsc";
>>> Is label required?
> Any answer?
Not required.
>>>> +       compatible = "qcom,rpmh-rsc";
>>>> +
>>>> +       apps_bcm_voter: bcm_voter {
>>>> +               compatible = "qcom,sdm845-bcm-voter";
>>>> +       };
>>>> +}
>>>> +
>>>> +disp_rsc: rsc@179d0000 {
>>>> +       label = "disp_rsc";
>>>> +       compatible = "qcom,rpmh-rsc";
>>>> +
>>>> +       disp_bcm_voter: bcm_voter {
>>>> +               compatible = "qcom,sdm845-bcm-voter";
>>>> +       };
>>>> +}
>>>> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt b/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
>>>> index 5c4f1d9..27f9ed9 100644
>>>> --- a/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
>>>> +++ b/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
> [...]
>>>> +
>>>> +mem_noc: interconnect@1380000 {
>>>> +       compatible = "qcom,sdm845-mem_noc";
>>>> +       reg = <0 0x1380000 0 0x27200>;
>>>> +       #interconnect-cells = <1>;
>>>> +       qcom,bcm-voter = <&apps_bcm_voter>, <&disp_bcm_voter>;
>>>> +};
>>> How does a consumer target a particular RSC? For example, how can
>>> display decide to use the disp_bcm_voter node from mem_noc here? Maybe
>>> you can add that consumer to the example?
>> I was thinking that the association between the bcm voters and the icc
>> nodes would be handled by the interconnect provider, and that there
>> would be a set of display specific icc nodes with their own unique IDs
>> that the consumers could reference. I will mention this as part of the
>> description and provide an example.
>>
>> Ex: interconnects = <&mmss_noc MASTER_MDP0_DISP &mem_noc SLAVE_EBI_DISP>;
>>
> It looks backwards to me. Don't the consumers want to consume a
> particular RSC, i.e. apps or display RSC, so they can choose where to
> put the bcm vote and then those RSCs want to find MMIO registers for
> mmss_noc or mem_noc that they have to write to tune something else like
> QoS? If the MMIO space is the provider then I'm lost how it can
> differentiate between the RSCs that may be targetting the particular
> NoC.
The way that I view this is that the consumers consume both bandwidth 
and QoS from these physical NoC devices by getting some path between two 
endpoints on these different NoCs and applying some constraints. The NoC 
providers can accomplish that either by writing to MMIO spaces or by 
talking to some remote processor/hardware to tune its clock speed. The 
consumer doesn't interact with the RSCs directly, but can select a 
different bcm voter based on the endpoints that are associated with a 
particular bcm(apps or disp rsc). Each node(endpoints) will have its own 
BCM designation and an unique bcm voter.
> Maybe I've just completely missed something and this is all decided
> already. If so, sorry, I'm just trying to understand.
No problem, this just means I need to do a better job of explaining.
Stephen Boyd July 24, 2019, 6:27 p.m. UTC | #6
Quoting David Dai (2019-07-24 10:22:57)
> 
> The way that I view this is that the consumers consume both bandwidth 
> and QoS from these physical NoC devices by getting some path between two 
> endpoints on these different NoCs and applying some constraints. The NoC 
> providers can accomplish that either by writing to MMIO spaces or by 
> talking to some remote processor/hardware to tune its clock speed. The 
> consumer doesn't interact with the RSCs directly, but can select a 
> different bcm voter based on the endpoints that are associated with a 
> particular bcm(apps or disp rsc). Each node(endpoints) will have its own 
> BCM designation and an unique bcm voter.

Ok. I get it now. The MMIO nodes will be interconnect providers and
they'll know what RSCs they can use by exposing the same RSC "resource"
multiple times for each RSC that can be targeted? This is what the
postfix is with _DISP on your examples? Presumably there's an _APPS
version of the same prefixed endpoint in case the consumer wants to use
the APPS RSC instead of the DISP one, or maybe there's just no postfix
in this case because APPS is the "default".
David Dai July 24, 2019, 8:42 p.m. UTC | #7
On 7/24/2019 11:27 AM, Stephen Boyd wrote:
> Quoting David Dai (2019-07-24 10:22:57)
>> The way that I view this is that the consumers consume both bandwidth
>> and QoS from these physical NoC devices by getting some path between two
>> endpoints on these different NoCs and applying some constraints. The NoC
>> providers can accomplish that either by writing to MMIO spaces or by
>> talking to some remote processor/hardware to tune its clock speed. The
>> consumer doesn't interact with the RSCs directly, but can select a
>> different bcm voter based on the endpoints that are associated with a
>> particular bcm(apps or disp rsc). Each node(endpoints) will have its own
>> BCM designation and an unique bcm voter.
> Ok. I get it now. The MMIO nodes will be interconnect providers and
> they'll know what RSCs they can use by exposing the same RSC "resource"
> multiple times for each RSC that can be targeted? This is what the
> postfix is with _DISP on your examples? Presumably there's an _APPS
> version of the same prefixed endpoint in case the consumer wants to use
> the APPS RSC instead of the DISP one, or maybe there's just no postfix
> in this case because APPS is the "default".

Right, the suffixes will denote the RSC association and will default to 
APPS otherwise.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt b/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt
new file mode 100644
index 0000000..2cf7da2
--- /dev/null
+++ b/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.txt
@@ -0,0 +1,32 @@ 
+Qualcomm BCM-Voter interconnect driver binding
+-----------------------------------------------------------
+
+The Bus Clock Manager (BCM) is a dedicated hardware accelerator
+that manages shared system resources by aggregating requests
+from multiple Resource State Coordinators (RSC). Interconnect
+providers are able to vote for aggregated thresholds values from
+consumers by communicating through their respective RSCs.
+
+Required properties :
+- compatible : shall contain only one of the following:
+			"qcom,sdm845-bcm-voter",
+
+Examples:
+
+apps_rsc: rsc@179c0000 {
+	label = "apps_rsc";
+	compatible = "qcom,rpmh-rsc";
+
+	apps_bcm_voter: bcm_voter {
+		compatible = "qcom,sdm845-bcm-voter";
+	};
+}
+
+disp_rsc: rsc@179d0000 {
+	label = "disp_rsc";
+	compatible = "qcom,rpmh-rsc";
+
+	disp_bcm_voter: bcm_voter {
+		compatible = "qcom,sdm845-bcm-voter";
+	};
+}
diff --git a/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt b/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
index 5c4f1d9..27f9ed9 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
+++ b/Documentation/devicetree/bindings/interconnect/qcom,sdm845.txt
@@ -4,21 +4,43 @@  Qualcomm SDM845 Network-On-Chip interconnect driver binding
 SDM845 interconnect providers support system bandwidth requirements through
 RPMh hardware accelerators known as Bus Clock Manager (BCM). The provider is
 able to communicate with the BCM through the Resource State Coordinator (RSC)
-associated with each execution environment. Provider nodes must reside within
-an RPMh device node pertaining to their RSC and each provider maps to a single
-RPMh resource.
+associated with each execution environment. Provider nodes must point to at
+least one RPMh device child node pertaining to their RSC and each provider
+can map to multiple RPMh resources.
 
 Required properties :
 - compatible : shall contain only one of the following:
-			"qcom,sdm845-rsc-hlos"
+			"qcom,sdm845-aggre1_noc",
+			"qcom,sdm845-aggre2_noc",
+			"qcom,sdm845-config_noc",
+			"qcom,sdm845-dc_noc",
+			"qcom,sdm845-gladiator_noc",
+			"qcom,sdm845-mem_noc",
+			"qcom,sdm845-mmss_noc",
+			"qcom,sdm845-system_noc",
 - #interconnect-cells : should contain 1
+- reg : shall contain base register location and length
+- qcom,bcm-voter : shall contain phandles to bcm voters
 
 Examples:
 
-apps_rsc: rsc {
-	rsc_hlos: interconnect {
-		compatible = "qcom,sdm845-rsc-hlos";
-		#interconnect-cells = <1>;
-	};
+aggre1_noc: interconnect@16e0000 {
+	compatible = "qcom,sdm845-aggre1_noc";
+	reg = <0x16e0000 0xd080>;
+	interconnect-cells = <1>;
+	qcom,bcm-voter = <&apps_bcm_voter>;
 };
 
+mmss_noc: interconnect@1740000 {
+	compatible = "qcom,sdm845-mmss_noc";
+	reg = <0x1740000 0x1c1000>;
+	interconnect-cells = <1>;
+	qcom,bcm-voter = <&apps_bcm_voter>, <&disp_bcm_voter>;
+};
+
+mem_noc: interconnect@1380000 {
+	compatible = "qcom,sdm845-mem_noc";
+	reg = <0 0x1380000 0 0x27200>;
+	#interconnect-cells = <1>;
+	qcom,bcm-voter = <&apps_bcm_voter>, <&disp_bcm_voter>;
+};