linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] amend some properties related clk and cpu for rk322x
@ 2017-05-17  4:45 Frank Wang
  2017-05-17  4:45 ` [PATCH 1/4] arm: dts: rk322x: add some assigned-clocks Frank Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Frank Wang @ 2017-05-17  4:45 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland, linux, mturquette, sboyd, rjw,
	viresh.kumar, rui.zhang, edubezval
  Cc: linux-arm-kernel, linux-rockchip, devicetree, linux-kernel,
	linux-pm, linux-clk, charles.chen, cody.xie, kevan.lan, huangtao,
	rocky.hao, finley.xiao, zhangqing, wmc, Frank Wang

These series of patches amend some assigned-clocks and add cpu opp table
for rk322x SoCs.

the following patches on patchwork are required for this changes.
https://patchwork.kernel.org/patch/9627639/
https://patchwork.kernel.org/patch/9703945/
https://patchwork.kernel.org/patch/9703939/
https://patchwork.kernel.org/patch/9707517/

Elaine Zhang (1):
  arm: dts: rk322x: add some assigned-clocks

Finley Xiao (2):
  arm: dts: rk322x: add operating-points-v2 property for cpu
  arm: dts: rk3229: add a new cpu opp table

Rocky Hao (1):
  arm: dts: rk322x: update tsadc's frequence setting

 arch/arm/boot/dts/rk3229-cpu-opp.dtsi | 85 +++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/rk322x.dtsi         | 52 ++++++++++++++++++---
 2 files changed, 131 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/boot/dts/rk3229-cpu-opp.dtsi

-- 
2.0.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] arm: dts: rk322x: add some assigned-clocks
  2017-05-17  4:45 [PATCH 0/4] amend some properties related clk and cpu for rk322x Frank Wang
@ 2017-05-17  4:45 ` Frank Wang
  2017-05-17  4:45 ` [PATCH 2/4] arm: dts: rk322x: add operating-points-v2 property for cpu Frank Wang
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Frank Wang @ 2017-05-17  4:45 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland, linux, mturquette, sboyd, rjw,
	viresh.kumar, rui.zhang, edubezval
  Cc: linux-arm-kernel, linux-rockchip, devicetree, linux-kernel,
	linux-pm, linux-clk, charles.chen, cody.xie, kevan.lan, huangtao,
	rocky.hao, finley.xiao, zhangqing, wmc, Frank Wang

From: Elaine Zhang <zhangqing@rock-chips.com>

Add CPLL, GPLL and some other assigned-clocks for rk322x SoC.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
---
 arch/arm/boot/dts/rk322x.dtsi | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
index 221251a..40044e8 100644
--- a/arch/arm/boot/dts/rk322x.dtsi
+++ b/arch/arm/boot/dts/rk322x.dtsi
@@ -346,8 +346,18 @@
 		rockchip,grf = <&grf>;
 		#clock-cells = <1>;
 		#reset-cells = <1>;
-		assigned-clocks = <&cru PLL_GPLL>;
-		assigned-clock-rates = <594000000>;
+		assigned-clocks =
+			<&cru PLL_GPLL>, <&cru ARMCLK>,
+			<&cru PLL_CPLL>, <&cru ACLK_PERI>,
+			<&cru HCLK_PERI>, <&cru PCLK_PERI>,
+			<&cru ACLK_CPU>, <&cru HCLK_CPU>,
+			<&cru PCLK_CPU>;
+		assigned-clock-rates =
+			<594000000>, <816000000>,
+			<500000000>, <150000000>,
+			<150000000>, <75000000>,
+			<150000000>, <150000000>,
+			<75000000>;
 	};
 
 	thermal-zones {
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] arm: dts: rk322x: add operating-points-v2 property for cpu
  2017-05-17  4:45 [PATCH 0/4] amend some properties related clk and cpu for rk322x Frank Wang
  2017-05-17  4:45 ` [PATCH 1/4] arm: dts: rk322x: add some assigned-clocks Frank Wang
@ 2017-05-17  4:45 ` Frank Wang
  2017-05-17  5:31   ` Viresh Kumar
  2017-05-17  4:45 ` [PATCH 3/4] arm: dts: rk3229: add a new cpu opp table Frank Wang
  2017-05-17  4:45 ` [PATCH 4/4] arm: dts: rk322x: update tsadc's frequence setting Frank Wang
  3 siblings, 1 reply; 7+ messages in thread
From: Frank Wang @ 2017-05-17  4:45 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland, linux, mturquette, sboyd, rjw,
	viresh.kumar, rui.zhang, edubezval
  Cc: linux-arm-kernel, linux-rockchip, devicetree, linux-kernel,
	linux-pm, linux-clk, charles.chen, cody.xie, kevan.lan, huangtao,
	rocky.hao, finley.xiao, zhangqing, wmc, Frank Wang

From: Finley Xiao <finley.xiao@rock-chips.com>

This patch adds a new opp table for cpu on rk322x SoC.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
---
 arch/arm/boot/dts/rk322x.dtsi | 36 ++++++++++++++++++++++++++++++++----
 1 file changed, 32 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
index 40044e8..7809e56 100644
--- a/arch/arm/boot/dts/rk322x.dtsi
+++ b/arch/arm/boot/dts/rk322x.dtsi
@@ -66,10 +66,7 @@
 			compatible = "arm,cortex-a7";
 			reg = <0xf00>;
 			resets = <&cru SRST_CORE0>;
-			operating-points = <
-				/* KHz    uV */
-				 816000 1000000
-			>;
+			operating-points-v2 = <&cpu0_opp_table>;
 			#cooling-cells = <2>; /* min followed by max */
 			clock-latency = <40000>;
 			clocks = <&cru ARMCLK>;
@@ -80,6 +77,7 @@
 			compatible = "arm,cortex-a7";
 			reg = <0xf01>;
 			resets = <&cru SRST_CORE1>;
+			operating-points-v2 = <&cpu0_opp_table>;
 		};
 
 		cpu2: cpu@f02 {
@@ -87,6 +85,7 @@
 			compatible = "arm,cortex-a7";
 			reg = <0xf02>;
 			resets = <&cru SRST_CORE2>;
+			operating-points-v2 = <&cpu0_opp_table>;
 		};
 
 		cpu3: cpu@f03 {
@@ -94,6 +93,35 @@
 			compatible = "arm,cortex-a7";
 			reg = <0xf03>;
 			resets = <&cru SRST_CORE3>;
+			operating-points-v2 = <&cpu0_opp_table>;
+		};
+	};
+
+	cpu0_opp_table: opp_table0 {
+		compatible = "operating-points-v2";
+		opp-shared;
+
+		opp-408000000 {
+			opp-hz = /bits/ 64 <408000000>;
+			opp-microvolt = <950000>;
+			clock-latency-ns = <40000>;
+			opp-suspend;
+		};
+		opp-600000000 {
+			opp-hz = /bits/ 64 <600000000>;
+			opp-microvolt = <975000>;
+		};
+		opp-816000000 {
+			opp-hz = /bits/ 64 <816000000>;
+			opp-microvolt = <1000000>;
+		};
+		opp-1008000000 {
+			opp-hz = /bits/ 64 <1008000000>;
+			opp-microvolt = <1175000>;
+		};
+		opp-1200000000 {
+			opp-hz = /bits/ 64 <1200000000>;
+			opp-microvolt = <1275000>;
 		};
 	};
 
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] arm: dts: rk3229: add a new cpu opp table
  2017-05-17  4:45 [PATCH 0/4] amend some properties related clk and cpu for rk322x Frank Wang
  2017-05-17  4:45 ` [PATCH 1/4] arm: dts: rk322x: add some assigned-clocks Frank Wang
  2017-05-17  4:45 ` [PATCH 2/4] arm: dts: rk322x: add operating-points-v2 property for cpu Frank Wang
