Re: [PATCH 1/7] PM / devfreq: event: Add new Exynos NoC probe driver

2016-04-14 Thread Chanwoo Choi
On 2016년 04월 12일 17:07, Krzysztof Kozlowski wrote:
> On 04/08/2016 07:00 AM, Chanwoo Choi wrote:
>> This patch adds NoC (Network on Chip) Probe driver which provides
>> the primitive values to get the performance data. The packets that the 
>> Network
>> on Chip (NoC) probes detects are transported over the network infrastructure.
>> Exynos542x bus has multiple NoC probes to provide bandwidth information about
>> behavior of the SoC that you can use while analyzing system performance.
>>
>> Signed-off-by: Chanwoo Choi 
>> ---
>>  .../bindings/devfreq/event/exynos-nocp.txt |  86 +++
>>  drivers/devfreq/event/Kconfig  |   8 +
>>  drivers/devfreq/event/Makefile |   2 +
>>  drivers/devfreq/event/exynos-nocp.c| 247 
>> +
>>  drivers/devfreq/event/exynos-nocp.h|  78 +++
>>  5 files changed, 421 insertions(+)
>>  create mode 100644 
>> Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
>>  create mode 100644 drivers/devfreq/event/exynos-nocp.c
>>  create mode 100644 drivers/devfreq/event/exynos-nocp.h
>>
>> diff --git a/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt 
>> b/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
>> new file mode 100644
>> index ..03b74fed034c
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
>> @@ -0,0 +1,86 @@
>> +
>> +* Samsung Exynos NoC (Network on Chip) Probe device
>> +
>> +The Samsung Exynos542x SoC has NoC (Network on Chip) Probe for NoC bus.
>> +NoC provides the primitive values to get the performance data. The packets
>> +that the Network on Chip (NoC) probes detects are transported over
>> +the network infrastructure to observer units. You can configure probes to
>> +capture packets with header or data on the data request response network,
>> +or as traffic debug or statistic collectors. Exynos542x bus has multiple
>> +NoC probes to provide bandwidth information about behavior of the SoC
>> +that you can use while analyzing system performance.
>> +
>> +Required properties:
>> +- compatible: Should be "samsung,exynos5420-nocp"
>> +- reg: physical base address of each NoC Probe and length of memory mapped 
>> region.
>> +
>> +Optional properties:
>> +- clock-names : the name of clock used by the NoC Probe, "nocp"
>> +- clocks : phandles for clock specified in "clock-names" property
>> +
>> +Example1 : NoC Probe nodes in exynos5420.dtsi are listed below.
>> +
>> +nocp_mem0_0: nocp_mem0_0@10CA1000 {
>> +compatible = "samsung,exynos5420-nocp";
>> +reg = <0x10CA1000 0x200>;
>> +status = "disabled";
>> +};
>> +
>> +nocp_mem0_1: nocp_mem0_1@10CA1400 {
>> +compatible = "samsung,exynos5420-nocp";
>> +reg = <0x10CA1400 0x200>;
>> +status = "disabled";
>> +};
>> +
>> +nocp_mem0_2: nocp_mem0_2@10CA1800 {
>> +compatible = "samsung,exynos5420-nocp";
>> +reg = <0x10CA1800 0x200>;
>> +status = "disabled";
>> +};
>> +
>> +nocp_mem0_3: nocp_mem0_0@10CA1C00 {
>> +compatible = "samsung,exynos5420-nocp";
>> +reg = <0x10CA1C00 0x200>;
>> +status = "disabled";
>> +};
>> +
>> +nocp_g3d_0: nocp_g3d_0@11A51000 {
>> +compatible = "samsung,exynos5420-nocp";
>> +reg = <0x11A51000 0x200>;
>> +status = "disabled";
>> +};
>> +
>> +nocp_g3d_1: nocp_g3d_1@11A51400 {
>> +compatible = "samsung,exynos5420-nocp";
>> +reg = <0x11A51400 0x200>;
>> +status = "disabled";
>> +};
>> +
>> +
>> +Example2 : Events of each NoC Probe node in exynos5422-odroidxu3-common.dtsi
>> +are listed below.
>> +
>> +
>> +_mem0_0 {
>> +status = "okay";
>> +};
>> +
>> +_mem0_1 {
>> +status = "okay";
>> +};
>> +
>> +_mem0_2 {
>> +status = "okay";
>> +};
>> +
>> +_mem0_3 {
>> +status = "okay";
>> +};
>> +
>> +_g3d_0 {
>> +status = "okay";
>> +};
>> +
>> +_g3d_1 {
>> +status = "okay";
>> +};
> 
> I think this split in documentation between DTSI and DTS is not needed
> for example. Just add one example without the status and it should be
> sufficient to get the idea.

