diff mbox

[v3,2/3] ARM: dts: Document the CCI PMU DT bindings

Message ID 1377183748-5717-3-git-send-email-punit.agrawal@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Punit Agrawal Aug. 22, 2013, 3:02 p.m. UTC
The CCI PMU can profile bus transactions at the master and slave
interfaces of the CCI. The PMU can be used to observe an aggregated
view of the bus traffic between the various components connected to the
CCI.

Introduce a binding for the CCI PMU. The PMU node will be a sub-node of
the CCI node.

Cc: devicetree@vger.kernel.org
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
---
 Documentation/devicetree/bindings/arm/cci.txt |   46 +++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

Comments

Stephen Warren Aug. 22, 2013, 10:17 p.m. UTC | #1
On 08/22/2013 09:02 AM, Punit Agrawal wrote:
> The CCI PMU can profile bus transactions at the master and slave
> interfaces of the CCI. The PMU can be used to observe an aggregated
> view of the bus traffic between the various components connected to the
> CCI.
> 
> Introduce a binding for the CCI PMU. The PMU node will be a sub-node of
> the CCI node.

This also seems fine to me.
Acked-by: Stephen Warren <swarren@nvidia.com>
Punit Agrawal Aug. 23, 2013, 9:56 a.m. UTC | #2
Hi Stephen,

On 22/08/13 23:17, Stephen Warren wrote:
> On 08/22/2013 09:02 AM, Punit Agrawal wrote:
>> The CCI PMU can profile bus transactions at the master and slave
>> interfaces of the CCI. The PMU can be used to observe an aggregated
>> view of the bus traffic between the various components connected to the
>> CCI.
>>
>> Introduce a binding for the CCI PMU. The PMU node will be a sub-node of
>> the CCI node.
>
> This also seems fine to me.
> Acked-by: Stephen Warren <swarren@nvidia.com>
>

Thanks for the Ack on both the patches. I'll get these queued for either 
3.12 or if it is too late for that then 3.13.

Cheers,
Punit
Jon Medhurst (Tixy) Aug. 30, 2013, 1:59 p.m. UTC | #3
On Thu, 2013-08-22 at 16:02 +0100, Punit Agrawal wrote:
> The CCI PMU can profile bus transactions at the master and slave
> interfaces of the CCI. The PMU can be used to observe an aggregated
> view of the bus traffic between the various components connected to the
> CCI.
> 
> Introduce a binding for the CCI PMU. The PMU node will be a sub-node of
> the CCI node.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Kumar Gala <galak@codeaurora.org>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
> ---
>  Documentation/devicetree/bindings/arm/cci.txt |   46 +++++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/cci.txt b/Documentation/devicetree/bindings/arm/cci.txt
> index 024c03d..551119e 100644
> --- a/Documentation/devicetree/bindings/arm/cci.txt
> +++ b/Documentation/devicetree/bindings/arm/cci.txt
> @@ -85,6 +85,42 @@ specific to ARM.
>  				    corresponding interface programming
>  				    registers.
>  
> +	- CCI PMU node
> +
> +		Parent node must be CCI interconnect node.
> +
> +		A CCI pmu node must contain the following properties:
> +
> +		- compatible
> +			Usage: required
> +			Value type: <string>
> +			Definition: must be "arm,cci-400-pmu"
> +
> +		- reg:
> +			Usage: required
> +			Value type: Integer cells. A register entry, expressed
> +				    as a pair of cells, containing base and
> +				    size.
> +			Definition: the base address and size of the
> +				    corresponding interface programming
> +				    registers.
> +
> +		- interrupts:
> +			Usage: required
> +			Value type: Integer cells. Array of interrupt specifier
> +				    entries, as defined in
> +				    ../interrupt-controller/interrupts.txt.
> +			Definition: list of counter overflow interrupts, one per
> +				    counter. The interrupts must be specified
> +				    starting with the cycle counter overflow
> +				    interrupt, followed by counter0 overflow
> +				    interrupt, counter1 overflow interrupt,...
> +				    ,counterN overflow interrupt.
> +
> +				    The CCI PMU has an interrupt signal for each
> +				    counter. The number of interrupts must be
> +				    equal to the number of counters.
> +
>  * CCI interconnect bus masters
>  
>  	Description: masters in the device tree connected to a CCI port
> @@ -169,6 +205,16 @@ Example:
>  			interface-type = "ace";
>  			reg = <0x5000 0x1000>;
>  		};
> +
> +		pmu@9000 {
> +			 compatible = "arm,cci-400-pmu";
> +			 reg = <0x9000 0x5000>;
> +			 interrupts = <0 101 4>,
> +				      <0 102 4>,
> +				      <0 103 4>,
> +				      <0 104 4>,
> +				      <0 105 4>;
> +		};
>  	};
>  
>  This CCI node corresponds to a CCI component whose control registers sits


It's not shown in the diff above, but the documentation gives the
following for the cci node:

		ranges = <0x0 0x0 0x2c090000 0x6000>;

which doesn't include the PMU nodes, so should that 0x6000 also be
changed to 0x10000 (the full range of addresses in the TRM).
Punit Agrawal Aug. 30, 2013, 2:36 p.m. UTC | #4
Hi Jon,

On 30/08/13 14:59, Jon Medhurst (Tixy) wrote:
> On Thu, 2013-08-22 at 16:02 +0100, Punit Agrawal wrote:
>> The CCI PMU can profile bus transactions at the master and slave
>> interfaces of the CCI. The PMU can be used to observe an aggregated
>> view of the bus traffic between the various components connected to the
>> CCI.
>>
>> Introduce a binding for the CCI PMU. The PMU node will be a sub-node of
>> the CCI node.
>>
>> Cc: devicetree@vger.kernel.org
>> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
>> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
>> Cc: Stephen Warren <swarren@wwwdotorg.org>
>> Cc: Kumar Gala <galak@codeaurora.org>
>> Cc: Rob Herring <rob.herring@calxeda.com>
>> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
>> ---
>>   Documentation/devicetree/bindings/arm/cci.txt |   46 +++++++++++++++++++++++++
>>   1 file changed, 46 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/cci.txt b/Documentation/devicetree/bindings/arm/cci.txt
>> index 024c03d..551119e 100644
>> --- a/Documentation/devicetree/bindings/arm/cci.txt
>> +++ b/Documentation/devicetree/bindings/arm/cci.txt
>> @@ -85,6 +85,42 @@ specific to ARM.
>>   				    corresponding interface programming
>>   				    registers.
>>
>> +	- CCI PMU node
>> +
>> +		Parent node must be CCI interconnect node.
>> +
>> +		A CCI pmu node must contain the following properties:
>> +
>> +		- compatible
>> +			Usage: required
>> +			Value type: <string>
>> +			Definition: must be "arm,cci-400-pmu"
>> +
>> +		- reg:
>> +			Usage: required
>> +			Value type: Integer cells. A register entry, expressed
>> +				    as a pair of cells, containing base and
>> +				    size.
>> +			Definition: the base address and size of the
>> +				    corresponding interface programming
>> +				    registers.
>> +
>> +		- interrupts:
>> +			Usage: required
>> +			Value type: Integer cells. Array of interrupt specifier
>> +				    entries, as defined in
>> +				    ../interrupt-controller/interrupts.txt.
>> +			Definition: list of counter overflow interrupts, one per
>> +				    counter. The interrupts must be specified
>> +				    starting with the cycle counter overflow
>> +				    interrupt, followed by counter0 overflow
>> +				    interrupt, counter1 overflow interrupt,...
>> +				    ,counterN overflow interrupt.
>> +
>> +				    The CCI PMU has an interrupt signal for each
>> +				    counter. The number of interrupts must be
>> +				    equal to the number of counters.
>> +
>>   * CCI interconnect bus masters
>>
>>   	Description: masters in the device tree connected to a CCI port
>> @@ -169,6 +205,16 @@ Example:
>>   			interface-type = "ace";
>>   			reg = <0x5000 0x1000>;
>>   		};
>> +
>> +		pmu@9000 {
>> +			 compatible = "arm,cci-400-pmu";
>> +			 reg = <0x9000 0x5000>;
>> +			 interrupts = <0 101 4>,
>> +				      <0 102 4>,
>> +				      <0 103 4>,
>> +				      <0 104 4>,
>> +				      <0 105 4>;
>> +		};
>>   	};
>>
>>   This CCI node corresponds to a CCI component whose control registers sits
>
>
> It's not shown in the diff above, but the documentation gives the
> following for the cci node:
>
> 		ranges = <0x0 0x0 0x2c090000 0x6000>;
>
> which doesn't include the PMU nodes, so should that 0x6000 also be
> changed to 0x10000 (the full range of addresses in the TRM).
>

You're right. Now that I am adding support for the PMU, this range 
should be extended to include the rest of the CCI addresses. I'll update 
it in the next version.

Cheers,
Punit
Kumar Gala Aug. 30, 2013, 4:17 p.m. UTC | #5
On Aug 22, 2013, at 10:02 AM, Punit Agrawal wrote:

