diff mbox

[v4,1/2] dt: cpufreq: st: Provide bindings for ST's CPUFreq implementation

Message ID 1438010430-5802-1-git-send-email-lee.jones@linaro.org
State Under Review, archived
Headers show

Commit Message

Lee Jones July 27, 2015, 3:20 p.m. UTC
Cc: devicetree@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---

Changelog:
 - Using OPP-v2
 - Moved (and linked) a bunch of documentation to ../power/

 .../devicetree/bindings/cpufreq/cpufreq-st.txt     | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt

Comments

Viresh Kumar July 28, 2015, 2:23 a.m. UTC | #1
On 27-07-15, 16:20, Lee Jones wrote:
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> 
> Changelog:
>  - Using OPP-v2
>  - Moved (and linked) a bunch of documentation to ../power/
> 
>  .../devicetree/bindings/cpufreq/cpufreq-st.txt     | 40 ++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt
> 
> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt
> new file mode 100644
> index 0000000..79add9d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt
> @@ -0,0 +1,40 @@
> +Binding for ST's CPUFreq driver
> +===============================
> +
> +Frequency Scaling only
> +----------------------
> +
> +Located in CPU's node:
> +
> +- operating-points		: [See: ../power/opp.txt]
> +
> +Example [safe]
> +--------------
> +
> +cpus {
> +	cpu@0 {
> +				 /* kHz     uV   */
> +		operating-points = <1500000 0
> +				    1200000 0
> +				    800000  0
> +				    500000  0>;
> +	};
> +};
> +
> +Dynamic Voltage and Frequency Scaling (DVFS)
> +--------------------------------------------
> +
> +Located in CPU's node:
> +
> +- operating-points-v2-sti	: [See ../power/opp-st.txt]
> +
> +Example [unsafe]
> +----------------
> +
> +cpus {
> +	cpu@0 {
> +		operating-points-v2	= <[OPP list phandle]>;
> +	};
> +};
> +
> +For an example of an OPP list, see ../power/opp-st.txt.

I don't think you need this file/patch at all.. It is almost blank and
doesn't define a binding. And so there is no need to specify this at
all. Just an OPP binding file is enough.
Lee Jones July 28, 2015, 7:41 a.m. UTC | #2
On Tue, 28 Jul 2015, Viresh Kumar wrote:

> On 27-07-15, 16:20, Lee Jones wrote:
> > Cc: devicetree@vger.kernel.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> > 
> > Changelog:
> >  - Using OPP-v2
> >  - Moved (and linked) a bunch of documentation to ../power/
> > 
> >  .../devicetree/bindings/cpufreq/cpufreq-st.txt     | 40 ++++++++++++++++++++++
> >  1 file changed, 40 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt
> > new file mode 100644
> > index 0000000..79add9d
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt
> > @@ -0,0 +1,40 @@
> > +Binding for ST's CPUFreq driver
> > +===============================
> > +
> > +Frequency Scaling only
> > +----------------------
> > +
> > +Located in CPU's node:
> > +
> > +- operating-points		: [See: ../power/opp.txt]
> > +
> > +Example [safe]
> > +--------------
> > +
> > +cpus {
> > +	cpu@0 {
> > +				 /* kHz     uV   */
> > +		operating-points = <1500000 0
> > +				    1200000 0
> > +				    800000  0
> > +				    500000  0>;
> > +	};
> > +};
> > +
> > +Dynamic Voltage and Frequency Scaling (DVFS)
> > +--------------------------------------------
> > +
> > +Located in CPU's node:
> > +
> > +- operating-points-v2-sti	: [See ../power/opp-st.txt]
> > +
> > +Example [unsafe]
> > +----------------
> > +
> > +cpus {
> > +	cpu@0 {
> > +		operating-points-v2	= <[OPP list phandle]>;
> > +	};
> > +};
> > +
> > +For an example of an OPP list, see ../power/opp-st.txt.
> 
> I don't think you need this file/patch at all.. It is almost blank and
> doesn't define a binding. And so there is no need to specify this at
> all. Just an OPP binding file is enough.

I have two issues with that.  Firstly, although the driver uses the
OPP API (it also uses the Regulator and Clock API too), it is
fundamentally a CPUFreq driver, so I think it should have a CPUFreq
DT entry.  Secondly, if someone doesn't know the history of the
ST CPUFreq set, they will look here for an accompanying document.  I
personally wouldn't think to look in power/*opp* for a CPUFreq
binding.

Perhaps, as all of the CPUFreq drivers use the OPP API, everything
should be moved to drivers/base/power or drivers/power?
Viresh Kumar July 28, 2015, 7:50 a.m. UTC | #3
Cc'ing Rob as well..

On 28-07-15, 08:41, Lee Jones wrote:
> I have two issues with that.  Firstly, although the driver uses the
> OPP API (it also uses the Regulator and Clock API too), it is
> fundamentally a CPUFreq driver, so I think it should have a CPUFreq
> DT entry.  Secondly, if someone doesn't know the history of the
> ST CPUFreq set, they will look here for an accompanying document.  I
> personally wouldn't think to look in power/*opp* for a CPUFreq
> binding.
> 
> Perhaps, as all of the CPUFreq drivers use the OPP API, everything
> should be moved to drivers/base/power or drivers/power?

Okay, looks fine :)
Viresh Kumar July 28, 2015, 8:35 a.m. UTC | #4
On 27-07-15, 16:20, Lee Jones wrote:
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> 
> Changelog:
>  - Using OPP-v2
>  - Moved (and linked) a bunch of documentation to ../power/
> 
>  .../devicetree/bindings/cpufreq/cpufreq-st.txt     | 40 ++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt

For both patches:

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

But I would like Rob to have a look as well :)
Lee Jones July 28, 2015, 8:55 a.m. UTC | #5
On Tue, 28 Jul 2015, Viresh Kumar wrote:

> On 27-07-15, 16:20, Lee Jones wrote:
> > Cc: devicetree@vger.kernel.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> > 
> > Changelog:
> >  - Using OPP-v2
> >  - Moved (and linked) a bunch of documentation to ../power/
> > 
> >  .../devicetree/bindings/cpufreq/cpufreq-st.txt     | 40 ++++++++++++++++++++++
> >  1 file changed, 40 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt
> 
> For both patches:
> 
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

W00t!  I'll start fixing up the driver.

> But I would like Rob to have a look as well :)

No problem.
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt
new file mode 100644
index 0000000..79add9d
--- /dev/null
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt
@@ -0,0 +1,40 @@ 
+Binding for ST's CPUFreq driver
+===============================
+
+Frequency Scaling only
+----------------------
+
+Located in CPU's node:
+
+- operating-points		: [See: ../power/opp.txt]
+
+Example [safe]
+--------------
+
+cpus {
+	cpu@0 {
+				 /* kHz     uV   */
+		operating-points = <1500000 0
+				    1200000 0
+				    800000  0
+				    500000  0>;
+	};
+};
+
+Dynamic Voltage and Frequency Scaling (DVFS)
+--------------------------------------------
+
+Located in CPU's node:
+
+- operating-points-v2-sti	: [See ../power/opp-st.txt]
+
+Example [unsafe]
+----------------
+
+cpus {
+	cpu@0 {
+		operating-points-v2	= <[OPP list phandle]>;
+	};
+};
+
+For an example of an OPP list, see ../power/opp-st.txt.