I'll modify it as following:

Example1 : NoC Probe nodes in Device Tree are listed below.

nocp_mem0_0: nocp@10CA1000 {
compatible = "samsung,exynos5420-nocp";
reg = <0x10CA1000 0x200>;
};

> 
>> diff --git a/drivers/devfreq/event/Kconfig b/drivers/devfreq/event/Kconfig
>> index a11720affc31..1e8b4f469f38 100644
>> --- a/drivers/devfreq/event/Kconfig
>> +++ b/drivers/devfreq/event/Kconfig
>> @@ -13,6 +13,14 @@ menuconfig PM_DEVFREQ_EVENT
>>  
>>  if PM_DEVFREQ_EVENT
>>  
>> +config DEVFREQ_EVENT_EXYNOS_NOCP
>> +bool "EXYNOS 

Re: [PATCH 1/7] PM / devfreq: event: Add new Exynos NoC probe driver

2016-04-14 Thread Chanwoo Choi
On 2016년 04월 12일 17:07, Krzysztof Kozlowski wrote:
> On 04/08/2016 07:00 AM, Chanwoo Choi wrote:
>> This patch adds NoC (Network on Chip) Probe driver which provides
>> the primitive values to get the performance data. The packets that the 
>> Network
>> on Chip (NoC) probes detects are transported over the network infrastructure.
>> Exynos542x bus has multiple NoC probes to provide bandwidth information about
>> behavior of the SoC that you can use while analyzing system performance.
>>
>> Signed-off-by: Chanwoo Choi 
>> ---
>>  .../bindings/devfreq/event/exynos-nocp.txt |  86 +++
>>  drivers/devfreq/event/Kconfig  |   8 +
>>  drivers/devfreq/event/Makefile |   2 +
>>  drivers/devfreq/event/exynos-nocp.c| 247 
>> +
>>  drivers/devfreq/event/exynos-nocp.h|  78 +++
>>  5 files changed, 421 insertions(+)
>>  create mode 100644 
>> Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
>>  create mode 100644 drivers/devfreq/event/exynos-nocp.c
>>  create mode 100644 drivers/devfreq/event/exynos-nocp.h
>>
>> diff --git a/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt 
>> b/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
>> new file mode 100644
>> index ..03b74fed034c
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
>> @@ -0,0 +1,86 @@
>> +
>> +* Samsung Exynos NoC (Network on Chip) Probe device
>> +
>> +The Samsung Exynos542x SoC has NoC (Network on Chip) Probe for NoC bus.
>> +NoC provides the primitive values to get the performance data. The packets
>> +that the Network on Chip (NoC) probes detects are transported over
>> +the network infrastructure to observer units. You can configure probes to
>> +capture packets with header or data on the data request response network,
>> +or as traffic debug or statistic collectors. Exynos542x bus has multiple
>> +NoC probes to provide bandwidth information about behavior of the SoC
>> +that you can use while analyzing system performance.
>> +
>> +Required properties:
>> +- compatible: Should be "samsung,exynos5420-nocp"
>> +- reg: physical base address of each NoC Probe and length of memory mapped 
>> region.
>> +
>> +Optional properties:
>> +- clock-names : the name of clock used by the NoC Probe, "nocp"
>> +- clocks : phandles for clock specified in "clock-names" property
>> +
>> +Example1 : NoC Probe nodes in exynos5420.dtsi are listed below.
>> +
>> +nocp_mem0_0: nocp_mem0_0@10CA1000 {
>> +compatible = "samsung,exynos5420-nocp";
>> +reg = <0x10CA1000 0x200>;
>> +status = "disabled";
>> +};
>> +
>> +nocp_mem0_1: nocp_mem0_1@10CA1400 {
>> +compatible = "samsung,exynos5420-nocp";
>> +reg = <0x10CA1400 0x200>;
>> +status = "disabled";
>> +};
>> +
>> +nocp_mem0_2: nocp_mem0_2@10CA1800 {
>> +compatible = "samsung,exynos5420-nocp";
>> +reg = <0x10CA1800 0x200>;
>> +status = "disabled";
>> +};
>> +
>> +nocp_mem0_3: nocp_mem0_0@10CA1C00 {
>> +compatible = "samsung,exynos5420-nocp";
>> +reg = <0x10CA1C00 0x200>;
>> +status = "disabled";
>> +};
>> +
>> +nocp_g3d_0: nocp_g3d_0@11A51000 {
>> +compatible = "samsung,exynos5420-nocp";
>> +reg = <0x11A51000 0x200>;
>> +status = "disabled";
>> +};
>> +
>> +nocp_g3d_1: nocp_g3d_1@11A51400 {
>> +compatible = "samsung,exynos5420-nocp";
>> +reg = <0x11A51400 0x200>;
>> +status = "disabled";
>> +};
>> +
>> +
>> +Example2 : Events of each NoC Probe node in exynos5422-odroidxu3-common.dtsi
>> +are listed below.
>> +
>> +
>> +_mem0_0 {
>> +status = "okay";
>> +};
>> +
>> +_mem0_1 {
>> +status = "okay";
>> +};
>> +
>> +_mem0_2 {
>> +status = "okay";
>> +};
>> +
>> +_mem0_3 {
>> +status = "okay";
>> +};
>> +
>> +_g3d_0 {
>> +status = "okay";
>> +};
>> +
>> +_g3d_1 {
>> +status = "okay";
>> +};
> 
> I think this split in documentation between DTSI and DTS is not needed
> for example. Just add one example without the status and it should be
> sufficient to get the idea.

