linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: rockchip: add cpuclk handling - arm-soc part
@ 2014-09-12 22:34 Heiko Stuebner
  2014-09-12 22:34 ` [PATCH 1/3] ARM: dts: rockchip: add operating points and armclk references Heiko Stuebner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Heiko Stuebner @ 2014-09-12 22:34 UTC (permalink / raw)
  To: linux-arm-kernel

This series provides the devicetree integration of the cpuclk provider
submitted against the clk-next tree.

It adds the necessary operating points and voltages as well as the
cpu regulator reference and a platform-device for cpufreq-cpu0

It needs an exported branch from the clock-tree that provides the
new ARMCLK id introduced there.


Heiko Stuebner (3):
  ARM: dts: rockchip: add operating points and armclk references
  ARM: dts: rockchip: add cpu supplies to boards
  ARM: rockchip: add a cpufreq-cpu0 device

 arch/arm/boot/dts/rk3066a-bqcurie2.dts |  4 ++++
 arch/arm/boot/dts/rk3066a.dtsi         | 12 +++++++++++-
 arch/arm/boot/dts/rk3188-radxarock.dts |  6 +++++-
 arch/arm/boot/dts/rk3188.dtsi          | 15 ++++++++++++++-
 arch/arm/boot/dts/rk3288-evb-rk808.dts |  6 +++++-
 arch/arm/boot/dts/rk3288.dtsi          | 19 ++++++++++++++++++-
 arch/arm/mach-rockchip/rockchip.c      |  7 +++++++
 7 files changed, 64 insertions(+), 5 deletions(-)

-- 
2.0.1

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

* [PATCH 1/3] ARM: dts: rockchip: add operating points and armclk references
  2014-09-12 22:34 [PATCH 0/3] ARM: rockchip: add cpuclk handling - arm-soc part Heiko Stuebner
@ 2014-09-12 22:34 ` Heiko Stuebner
  2014-09-12 22:34 ` [PATCH 2/3] ARM: dts: rockchip: add cpu supplies to boards Heiko Stuebner
  2014-09-12 22:34 ` [PATCH 3/3] ARM: rockchip: add a cpufreq-cpu0 device Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2014-09-12 22:34 UTC (permalink / raw)
  To: linux-arm-kernel

Add basic OPP entries for current supported Rockchip SoCs.
The operating points are currently very conservative, so individual
boards may opt to redefine them.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
---
 arch/arm/boot/dts/rk3066a.dtsi | 12 +++++++++++-
 arch/arm/boot/dts/rk3188.dtsi  | 15 ++++++++++++++-
 arch/arm/boot/dts/rk3288.dtsi  | 19 ++++++++++++++++++-
 3 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/rk3066a.dtsi b/arch/arm/boot/dts/rk3066a.dtsi
index 879a818..572c30b 100644
--- a/arch/arm/boot/dts/rk3066a.dtsi
+++ b/arch/arm/boot/dts/rk3066a.dtsi
@@ -26,11 +26,21 @@
 		#size-cells = <0>;
 		enable-method = "rockchip,rk3066-smp";
 
