diff options
author | hongbo.zhang <hongbo.zhang@linaro.com> | 2012-11-15 05:56:43 -0500 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2012-11-15 07:51:02 -0500 |
commit | dc1956b5f84de7d453ec4d9fe68385fffd689686 (patch) | |
tree | e2254dd16d7c178994439d0f784945b25e80e62c | |
parent | aa1acb0451bb27add173d9641d0b74c58889e693 (diff) |
Thermal: Add ST-Ericsson DB8500 thermal properties and platform data.
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>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r-- | arch/arm/boot/dts/dbx5x0.dtsi | 14 | ||||
-rw-r--r-- | arch/arm/boot/dts/snowball.dts | 31 | ||||
-rw-r--r-- | arch/arm/configs/u8500_defconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 64 |
4 files changed, 111 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 4b0e0ca08f40..731086b2fca2 100644 --- a/arch/arm/boot/dts/dbx5x0.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi | |||
@@ -203,6 +203,14 @@ | |||
203 | reg = <0x80157450 0xC>; | 203 | reg = <0x80157450 0xC>; |
204 | }; | 204 | }; |
205 | 205 | ||
206 | thermal@801573c0 { | ||
207 | compatible = "stericsson,db8500-thermal"; | ||
208 | reg = <0x801573c0 0x40>; | ||
209 | interrupts = <21 0x4>, <22 0x4>; | ||
210 | interrupt-names = "IRQ_HOTMON_LOW", "IRQ_HOTMON_HIGH"; | ||
211 | status = "disabled"; | ||
212 | }; | ||
213 | |||
206 | db8500-prcmu-regulators { | 214 | db8500-prcmu-regulators { |
207 | compatible = "stericsson,db8500-prcmu-regulator"; | 215 | compatible = "stericsson,db8500-prcmu-regulator"; |
208 | 216 | ||
@@ -660,5 +668,11 @@ | |||
660 | ranges = <0 0x50000000 0x4000000>; | 668 | ranges = <0 0x50000000 0x4000000>; |
661 | status = "disabled"; | 669 | status = "disabled"; |
662 | }; | 670 | }; |
671 | |||
672 | cpufreq-cooling { | ||
673 | compatible = "stericsson,db8500-cpufreq-cooling"; | ||
674 | status = "disabled"; | ||
675 | }; | ||
676 | |||
663 | }; | 677 | }; |
664 | }; | 678 | }; |
diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts index 702c0baa6004..c6f85f0bc531 100644 --- a/arch/arm/boot/dts/snowball.dts +++ b/arch/arm/boot/dts/snowball.dts | |||
@@ -99,6 +99,33 @@ | |||
99 | status = "okay"; | 99 | status = "okay"; |
100 | }; | 100 | }; |
101 | 101 | ||
102 | prcmu@80157000 { | ||
103 | thermal@801573c0 { | ||
104 | num-trips = <4>; | ||
105 | |||
106 | trip0-temp = <70000>; | ||
107 | trip0-type = "active"; | ||
108 | trip0-cdev-num = <1>; | ||
109 | trip0-cdev-name0 = "thermal-cpufreq-0"; | ||
110 | |||
111 | trip1-temp = <75000>; | ||
112 | trip1-type = "active"; | ||
113 | trip1-cdev-num = <1>; | ||
114 | trip1-cdev-name0 = "thermal-cpufreq-0"; | ||
115 | |||
116 | trip2-temp = <80000>; | ||
117 | trip2-type = "active"; | ||
118 | trip2-cdev-num = <1>; | ||
119 | trip2-cdev-name0 = "thermal-cpufreq-0"; | ||
120 | |||
121 | trip3-temp = <85000>; | ||
122 | trip3-type = "critical"; | ||
123 | trip3-cdev-num = <0>; | ||
124 | |||
125 | status = "okay"; | ||
126 | }; | ||
127 | }; | ||
128 | |||
102 | external-bus@50000000 { | 129 | external-bus@50000000 { |
103 | status = "okay"; | 130 | status = "okay"; |
104 | 131 | ||
@@ -183,5 +210,9 @@ | |||
183 | reg = <0x33>; | 210 | reg = <0x33>; |
184 | }; | 211 | }; |
185 | }; | 212 | }; |
213 | |||
214 | cpufreq-cooling { | ||
215 | status = "okay"; | ||
216 | }; | ||
186 | }; | 217 | }; |
187 | }; | 218 | }; |
diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index da6845493caa..250625d5223f 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig | |||
@@ -69,6 +69,8 @@ CONFIG_GPIO_TC3589X=y | |||
69 | CONFIG_POWER_SUPPLY=y | 69 | CONFIG_POWER_SUPPLY=y |
70 | CONFIG_AB8500_BM=y | 70 | CONFIG_AB8500_BM=y |
71 | CONFIG_AB8500_BATTERY_THERM_ON_BATCTRL=y | 71 | CONFIG_AB8500_BATTERY_THERM_ON_BATCTRL=y |
72 | CONFIG_THERMAL=y | ||
73 | CONFIG_CPU_THERMAL=y | ||
72 | CONFIG_MFD_STMPE=y | 74 | CONFIG_MFD_STMPE=y |
73 | CONFIG_MFD_TC3589X=y | 75 | CONFIG_MFD_TC3589X=y |
74 | CONFIG_AB5500_CORE=y | 76 | CONFIG_AB5500_CORE=y |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 416d436111f2..b03216b15495 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/platform_data/i2c-nomadik.h> | 18 | #include <linux/platform_data/i2c-nomadik.h> |
19 | #include <linux/platform_data/db8500_thermal.h> | ||
19 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
20 | #include <linux/amba/bus.h> | 21 | #include <linux/amba/bus.h> |
21 | #include <linux/amba/pl022.h> | 22 | #include <linux/amba/pl022.h> |
@@ -229,6 +230,67 @@ static struct ab8500_platform_data ab8500_platdata = { | |||
229 | }; | 230 | }; |
230 | 231 | ||
231 | /* | 232 | /* |
233 | * Thermal Sensor | ||
234 | */ | ||
235 | |||
236 | static struct resource db8500_thsens_resources[] = { | ||
237 | { | ||
238 | .name = "IRQ_HOTMON_LOW", | ||
239 | .start = IRQ_PRCMU_HOTMON_LOW, | ||
240 | .end = IRQ_PRCMU_HOTMON_LOW, | ||
241 | .flags = IORESOURCE_IRQ, | ||
242 | }, | ||
243 | { | ||
244 | .name = "IRQ_HOTMON_HIGH", | ||
245 | .start = IRQ_PRCMU_HOTMON_HIGH, | ||
246 | .end = IRQ_PRCMU_HOTMON_HIGH, | ||
247 | .flags = IORESOURCE_IRQ, | ||
248 | }, | ||
249 | }; | ||
250 | |||
251 | static struct db8500_thsens_platform_data db8500_thsens_data = { | ||
252 | .trip_points[0] = { | ||
253 | .temp = 70000, | ||
254 | .type = THERMAL_TRIP_ACTIVE, | ||
255 | .cdev_name = { | ||
256 | [0] = "thermal-cpufreq-0", | ||
257 | }, | ||
258 | }, | ||
259 | .trip_points[1] = { | ||
260 | .temp = 75000, | ||
261 | .type = THERMAL_TRIP_ACTIVE, | ||
262 | .cdev_name = { | ||
263 | [0] = "thermal-cpufreq-0", | ||
264 | }, | ||
265 | }, | ||
266 | .trip_points[2] = { | ||
267 | .temp = 80000, | ||
268 | .type = THERMAL_TRIP_ACTIVE, | ||
269 | .cdev_name = { | ||
270 | [0] = "thermal-cpufreq-0", | ||
271 | }, | ||
272 | }, | ||
273 | .trip_points[3] = { | ||
274 | .temp = 85000, | ||
275 | .type = THERMAL_TRIP_CRITICAL, | ||
276 | }, | ||
277 | .num_trips = 4, | ||
278 | }; | ||
279 | |||
280 | static struct platform_device u8500_thsens_device = { | ||
281 | .name = "db8500-thermal", | ||
282 | .resource = db8500_thsens_resources, | ||
283 | .num_resources = ARRAY_SIZE(db8500_thsens_resources), | ||
284 | .dev = { | ||
285 | .platform_data = &db8500_thsens_data, | ||
286 | }, | ||
287 | }; | ||
288 | |||
289 | static struct platform_device u8500_cpufreq_cooling_device = { | ||
290 | .name = "db8500-cpufreq-cooling", | ||
291 | }; | ||
292 | |||
293 | /* | ||
232 | * TPS61052 | 294 | * TPS61052 |
233 | */ | 295 | */ |
234 | 296 | ||
@@ -583,6 +645,8 @@ static struct platform_device *snowball_platform_devs[] __initdata = { | |||
583 | &snowball_key_dev, | 645 | &snowball_key_dev, |
584 | &snowball_sbnet_dev, | 646 | &snowball_sbnet_dev, |
585 | &snowball_gpio_en_3v3_regulator_dev, | 647 | &snowball_gpio_en_3v3_regulator_dev, |
648 | &u8500_thsens_device, | ||
649 | &u8500_cpufreq_cooling_device, | ||
586 | }; | 650 | }; |
587 | 651 | ||
588 | static void __init mop500_init_machine(void) | 652 | static void __init mop500_init_machine(void) |