I'll modify it as following:

Example1 : NoC Probe nodes in Device Tree are listed below.

nocp_mem0_0: nocp@10CA1000 {
compatible = "samsung,exynos5420-nocp";
reg = <0x10CA1000 0x200>;
};

> 
>> diff --git a/drivers/devfreq/event/Kconfig b/drivers/devfreq/event/Kconfig
>> index a11720affc31..1e8b4f469f38 100644
>> --- a/drivers/devfreq/event/Kconfig
>> +++ b/drivers/devfreq/event/Kconfig
>> @@ -13,6 +13,14 @@ menuconfig PM_DEVFREQ_EVENT
>>  
>>  if PM_DEVFREQ_EVENT
>>  
>> +config DEVFREQ_EVENT_EXYNOS_NOCP
>> +bool "EXYNOS NoC (Network On Chip) 

Re: [PATCH 1/7] PM / devfreq: event: Add new Exynos NoC probe driver

2016-04-12 Thread Krzysztof Kozlowski
On 04/08/2016 07:00 AM, Chanwoo Choi wrote:
> This patch adds NoC (Network on Chip) Probe driver which provides
> the primitive values to get the performance data. The packets that the Network
> on Chip (NoC) probes detects are transported over the network infrastructure.
> Exynos542x bus has multiple NoC probes to provide bandwidth information about
> behavior of the SoC that you can use while analyzing system performance.
> 
> Signed-off-by: Chanwoo Choi 
> ---
>  .../bindings/devfreq/event/exynos-nocp.txt |  86 +++
>  drivers/devfreq/event/Kconfig  |   8 +
>  drivers/devfreq/event/Makefile |   2 +
>  drivers/devfreq/event/exynos-nocp.c| 247 
> +
>  drivers/devfreq/event/exynos-nocp.h|  78 +++
>  5 files changed, 421 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
>  create mode 100644 drivers/devfreq/event/exynos-nocp.c
>  create mode 100644 drivers/devfreq/event/exynos-nocp.h
> 
> diff --git a/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt 
> b/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
> new file mode 100644
> index ..03b74fed034c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
> @@ -0,0 +1,86 @@
> +
> +* Samsung Exynos NoC (Network on Chip) Probe device
> +
> +The Samsung Exynos542x SoC has NoC (Network on Chip) Probe for NoC bus.
> +NoC provides the primitive values to get the performance data. The packets
> +that the Network on Chip (NoC) probes detects are transported over
> +the network infrastructure to observer units. You can configure probes to
> +capture packets with header or data on the data request response network,
> +or as traffic debug or statistic collectors. Exynos542x bus has multiple
> +NoC probes to provide bandwidth information about behavior of the SoC
> +that you can use while analyzing system performance.
> +
> +Required properties:
> +- compatible: Should be "samsung,exynos5420-nocp"
> +- reg: physical base address of each NoC Probe and length of memory mapped 
> region.
> +
> +Optional properties:
> +- clock-names : the name of clock used by the NoC Probe, "nocp"
> +- clocks : phandles for clock specified in "clock-names" property
> +
> +Example1 : NoC Probe nodes in exynos5420.dtsi are listed below.
> +
> + nocp_mem0_0: nocp_mem0_0@10CA1000 {
> + compatible = "samsung,exynos5420-nocp";
> + reg = <0x10CA1000 0x200>;
> + status = "disabled";
> + };
> +
> + nocp_mem0_1: nocp_mem0_1@10CA1400 {
> + compatible = "samsung,exynos5420-nocp";
> + reg = <0x10CA1400 0x200>;
> + status = "disabled";
> + };
> +
> + nocp_mem0_2: nocp_mem0_2@10CA1800 {
> + compatible = "samsung,exynos5420-nocp";
> + reg = <0x10CA1800 0x200>;
> + status = "disabled";
> + };
> +
> + nocp_mem0_3: nocp_mem0_0@10CA1C00 {
> + compatible = "samsung,exynos5420-nocp";
> + reg = <0x10CA1C00 0x200>;
> + status = "disabled";
> + };
> +
> + nocp_g3d_0: nocp_g3d_0@11A51000 {
> + compatible = "samsung,exynos5420-nocp";
> + reg = <0x11A51000 0x200>;
> + status = "disabled";
> + };
> +
> + nocp_g3d_1: nocp_g3d_1@11A51400 {
> + compatible = "samsung,exynos5420-nocp";
> + reg = <0x11A51400 0x200>;
> + status = "disabled";
> + };
> +
> +
> +Example2 : Events of each NoC Probe node in exynos5422-odroidxu3-common.dtsi
> + are listed below.
> +
> +
> + _mem0_0 {
> + status = "okay";
> + };
> +
> + _mem0_1 {
> + status = "okay";
> + };
> +
> + _mem0_2 {
> + status = "okay";
> + };
> +
> + _mem0_3 {
> + status = "okay";
> + };
> +
> + _g3d_0 {
> + status = "okay";
> + };
> +
> + _g3d_1 {
> + status = "okay";
> + };

