Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 1 | /* |
Linus Walleij | a3a6c6a | 2012-10-01 09:37:39 +0200 | [diff] [blame] | 2 | * Copyright (C) 2008-2012 ST-Ericsson |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 3 | * |
| 4 | * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2, as |
| 8 | * published by the Free Software Foundation. |
| 9 | * |
| 10 | */ |
| 11 | #include <linux/kernel.h> |
| 12 | #include <linux/init.h> |
| 13 | #include <linux/interrupt.h> |
| 14 | #include <linux/platform_device.h> |
| 15 | #include <linux/io.h> |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 16 | #include <linux/i2c.h> |
Alessandro Rubini | af97bac | 2012-06-11 22:56:26 +0200 | [diff] [blame] | 17 | #include <linux/platform_data/i2c-nomadik.h> |
hongbo.zhang | dc1956b | 2012-11-15 18:56:43 +0800 | [diff] [blame] | 18 | #include <linux/platform_data/db8500_thermal.h> |
Rabin Vincent | ea05a57 | 2010-06-03 07:58:42 +0100 | [diff] [blame] | 19 | #include <linux/gpio.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 20 | #include <linux/amba/bus.h> |
| 21 | #include <linux/amba/pl022.h> |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 22 | #include <linux/amba/serial.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 23 | #include <linux/spi/spi.h> |
Linus Walleij | ee66e65 | 2011-12-02 14:16:33 +0100 | [diff] [blame] | 24 | #include <linux/mfd/abx500/ab8500.h> |
Bengt Jonsson | 79568b94 | 2011-03-11 11:54:46 +0100 | [diff] [blame] | 25 | #include <linux/regulator/ab8500.h> |
Lee Jones | 0b5ea1e | 2012-09-03 14:33:39 +0100 | [diff] [blame] | 26 | #include <linux/regulator/fixed.h> |
Sundar Iyer | 20406eb | 2010-12-13 09:33:14 +0530 | [diff] [blame] | 27 | #include <linux/mfd/tc3589x.h> |
Linus Walleij | fe67dfc | 2011-03-07 11:48:15 +0100 | [diff] [blame] | 28 | #include <linux/mfd/tps6105x.h> |
Linus Walleij | ee66e65 | 2011-12-02 14:16:33 +0100 | [diff] [blame] | 29 | #include <linux/mfd/abx500/ab8500-gpio.h> |
Ola Lilja | f242e50 | 2012-06-07 14:00:46 +0200 | [diff] [blame] | 30 | #include <linux/mfd/abx500/ab8500-codec.h> |
Philippe Langlais | dd7b2a0 | 2011-01-12 11:26:20 +0100 | [diff] [blame] | 31 | #include <linux/leds-lp5521.h> |
Philippe Langlais | a71b819 | 2011-01-14 10:53:59 +0100 | [diff] [blame] | 32 | #include <linux/input.h> |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 33 | #include <linux/smsc911x.h> |
Philippe Langlais | a71b819 | 2011-01-14 10:53:59 +0100 | [diff] [blame] | 34 | #include <linux/gpio_keys.h> |
Shreshtha Kumar Sahu | 1a7d436 | 2011-06-13 10:11:44 +0200 | [diff] [blame] | 35 | #include <linux/delay.h> |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 36 | #include <linux/leds.h> |
Linus Walleij | a098066 | 2012-05-07 01:33:24 +0200 | [diff] [blame] | 37 | #include <linux/pinctrl/consumer.h> |
Linus Walleij | bb16bd9 | 2012-10-10 14:27:58 +0200 | [diff] [blame] | 38 | #include <linux/platform_data/pinctrl-nomadik.h> |
Linus Walleij | 865fab6 | 2012-10-18 14:20:16 +0200 | [diff] [blame] | 39 | #include <linux/platform_data/dma-ste-dma40.h> |
Linus Walleij | a098066 | 2012-05-07 01:33:24 +0200 | [diff] [blame] | 40 | |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 41 | #include <asm/mach-types.h> |
| 42 | #include <asm/mach/arch.h> |
Marc Zyngier | bbf5f38 | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 43 | #include <asm/hardware/gic.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 44 | |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 45 | #include <mach/hardware.h> |
| 46 | #include <mach/setup.h> |
Rabin Vincent | 9e4e7fe | 2010-05-03 08:03:52 +0100 | [diff] [blame] | 47 | #include <mach/devices.h> |
Linus Walleij | 29aeb3c | 2010-09-06 22:15:08 +0100 | [diff] [blame] | 48 | #include <mach/irqs.h> |
Arnd Bergmann | db298da | 2012-08-24 15:19:33 +0200 | [diff] [blame] | 49 | #include <linux/platform_data/crypto-ux500.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 50 | |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 51 | #include "ste-dma40-db8500.h" |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 52 | #include "devices-db8500.h" |
Hanumath Prasad | 008f8a2 | 2010-08-19 12:06:32 +0100 | [diff] [blame] | 53 | #include "board-mop500.h" |
Bengt Jonsson | a1e516e | 2010-12-10 11:08:48 +0100 | [diff] [blame] | 54 | #include "board-mop500-regulators.h" |
Rabin Vincent | ea05a57 | 2010-06-03 07:58:42 +0100 | [diff] [blame] | 55 | |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 56 | static struct gpio_led snowball_led_array[] = { |
| 57 | { |
| 58 | .name = "user_led", |
Lee Jones | c525f07 | 2012-05-02 09:20:37 +0100 | [diff] [blame] | 59 | .default_trigger = "heartbeat", |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 60 | .gpio = 142, |
| 61 | }, |
| 62 | }; |
| 63 | |
| 64 | static struct gpio_led_platform_data snowball_led_data = { |
| 65 | .leds = snowball_led_array, |
| 66 | .num_leds = ARRAY_SIZE(snowball_led_array), |
| 67 | }; |
| 68 | |
| 69 | static struct platform_device snowball_led_dev = { |
| 70 | .name = "leds-gpio", |
| 71 | .dev = { |
| 72 | .platform_data = &snowball_led_data, |
| 73 | }, |
| 74 | }; |
| 75 | |
Lee Jones | 0b5ea1e | 2012-09-03 14:33:39 +0100 | [diff] [blame] | 76 | static struct fixed_voltage_config snowball_gpio_en_3v3_data = { |
| 77 | .supply_name = "EN-3V3", |
| 78 | .gpio = SNOWBALL_EN_3V3_ETH_GPIO, |
| 79 | .microvolts = 3300000, |
| 80 | .enable_high = 1, |
| 81 | .init_data = &gpio_en_3v3_regulator, |
| 82 | .startup_delay = 5000, /* 1200us */ |
| 83 | }; |
| 84 | |
| 85 | static struct platform_device snowball_gpio_en_3v3_regulator_dev = { |
| 86 | .name = "reg-fixed-voltage", |
| 87 | .id = 1, |
| 88 | .dev = { |
| 89 | .platform_data = &snowball_gpio_en_3v3_data, |
| 90 | }, |
| 91 | }; |
| 92 | |
Patrice Chotard | 0493e64 | 2013-01-08 10:41:02 +0100 | [diff] [blame^] | 93 | static struct abx500_gpio_platform_data ab8500_gpio_pdata = { |
Philippe Langlais | a1524ee | 2012-02-13 10:52:25 +0100 | [diff] [blame] | 94 | .gpio_base = MOP500_AB8500_PIN_GPIO(1), |
Bibek Basu | 3ef374a | 2011-02-15 12:56:16 +0530 | [diff] [blame] | 95 | .irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE, |
Bibek Basu | 3ef374a | 2011-02-15 12:56:16 +0530 | [diff] [blame] | 96 | }; |
| 97 | |
Ola Lilja | f242e50 | 2012-06-07 14:00:46 +0200 | [diff] [blame] | 98 | /* ab8500-codec */ |
| 99 | static struct ab8500_codec_platform_data ab8500_codec_pdata = { |
| 100 | .amics = { |
| 101 | .mic1_type = AMIC_TYPE_DIFFERENTIAL, |
| 102 | .mic2_type = AMIC_TYPE_DIFFERENTIAL, |
| 103 | .mic1a_micbias = AMIC_MICBIAS_VAMIC1, |
| 104 | .mic1b_micbias = AMIC_MICBIAS_VAMIC1, |
| 105 | .mic2_micbias = AMIC_MICBIAS_VAMIC2 |
| 106 | }, |
| 107 | .ear_cmv = EAR_CMV_0_95V |
| 108 | }; |
| 109 | |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 110 | static struct gpio_keys_button snowball_key_array[] = { |
| 111 | { |
| 112 | .gpio = 32, |
| 113 | .type = EV_KEY, |
| 114 | .code = KEY_1, |
| 115 | .desc = "userpb", |
| 116 | .active_low = 1, |
| 117 | .debounce_interval = 50, |
| 118 | .wakeup = 1, |
| 119 | }, |
| 120 | { |
| 121 | .gpio = 151, |
| 122 | .type = EV_KEY, |
| 123 | .code = KEY_2, |
| 124 | .desc = "extkb1", |
| 125 | .active_low = 1, |
| 126 | .debounce_interval = 50, |
| 127 | .wakeup = 1, |
| 128 | }, |
| 129 | { |
| 130 | .gpio = 152, |
| 131 | .type = EV_KEY, |
| 132 | .code = KEY_3, |
| 133 | .desc = "extkb2", |
| 134 | .active_low = 1, |
| 135 | .debounce_interval = 50, |
| 136 | .wakeup = 1, |
| 137 | }, |
| 138 | { |
| 139 | .gpio = 161, |
| 140 | .type = EV_KEY, |
| 141 | .code = KEY_4, |
| 142 | .desc = "extkb3", |
| 143 | .active_low = 1, |
| 144 | .debounce_interval = 50, |
| 145 | .wakeup = 1, |
| 146 | }, |
| 147 | { |
| 148 | .gpio = 162, |
| 149 | .type = EV_KEY, |
| 150 | .code = KEY_5, |
| 151 | .desc = "extkb4", |
| 152 | .active_low = 1, |
| 153 | .debounce_interval = 50, |
| 154 | .wakeup = 1, |
| 155 | }, |
| 156 | }; |
| 157 | |
| 158 | static struct gpio_keys_platform_data snowball_key_data = { |
| 159 | .buttons = snowball_key_array, |
| 160 | .nbuttons = ARRAY_SIZE(snowball_key_array), |
| 161 | }; |
| 162 | |
| 163 | static struct platform_device snowball_key_dev = { |
| 164 | .name = "gpio-keys", |
| 165 | .id = -1, |
| 166 | .dev = { |
| 167 | .platform_data = &snowball_key_data, |
| 168 | } |
| 169 | }; |
| 170 | |
| 171 | static struct smsc911x_platform_config snowball_sbnet_cfg = { |
| 172 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, |
| 173 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, |
| 174 | .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY, |
| 175 | .shift = 1, |
| 176 | }; |
| 177 | |
| 178 | static struct resource sbnet_res[] = { |
| 179 | { |
| 180 | .name = "smsc911x-memory", |
| 181 | .start = (0x5000 << 16), |
| 182 | .end = (0x5000 << 16) + 0xffff, |
| 183 | .flags = IORESOURCE_MEM, |
| 184 | }, |
| 185 | { |
| 186 | .start = NOMADIK_GPIO_TO_IRQ(140), |
| 187 | .end = NOMADIK_GPIO_TO_IRQ(140), |
| 188 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
| 189 | }, |
| 190 | }; |
| 191 | |
| 192 | static struct platform_device snowball_sbnet_dev = { |
| 193 | .name = "smsc911x", |
| 194 | .num_resources = ARRAY_SIZE(sbnet_res), |
| 195 | .resource = sbnet_res, |
| 196 | .dev = { |
| 197 | .platform_data = &snowball_sbnet_cfg, |
| 198 | }, |
| 199 | }; |
| 200 | |
Rabin Vincent | 39ae702 | 2010-07-26 11:12:15 +0100 | [diff] [blame] | 201 | static struct ab8500_platform_data ab8500_platdata = { |
| 202 | .irq_base = MOP500_AB8500_IRQ_BASE, |
Bengt Jonsson | dfa3a82 | 2011-03-09 13:34:17 +0100 | [diff] [blame] | 203 | .regulator_reg_init = ab8500_regulator_reg_init, |
| 204 | .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init), |
Bengt Jonsson | a1e516e | 2010-12-10 11:08:48 +0100 | [diff] [blame] | 205 | .regulator = ab8500_regulators, |
| 206 | .num_regulator = ARRAY_SIZE(ab8500_regulators), |
Bibek Basu | 3ef374a | 2011-02-15 12:56:16 +0530 | [diff] [blame] | 207 | .gpio = &ab8500_gpio_pdata, |
Ola Lilja | f242e50 | 2012-06-07 14:00:46 +0200 | [diff] [blame] | 208 | .codec = &ab8500_codec_pdata, |
Rabin Vincent | 39ae702 | 2010-07-26 11:12:15 +0100 | [diff] [blame] | 209 | }; |
| 210 | |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 211 | /* |
hongbo.zhang | dc1956b | 2012-11-15 18:56:43 +0800 | [diff] [blame] | 212 | * Thermal Sensor |
| 213 | */ |
| 214 | |
| 215 | static struct resource db8500_thsens_resources[] = { |
| 216 | { |
| 217 | .name = "IRQ_HOTMON_LOW", |
| 218 | .start = IRQ_PRCMU_HOTMON_LOW, |
| 219 | .end = IRQ_PRCMU_HOTMON_LOW, |
| 220 | .flags = IORESOURCE_IRQ, |
| 221 | }, |
| 222 | { |
| 223 | .name = "IRQ_HOTMON_HIGH", |
| 224 | .start = IRQ_PRCMU_HOTMON_HIGH, |
| 225 | .end = IRQ_PRCMU_HOTMON_HIGH, |
| 226 | .flags = IORESOURCE_IRQ, |
| 227 | }, |
| 228 | }; |
| 229 | |
| 230 | static struct db8500_thsens_platform_data db8500_thsens_data = { |
| 231 | .trip_points[0] = { |
| 232 | .temp = 70000, |
| 233 | .type = THERMAL_TRIP_ACTIVE, |
| 234 | .cdev_name = { |
| 235 | [0] = "thermal-cpufreq-0", |
| 236 | }, |
| 237 | }, |
| 238 | .trip_points[1] = { |
| 239 | .temp = 75000, |
| 240 | .type = THERMAL_TRIP_ACTIVE, |
| 241 | .cdev_name = { |
| 242 | [0] = "thermal-cpufreq-0", |
| 243 | }, |
| 244 | }, |
| 245 | .trip_points[2] = { |
| 246 | .temp = 80000, |
| 247 | .type = THERMAL_TRIP_ACTIVE, |
| 248 | .cdev_name = { |
| 249 | [0] = "thermal-cpufreq-0", |
| 250 | }, |
| 251 | }, |
| 252 | .trip_points[3] = { |
| 253 | .temp = 85000, |
| 254 | .type = THERMAL_TRIP_CRITICAL, |
| 255 | }, |
| 256 | .num_trips = 4, |
| 257 | }; |
| 258 | |
| 259 | static struct platform_device u8500_thsens_device = { |
| 260 | .name = "db8500-thermal", |
| 261 | .resource = db8500_thsens_resources, |
| 262 | .num_resources = ARRAY_SIZE(db8500_thsens_resources), |
| 263 | .dev = { |
| 264 | .platform_data = &db8500_thsens_data, |
| 265 | }, |
| 266 | }; |
| 267 | |
| 268 | static struct platform_device u8500_cpufreq_cooling_device = { |
| 269 | .name = "db8500-cpufreq-cooling", |
| 270 | }; |
| 271 | |
| 272 | /* |
Linus Walleij | fe67dfc | 2011-03-07 11:48:15 +0100 | [diff] [blame] | 273 | * TPS61052 |
| 274 | */ |
| 275 | |
| 276 | static struct tps6105x_platform_data mop500_tps61052_data = { |
| 277 | .mode = TPS6105X_MODE_VOLTAGE, |
| 278 | .regulator_data = &tps61052_regulator, |
| 279 | }; |
| 280 | |
| 281 | /* |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 282 | * TC35892 |
| 283 | */ |
| 284 | |
Sundar Iyer | 20406eb | 2010-12-13 09:33:14 +0530 | [diff] [blame] | 285 | static void mop500_tc35892_init(struct tc3589x *tc3589x, unsigned int base) |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 286 | { |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 287 | struct device *parent = NULL; |
| 288 | #if 0 |
| 289 | /* FIXME: Is the sdi actually part of tc3589x? */ |
| 290 | parent = tc3589x->dev; |
| 291 | #endif |
| 292 | mop500_sdi_tc35892_init(parent); |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 293 | } |
| 294 | |
Sundar Iyer | 20406eb | 2010-12-13 09:33:14 +0530 | [diff] [blame] | 295 | static struct tc3589x_gpio_platform_data mop500_tc35892_gpio_data = { |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 296 | .gpio_base = MOP500_EGPIO(0), |
| 297 | .setup = mop500_tc35892_init, |
| 298 | }; |
| 299 | |
Sundar Iyer | 20406eb | 2010-12-13 09:33:14 +0530 | [diff] [blame] | 300 | static struct tc3589x_platform_data mop500_tc35892_data = { |
Sundar Iyer | 611b759 | 2010-12-13 09:33:15 +0530 | [diff] [blame] | 301 | .block = TC3589x_BLOCK_GPIO, |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 302 | .gpio = &mop500_tc35892_gpio_data, |
| 303 | .irq_base = MOP500_EGPIO_IRQ_BASE, |
| 304 | }; |
| 305 | |
Philippe Langlais | dd7b2a0 | 2011-01-12 11:26:20 +0100 | [diff] [blame] | 306 | static struct lp5521_led_config lp5521_pri_led[] = { |
| 307 | [0] = { |
| 308 | .chan_nr = 0, |
| 309 | .led_current = 0x2f, |
| 310 | .max_current = 0x5f, |
| 311 | }, |
| 312 | [1] = { |
| 313 | .chan_nr = 1, |
| 314 | .led_current = 0x2f, |
| 315 | .max_current = 0x5f, |
| 316 | }, |
| 317 | [2] = { |
| 318 | .chan_nr = 2, |
| 319 | .led_current = 0x2f, |
| 320 | .max_current = 0x5f, |
| 321 | }, |
| 322 | }; |
| 323 | |
| 324 | static struct lp5521_platform_data __initdata lp5521_pri_data = { |
| 325 | .label = "lp5521_pri", |
| 326 | .led_config = &lp5521_pri_led[0], |
| 327 | .num_channels = 3, |
| 328 | .clock_mode = LP5521_CLOCK_EXT, |
| 329 | }; |
| 330 | |
| 331 | static struct lp5521_led_config lp5521_sec_led[] = { |
| 332 | [0] = { |
| 333 | .chan_nr = 0, |
| 334 | .led_current = 0x2f, |
| 335 | .max_current = 0x5f, |
| 336 | }, |
| 337 | [1] = { |
| 338 | .chan_nr = 1, |
| 339 | .led_current = 0x2f, |
| 340 | .max_current = 0x5f, |
| 341 | }, |
| 342 | [2] = { |
| 343 | .chan_nr = 2, |
| 344 | .led_current = 0x2f, |
| 345 | .max_current = 0x5f, |
| 346 | }, |
| 347 | }; |
| 348 | |
| 349 | static struct lp5521_platform_data __initdata lp5521_sec_data = { |
| 350 | .label = "lp5521_sec", |
| 351 | .led_config = &lp5521_sec_led[0], |
| 352 | .num_channels = 3, |
| 353 | .clock_mode = LP5521_CLOCK_EXT, |
| 354 | }; |
| 355 | |
Linus Walleij | fe67dfc | 2011-03-07 11:48:15 +0100 | [diff] [blame] | 356 | static struct i2c_board_info __initdata mop500_i2c0_devices[] = { |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 357 | { |
Sundar Iyer | 20406eb | 2010-12-13 09:33:14 +0530 | [diff] [blame] | 358 | I2C_BOARD_INFO("tc3589x", 0x42), |
Philippe Langlais | dd7b2a0 | 2011-01-12 11:26:20 +0100 | [diff] [blame] | 359 | .irq = NOMADIK_GPIO_TO_IRQ(217), |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 360 | .platform_data = &mop500_tc35892_data, |
| 361 | }, |
Linus Walleij | cf568c5 | 2011-03-30 14:31:42 +0200 | [diff] [blame] | 362 | /* I2C0 devices only available prior to HREFv60 */ |
Linus Walleij | fe67dfc | 2011-03-07 11:48:15 +0100 | [diff] [blame] | 363 | { |
| 364 | I2C_BOARD_INFO("tps61052", 0x33), |
| 365 | .platform_data = &mop500_tps61052_data, |
| 366 | }, |
| 367 | }; |
| 368 | |
Linus Walleij | cf568c5 | 2011-03-30 14:31:42 +0200 | [diff] [blame] | 369 | #define NUM_PRE_V60_I2C0_DEVICES 1 |
| 370 | |
Philippe Langlais | dd7b2a0 | 2011-01-12 11:26:20 +0100 | [diff] [blame] | 371 | static struct i2c_board_info __initdata mop500_i2c2_devices[] = { |
| 372 | { |
| 373 | /* lp5521 LED driver, 1st device */ |
| 374 | I2C_BOARD_INFO("lp5521", 0x33), |
| 375 | .platform_data = &lp5521_pri_data, |
| 376 | }, |
| 377 | { |
| 378 | /* lp5521 LED driver, 2st device */ |
| 379 | I2C_BOARD_INFO("lp5521", 0x34), |
| 380 | .platform_data = &lp5521_sec_data, |
| 381 | }, |
Lee Jones | bb3b218 | 2011-01-13 14:41:22 +0000 | [diff] [blame] | 382 | { |
| 383 | /* Light sensor Rohm BH1780GLI */ |
| 384 | I2C_BOARD_INFO("bh1780", 0x29), |
| 385 | }, |
Philippe Langlais | dd7b2a0 | 2011-01-12 11:26:20 +0100 | [diff] [blame] | 386 | }; |
| 387 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 388 | static void __init mop500_i2c_init(struct device *parent) |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 389 | { |
Lee Jones | 98582d9 | 2012-04-17 15:52:26 +0100 | [diff] [blame] | 390 | db8500_add_i2c0(parent, NULL); |
| 391 | db8500_add_i2c1(parent, NULL); |
| 392 | db8500_add_i2c2(parent, NULL); |
| 393 | db8500_add_i2c3(parent, NULL); |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 394 | } |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 395 | |
Philippe Langlais | a71b819 | 2011-01-14 10:53:59 +0100 | [diff] [blame] | 396 | static struct gpio_keys_button mop500_gpio_keys[] = { |
| 397 | { |
| 398 | .desc = "SFH7741 Proximity Sensor", |
| 399 | .type = EV_SW, |
| 400 | .code = SW_FRONT_PROXIMITY, |
Philippe Langlais | a71b819 | 2011-01-14 10:53:59 +0100 | [diff] [blame] | 401 | .active_low = 0, |
| 402 | .can_disable = 1, |
| 403 | } |
| 404 | }; |
| 405 | |
| 406 | static struct regulator *prox_regulator; |
| 407 | static int mop500_prox_activate(struct device *dev); |
| 408 | static void mop500_prox_deactivate(struct device *dev); |
| 409 | |
| 410 | static struct gpio_keys_platform_data mop500_gpio_keys_data = { |
| 411 | .buttons = mop500_gpio_keys, |
| 412 | .nbuttons = ARRAY_SIZE(mop500_gpio_keys), |
| 413 | .enable = mop500_prox_activate, |
| 414 | .disable = mop500_prox_deactivate, |
| 415 | }; |
| 416 | |
| 417 | static struct platform_device mop500_gpio_keys_device = { |
| 418 | .name = "gpio-keys", |
| 419 | .id = 0, |
| 420 | .dev = { |
| 421 | .platform_data = &mop500_gpio_keys_data, |
| 422 | }, |
| 423 | }; |
| 424 | |
| 425 | static int mop500_prox_activate(struct device *dev) |
| 426 | { |
| 427 | prox_regulator = regulator_get(&mop500_gpio_keys_device.dev, |
| 428 | "vcc"); |
| 429 | if (IS_ERR(prox_regulator)) { |
| 430 | dev_err(&mop500_gpio_keys_device.dev, |
| 431 | "no regulator\n"); |
| 432 | return PTR_ERR(prox_regulator); |
| 433 | } |
| 434 | regulator_enable(prox_regulator); |
| 435 | return 0; |
| 436 | } |
| 437 | |
| 438 | static void mop500_prox_deactivate(struct device *dev) |
| 439 | { |
| 440 | regulator_disable(prox_regulator); |
| 441 | regulator_put(prox_regulator); |
| 442 | } |
| 443 | |
Andreas Westin | 585d188 | 2012-05-10 10:14:06 +0200 | [diff] [blame] | 444 | static struct cryp_platform_data u8500_cryp1_platform_data = { |
| 445 | .mem_to_engine = { |
| 446 | .dir = STEDMA40_MEM_TO_PERIPH, |
| 447 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, |
| 448 | .dst_dev_type = DB8500_DMA_DEV48_CAC1_TX, |
| 449 | .src_info.data_width = STEDMA40_WORD_WIDTH, |
| 450 | .dst_info.data_width = STEDMA40_WORD_WIDTH, |
| 451 | .mode = STEDMA40_MODE_LOGICAL, |
| 452 | .src_info.psize = STEDMA40_PSIZE_LOG_4, |
| 453 | .dst_info.psize = STEDMA40_PSIZE_LOG_4, |
| 454 | }, |
| 455 | .engine_to_mem = { |
| 456 | .dir = STEDMA40_PERIPH_TO_MEM, |
| 457 | .src_dev_type = DB8500_DMA_DEV48_CAC1_RX, |
| 458 | .dst_dev_type = STEDMA40_DEV_DST_MEMORY, |
| 459 | .src_info.data_width = STEDMA40_WORD_WIDTH, |
| 460 | .dst_info.data_width = STEDMA40_WORD_WIDTH, |
| 461 | .mode = STEDMA40_MODE_LOGICAL, |
| 462 | .src_info.psize = STEDMA40_PSIZE_LOG_4, |
| 463 | .dst_info.psize = STEDMA40_PSIZE_LOG_4, |
| 464 | } |
| 465 | }; |
| 466 | |
| 467 | static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = { |
| 468 | .dir = STEDMA40_MEM_TO_PERIPH, |
| 469 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, |
| 470 | .dst_dev_type = DB8500_DMA_DEV50_HAC1_TX, |
| 471 | .src_info.data_width = STEDMA40_WORD_WIDTH, |
| 472 | .dst_info.data_width = STEDMA40_WORD_WIDTH, |
| 473 | .mode = STEDMA40_MODE_LOGICAL, |
| 474 | .src_info.psize = STEDMA40_PSIZE_LOG_16, |
| 475 | .dst_info.psize = STEDMA40_PSIZE_LOG_16, |
| 476 | }; |
| 477 | |
| 478 | static struct hash_platform_data u8500_hash1_platform_data = { |
| 479 | .mem_to_engine = &u8500_hash_dma_cfg_tx, |
| 480 | .dma_filter = stedma40_filter, |
| 481 | }; |
| 482 | |
Srinidhi Kasagar | d48a41c | 2010-02-03 13:02:48 +0100 | [diff] [blame] | 483 | /* add any platform devices here - TODO */ |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 484 | static struct platform_device *mop500_platform_devs[] __initdata = { |
Philippe Langlais | a71b819 | 2011-01-14 10:53:59 +0100 | [diff] [blame] | 485 | &mop500_gpio_keys_device, |
Srinidhi Kasagar | d48a41c | 2010-02-03 13:02:48 +0100 | [diff] [blame] | 486 | }; |
| 487 | |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 488 | #ifdef CONFIG_STE_DMA40 |
| 489 | static struct stedma40_chan_cfg ssp0_dma_cfg_rx = { |
| 490 | .mode = STEDMA40_MODE_LOGICAL, |
| 491 | .dir = STEDMA40_PERIPH_TO_MEM, |
| 492 | .src_dev_type = DB8500_DMA_DEV8_SSP0_RX, |
| 493 | .dst_dev_type = STEDMA40_DEV_DST_MEMORY, |
| 494 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 495 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 496 | }; |
| 497 | |
| 498 | static struct stedma40_chan_cfg ssp0_dma_cfg_tx = { |
| 499 | .mode = STEDMA40_MODE_LOGICAL, |
| 500 | .dir = STEDMA40_MEM_TO_PERIPH, |
| 501 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, |
| 502 | .dst_dev_type = DB8500_DMA_DEV8_SSP0_TX, |
| 503 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 504 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 505 | }; |
| 506 | #endif |
| 507 | |
Lee Jones | fa86a76 | 2012-09-27 10:17:36 +0100 | [diff] [blame] | 508 | struct pl022_ssp_controller ssp0_plat = { |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 509 | .bus_id = 0, |
| 510 | #ifdef CONFIG_STE_DMA40 |
| 511 | .enable_dma = 1, |
| 512 | .dma_filter = stedma40_filter, |
| 513 | .dma_rx_param = &ssp0_dma_cfg_rx, |
| 514 | .dma_tx_param = &ssp0_dma_cfg_tx, |
| 515 | #else |
| 516 | .enable_dma = 0, |
| 517 | #endif |
| 518 | /* on this platform, gpio 31,142,144,214 & |
| 519 | * 224 are connected as chip selects |
| 520 | */ |
| 521 | .num_chipselect = 5, |
| 522 | }; |
| 523 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 524 | static void __init mop500_spi_init(struct device *parent) |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 525 | { |
Lee Jones | 15daf69 | 2012-03-15 16:47:11 +0000 | [diff] [blame] | 526 | db8500_add_ssp0(parent, &ssp0_plat); |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 527 | } |
| 528 | |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 529 | #ifdef CONFIG_STE_DMA40 |
| 530 | static struct stedma40_chan_cfg uart0_dma_cfg_rx = { |
| 531 | .mode = STEDMA40_MODE_LOGICAL, |
| 532 | .dir = STEDMA40_PERIPH_TO_MEM, |
| 533 | .src_dev_type = DB8500_DMA_DEV13_UART0_RX, |
| 534 | .dst_dev_type = STEDMA40_DEV_DST_MEMORY, |
| 535 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 536 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 537 | }; |
| 538 | |
| 539 | static struct stedma40_chan_cfg uart0_dma_cfg_tx = { |
| 540 | .mode = STEDMA40_MODE_LOGICAL, |
| 541 | .dir = STEDMA40_MEM_TO_PERIPH, |
| 542 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, |
| 543 | .dst_dev_type = DB8500_DMA_DEV13_UART0_TX, |
| 544 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 545 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 546 | }; |
| 547 | |
| 548 | static struct stedma40_chan_cfg uart1_dma_cfg_rx = { |
| 549 | .mode = STEDMA40_MODE_LOGICAL, |
| 550 | .dir = STEDMA40_PERIPH_TO_MEM, |
| 551 | .src_dev_type = DB8500_DMA_DEV12_UART1_RX, |
| 552 | .dst_dev_type = STEDMA40_DEV_DST_MEMORY, |
| 553 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 554 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 555 | }; |
| 556 | |
| 557 | static struct stedma40_chan_cfg uart1_dma_cfg_tx = { |
| 558 | .mode = STEDMA40_MODE_LOGICAL, |
| 559 | .dir = STEDMA40_MEM_TO_PERIPH, |
| 560 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, |
| 561 | .dst_dev_type = DB8500_DMA_DEV12_UART1_TX, |
| 562 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 563 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 564 | }; |
| 565 | |
| 566 | static struct stedma40_chan_cfg uart2_dma_cfg_rx = { |
| 567 | .mode = STEDMA40_MODE_LOGICAL, |
| 568 | .dir = STEDMA40_PERIPH_TO_MEM, |
| 569 | .src_dev_type = DB8500_DMA_DEV11_UART2_RX, |
| 570 | .dst_dev_type = STEDMA40_DEV_DST_MEMORY, |
| 571 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 572 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 573 | }; |
| 574 | |
| 575 | static struct stedma40_chan_cfg uart2_dma_cfg_tx = { |
| 576 | .mode = STEDMA40_MODE_LOGICAL, |
| 577 | .dir = STEDMA40_MEM_TO_PERIPH, |
| 578 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, |
| 579 | .dst_dev_type = DB8500_DMA_DEV11_UART2_TX, |
| 580 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 581 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 582 | }; |
| 583 | #endif |
| 584 | |
Lee Jones | fa86a76 | 2012-09-27 10:17:36 +0100 | [diff] [blame] | 585 | struct amba_pl011_data uart0_plat = { |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 586 | #ifdef CONFIG_STE_DMA40 |
| 587 | .dma_filter = stedma40_filter, |
| 588 | .dma_rx_param = &uart0_dma_cfg_rx, |
| 589 | .dma_tx_param = &uart0_dma_cfg_tx, |
| 590 | #endif |
| 591 | }; |
| 592 | |
Lee Jones | fa86a76 | 2012-09-27 10:17:36 +0100 | [diff] [blame] | 593 | struct amba_pl011_data uart1_plat = { |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 594 | #ifdef CONFIG_STE_DMA40 |
| 595 | .dma_filter = stedma40_filter, |
| 596 | .dma_rx_param = &uart1_dma_cfg_rx, |
| 597 | .dma_tx_param = &uart1_dma_cfg_tx, |
| 598 | #endif |
| 599 | }; |
| 600 | |
Lee Jones | fa86a76 | 2012-09-27 10:17:36 +0100 | [diff] [blame] | 601 | struct amba_pl011_data uart2_plat = { |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 602 | #ifdef CONFIG_STE_DMA40 |
| 603 | .dma_filter = stedma40_filter, |
| 604 | .dma_rx_param = &uart2_dma_cfg_rx, |
| 605 | .dma_tx_param = &uart2_dma_cfg_tx, |
| 606 | #endif |
| 607 | }; |
| 608 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 609 | static void __init mop500_uart_init(struct device *parent) |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 610 | { |
Linus Walleij | 78d80c5 | 2012-05-23 21:18:46 +0200 | [diff] [blame] | 611 | db8500_add_uart0(parent, &uart0_plat); |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 612 | db8500_add_uart1(parent, &uart1_plat); |
| 613 | db8500_add_uart2(parent, &uart2_plat); |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 614 | } |
| 615 | |
Andreas Westin | 585d188 | 2012-05-10 10:14:06 +0200 | [diff] [blame] | 616 | static void __init u8500_cryp1_hash1_init(struct device *parent) |
| 617 | { |
| 618 | db8500_add_cryp1(parent, &u8500_cryp1_platform_data); |
| 619 | db8500_add_hash1(parent, &u8500_hash1_platform_data); |
| 620 | } |
| 621 | |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 622 | static struct platform_device *snowball_platform_devs[] __initdata = { |
| 623 | &snowball_led_dev, |
| 624 | &snowball_key_dev, |
Lee Jones | e6fada5 | 2012-05-17 13:18:36 +0100 | [diff] [blame] | 625 | &snowball_sbnet_dev, |
Lee Jones | 0b5ea1e | 2012-09-03 14:33:39 +0100 | [diff] [blame] | 626 | &snowball_gpio_en_3v3_regulator_dev, |
hongbo.zhang | dc1956b | 2012-11-15 18:56:43 +0800 | [diff] [blame] | 627 | &u8500_thsens_device, |
| 628 | &u8500_cpufreq_cooling_device, |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 629 | }; |
| 630 | |
Linus Walleij | 4b4f757 | 2011-02-15 15:01:35 +0100 | [diff] [blame] | 631 | static void __init mop500_init_machine(void) |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 632 | { |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 633 | struct device *parent = NULL; |
Linus Walleij | cf568c5 | 2011-03-30 14:31:42 +0200 | [diff] [blame] | 634 | int i2c0_devs; |
Lee Jones | b024a0c | 2012-02-06 11:22:25 -0800 | [diff] [blame] | 635 | int i; |
Linus Walleij | cf568c5 | 2011-03-30 14:31:42 +0200 | [diff] [blame] | 636 | |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 637 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; |
Linus Walleij | 4b4f757 | 2011-02-15 15:01:35 +0100 | [diff] [blame] | 638 | |
Linus Walleij | ed781d39 | 2012-05-03 00:44:52 +0200 | [diff] [blame] | 639 | mop500_pinmaps_init(); |
Lee Jones | 3a8e39c | 2012-07-06 12:46:23 +0200 | [diff] [blame] | 640 | parent = u8500_init_devices(&ab8500_platdata); |
Rabin Vincent | ea05a57 | 2010-06-03 07:58:42 +0100 | [diff] [blame] | 641 | |
Lee Jones | b024a0c | 2012-02-06 11:22:25 -0800 | [diff] [blame] | 642 | for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) |
| 643 | mop500_platform_devs[i]->dev.parent = parent; |
| 644 | |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 645 | platform_add_devices(mop500_platform_devs, |
| 646 | ARRAY_SIZE(mop500_platform_devs)); |
Srinidhi Kasagar | d48a41c | 2010-02-03 13:02:48 +0100 | [diff] [blame] | 647 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 648 | mop500_i2c_init(parent); |
| 649 | mop500_sdi_init(parent); |
| 650 | mop500_spi_init(parent); |
Lee Jones | 39b740b | 2012-09-14 15:46:29 +0100 | [diff] [blame] | 651 | mop500_audio_init(parent); |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 652 | mop500_uart_init(parent); |
Hanumath Prasad | 008f8a2 | 2010-08-19 12:06:32 +0100 | [diff] [blame] | 653 | |
Andreas Westin | 585d188 | 2012-05-10 10:14:06 +0200 | [diff] [blame] | 654 | u8500_cryp1_hash1_init(parent); |
| 655 | |
Linus Walleij | cf568c5 | 2011-03-30 14:31:42 +0200 | [diff] [blame] | 656 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 657 | |
| 658 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); |
| 659 | i2c_register_board_info(2, mop500_i2c2_devices, |
| 660 | ARRAY_SIZE(mop500_i2c2_devices)); |
| 661 | |
| 662 | /* This board has full regulator constraints */ |
| 663 | regulator_has_full_constraints(); |
| 664 | } |
| 665 | |
| 666 | static void __init snowball_init_machine(void) |
| 667 | { |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 668 | struct device *parent = NULL; |
Lee Jones | b024a0c | 2012-02-06 11:22:25 -0800 | [diff] [blame] | 669 | int i; |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 670 | |
Linus Walleij | ed781d39 | 2012-05-03 00:44:52 +0200 | [diff] [blame] | 671 | snowball_pinmaps_init(); |
Lee Jones | 3a8e39c | 2012-07-06 12:46:23 +0200 | [diff] [blame] | 672 | parent = u8500_init_devices(&ab8500_platdata); |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 673 | |
Lee Jones | b024a0c | 2012-02-06 11:22:25 -0800 | [diff] [blame] | 674 | for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++) |
| 675 | snowball_platform_devs[i]->dev.parent = parent; |
| 676 | |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 677 | platform_add_devices(snowball_platform_devs, |
| 678 | ARRAY_SIZE(snowball_platform_devs)); |
| 679 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 680 | mop500_i2c_init(parent); |
| 681 | snowball_sdi_init(parent); |
| 682 | mop500_spi_init(parent); |
Lee Jones | 39b740b | 2012-09-14 15:46:29 +0100 | [diff] [blame] | 683 | mop500_audio_init(parent); |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 684 | mop500_uart_init(parent); |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 685 | |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 686 | /* This board has full regulator constraints */ |
| 687 | regulator_has_full_constraints(); |
| 688 | } |
| 689 | |
| 690 | static void __init hrefv60_init_machine(void) |
| 691 | { |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 692 | struct device *parent = NULL; |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 693 | int i2c0_devs; |
Lee Jones | b024a0c | 2012-02-06 11:22:25 -0800 | [diff] [blame] | 694 | int i; |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 695 | |
| 696 | /* |
| 697 | * The HREFv60 board removed a GPIO expander and routed |
| 698 | * all these GPIO pins to the internal GPIO controller |
| 699 | * instead. |
| 700 | */ |
| 701 | mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; |
| 702 | |
Linus Walleij | ed781d39 | 2012-05-03 00:44:52 +0200 | [diff] [blame] | 703 | hrefv60_pinmaps_init(); |
Lee Jones | 3a8e39c | 2012-07-06 12:46:23 +0200 | [diff] [blame] | 704 | parent = u8500_init_devices(&ab8500_platdata); |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 705 | |
Lee Jones | b024a0c | 2012-02-06 11:22:25 -0800 | [diff] [blame] | 706 | for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) |
| 707 | mop500_platform_devs[i]->dev.parent = parent; |
| 708 | |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 709 | platform_add_devices(mop500_platform_devs, |
| 710 | ARRAY_SIZE(mop500_platform_devs)); |
| 711 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 712 | mop500_i2c_init(parent); |
| 713 | hrefv60_sdi_init(parent); |
| 714 | mop500_spi_init(parent); |
Lee Jones | 39b740b | 2012-09-14 15:46:29 +0100 | [diff] [blame] | 715 | mop500_audio_init(parent); |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 716 | mop500_uart_init(parent); |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 717 | |
| 718 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
| 719 | |
| 720 | i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; |
Linus Walleij | cf568c5 | 2011-03-30 14:31:42 +0200 | [diff] [blame] | 721 | |
| 722 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); |
Philippe Langlais | dd7b2a0 | 2011-01-12 11:26:20 +0100 | [diff] [blame] | 723 | i2c_register_board_info(2, mop500_i2c2_devices, |
| 724 | ARRAY_SIZE(mop500_i2c2_devices)); |
Linus Walleij | db24520 | 2011-04-04 10:44:51 +0200 | [diff] [blame] | 725 | |
| 726 | /* This board has full regulator constraints */ |
| 727 | regulator_has_full_constraints(); |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 728 | } |
| 729 | |
| 730 | MACHINE_START(U8500, "ST-Ericsson MOP500 platform") |
| 731 | /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */ |
Nicolas Pitre | bc77b1a | 2011-07-05 22:38:18 -0400 | [diff] [blame] | 732 | .atag_offset = 0x100, |
Marc Zyngier | 5ac21a9 | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 733 | .smp = smp_ops(ux500_smp_ops), |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 734 | .map_io = u8500_map_io, |
Rabin Vincent | 178980f | 2010-05-03 07:39:02 +0100 | [diff] [blame] | 735 | .init_irq = ux500_init_irq, |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 736 | /* we re-use nomadik timer here */ |
Rabin Vincent | 41ac329 | 2010-05-03 08:28:05 +0100 | [diff] [blame] | 737 | .timer = &ux500_timer, |
Marc Zyngier | bbf5f38 | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 738 | .handle_irq = gic_handle_irq, |
Linus Walleij | 4b4f757 | 2011-02-15 15:01:35 +0100 | [diff] [blame] | 739 | .init_machine = mop500_init_machine, |
Shawn Guo | a010bc2 | 2012-05-02 17:10:07 +0800 | [diff] [blame] | 740 | .init_late = ux500_init_late, |
Linus Walleij | 4b4f757 | 2011-02-15 15:01:35 +0100 | [diff] [blame] | 741 | MACHINE_END |
| 742 | |
Linus Walleij | a3a6c6a | 2012-10-01 09:37:39 +0200 | [diff] [blame] | 743 | MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520") |
| 744 | .atag_offset = 0x100, |
| 745 | .map_io = u8500_map_io, |
| 746 | .init_irq = ux500_init_irq, |
| 747 | .timer = &ux500_timer, |
| 748 | .handle_irq = gic_handle_irq, |
| 749 | .init_machine = mop500_init_machine, |
| 750 | .init_late = ux500_init_late, |
| 751 | MACHINE_END |
| 752 | |
Linus Walleij | 4b4f757 | 2011-02-15 15:01:35 +0100 | [diff] [blame] | 753 | MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") |
Nicolas Pitre | bc77b1a | 2011-07-05 22:38:18 -0400 | [diff] [blame] | 754 | .atag_offset = 0x100, |
Marc Zyngier | 5ac21a9 | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 755 | .smp = smp_ops(ux500_smp_ops), |
Linus Walleij | 4b4f757 | 2011-02-15 15:01:35 +0100 | [diff] [blame] | 756 | .map_io = u8500_map_io, |
| 757 | .init_irq = ux500_init_irq, |
| 758 | .timer = &ux500_timer, |
Marc Zyngier | bbf5f38 | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 759 | .handle_irq = gic_handle_irq, |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 760 | .init_machine = hrefv60_init_machine, |
Shawn Guo | a010bc2 | 2012-05-02 17:10:07 +0800 | [diff] [blame] | 761 | .init_late = ux500_init_late, |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 762 | MACHINE_END |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 763 | |
| 764 | MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") |
Nicolas Pitre | bc77b1a | 2011-07-05 22:38:18 -0400 | [diff] [blame] | 765 | .atag_offset = 0x100, |
Marc Zyngier | 5ac21a9 | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 766 | .smp = smp_ops(ux500_smp_ops), |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 767 | .map_io = u8500_map_io, |
| 768 | .init_irq = ux500_init_irq, |
| 769 | /* we re-use nomadik timer here */ |
| 770 | .timer = &ux500_timer, |
Marc Zyngier | bbf5f38 | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 771 | .handle_irq = gic_handle_irq, |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 772 | .init_machine = snowball_init_machine, |
Lee Jones | 0ddf855 | 2012-09-25 16:03:45 +0100 | [diff] [blame] | 773 | .init_late = NULL, |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 774 | MACHINE_END |