@ 2017-05-17  4:45 ` Frank Wang
  2017-05-17  5:30   ` Viresh Kumar
  2017-05-17  4:45 ` [PATCH 4/4] arm: dts: rk322x: update tsadc's frequence setting Frank Wang
  3 siblings, 1 reply; 7+ messages in thread
From: Frank Wang @ 2017-05-17  4:45 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland, linux, mturquette, sboyd, rjw,
	viresh.kumar, rui.zhang, edubezval
  Cc: linux-arm-kernel, linux-rockchip, devicetree, linux-kernel,
	linux-pm, linux-clk, charles.chen, cody.xie, kevan.lan, huangtao,
	rocky.hao, finley.xiao, zhangqing, wmc, Frank Wang

From: Finley Xiao <finley.xiao@rock-chips.com>

This patch adds some new frequencies for rk3229 board.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
---
 arch/arm/boot/dts/rk3229-cpu-opp.dtsi | 85 +++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)
 create mode 100644 arch/arm/boot/dts/rk3229-cpu-opp.dtsi

diff --git a/arch/arm/boot/dts/rk3229-cpu-opp.dtsi b/arch/arm/boot/dts/rk3229-cpu-opp.dtsi
new file mode 100644
index 0000000..89e8413
--- /dev/null
+++ b/arch/arm/boot/dts/rk3229-cpu-opp.dtsi
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 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.
+ */
+
+/ {
+	/delete-node/ opp-table0;
+
+	cpu0_opp_table: opp_table0 {
+		compatible = "operating-points-v2";
+		opp-shared;
+
+		opp-408000000 {
+			opp-hz = /bits/ 64 <408000000>;
+			opp-microvolt = <950000>;
+			clock-latency-ns = <40000>;
+			opp-suspend;
+		};
+		opp-600000000 {
+			opp-hz = /bits/ 64 <600000000>;
+			opp-microvolt = <975000>;
+		};
+		opp-816000000 {
+			opp-hz = /bits/ 64 <816000000>;
+			opp-microvolt = <1000000>;
+		};
+		opp-1008000000 {
+			opp-hz = /bits/ 64 <1008000000>;
+			opp-microvolt = <1175000>;
+		};
+		opp-1200000000 {
+			opp-hz = /bits/ 64 <1200000000>;
+			opp-microvolt = <1275000>;
+		};
+		opp-1296000000 {
+			opp-hz = /bits/ 64 <1296000000>;
+			opp-microvolt = <1325000>;
+		};
+		opp-1392000000 {
+			opp-hz = /bits/ 64 <1392000000>;
+			opp-microvolt = <1375000>;
+		};
+		opp-1464000000 {
+			opp-hz = /bits/ 64 <1464000000>;
+			opp-microvolt = <1400000>;
+		};
+	};
+};
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] arm: dts: rk322x: update tsadc's frequence setting
  2017-05-17  4:45 [PATCH 0/4] amend some properties related clk and cpu for rk322x Frank Wang
                   ` (2 preceding siblings ...)
  2017-05-17  4:45 ` [PATCH 3/4] arm: dts: rk3229: add a new cpu opp table Frank Wang
@ 2017-05-17  4:45 ` Frank Wang
  3 siblings, 0 replies; 7+ messages in thread
From: Frank Wang @ 2017-05-17  4:45 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland, linux, mturquette, sboyd, rjw,
	viresh.kumar, rui.zhang, edubezval
  Cc: linux-arm-kernel, linux-rockchip, devicetree, linux-kernel,
	linux-pm, linux-clk, charles.chen, cody.xie, kevan.lan, huangtao,
	rocky.hao, finley.xiao, zhangqing, wmc, Frank Wang

From: Rocky Hao <rocky.hao@rock-chips.com>

