From: "hongbo.zhang" <hongbo.zhang@linaro.org>
To: linaro-dev@lists.linaro.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Cc: patches@linaro.org, linaro-kernel@lists.linaro.org,
STEricsson_nomadik_linux@list.st.com, kernel@igloocommunity.org,
"hongbo.zhang" <hongbo.zhang@linaro.com>
Subject: [PATCH V2 6/6] Thermal: Add ST-Ericsson DB8500 thermal properties and platform data.
Date: Thu, 25 Oct 2012 19:39:39 +0800 [thread overview]
Message-ID: <1351165179-30599-1-git-send-email-hongbo.zhang@linaro.com> (raw)
In-Reply-To: <1351163752-29389-1-git-send-email-hongbo.zhang@linaro.com>
From: "hongbo.zhang" <hongbo.zhang@linaro.com>
This patch adds device tree properties for ST-Ericsson DB8500 thermal driver,
also adds the platform data to support the old fashion.
Signed-off-by: hongbo.zhang <hongbo.zhang@linaro.com>
---
arch/arm/boot/dts/dbx5x0.dtsi | 14 +++++++++
arch/arm/boot/dts/snowball.dts | 31 ++++++++++++++++++
arch/arm/configs/u8500_defconfig | 4 +++
arch/arm/mach-ux500/board-mop500.c | 64 ++++++++++++++++++++++++++++++++++++++
4 files changed, 113 insertions(+)
diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi
index 748ba7a..949edc2 100644
--- a/arch/arm/boot/dts/dbx5x0.dtsi
+++ b/arch/arm/boot/dts/dbx5x0.dtsi
@@ -203,6 +203,14 @@
reg = <0x80157450 0xC>;
};
+ thermal@801573c0 {
+ compatible = "stericsson,db8500-thermal";
+ reg = <0x801573c0 0x40>;
+ interrupts = <21 0x4>, <22 0x4>;
+ interrupt-names = "IRQ_HOTMON_LOW", "IRQ_HOTMON_HIGH";
+ status = "disabled";
+ };
+
db8500-prcmu-regulators {
compatible = "stericsson,db8500-prcmu-regulator";
@@ -645,5 +653,11 @@
ranges = <0 0x50000000 0x4000000>;
status = "disabled";
};
+
+ cpufreq-cooling {
+ compatible = "stericsson,db8500-cpufreq-cooling";
+ status = "disabled";
+ };
+
};
};
diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts
index 702c0ba..c6f85f0 100644
--- a/arch/arm/boot/dts/snowball.dts
+++ b/arch/arm/boot/dts/snowball.dts
@@ -99,6 +99,33 @@
status = "okay";
};
+ prcmu@80157000 {
+ thermal@801573c0 {
+ num-trips = <4>;
+
+ trip0-temp = <70000>;
+ trip0-type = "active";
+ trip0-cdev-num = <1>;
+ trip0-cdev-name0 = "thermal-cpufreq-0";
+
+ trip1-temp = <75000>;
+ trip1-type = "active";
+ trip1-cdev-num = <1>;
+ trip1-cdev-name0 = "thermal-cpufreq-0";
+
+ trip2-temp = <80000>;
+ trip2-type = "active";
+ trip2-cdev-num = <1>;
+ trip2-cdev-name0 = "thermal-cpufreq-0";
+
+ trip3-temp = <85000>;
+ trip3-type = "critical";
+ trip3-cdev-num = <0>;
+
+ status = "okay";
+ };
+ };
+
external-bus@50000000 {
status = "okay";
@@ -183,5 +210,9 @@
reg = <0x33>;
};
};
+
+ cpufreq-cooling {
+ status = "okay";
+ };
};
};
diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig
index cc5e7a8..34918c4 100644
--- a/arch/arm/configs/u8500_defconfig
+++ b/arch/arm/configs/u8500_defconfig
@@ -118,3 +118,7 @@ CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_INFO=y
# CONFIG_FTRACE is not set
CONFIG_DEBUG_USER=y
+CONFIG_THERMAL=y
+CONFIG_CPU_THERMAL=y
+CONFIG_DB8500_THERMAL=y
+CONFIG_DB8500_CPUFREQ_COOLING=y
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 416d436..b03216b 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -16,6 +16,7 @@
#include <linux/io.h>
#include <linux/i2c.h>
#include <linux/platform_data/i2c-nomadik.h>
+#include <linux/platform_data/db8500_thermal.h>
#include <linux/gpio.h>
#include <linux/amba/bus.h>
#include <linux/amba/pl022.h>
@@ -229,6 +230,67 @@ static struct ab8500_platform_data ab8500_platdata = {
};
/*
+ * Thermal Sensor
+ */
+
+static struct resource db8500_thsens_resources[] = {
+ {
+ .name = "IRQ_HOTMON_LOW",
+ .start = IRQ_PRCMU_HOTMON_LOW,
+ .end = IRQ_PRCMU_HOTMON_LOW,
+ .flags = IORESOURCE_IRQ,
+ },
+ {
+ .name = "IRQ_HOTMON_HIGH",
+ .start = IRQ_PRCMU_HOTMON_HIGH,
+ .end = IRQ_PRCMU_HOTMON_HIGH,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct db8500_thsens_platform_data db8500_thsens_data = {
+ .trip_points[0] = {
+ .temp = 70000,
+ .type = THERMAL_TRIP_ACTIVE,
+ .cdev_name = {
+ [0] = "thermal-cpufreq-0",
+ },
+ },
+ .trip_points[1] = {
+ .temp = 75000,
+ .type = THERMAL_TRIP_ACTIVE,
+ .cdev_name = {
+ [0] = "thermal-cpufreq-0",
+ },
+ },
+ .trip_points[2] = {
+ .temp = 80000,
+ .type = THERMAL_TRIP_ACTIVE,
+ .cdev_name = {
+ [0] = "thermal-cpufreq-0",
+ },
+ },
+ .trip_points[3] = {
+ .temp = 85000,
+ .type = THERMAL_TRIP_CRITICAL,
+ },
+ .num_trips = 4,
+};
+
+static struct platform_device u8500_thsens_device = {
+ .name = "db8500-thermal",
+ .resource = db8500_thsens_resources,
+ .num_resources = ARRAY_SIZE(db8500_thsens_resources),
+ .dev = {
+ .platform_data = &db8500_thsens_data,
+ },
+};
+
+static struct platform_device u8500_cpufreq_cooling_device = {
+ .name = "db8500-cpufreq-cooling",
+};
+
+/*
* TPS61052
*/
@@ -583,6 +645,8 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
&snowball_key_dev,
&snowball_sbnet_dev,
&snowball_gpio_en_3v3_regulator_dev,
+ &u8500_thsens_device,
+ &u8500_cpufreq_cooling_device,
};
static void __init mop500_init_machine(void)
--
1.7.11.3
next prev parent reply other threads:[~2012-10-25 11:39 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1350387889-15324-1-git-send-email-hongbo.zhang@linaro.com>
[not found] ` <1350387889-15324-2-git-send-email-hongbo.zhang@linaro.com>
2012-10-21 10:05 ` [PATCH 1/5] Thermal: do bind operation after thermal zone or cooling device register returns Francesco Lavra
2012-10-23 8:23 ` Hongbo Zhang
2012-10-23 22:13 ` Francesco Lavra
2012-10-24 2:37 ` Hongbo Zhang
[not found] ` <1350387889-15324-6-git-send-email-hongbo.zhang@linaro.com>
2012-10-21 15:01 ` [PATCH 5/5] Thermal: Add ST-Ericsson db8500 thermal dirver Francesco Lavra
2012-10-22 12:02 ` Hongbo Zhang
2012-10-22 18:51 ` Francesco Lavra
2012-10-24 4:40 ` Hongbo Zhang
2012-10-24 11:58 ` [PATCH V2 0/6] Fix thermal bugs and Upstream ST-Ericsson thermal driver hongbo.zhang
2012-10-24 11:58 ` [PATCH V2 1/6] Thermal: add indent for code alignment hongbo.zhang
2012-10-24 11:58 ` [PATCH V2 4/6] Thermal: Remove the cooling_cpufreq_list hongbo.zhang
2012-10-25 19:14 ` Francesco Lavra
2012-10-26 2:59 ` Hongbo Zhang
2012-10-26 7:09 ` hongbo.zhang
2012-10-27 6:39 ` Francesco Lavra
2012-10-30 8:03 ` Amit Kachhap
2012-10-30 8:53 ` Hongbo Zhang
[not found] ` <1351079900-32236-1-git-send-email-hongbo.zhang-68IGFXMjmZ7QT0dZR+AlfA@public.gmane.org>
2012-10-24 11:58 ` [PATCH V2 2/6] Thermal: make sure cpufreq cooling register after cpufreq driver hongbo.zhang
2012-10-29 11:42 ` Amit Kachhap
2012-10-30 8:59 ` Hongbo Zhang
2012-10-24 11:58 ` [PATCH V2 3/6] Thermal: fix bug of counting cpu frequencies hongbo.zhang
2012-10-24 13:34 ` Viresh Kumar
2012-10-29 11:54 ` Amit Kachhap
2012-10-24 11:58 ` [PATCH V2 5/6] Thermal: Add ST-Ericsson DB8500 thermal dirver hongbo.zhang
2012-10-24 14:38 ` Viresh Kumar
2012-10-25 8:26 ` Hongbo Zhang
2012-10-25 8:41 ` Viresh Kumar
2012-10-25 9:33 ` Hongbo Zhang
2012-10-25 9:42 ` Viresh Kumar
2012-10-25 10:43 ` Hongbo Zhang
[not found] ` <CAJLyvQw7=ucSTXH8YyPrm6LS8uDyxJkWGEVP2jQ3FL=cYN7frg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-25 9:56 ` Hongbo Zhang
2012-10-25 10:04 ` Viresh Kumar
2012-10-25 10:11 ` Viresh Kumar
2012-10-25 10:45 ` Hongbo Zhang
2012-10-25 11:13 ` [PATCH V2 5/6] Thermal: Add ST-Ericsson DB8500 thermal driver hongbo.zhang
2012-10-27 10:53 ` Francesco Lavra
2012-10-24 11:58 ` [PATCH V2 6/6] Thermal: Add ST-Ericsson DB8500 thermal properties and platform data hongbo.zhang
2012-10-24 14:32 ` Joe Perches
2012-10-25 3:45 ` Hongbo Zhang
[not found] ` <1351079900-32236-7-git-send-email-hongbo.zhang-68IGFXMjmZ7QT0dZR+AlfA@public.gmane.org>
2012-10-24 14:47 ` Viresh Kumar
[not found] ` <CAKohpom0EOAuahLQoNr1ODbTT-Trv3eE0-oBEmbbdbiKBJPCng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-25 3:49 ` Hongbo Zhang
2012-10-25 11:15 ` hongbo.zhang
2012-10-25 11:39 ` hongbo.zhang [this message]
2012-10-30 16:48 ` [PATCH V3 0/5] Fix thermal bugs and Upstream ST-Ericsson thermal driver hongbo.zhang
2012-10-30 16:48 ` [PATCH V3 1/5] Thermal: add indent for code alignment hongbo.zhang
[not found] ` <1351615741-24134-2-git-send-email-hongbo.zhang-68IGFXMjmZ7QT0dZR+AlfA@public.gmane.org>
2012-11-07 6:54 ` Zhang Rui
[not found] ` <1351615741-24134-1-git-send-email-hongbo.zhang-68IGFXMjmZ7QT0dZR+AlfA@public.gmane.org>
2012-10-30 16:48 ` [PATCH V3 2/5] Thermal: fix bug of counting cpu frequencies hongbo.zhang
2012-11-07 6:54 ` Zhang Rui
2012-10-30 16:48 ` [PATCH V3 3/5] Thermal: Remove the cooling_cpufreq_list hongbo.zhang
2012-11-07 6:54 ` Zhang Rui
2012-11-09 11:54 ` Hongbo Zhang
2012-10-30 16:49 ` [PATCH V3 4/5] Thermal: Add ST-Ericsson DB8500 thermal driver hongbo.zhang
2012-10-31 2:33 ` Viresh Kumar
[not found] ` <1351615741-24134-5-git-send-email-hongbo.zhang-68IGFXMjmZ7QT0dZR+AlfA@public.gmane.org>
2012-11-01 1:52 ` Zhang, Rui
2012-11-06 10:17 ` Hongbo Zhang
2012-11-06 10:30 ` Hongbo Zhang
2012-11-01 14:48 ` Francesco Lavra
2012-10-30 16:49 ` [PATCH V3 5/5] Thermal: Add ST-Ericsson DB8500 thermal properties and platform data hongbo.zhang
2012-10-31 2:18 ` viresh kumar
2012-11-06 7:25 ` Hongbo Zhang
2012-10-31 2:08 ` [PATCH V3 0/5] Fix thermal bugs and Upstream ST-Ericsson thermal driver viresh kumar
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=1351165179-30599-1-git-send-email-hongbo.zhang@linaro.com \
--to=hongbo.zhang@linaro.org \
--cc=STEricsson_nomadik_linux@list.st.com \
--cc=hongbo.zhang@linaro.com \
--cc=kernel@igloocommunity.org \
--cc=linaro-dev@lists.linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=patches@linaro.org \
/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 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).