* [PATCH 1/2] arm64: dts: rockchip: update common rk3399 operating points
@ 2017-05-23 9:51 Heiko Stuebner
2017-05-23 9:51 ` [PATCH 2/2] arm64: dts: rockchip: introduce rk3399-op1 " Heiko Stuebner
2017-05-30 10:13 ` [PATCH 1/2] arm64: dts: rockchip: update common rk3399 " Heiko Stuebner
0 siblings, 2 replies; 7+ messages in thread
From: Heiko Stuebner @ 2017-05-23 9:51 UTC (permalink / raw)
To: linux-arm-kernel
The rk3399 has multiple variants with different frequency ratings.
The operating points currently in the kernel stem from the op1 variant
used in Gru ChromeOS devices and may not be suitable for general rk3399
chips. Therefore bring it back to the official general operating points.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
index dd82e16236a8..c83460db130a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
@@ -56,22 +56,18 @@
};
opp02 {
opp-hz = /bits/ 64 <816000000>;
- opp-microvolt = <800000>;
+ opp-microvolt = <850000>;
};
opp03 {
opp-hz = /bits/ 64 <1008000000>;
- opp-microvolt = <875000>;
+ opp-microvolt = <925000>;
};
opp04 {
opp-hz = /bits/ 64 <1200000000>;
- opp-microvolt = <925000>;
+ opp-microvolt = <1000000>;
};
opp05 {
opp-hz = /bits/ 64 <1416000000>;
- opp-microvolt = <1050000>;
- };
- opp06 {
- opp-hz = /bits/ 64 <1512000000>;
opp-microvolt = <1125000>;
};
};
@@ -107,15 +103,11 @@
};
opp06 {
opp-hz = /bits/ 64 <1608000000>;
- opp-microvolt = <1075000>;
+ opp-microvolt = <1100000>;
};
opp07 {
opp-hz = /bits/ 64 <1800000000>;
- opp-microvolt = <1150000>;
- };
- opp08 {
- opp-hz = /bits/ 64 <2016000000>;
- opp-microvolt = <1250000>;
+ opp-microvolt = <1200000>;
};
};
};
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] arm64: dts: rockchip: introduce rk3399-op1 operating points
2017-05-23 9:51 [PATCH 1/2] arm64: dts: rockchip: update common rk3399 operating points Heiko Stuebner
@ 2017-05-23 9:51 ` Heiko Stuebner
2017-05-23 15:57 ` Doug Anderson
2017-05-30 10:13 ` [PATCH 1/2] arm64: dts: rockchip: update common rk3399 " Heiko Stuebner
1 sibling, 1 reply; 7+ messages in thread
From: Heiko Stuebner @ 2017-05-23 9:51 UTC (permalink / raw)
To: linux-arm-kernel
The OP1 is a rk3399 variant used in ChromeOS devices with a slightly
higher frequency rating. Therefore introduce separate operting points,
from the ChromeOS tree, for it and use it in Gru devices.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 145 +++++++++++++++++++++++
2 files changed, 146 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
index 0d960b7f7625..eb5059344023 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
@@ -44,7 +44,7 @@
#include <dt-bindings/input/input.h>
#include "rk3399.dtsi"
-#include "rk3399-opp.dtsi"
+#include "rk3399-op1-opp.dtsi"
/ {
chosen {
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
new file mode 100644
index 000000000000..be7fe635f7c1
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2016-2017 Fuzhou Rockchip Electronics Co., Ltd
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/ {
+ cluster0_opp: opp-table0 {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ opp00 {
+ opp-hz = /bits/ 64 <408000000>;
+ opp-microvolt = <800000>;
+ clock-latency-ns = <40000>;
+ };
+ opp01 {
+ opp-hz = /bits/ 64 <600000000>;
+ opp-microvolt = <825000>;
+ };
+ opp02 {
+ opp-hz = /bits/ 64 <816000000>;
+ opp-microvolt = <850000>;
+ };
+ opp03 {
+ opp-hz = /bits/ 64 <1008000000>;
+ opp-microvolt = <900000>;
+ };
+ opp04 {
+ opp-hz = /bits/ 64 <1200000000>;
+ opp-microvolt = <975000>;
+ };
+ opp05 {
+ opp-hz = /bits/ 64 <1416000000>;
+ opp-microvolt = <1100000>;
+ };
+ opp06 {
+ opp-hz = /bits/ 64 <1512000000>;
+ opp-microvolt = <1150000>;
+ };
+ };
+
+ cluster1_opp: opp-table1 {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ opp00 {
+ opp-hz = /bits/ 64 <408000000>;
+ opp-microvolt = <800000>;
+ clock-latency-ns = <40000>;
+ };
+ opp01 {
+ opp-hz = /bits/ 64 <600000000>;
+ opp-microvolt = <800000>;
+ };
+ opp02 {
+ opp-hz = /bits/ 64 <816000000>;
+ opp-microvolt = <825000>;
+ };
+ opp03 {
+ opp-hz = /bits/ 64 <1008000000>;
+ opp-microvolt = <850000>;
+ };
+ opp04 {
+ opp-hz = /bits/ 64 <1200000000>;
+ opp-microvolt = <900000>;
+ };
+ opp05 {
+ opp-hz = /bits/ 64 <1416000000>;
+ opp-microvolt = <975000>;
+ };
+ opp06 {
+ opp-hz = /bits/ 64 <1608000000>;
+ opp-microvolt = <1050000>;
+ };
+ opp07 {
+ opp-hz = /bits/ 64 <1800000000>;
+ opp-microvolt = <1150000>;
+ };
+ opp08 {
+ opp-hz = /bits/ 64 <2016000000>;
+ opp-microvolt = <1250000>;
+ };
+ };
+};
+
+&cpu_l0 {
+ operating-points-v2 = <&cluster0_opp>;
+};
+
+&cpu_l1 {
+ operating-points-v2 = <&cluster0_opp>;
+};
+
+&cpu_l2 {
+ operating-points-v2 = <&cluster0_opp>;
+};
+
+&cpu_l3 {
+ operating-points-v2 = <&cluster0_opp>;
+};
+
+&cpu_b0 {
+ operating-points-v2 = <&cluster1_opp>;
+};
+
+&cpu_b1 {
+ operating-points-v2 = <&cluster1_opp>;
+};
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] arm64: dts: rockchip: introduce rk3399-op1 operating points
2017-05-23 9:51 ` [PATCH 2/2] arm64: dts: rockchip: introduce rk3399-op1 " Heiko Stuebner
@ 2017-05-23 15:57 ` Doug Anderson
2017-05-23 16:10 ` Heiko Stuebner
0 siblings, 1 reply; 7+ messages in thread
From: Doug Anderson @ 2017-05-23 15:57 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tue, May 23, 2017 at 2:51 AM, Heiko Stuebner <heiko@sntech.de> wrote:
> The OP1 is a rk3399 variant used in ChromeOS devices with a slightly
> higher frequency rating. Therefore introduce separate operting points,
> from the ChromeOS tree, for it and use it in Gru devices.
>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
> arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 2 +-
> arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 145 +++++++++++++++++++++++
> 2 files changed, 146 insertions(+), 1 deletion(-)
> create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
The numbers here match what's in the Chrome OS tree and those were all
approved by Rockchip.
One slight nit is that the descriptions these two patches together
make it look like this will be a no-op change for OP1 devices. This
is not true. After things were posted upstream there have been
several adjustments to the opp points in the Chrome OS tree. Since
what you have currently matches the ToT Chrome OS tree, that should
mean that there's a net difference. It would be nice to mention that
in the commit message.
Other than that small nit:
Reviewed-by: Douglas Anderson <dianders@chromium.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] arm64: dts: rockchip: introduce rk3399-op1 operating points
2017-05-23 15:57 ` Doug Anderson
@ 2017-05-23 16:10 ` Heiko Stuebner
2017-05-23 16:35 ` Doug Anderson
0 siblings, 1 reply; 7+ messages in thread
From: Heiko Stuebner @ 2017-05-23 16:10 UTC (permalink / raw)
To: linux-arm-kernel
Am Dienstag, 23. Mai 2017, 08:57:01 CEST schrieb Doug Anderson:
> Hi,
>
> On Tue, May 23, 2017 at 2:51 AM, Heiko Stuebner <heiko@sntech.de> wrote:
> > The OP1 is a rk3399 variant used in ChromeOS devices with a slightly
> > higher frequency rating. Therefore introduce separate operting points,
> > from the ChromeOS tree, for it and use it in Gru devices.
> >
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> > ---
> > arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 2 +-
> > arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 145 +++++++++++++++++++++++
> > 2 files changed, 146 insertions(+), 1 deletion(-)
> > create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
>
> The numbers here match what's in the Chrome OS tree and those were all
> approved by Rockchip.
>
> One slight nit is that the descriptions these two patches together
> make it look like this will be a no-op change for OP1 devices. This
> is not true. After things were posted upstream there have been
> several adjustments to the opp points in the Chrome OS tree. Since
> what you have currently matches the ToT Chrome OS tree, that should
> mean that there's a net difference. It would be nice to mention that
> in the commit message.
In the mainline kernel it is a no-op change, as we're still running with
the cpu-regulators disabled on gru ;-)
But to address your very valid point, I guess you mean something like
----
The OP1 is a rk3399 variant used in ChromeOS devices with a slightly
higher frequency rating compared to the regular rk3399, but right now
the only available operating points are somewhere in between both
variants with both needing adjustments to actually fit their specs.
Therefore introduce separate operting points, from the ChromeOS kernel,
for the OP1 and use it on Gru devices.
----
And I guess we should also swap patch ordering, first move Gru away from
the general opps and then adust them for the regular rk3399.
> Other than that small nit:
>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
Heiko
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] arm64: dts: rockchip: introduce rk3399-op1 operating points
2017-05-23 16:10 ` Heiko Stuebner
@ 2017-05-23 16:35 ` Doug Anderson
2017-05-23 16:38 ` Heiko Stuebner
0 siblings, 1 reply; 7+ messages in thread
From: Doug Anderson @ 2017-05-23 16:35 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tue, May 23, 2017 at 9:10 AM, Heiko Stuebner <heiko@sntech.de> wrote:
> Am Dienstag, 23. Mai 2017, 08:57:01 CEST schrieb Doug Anderson:
>> Hi,
>>
>> On Tue, May 23, 2017 at 2:51 AM, Heiko Stuebner <heiko@sntech.de> wrote:
>> > The OP1 is a rk3399 variant used in ChromeOS devices with a slightly
>> > higher frequency rating. Therefore introduce separate operting points,
>> > from the ChromeOS tree, for it and use it in Gru devices.
>> >
>> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
>> > ---
>> > arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 2 +-
>> > arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 145 +++++++++++++++++++++++
>> > 2 files changed, 146 insertions(+), 1 deletion(-)
>> > create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
>>
>> The numbers here match what's in the Chrome OS tree and those were all
>> approved by Rockchip.
>>
>> One slight nit is that the descriptions these two patches together
>> make it look like this will be a no-op change for OP1 devices. This
>> is not true. After things were posted upstream there have been
>> several adjustments to the opp points in the Chrome OS tree. Since
>> what you have currently matches the ToT Chrome OS tree, that should
>> mean that there's a net difference. It would be nice to mention that
>> in the commit message.
>
> In the mainline kernel it is a no-op change, as we're still running with
> the cpu-regulators disabled on gru ;-)
Ah, that's true.
> But to address your very valid point, I guess you mean something like
>
> ----
> The OP1 is a rk3399 variant used in ChromeOS devices with a slightly
> higher frequency rating compared to the regular rk3399, but right now
> the only available operating points are somewhere in between both
> variants with both needing adjustments to actually fit their specs.
That would be fine and would make it obvious that it's a no-op.
Ironically, the OPP points that were in mainline were actually not
totally in between. There were some numbers that were raised for
both. :)
> Therefore introduce separate operting points, from the ChromeOS kernel,
> for the OP1 and use it on Gru devices.
> ----
>
> And I guess we should also swap patch ordering, first move Gru away from
> the general opps and then adust them for the regular rk3399.
Yeah, I think swapping the order would make it slightly better.
-Doug
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] arm64: dts: rockchip: introduce rk3399-op1 operating points
2017-05-23 16:35 ` Doug Anderson
@ 2017-05-23 16:38 ` Heiko Stuebner
0 siblings, 0 replies; 7+ messages in thread
From: Heiko Stuebner @ 2017-05-23 16:38 UTC (permalink / raw)
To: linux-arm-kernel
Am Dienstag, 23. Mai 2017, 09:35:05 CEST schrieb Doug Anderson:
> Hi,
>
> On Tue, May 23, 2017 at 9:10 AM, Heiko Stuebner <heiko@sntech.de> wrote:
> > Am Dienstag, 23. Mai 2017, 08:57:01 CEST schrieb Doug Anderson:
> >> Hi,
> >>
> >> On Tue, May 23, 2017 at 2:51 AM, Heiko Stuebner <heiko@sntech.de> wrote:
> >> > The OP1 is a rk3399 variant used in ChromeOS devices with a slightly
> >> > higher frequency rating. Therefore introduce separate operting points,
> >> > from the ChromeOS tree, for it and use it in Gru devices.
> >> >
> >> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> >> > ---
> >> > arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 2 +-
> >> > arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 145 +++++++++++++++++++++++
> >> > 2 files changed, 146 insertions(+), 1 deletion(-)
> >> > create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
> >>
> >> The numbers here match what's in the Chrome OS tree and those were all
> >> approved by Rockchip.
> >>
> >> One slight nit is that the descriptions these two patches together
> >> make it look like this will be a no-op change for OP1 devices. This
> >> is not true. After things were posted upstream there have been
> >> several adjustments to the opp points in the Chrome OS tree. Since
> >> what you have currently matches the ToT Chrome OS tree, that should
> >> mean that there's a net difference. It would be nice to mention that
> >> in the commit message.
> >
> > In the mainline kernel it is a no-op change, as we're still running with
> > the cpu-regulators disabled on gru ;-)
>
> Ah, that's true.
>
>
> > But to address your very valid point, I guess you mean something like
> >
> > ----
> > The OP1 is a rk3399 variant used in ChromeOS devices with a slightly
> > higher frequency rating compared to the regular rk3399, but right now
> > the only available operating points are somewhere in between both
> > variants with both needing adjustments to actually fit their specs.
>
> That would be fine and would make it obvious that it's a no-op.
> Ironically, the OPP points that were in mainline were actually not
> totally in between. There were some numbers that were raised for
> both. :)
wording fun ... then we'll make that part a
"[...] but right now
the only available operating points don't match either variant
with both needing adjustments to actually fit their specs."
> > Therefore introduce separate operting points, from the ChromeOS kernel,
> > for the OP1 and use it on Gru devices.
> > ----
> >
> > And I guess we should also swap patch ordering, first move Gru away from
> > the general opps and then adust them for the regular rk3399.
>
> Yeah, I think swapping the order would make it slightly better.
Heiko
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] arm64: dts: rockchip: update common rk3399 operating points
2017-05-23 9:51 [PATCH 1/2] arm64: dts: rockchip: update common rk3399 operating points Heiko Stuebner
2017-05-23 9:51 ` [PATCH 2/2] arm64: dts: rockchip: introduce rk3399-op1 " Heiko Stuebner
@ 2017-05-30 10:13 ` Heiko Stuebner
1 sibling, 0 replies; 7+ messages in thread
From: Heiko Stuebner @ 2017-05-30 10:13 UTC (permalink / raw)
To: linux-arm-kernel
Am Dienstag, 23. Mai 2017, 11:51:08 CEST schrieb Heiko Stuebner:
> The rk3399 has multiple variants with different frequency ratings.
> The operating points currently in the kernel stem from the op1 variant
> used in Gru ChromeOS devices and may not be suitable for general rk3399
> chips. Therefore bring it back to the official general operating points.
>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
applied both for 4.13 with the description in patch2 fixed and
having the patches in reverse order, as discussed in patch2.
Heiko
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-05-30 10:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-23 9:51 [PATCH 1/2] arm64: dts: rockchip: update common rk3399 operating points Heiko Stuebner
2017-05-23 9:51 ` [PATCH 2/2] arm64: dts: rockchip: introduce rk3399-op1 " Heiko Stuebner
2017-05-23 15:57 ` Doug Anderson
2017-05-23 16:10 ` Heiko Stuebner
2017-05-23 16:35 ` Doug Anderson
2017-05-23 16:38 ` Heiko Stuebner
2017-05-30 10:13 ` [PATCH 1/2] arm64: dts: rockchip: update common rk3399 " Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox