From: Tomasz Figa <tomasz.figa@gmail.com>
To: Kyungmin Park <kmpark@infradead.org>, Tomasz Figa <t.figa@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>,
Mark Rutland <mark.rutland@arm.com>,
"myungjoo.ham@samsung.com" <myungjoo.ham@samsung.com>,
"rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
"nm@ti.com" <nm@ti.com>,
"b.zolnierkie@samsaung.com" <b.zolnierkie@samsaung.com>,
Pawel Moll <Pawel.Moll@arm.com>,
"swarren@wwwdotorg.org" <swarren@wwwdotorg.org>,
"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: Re: [PATCHv2 8/8] devfreq: exynos4: Add busfreq driver for exynos4210/exynos4x12
Date: Sat, 15 Mar 2014 13:41:44 +0100 [thread overview]
Message-ID: <53244A88.9070806@gmail.com> (raw)
In-Reply-To: <CAH9JG2WV-y+9wMyu0_6WSRXMWZmCWmxHnWot9APKUo6eFkZS5A@mail.gmail.com>
On 15.03.2014 12:36, Kyungmin Park wrote:
> On Sat, Mar 15, 2014 at 2:35 AM, Tomasz Figa <t.figa@samsung.com> wrote:
>> Hi Chanwoo, Mark,
>>
>>
>> On 14.03.2014 11:56, Chanwoo Choi wrote:
>>>
>>> Hi Mark,
>>>
>>> On 03/14/2014 07:35 PM, Mark Rutland wrote:
>>>>
>>>> On Fri, Mar 14, 2014 at 07:14:37AM +0000, Chanwoo Choi wrote:
>>>>>
>>>>> Hi Mark,
>>>>>
>>>>> On 03/14/2014 02:53 AM, Mark Rutland wrote:
>>>>>>
>>>>>> On Thu, Mar 13, 2014 at 08:17:29AM +0000, Chanwoo Choi wrote:
>>>>>>>
>>>>>>> This patch add busfreq driver for Exynos4210/Exynos4x12 memory
>>>>>>> interface
>>>>>>> and bus to support DVFS(Dynamic Voltage Frequency Scaling) according
>>>>>>> to PPMU
>>>>>>> counters. PPMU (Performance Profiling Monitorings Units) of Exynos4
>>>>>>> SoC provides
>>>>>>> PPMU counters for DMC(Dynamic Memory Controller) to check memory bus
>>>>>>> utilization
>>>>>>> and then busfreq driver adjusts dynamically the operating
>>>>>>> frequency/voltage
>>>>>>> by using DEVFREQ Subsystem.
>>>>>>>
>>>>>>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>>>>>>> ---
>>>>>>> .../devicetree/bindings/devfreq/exynos4_bus.txt | 49
>>>>>>> ++++++++++++++++++++++
>>>>>>> 1 file changed, 49 insertions(+)
>>>>>>> create mode 100644
>>>>>>> Documentation/devicetree/bindings/devfreq/exynos4_bus.txt
>>>>>>>
>>>>>>> diff --git a/Documentation/devicetree/bindings/devfreq/exynos4_bus.txt
>>>>>>> b/Documentation/devicetree/bindings/devfreq/exynos4_bus.txt
>>>>>>> new file mode 100644
>>>>>>> index 0000000..2a83fcc
>>>>>>> --- /dev/null
>>>>>>> +++ b/Documentation/devicetree/bindings/devfreq/exynos4_bus.txt
>>>>>>> @@ -0,0 +1,49 @@
>>>>>>> +
>>>>>>> +Exynos4210/4x12 busfreq driver
>>>>>>> +-----------------------------
>>>>>>> +
>>>>>>> +Exynos4210/4x12 Soc busfreq driver with devfreq for Memory bus
>>>>>>> frequency/voltage
>>>>>>> +scaling according to PPMU counters of memory controllers
>>>>>>> +
>>>>>>> +Required properties:
>>>>>>> +- compatible : should contain Exynos4 SoC type as follwoing:
>>>>>>> + - "samsung,exynos4x12-busfreq" for Exynos4x12
>>>>>>> + - "samsung,exynos4210-busfreq" for Exynos4210
>>>>>>
>>>>>>
>>>>>> Is there a device called "busfreq"? What device does this binding
>>>>>> describe?
>>>>>
>>>>>
>>>>> I'll add detailed description of busfreq as following:
>>>>>
>>>>> "busfreq(bus frequendcy)" driver means that busfreq driver control
>>>>> dynamically
>>>>> memory bus frequency/voltage by checking memory bus utilization to
>>>>> optimize
>>>>> power-consumption. When checking memeory bus utilization,
>>>>> exynos4_busfreq driver
>>>>> would use PPMU(Performance Profiling Monitoring Units).
>>>>
>>>>
>>>> This still sounds like a description of the _driver_, not the _device_.
>>>> The binding should describe the hardware, now the high level abstraction
>>>> that software is going to build atop of it.
>>>>
>>>> It sounds like this is a binding for the DMC PPMU?
>>>>
>>>> Is the PPMU a component of the DMC, or is it bolted on the side?
>>>
>>>
>>> PPMU(Performance Profiling Monitoring Unit) is to profile performance
>>> event of
>>> various IP on Exynos4. Each PPMU provide perforamnce event for each IP.
>>> We can check various PPMU as following:
>>>
>>> PPMU_3D
>>> PPMU_ACP
>>> PPMU_CAMIF
>>> PPMU_CPU
>>> PPMU_DMC0
>>> PPMU_DMC1
>>> PPMU_FSYS
>>> PPMU_IMAGE
>>> PPMU_LCD0
>>> PPMU_LCD1
>>> PPMU_MFC_L
>>> PPMU_MFC_R
>>> PPMU_TV
>>> PPMU_LEFT_BUS
>>> PPMU_RIGHT_BUS
>>>
>>> DMC (Dynamic Memory Controller) control the operation of DRAM in Exynos4
>>> SoC.
>>> If we need to get memory bust utilization of DMC, we can get memory bus
>>> utilization
>>> from PPMU_DMC0/PPMU_DMC1.
>>>
>>> So, Exynos4's busfreq used two(PPMU_DMC0/PPMU_DMC1) among upper various
>>> PPMU list.
>>
>>
>> Well, PPMUs and DMCs are separate hardware blocks found inside Exynos SoCs.
>> Busfreq/devfreq is just a Linux-specific abstraction responsible for
>> collecting data using PPMUs and controlling frequencies and voltages of
>> appropriate power planes, vdd_int responsible for powering DMC0 and DMC1
>> blocks in this case.
>>
>> I'm afraid that the binding you're proposing is unfortunately incorrect,
>> because it represents the software abstraction, not the real hardware.
>>
>> Instead, this should be separated into several independent bindings:
>>
>> - PPMU bindings to list all the PPMU instances present in the SoC and
>> resources they need,
>>
>> - power plane bindings, which define a power plane in which multiple IP
>> blocks might reside, can be monitored by one or more PPMU units and
>> frequency and voltage of which can be configured according to determined
>> performance level. Needed resources will be clocks and regulators to scale
>> and probably also operating points.
>>
>> Then, exynos-busfreq driver should bind to such power planes, parse
>> necessary data from DT (list of PPMUs and IP blocks, clocks, regulators and
>> operating points) and register a devfreq entity.
>
> How about to use component DT like DRM?
Well, basically this is what I proposed. Each "power plane" would be a
"subsystem" built from components - PPMUs, IP blocks, clocks,
regulators, etc, specified in DT by existing means, e.g.
ppmu_disp: ppmu@12340000 {
/* Resources of PPMU */
}
fimd: fimd@23450000 {
/* Resources of FIMD */
};
power-plane-display {
compatible = "samsung,power-plane";
samsung,ppmus = <&ppmu_disp>, ...;
samsung,devices = <&fimd>, ...;
clock-names = "aclk_xxx", "sclk_xxx", ...;
clocks = ...;
vdd_xxx-supply = ...;
};
However I'm still wondering whether there shouldn't be a relation
between power planes and power domains and simply existing power domain
nodes shouldn't be extended with the data I put above in
power-plane-display node. I need to check this in the documentation back
at work on Monday.
Best regards,
Tomasz
next prev parent reply other threads:[~2014-03-15 12:41 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 8:17 [PATCHv2 0/8] devfreq: exynos4: Support dt and use common ppmu driver Chanwoo Choi
2014-03-13 8:17 ` [PATCHv2 1/8] devfreq: exynos4: Support devicetree to get device id of Exynos4 SoC Chanwoo Choi
2014-03-13 8:17 ` [PATCHv2 2/8] devfreq: exynos4: Use common ppmu driver and get ppmu address from dt data Chanwoo Choi
2014-03-13 8:17 ` [PATCHv2 3/8] devfreq: exynos4: Add ppmu's clock control and code clean about regulator control Chanwoo Choi
2014-03-14 17:42 ` Tomasz Figa
2014-03-17 2:51 ` Chanwoo Choi
2014-03-17 5:35 ` Chanwoo Choi
2014-03-17 5:59 ` Chanwoo Choi
2014-03-18 11:13 ` Tomasz Figa
2014-03-19 2:44 ` Chanwoo Choi
2014-03-13 8:17 ` [PATCHv2 4/8] devfreq: exynos4: Fix bug of resource leak and code clean on probe() Chanwoo Choi
2014-03-14 17:49 ` Tomasz Figa
2014-03-17 5:05 ` Chanwoo Choi
2014-03-18 12:18 ` Tomasz Figa
2014-03-19 2:46 ` Chanwoo Choi
2014-03-13 8:17 ` [PATCHv2 5/8] devfreq: exynos4: Use SET_SYSTEM_SLEEP_PM_OPS macro Chanwoo Choi
2014-03-13 8:17 ` [PATCHv2 6/8] devfreq: exynos4: Fix power-leakage of clock on suspend state Chanwoo Choi
2014-03-14 17:52 ` Tomasz Figa
2014-03-17 2:58 ` Chanwoo Choi
2014-03-13 8:17 ` [PATCHv2 7/8] devfreq: exynos4: Add CONFIG_PM_OPP dependency to fix probe fail Chanwoo Choi
2014-03-13 8:17 ` [PATCHv2 8/8] devfreq: exynos4: Add busfreq driver for exynos4210/exynos4x12 Chanwoo Choi
2014-03-13 16:50 ` Bartlomiej Zolnierkiewicz
2014-03-13 17:53 ` Mark Rutland
2014-03-14 7:14 ` Chanwoo Choi
2014-03-14 10:35 ` Mark Rutland
2014-03-14 10:56 ` Chanwoo Choi
2014-03-14 17:35 ` Tomasz Figa
2014-03-15 11:36 ` Kyungmin Park
2014-03-15 12:41 ` Tomasz Figa [this message]
2014-03-17 5:19 ` Chanwoo Choi
2014-03-18 15:46 ` Tomasz Figa
[not found] ` <53286A6C.5090108-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-19 9:47 ` Chanwoo Choi
2014-03-19 9:47 ` Chanwoo Choi
2014-03-19 10:23 ` Tomasz Figa
2014-03-13 16:43 ` [PATCHv2 0/8] devfreq: exynos4: Support dt and use common ppmu driver Bartlomiej Zolnierkiewicz
2014-03-14 3:14 ` Chanwoo Choi
2014-03-14 10:47 ` Bartlomiej Zolnierkiewicz
2014-03-17 1:56 ` Chanwoo Choi
2014-03-14 17:58 ` Tomasz Figa
2014-03-17 1:58 ` Chanwoo Choi
2014-03-18 15:47 ` Tomasz Figa
2014-07-09 13:06 ` Tomeu Vizoso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53244A88.9070806@gmail.com \
--to=tomasz.figa@gmail.com \
--cc=Pawel.Moll@arm.com \
--cc=b.zolnierkie@samsaung.com \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kmpark@infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=myungjoo.ham@samsung.com \
--cc=nm@ti.com \
--cc=rafael.j.wysocki@intel.com \
--cc=swarren@wwwdotorg.org \
--cc=t.figa@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.