I think this split in documentation between DTSI and DTS is not needed
for example. Just add one example without the status and it should be
sufficient to get the idea.

> diff --git a/drivers/devfreq/event/Kconfig b/drivers/devfreq/event/Kconfig
> index a11720affc31..1e8b4f469f38 100644
> --- a/drivers/devfreq/event/Kconfig
> +++ b/drivers/devfreq/event/Kconfig
> @@ -13,6 +13,14 @@ menuconfig PM_DEVFREQ_EVENT
>  
>  if PM_DEVFREQ_EVENT
>  
> +config DEVFREQ_EVENT_EXYNOS_NOCP
> + bool "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver"
> + depends on ARCH_EXYNOS
> + select PM_OPP
> + help
> +   This add the devfreq-event driver for Exynos SoC. It provides NoC
> +   (Network on Chip) Probe counters to measure the bandwidth of AXI bus.
> +
>  config DEVFREQ_EVENT_EXYNOS_PPMU
>   bool "EXYNOS PPMU (Platform Performance Monitoring Unit) 

Re: [PATCH 1/7] PM / devfreq: event: Add new Exynos NoC probe driver

2016-04-12 Thread Krzysztof Kozlowski
On 04/08/2016 07:00 AM, Chanwoo Choi wrote:
> This patch adds NoC (Network on Chip) Probe driver which provides
> the primitive values to get the performance data. The packets that the Network
> on Chip (NoC) probes detects are transported over the network infrastructure.
> Exynos542x bus has multiple NoC probes to provide bandwidth information about
> behavior of the SoC that you can use while analyzing system performance.
> 
> Signed-off-by: Chanwoo Choi 
> ---
>  .../bindings/devfreq/event/exynos-nocp.txt |  86 +++
>  drivers/devfreq/event/Kconfig  |   8 +
>  drivers/devfreq/event/Makefile |   2 +
>  drivers/devfreq/event/exynos-nocp.c| 247 
> +
>  drivers/devfreq/event/exynos-nocp.h|  78 +++
>  5 files changed, 421 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
>  create mode 100644 drivers/devfreq/event/exynos-nocp.c
>  create mode 100644 drivers/devfreq/event/exynos-nocp.h
> 
> diff --git a/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt 
> b/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
> new file mode 100644
> index ..03b74fed034c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
> @@ -0,0 +1,86 @@
> +
> +* Samsung Exynos NoC (Network on Chip) Probe device
> +
> +The Samsung Exynos542x SoC has NoC (Network on Chip) Probe for NoC bus.
> +NoC provides the primitive values to get the performance data. The packets
> +that the Network on Chip (NoC) probes detects are transported over
> +the network infrastructure to observer units. You can configure probes to
> +capture packets with header or data on the data request response network,
> +or as traffic debug or statistic collectors. Exynos542x bus has multiple
> +NoC probes to provide bandwidth information about behavior of the SoC
> +that you can use while analyzing system performance.
> +
> +Required properties:
> +- compatible: Should be "samsung,exynos5420-nocp"
> +- reg: physical base address of each NoC Probe and length of memory mapped 
> region.
> +
> +Optional properties:
> +- clock-names : the name of clock used by the NoC Probe, "nocp"
> +- clocks : phandles for clock specified in "clock-names" property
> +
> +Example1 : NoC Probe nodes in exynos5420.dtsi are listed below.
> +
> + nocp_mem0_0: nocp_mem0_0@10CA1000 {
> + compatible = "samsung,exynos5420-nocp";
> + reg = <0x10CA1000 0x200>;
> + status = "disabled";
> + };
> +
> + nocp_mem0_1: nocp_mem0_1@10CA1400 {
> + compatible = "samsung,exynos5420-nocp";
> + reg = <0x10CA1400 0x200>;
> + status = "disabled";
> + };
> +
> + nocp_mem0_2: nocp_mem0_2@10CA1800 {
> + compatible = "samsung,exynos5420-nocp";
> + reg = <0x10CA1800 0x200>;
> + status = "disabled";
> + };
> +
> + nocp_mem0_3: nocp_mem0_0@10CA1C00 {
> + compatible = "samsung,exynos5420-nocp";
> + reg = <0x10CA1C00 0x200>;
> + status = "disabled";
> + };
> +
> + nocp_g3d_0: nocp_g3d_0@11A51000 {
> + compatible = "samsung,exynos5420-nocp";
> + reg = <0x11A51000 0x200>;
> + status = "disabled";
> + };
> +
> + nocp_g3d_1: nocp_g3d_1@11A51400 {
> + compatible = "samsung,exynos5420-nocp";
> + reg = <0x11A51400 0x200>;
> + status = "disabled";
> + };
> +
> +
> +Example2 : Events of each NoC Probe node in exynos5422-odroidxu3-common.dtsi
> + are listed below.
> +
> +
> + _mem0_0 {
> + status = "okay";
> + };
> +
> + _mem0_1 {
> + status = "okay";
> + };
> +
> + _mem0_2 {
> + status = "okay";
> + };
> +
> + _mem0_3 {
> + status = "okay";
> + };
> +
> + _g3d_0 {
> + status = "okay";
> + };
> +
> + _g3d_1 {
> + status = "okay";
> + };

I think this split in documentation between DTSI and DTS is not needed
for example. Just add one example without the status and it should be
sufficient to get the idea.

> diff --git a/drivers/devfreq/event/Kconfig b/drivers/devfreq/event/Kconfig
> index a11720affc31..1e8b4f469f38 100644
> --- a/drivers/devfreq/event/Kconfig
> +++ b/drivers/devfreq/event/Kconfig
> @@ -13,6 +13,14 @@ menuconfig PM_DEVFREQ_EVENT
>  
>  if PM_DEVFREQ_EVENT
>  
> +config DEVFREQ_EVENT_EXYNOS_NOCP
> + bool "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver"
> + depends on ARCH_EXYNOS
> + select PM_OPP
> + help
> +   This add the devfreq-event driver for Exynos SoC. It provides NoC
> +   (Network on Chip) Probe counters to measure the bandwidth of AXI bus.
> +
>  config DEVFREQ_EVENT_EXYNOS_PPMU
>   bool "EXYNOS PPMU (Platform Performance Monitoring Unit) DEVFREQ event 
> Driver"

[PATCH 1/7] PM / devfreq: event: Add new Exynos NoC probe driver

2016-04-07 Thread Chanwoo Choi
This patch adds NoC (Network on Chip) Probe driver which provides
the primitive values to get the performance data. The packets that the Network
on Chip (NoC) probes detects are transported over the network infrastructure.
Exynos542x bus has multiple NoC probes to provide bandwidth information about
behavior of the SoC that you can use while analyzing system performance.