-		cpu at 0 {
+		cpu0: cpu at 0 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			next-level-cache = <&L2>;
 			reg = <0x0>;
+			operating-points = <
+				/* kHz    uV */
+				1008000 1075000
+				 816000 1025000
+				 600000 1025000
+				 504000 1000000
+				 312000  975000
+			>;
+			clock-latency = <40000>;
+			clocks = <&cru ARMCLK>;
 		};
 		cpu at 1 {
 			device_type = "cpu";
diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi
index ee801a9..e237216 100644
--- a/arch/arm/boot/dts/rk3188.dtsi
+++ b/arch/arm/boot/dts/rk3188.dtsi
@@ -26,11 +26,24 @@
 		#size-cells = <0>;
 		enable-method = "rockchip,rk3066-smp";
 
-		cpu at 0 {
+		cpu0: cpu at 0 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			next-level-cache = <&L2>;
 			reg = <0x0>;
+			operating-points = <
+				/* kHz    uV */
+				1608000 1350000
+				1416000 1250000
+				1200000 1150000
+				1008000 1075000
+				 816000  975000
+				 600000  950000
+				 504000  925000
+				 312000  875000
+			>;
+			clock-latency = <40000>;
+			clocks = <&cru ARMCLK>;
 		};
 		cpu at 1 {
 			device_type = "cpu";
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 37a8ac8..7db8432 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -47,10 +47,27 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		cpu at 500 {
+		cpu0: cpu at 500 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a12";
 			reg = <0x500>;
+			operating-points = <
+				/* KHz    uV */
+				1608000 1350000
+				1512000 1300000
+				1416000 1200000
+				1200000 1100000
+				1008000 1050000
+				 816000 1000000
+				 696000  950000
+				 600000  900000
+				 408000  900000
+				 312000  900000
+				 216000  900000
+				 126000  900000
+			>;
+			clock-latency = <40000>;
+			clocks = <&cru ARMCLK>;
 		};
 		cpu at 501 {
 			device_type = "cpu";
-- 
2.0.1

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

* [PATCH 2/3] ARM: dts: rockchip: add cpu supplies to boards
  2014-09-12 22:34 [PATCH 0/3] ARM: rockchip: add cpuclk handling - arm-soc part Heiko Stuebner
  2014-09-12 22:34 ` [PATCH 1/3] ARM: dts: rockchip: add operating points and armclk references Heiko Stuebner
@ 2014-09-12 22:34 ` Heiko Stuebner
  2014-09-12 22:34 ` [PATCH 3/3] ARM: rockchip: add a cpufreq-cpu0 device Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2014-09-12 22:34 UTC (permalink / raw)
  To: linux-arm-kernel

This adds the cpu-supplies to the curie2, radxarock and rk3288-evb-rk808 boards.
The rk3288-evb-act8846 variant cannot provide the cpu-regulator at the moment
so will get its supply later.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/boot/dts/rk3066a-bqcurie2.dts | 4 ++++
 arch/arm/boot/dts/rk3188-radxarock.dts | 6 +++++-
 arch/arm/boot/dts/rk3288-evb-rk808.dts | 6 +++++-
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/rk3066a-bqcurie2.dts b/arch/arm/boot/dts/rk3066a-bqcurie2.dts
index 665dd56..5974a09 100644
--- a/arch/arm/boot/dts/rk3066a-bqcurie2.dts
+++ b/arch/arm/boot/dts/rk3066a-bqcurie2.dts
@@ -60,6 +60,10 @@
 	};
 };
 
+&cpu0 {
+	cpu0-supply = <&vdd_arm>;
+};
+
 &i2c1 {
 	status = "okay";
 	clock-frequency = <400000>;
diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch/arm/boot/dts/rk3188-radxarock.dts
index ff35acfa..8cbd5a2 100644
--- a/arch/arm/boot/dts/rk3188-radxarock.dts
+++ b/arch/arm/boot/dts/rk3188-radxarock.dts
@@ -76,6 +76,10 @@
 	};
 };
 
+&cpu0 {
+	cpu0-supply = <&vdd_arm>;
+};
+
 &i2c1 {
 	status = "okay";
 	clock-frequency = <400000>;
@@ -117,7 +121,7 @@
 			vdd_arm: REG3 {
 				regulator-name = "VDD_ARM";
 				regulator-min-microvolt = <875000>;
-				regulator-max-microvolt = <1300000>;
+				regulator-max-microvolt = <1350000>;
 				regulator-always-on;
 			};
 
diff --git a/arch/arm/boot/dts/rk3288-evb-rk808.dts b/arch/arm/boot/dts/rk3288-evb-rk808.dts
index ff522f8..d8c775e6 100644
--- a/arch/arm/boot/dts/rk3288-evb-rk808.dts
+++ b/arch/arm/boot/dts/rk3288-evb-rk808.dts
@@ -17,6 +17,10 @@
 	compatible = "rockchip,rk3288-evb-rk808", "rockchip,rk3288";
 };
 
+&cpu0 {
+	cpu0-supply = <&vdd_cpu>;
+};
+
 &i2c0 {
 	clock-frequency = <400000>;
 	status = "okay";
@@ -44,7 +48,7 @@
 				regulator-always-on;
 				regulator-boot-on;
 				regulator-min-microvolt = <750000>;
-				regulator-max-microvolt = <1300000>;
+				regulator-max-microvolt = <1350000>;
 				regulator-name = "vdd_arm";
 			};
 
-- 
2.0.1

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

* [PATCH 3/3] ARM: rockchip: add a cpufreq-cpu0 device
  2014-09-12 22:34 [PATCH 0/3] ARM: rockchip: add cpuclk handling - arm-soc part Heiko Stuebner
  2014-09-12 22:34 ` [PATCH 1/3] ARM: dts: rockchip: add operating points and armclk references Heiko Stuebner
  2014-09-12 22:34 ` [PATCH 2/3] ARM: dts: rockchip: add cpu supplies to boards Heiko Stuebner
@ 2014-09-12 22:34 ` Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2014-09-12 22:34 UTC (permalink / raw)
  To: linux-arm-kernel

Rockchip SoCs can sucessfully use the generic cpufreq-cpu0 driver to
do frequency scaling. Therefore add a platform device in the machine
init code.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-rockchip/rockchip.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index 8ab9e0e..eea1f06 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -24,6 +24,12 @@
 #include <asm/hardware/cache-l2x0.h>
 #include "core.h"
 
+static void __init rockchip_dt_init(void)
+{
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	platform_device_register_simple("cpufreq-cpu0", 0, NULL, 0);
+}
+
 static const char * const rockchip_board_dt_compat[] = {
 	"rockchip,rk2928",
 	"rockchip,rk3066a",
@@ -37,4 +43,5 @@ DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
 	.l2c_aux_val	= 0,
 	.l2c_aux_mask	= ~0,
 	.dt_compat	= rockchip_board_dt_compat,
+	.init_machine	= rockchip_dt_init,
 MACHINE_END
-- 
2.0.1

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

end of thread, other threads:[~2014-09-12 22:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-12 22:34 [PATCH 0/3] ARM: rockchip: add cpuclk handling - arm-soc part Heiko Stuebner
2014-09-12 22:34 ` [PATCH 1/3] ARM: dts: rockchip: add operating points and armclk references Heiko Stuebner
2014-09-12 22:34 ` [PATCH 2/3] ARM: dts: rockchip: add cpu supplies to boards Heiko Stuebner
2014-09-12 22:34 ` [PATCH 3/3] ARM: rockchip: add a cpufreq-cpu0 device Heiko Stuebner

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).