> The CCI PMU can profile bus transactions at the master and slave
> interfaces of the CCI. The PMU can be used to observe an aggregated
> view of the bus traffic between the various components connected to the
> CCI.
> 
> Introduce a binding for the CCI PMU. The PMU node will be a sub-node of
> the CCI node.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Kumar Gala <galak@codeaurora.org>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
> ---
> Documentation/devicetree/bindings/arm/cci.txt |   46 +++++++++++++++++++++++++
> 1 file changed, 46 insertions(+)

Acked-by: Kumar Gala <galak@codeaurora.org>

- k
Punit Agrawal Sept. 4, 2013, 12:26 p.m. UTC | #6
(adding Will, as these patches will be going via his tree.)

Hi Will,

On 30/08/13 17:17, Kumar Gala wrote:
>
> On Aug 22, 2013, at 10:02 AM, Punit Agrawal wrote:
>
>> The CCI PMU can profile bus transactions at the master and slave
>> interfaces of the CCI. The PMU can be used to observe an aggregated
>> view of the bus traffic between the various components connected to the
>> CCI.
>>
>> Introduce a binding for the CCI PMU. The PMU node will be a sub-node of
>> the CCI node.
>>
>> Cc: devicetree@vger.kernel.org
>> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
>> Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
>> Cc: Stephen Warren <swarren@wwwdotorg.org>
>> Cc: Kumar Gala <galak@codeaurora.org>
>> Cc: Rob Herring <rob.herring@calxeda.com>
>> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
>> ---
>> Documentation/devicetree/bindings/arm/cci.txt |   46 +++++++++++++++++++++++++
>> 1 file changed, 46 insertions(+)
>
> Acked-by: Kumar Gala <galak@codeaurora.org>
>

Can you pick Kumar's ack for the second patch before you send a pull 
request for the CCI PMU patches? Let me know if you prefer for me to 
post patches with the Acks applied.

Cheers,
Punit

> - k
>
Will Deacon Sept. 5, 2013, 12:51 p.m. UTC | #7
On Wed, Sep 04, 2013 at 01:26:17PM +0100, Punit Agrawal wrote:
> On 30/08/13 17:17, Kumar Gala wrote:
> > Acked-by: Kumar Gala <galak@codeaurora.org>
> >
> 
> Can you pick Kumar's ack for the second patch before you send a pull 
> request for the CCI PMU patches? Let me know if you prefer for me to 
> post patches with the Acks applied.

That's fine, I've added the ack.

Will
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/arm/cci.txt b/Documentation/devicetree/bindings/arm/cci.txt
index 024c03d..551119e 100644
--- a/Documentation/devicetree/bindings/arm/cci.txt
+++ b/Documentation/devicetree/bindings/arm/cci.txt
@@ -85,6 +85,42 @@  specific to ARM.
 				    corresponding interface programming
 				    registers.
 
+	- CCI PMU node
+
+		Parent node must be CCI interconnect node.
+
+		A CCI pmu node must contain the following properties:
+
+		- compatible
+			Usage: required
+			Value type: <string>
+			Definition: must be "arm,cci-400-pmu"
+
+		- reg:
+			Usage: required
+			Value type: Integer cells. A register entry, expressed
+				    as a pair of cells, containing base and
+				    size.
+			Definition: the base address and size of the
+				    corresponding interface programming
+				    registers.
+
+		- interrupts:
+			Usage: required
+			Value type: Integer cells. Array of interrupt specifier
+				    entries, as defined in
+				    ../interrupt-controller/interrupts.txt.
+			Definition: list of counter overflow interrupts, one per
+				    counter. The interrupts must be specified
+				    starting with the cycle counter overflow
+				    interrupt, followed by counter0 overflow
+				    interrupt, counter1 overflow interrupt,...
+				    ,counterN overflow interrupt.
+
+				    The CCI PMU has an interrupt signal for each
+				    counter. The number of interrupts must be
+				    equal to the number of counters.
+
 * CCI interconnect bus masters
 
 	Description: masters in the device tree connected to a CCI port
@@ -169,6 +205,16 @@  Example:
 			interface-type = "ace";
 			reg = <0x5000 0x1000>;
 		};
+
+		pmu@9000 {
+			 compatible = "arm,cci-400-pmu";
+			 reg = <0x9000 0x5000>;
+			 interrupts = <0 101 4>,
+				      <0 102 4>,
+				      <0 103 4>,
+				      <0 104 4>,
+				      <0 105 4>;
+		};
 	};
 
 This CCI node corresponds to a CCI component whose control registers sits