Update freq of tsadc's working clock as 32768 hz, if not set, tsadc
will work at a default frequence.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
---
 arch/arm/boot/dts/rk322x.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
index 7809e56..d2e9641 100644
--- a/arch/arm/boot/dts/rk322x.dtsi
+++ b/arch/arm/boot/dts/rk322x.dtsi
@@ -434,6 +434,8 @@
 		interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
 		clock-names = "tsadc", "apb_pclk";
+		assigned-clocks = <&cru SCLK_TSADC>;
+		assigned-clock-rates = <32768>;
 		resets = <&cru SRST_TSADC>;
 		reset-names = "tsadc-apb";
 		pinctrl-names = "init", "default", "sleep";
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/4] arm: dts: rk3229: add a new cpu opp table
  2017-05-17  4:45 ` [PATCH 3/4] arm: dts: rk3229: add a new cpu opp table Frank Wang
@ 2017-05-17  5:30   ` Viresh Kumar
  0 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2017-05-17  5:30 UTC (permalink / raw)
  To: Frank Wang
  Cc: heiko, robh+dt, mark.rutland, linux, mturquette, sboyd, rjw,
	rui.zhang, edubezval, linux-arm-kernel, linux-rockchip,
	devicetree, linux-kernel, linux-pm, linux-clk, charles.chen,
	cody.xie, kevan.lan, huangtao, rocky.hao, finley.xiao, zhangqing,
	wmc

On 17-05-17, 12:45, Frank Wang wrote:
> From: Finley Xiao <finley.xiao@rock-chips.com>
> 
> This patch adds some new frequencies for rk3229 board.
> 
> Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
> ---
>  arch/arm/boot/dts/rk3229-cpu-opp.dtsi | 85 +++++++++++++++++++++++++++++++++++
>  1 file changed, 85 insertions(+)
>  create mode 100644 arch/arm/boot/dts/rk3229-cpu-opp.dtsi

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

-- 
viresh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] arm: dts: rk322x: add operating-points-v2 property for cpu
  2017-05-17  4:45 ` [PATCH 2/4] arm: dts: rk322x: add operating-points-v2 property for cpu Frank Wang
@ 2017-05-17  5:31   ` Viresh Kumar
  0 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2017-05-17  5:31 UTC (permalink / raw)
  To: Frank Wang
  Cc: heiko, robh+dt, mark.rutland, linux, mturquette, sboyd, rjw,
	rui.zhang, edubezval, linux-arm-kernel, linux-rockchip,
	devicetree, linux-kernel, linux-pm, linux-clk, charles.chen,
	cody.xie, kevan.lan, huangtao, rocky.hao, finley.xiao, zhangqing,
	wmc

On 17-05-17, 12:45, Frank Wang wrote:
> From: Finley Xiao <finley.xiao@rock-chips.com>
> 
> This patch adds a new opp table for cpu on rk322x SoC.
> 
> Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
> ---
>  arch/arm/boot/dts/rk322x.dtsi | 36 ++++++++++++++++++++++++++++++++----
>  1 file changed, 32 insertions(+), 4 deletions(-)

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

-- 
viresh

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-17  5:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17  4:45 [PATCH 0/4] amend some properties related clk and cpu for rk322x Frank Wang
2017-05-17  4:45 ` [PATCH 1/4] arm: dts: rk322x: add some assigned-clocks Frank Wang
2017-05-17  4:45 ` [PATCH 2/4] arm: dts: rk322x: add operating-points-v2 property for cpu Frank Wang
2017-05-17  5:31   ` Viresh Kumar
2017-05-17  4:45 ` [PATCH 3/4] arm: dts: rk3229: add a new cpu opp table Frank Wang
2017-05-17  5:30   ` Viresh Kumar
2017-05-17  4:45 ` [PATCH 4/4] arm: dts: rk322x: update tsadc's frequence setting Frank Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).