Signed-off-by: Chanwoo Choi 
---
 .../bindings/devfreq/event/exynos-nocp.txt |  86 +++
 drivers/devfreq/event/Kconfig  |   8 +
 drivers/devfreq/event/Makefile |   2 +
 drivers/devfreq/event/exynos-nocp.c| 247 +
 drivers/devfreq/event/exynos-nocp.h|  78 +++
 5 files changed, 421 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
 create mode 100644 drivers/devfreq/event/exynos-nocp.c
 create mode 100644 drivers/devfreq/event/exynos-nocp.h

diff --git a/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt 
b/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
new file mode 100644
index ..03b74fed034c
--- /dev/null
+++ b/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
@@ -0,0 +1,86 @@
+
+* Samsung Exynos NoC (Network on Chip) Probe device
+
+The Samsung Exynos542x SoC has NoC (Network on Chip) Probe for NoC bus.
+NoC provides the primitive values to get the performance data. The packets
+that the Network on Chip (NoC) probes detects are transported over
+the network infrastructure to observer units. You can configure probes to
+capture packets with header or data on the data request response network,
+or as traffic debug or statistic collectors. Exynos542x bus has multiple
+NoC probes to provide bandwidth information about behavior of the SoC
+that you can use while analyzing system performance.
+
+Required properties:
+- compatible: Should be "samsung,exynos5420-nocp"
+- reg: physical base address of each NoC Probe and length of memory mapped 
region.
+
+Optional properties:
+- clock-names : the name of clock used by the NoC Probe, "nocp"
+- clocks : phandles for clock specified in "clock-names" property
+
+Example1 : NoC Probe nodes in exynos5420.dtsi are listed below.
+
+   nocp_mem0_0: nocp_mem0_0@10CA1000 {
+   compatible = "samsung,exynos5420-nocp";
+   reg = <0x10CA1000 0x200>;
+   status = "disabled";
+   };
+
+   nocp_mem0_1: nocp_mem0_1@10CA1400 {
+   compatible = "samsung,exynos5420-nocp";
+   reg = <0x10CA1400 0x200>;
+   status = "disabled";
+   };
+
+   nocp_mem0_2: nocp_mem0_2@10CA1800 {
+   compatible = "samsung,exynos5420-nocp";
+   reg = <0x10CA1800 0x200>;
+   status = "disabled";
+   };
+
+   nocp_mem0_3: nocp_mem0_0@10CA1C00 {
+   compatible = "samsung,exynos5420-nocp";
+   reg = <0x10CA1C00 0x200>;
+   status = "disabled";
+   };
+
+   nocp_g3d_0: nocp_g3d_0@11A51000 {
+   compatible = "samsung,exynos5420-nocp";
+   reg = <0x11A51000 0x200>;
+   status = "disabled";
+   };
+
+   nocp_g3d_1: nocp_g3d_1@11A51400 {
+   compatible = "samsung,exynos5420-nocp";
+   reg = <0x11A51400 0x200>;
+   status = "disabled";
+   };
+
+
+Example2 : Events of each NoC Probe node in exynos5422-odroidxu3-common.dtsi
+   are listed below.
+
+
+   _mem0_0 {
+   status = "okay";
+   };
+
+   _mem0_1 {
+   status = "okay";
+   };
+
+   _mem0_2 {
+   status = "okay";
+   };
+
+   _mem0_3 {
+   status = "okay";
+   };
+
+   _g3d_0 {
+   status = "okay";
+   };
+
+   _g3d_1 {
+   status = "okay";
+   };
diff --git a/drivers/devfreq/event/Kconfig b/drivers/devfreq/event/Kconfig
index a11720affc31..1e8b4f469f38 100644
--- a/drivers/devfreq/event/Kconfig
+++ b/drivers/devfreq/event/Kconfig
@@ -13,6 +13,14 @@ menuconfig PM_DEVFREQ_EVENT
 
 if PM_DEVFREQ_EVENT
 
+config DEVFREQ_EVENT_EXYNOS_NOCP
+   bool "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver"
+   depends on ARCH_EXYNOS
+   select PM_OPP
+   help
+ This add the devfreq-event driver for Exynos SoC. It provides NoC
+ (Network on Chip) Probe counters to measure the bandwidth of AXI bus.
+
 config DEVFREQ_EVENT_EXYNOS_PPMU
bool "EXYNOS PPMU (Platform Performance Monitoring Unit) DEVFREQ event 
Driver"
depends on ARCH_EXYNOS
diff --git a/drivers/devfreq/event/Makefile b/drivers/devfreq/event/Makefile
index be146ead79cf..3d6afd352253 100644
--- a/drivers/devfreq/event/Makefile
+++ b/drivers/devfreq/event/Makefile
@@ -1,2 +1,4 @@
 # Exynos DEVFREQ Event Drivers
+
+obj-$(CONFIG_DEVFREQ_EVENT_EXYNOS_NOCP) += exynos-nocp.o
 

[PATCH 1/7] PM / devfreq: event: Add new Exynos NoC probe driver

2016-04-07 Thread Chanwoo Choi
This patch adds NoC (Network on Chip) Probe driver which provides
the primitive values to get the performance data. The packets that the Network
on Chip (NoC) probes detects are transported over the network infrastructure.
Exynos542x bus has multiple NoC probes to provide bandwidth information about
behavior of the SoC that you can use while analyzing system performance.

Signed-off-by: Chanwoo Choi 
---
 .../bindings/devfreq/event/exynos-nocp.txt |  86 +++
 drivers/devfreq/event/Kconfig  |   8 +
 drivers/devfreq/event/Makefile |   2 +
 drivers/devfreq/event/exynos-nocp.c| 247 +
 drivers/devfreq/event/exynos-nocp.h|  78 +++
 5 files changed, 421 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
 create mode 100644 drivers/devfreq/event/exynos-nocp.c
 create mode 100644 drivers/devfreq/event/exynos-nocp.h

