]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/blobdiff - arch/arm/mach-ux500/board-mop500.c
Merge tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[can-eth-gw-linux.git] / arch / arm / mach-ux500 / board-mop500.c
index daa4237ac0dcfe7be72d403e496cc6724bfb1e24..5b70212c2536c966fe4d98ad3c91269f79dd754a 100644 (file)
@@ -1,6 +1,5 @@
-
 /*
- * Copyright (C) 2008-2009 ST-Ericsson
+ * Copyright (C) 2008-2012 ST-Ericsson
  *
  * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
  *
@@ -16,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/delay.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>
@@ -226,6 +226,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
  */
@@ -581,6 +642,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)
@@ -695,6 +758,16 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
        .init_late      = ux500_init_late,
 MACHINE_END
 
+MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520")
+       .atag_offset    = 0x100,
+       .map_io         = u8500_map_io,
+       .init_irq       = ux500_init_irq,
+       .timer          = &ux500_timer,
+       .handle_irq     = gic_handle_irq,
+       .init_machine   = mop500_init_machine,
+       .init_late      = ux500_init_late,
+MACHINE_END
+
 MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
        .atag_offset    = 0x100,
        .smp            = smp_ops(ux500_smp_ops),