Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[pandora-kernel.git] / arch / arm / mach-ux500 / board-mop500.c
index e4dad22..e6ad161 100644 (file)
@@ -15,6 +15,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>
 #include <linux/of_platform.h>
 #include <linux/leds.h>
 #include <linux/pinctrl/consumer.h>
+#include <linux/platform_data/pinctrl-nomadik.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/hardware/gic.h>
 
 #include <plat/ste_dma40.h>
-#include <plat/gpio-nomadik.h>
 
 #include <mach/hardware.h>
 #include <mach/setup.h>
@@ -227,6 +228,67 @@ static struct ab8500_platform_data ab8500_platdata = {
        .codec          = &ab8500_codec_pdata,
 };
 
+/*
+ * 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
  */
@@ -582,6 +644,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)