diff --git a/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt 
b/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
new file mode 100644
index ..03b74fed034c
--- /dev/null
+++ b/Documentation/devicetree/bindings/devfreq/event/exynos-nocp.txt
@@ -0,0 +1,86 @@
+
+* Samsung Exynos NoC (Network on Chip) Probe device
+
+The Samsung Exynos542x SoC has NoC (Network on Chip) Probe for NoC bus.
+NoC provides the primitive values to get the performance data. The packets
+that the Network on Chip (NoC) probes detects are transported over
+the network infrastructure to observer units. You can configure probes to
+capture packets with header or data on the data request response network,
+or as traffic debug or statistic collectors. Exynos542x bus has multiple
+NoC probes to provide bandwidth information about behavior of the SoC
+that you can use while analyzing system performance.
+
+Required properties:
+- compatible: Should be "samsung,exynos5420-nocp"
+- reg: physical base address of each NoC Probe and length of memory mapped 
region.
+
+Optional properties:
+- clock-names : the name of clock used by the NoC Probe, "nocp"
+- clocks : phandles for clock specified in "clock-names" property
+
+Example1 : NoC Probe nodes in exynos5420.dtsi are listed below.
+
+   nocp_mem0_0: nocp_mem0_0@10CA1000 {
+   compatible = "samsung,exynos5420-nocp";
+   reg = <0x10CA1000 0x200>;
+   status = "disabled";
+   };
+
+   nocp_mem0_1: nocp_mem0_1@10CA1400 {
+   compatible = "samsung,exynos5420-nocp";
+   reg = <0x10CA1400 0x200>;
+   status = "disabled";
+   };
+
+   nocp_mem0_2: nocp_mem0_2@10CA1800 {
+   compatible = "samsung,exynos5420-nocp";
+   reg = <0x10CA1800 0x200>;
+   status = "disabled";
+   };
+
+   nocp_mem0_3: nocp_mem0_0@10CA1C00 {
+   compatible = "samsung,exynos5420-nocp";
+   reg = <0x10CA1C00 0x200>;
+   status = "disabled";
+   };
+
+   nocp_g3d_0: nocp_g3d_0@11A51000 {
+   compatible = "samsung,exynos5420-nocp";
+   reg = <0x11A51000 0x200>;
+   status = "disabled";
+   };
+
+   nocp_g3d_1: nocp_g3d_1@11A51400 {
+   compatible = "samsung,exynos5420-nocp";
+   reg = <0x11A51400 0x200>;
+   status = "disabled";
+   };
+
+
+Example2 : Events of each NoC Probe node in exynos5422-odroidxu3-common.dtsi
+   are listed below.
+
+
+   _mem0_0 {
+   status = "okay";
+   };
+
+   _mem0_1 {
+   status = "okay";
+   };
+
+   _mem0_2 {
+   status = "okay";
+   };
+
+   _mem0_3 {
+   status = "okay";
+   };
+
+   _g3d_0 {
+   status = "okay";
+   };
+
+   _g3d_1 {
+   status = "okay";
+   };
diff --git a/drivers/devfreq/event/Kconfig b/drivers/devfreq/event/Kconfig
index a11720affc31..1e8b4f469f38 100644
--- a/drivers/devfreq/event/Kconfig
+++ b/drivers/devfreq/event/Kconfig
@@ -13,6 +13,14 @@ menuconfig PM_DEVFREQ_EVENT
 
 if PM_DEVFREQ_EVENT
 
+config DEVFREQ_EVENT_EXYNOS_NOCP
+   bool "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver"
+   depends on ARCH_EXYNOS
+   select PM_OPP
+   help
+ This add the devfreq-event driver for Exynos SoC. It provides NoC
+ (Network on Chip) Probe counters to measure the bandwidth of AXI bus.
+
 config DEVFREQ_EVENT_EXYNOS_PPMU
bool "EXYNOS PPMU (Platform Performance Monitoring Unit) DEVFREQ event 
Driver"
depends on ARCH_EXYNOS
diff --git a/drivers/devfreq/event/Makefile b/drivers/devfreq/event/Makefile
index be146ead79cf..3d6afd352253 100644
--- a/drivers/devfreq/event/Makefile
+++ b/drivers/devfreq/event/Makefile
@@ -1,2 +1,4 @@
 # Exynos DEVFREQ Event Drivers
+
+obj-$(CONFIG_DEVFREQ_EVENT_EXYNOS_NOCP) += exynos-nocp.o