blob: 0213e896fbfd7f53e3f7362d0ecdd45f6d366a70 [file] [log] [blame]
Linus Walleijed781d392012-05-03 00:44:52 +02001
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +01002/*
3 * Copyright (C) 2008-2009 ST-Ericsson
4 *
5 * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2, as
9 * published by the Free Software Foundation.
10 *
11 */
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/interrupt.h>
15#include <linux/platform_device.h>
16#include <linux/io.h>
Rabin Vincentb8410a12010-08-09 19:18:17 +053017#include <linux/i2c.h>
Alessandro Rubiniaf97bac2012-06-11 22:56:26 +020018#include <linux/platform_data/i2c-nomadik.h>
Rabin Vincentea05a572010-06-03 07:58:42 +010019#include <linux/gpio.h>
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +010020#include <linux/amba/bus.h>
21#include <linux/amba/pl022.h>
Linus Walleij5d7b8462010-10-14 13:57:59 +020022#include <linux/amba/serial.h>
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +010023#include <linux/spi/spi.h>
Linus Walleijee66e652011-12-02 14:16:33 +010024#include <linux/mfd/abx500/ab8500.h>
Bengt Jonsson79568b942011-03-11 11:54:46 +010025#include <linux/regulator/ab8500.h>
Lee Jones0b5ea1e2012-09-03 14:33:39 +010026#include <linux/regulator/fixed.h>
Sundar Iyer20406eb2010-12-13 09:33:14 +053027#include <linux/mfd/tc3589x.h>
Linus Walleijfe67dfc82011-03-07 11:48:15 +010028#include <linux/mfd/tps6105x.h>
Linus Walleijee66e652011-12-02 14:16:33 +010029#include <linux/mfd/abx500/ab8500-gpio.h>
Ola Liljaf242e502012-06-07 14:00:46 +020030#include <linux/mfd/abx500/ab8500-codec.h>
Philippe Langlaisdd7b2a02011-01-12 11:26:20 +010031#include <linux/leds-lp5521.h>
Philippe Langlaisa71b8192011-01-14 10:53:59 +010032#include <linux/input.h>
Robert Marklund350abe02011-06-20 15:55:46 +020033#include <linux/smsc911x.h>
Philippe Langlaisa71b8192011-01-14 10:53:59 +010034#include <linux/gpio_keys.h>
Shreshtha Kumar Sahu1a7d4362011-06-13 10:11:44 +020035#include <linux/delay.h>
Arnd Bergmann2d334292012-03-07 15:04:07 +000036#include <linux/of.h>
37#include <linux/of_platform.h>
Robert Marklund350abe02011-06-20 15:55:46 +020038#include <linux/leds.h>
Linus Walleija0980662012-05-07 01:33:24 +020039#include <linux/pinctrl/consumer.h>
Linus Walleij7cb15e12012-10-10 14:27:58 +020040#include <linux/platform_data/pinctrl-nomadik.h>
Linus Walleij865fab62012-10-18 14:20:16 +020041#include <linux/platform_data/dma-ste-dma40.h>
Linus Walleija0980662012-05-07 01:33:24 +020042
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +010043#include <asm/mach-types.h>
44#include <asm/mach/arch.h>
Marc Zyngierbbf5f382011-09-06 10:23:45 +010045#include <asm/hardware/gic.h>
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +010046
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +010047#include <mach/hardware.h>
48#include <mach/setup.h>
Rabin Vincent9e4e7fe2010-05-03 08:03:52 +010049#include <mach/devices.h>
Linus Walleij29aeb3c2010-09-06 22:15:08 +010050#include <mach/irqs.h>
Arnd Bergmanndb298da2012-08-24 15:19:33 +020051#include <linux/platform_data/crypto-ux500.h>
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +010052
Linus Walleij5d7b8462010-10-14 13:57:59 +020053#include "ste-dma40-db8500.h"
Rabin Vincentfbf1ead2010-09-29 19:46:32 +053054#include "devices-db8500.h"
Hanumath Prasad008f8a22010-08-19 12:06:32 +010055#include "board-mop500.h"
Bengt Jonssona1e516e2010-12-10 11:08:48 +010056#include "board-mop500-regulators.h"
Rabin Vincentea05a572010-06-03 07:58:42 +010057
Robert Marklund350abe02011-06-20 15:55:46 +020058static struct gpio_led snowball_led_array[] = {
59 {
60 .name = "user_led",
Lee Jonesc525f072012-05-02 09:20:37 +010061 .default_trigger = "heartbeat",
Robert Marklund350abe02011-06-20 15:55:46 +020062 .gpio = 142,
63 },
64};
65
66static struct gpio_led_platform_data snowball_led_data = {
67 .leds = snowball_led_array,
68 .num_leds = ARRAY_SIZE(snowball_led_array),
69};
70
71static struct platform_device snowball_led_dev = {
72 .name = "leds-gpio",
73 .dev = {
74 .platform_data = &snowball_led_data,
75 },
76};
77
Lee Jones0b5ea1e2012-09-03 14:33:39 +010078static struct fixed_voltage_config snowball_gpio_en_3v3_data = {
79 .supply_name = "EN-3V3",
80 .gpio = SNOWBALL_EN_3V3_ETH_GPIO,
81 .microvolts = 3300000,
82 .enable_high = 1,
83 .init_data = &gpio_en_3v3_regulator,
84 .startup_delay = 5000, /* 1200us */
85};
86
87static struct platform_device snowball_gpio_en_3v3_regulator_dev = {
88 .name = "reg-fixed-voltage",
89 .id = 1,
90 .dev = {
91 .platform_data = &snowball_gpio_en_3v3_data,
92 },
93};
94
Bibek Basu3ef374a2011-02-15 12:56:16 +053095static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
Philippe Langlaisa1524ee2012-02-13 10:52:25 +010096 .gpio_base = MOP500_AB8500_PIN_GPIO(1),
Bibek Basu3ef374a2011-02-15 12:56:16 +053097 .irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE,
98 /* config_reg is the initial configuration of ab8500 pins.
99 * The pins can be configured as GPIO or alt functions based
100 * on value present in GpioSel1 to GpioSel6 and AlternatFunction
101 * register. This is the array of 7 configuration settings.
102 * One has to compile time decide these settings. Below is the
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300103 * explanation of these setting
Bibek Basu3ef374a2011-02-15 12:56:16 +0530104 * GpioSel1 = 0x00 => Pins GPIO1 to GPIO8 are not used as GPIO
105 * GpioSel2 = 0x1E => Pins GPIO10 to GPIO13 are configured as GPIO
106 * GpioSel3 = 0x80 => Pin GPIO24 is configured as GPIO
107 * GpioSel4 = 0x01 => Pin GPIo25 is configured as GPIO
108 * GpioSel5 = 0x7A => Pins GPIO34, GPIO36 to GPIO39 are conf as GPIO
109 * GpioSel6 = 0x00 => Pins GPIO41 & GPIo42 are not configured as GPIO
110 * AlternaFunction = 0x00 => If Pins GPIO10 to 13 are not configured
111 * as GPIO then this register selectes the alternate fucntions
112 */
113 .config_reg = {0x00, 0x1E, 0x80, 0x01,
114 0x7A, 0x00, 0x00},
115};
116
Ola Liljaf242e502012-06-07 14:00:46 +0200117/* ab8500-codec */
118static struct ab8500_codec_platform_data ab8500_codec_pdata = {
119 .amics = {
120 .mic1_type = AMIC_TYPE_DIFFERENTIAL,
121 .mic2_type = AMIC_TYPE_DIFFERENTIAL,
122 .mic1a_micbias = AMIC_MICBIAS_VAMIC1,
123 .mic1b_micbias = AMIC_MICBIAS_VAMIC1,
124 .mic2_micbias = AMIC_MICBIAS_VAMIC2
125 },
126 .ear_cmv = EAR_CMV_0_95V
127};
128
Robert Marklund350abe02011-06-20 15:55:46 +0200129static struct gpio_keys_button snowball_key_array[] = {
130 {
131 .gpio = 32,
132 .type = EV_KEY,
133 .code = KEY_1,
134 .desc = "userpb",
135 .active_low = 1,
136 .debounce_interval = 50,
137 .wakeup = 1,
138 },
139 {
140 .gpio = 151,
141 .type = EV_KEY,
142 .code = KEY_2,
143 .desc = "extkb1",
144 .active_low = 1,
145 .debounce_interval = 50,
146 .wakeup = 1,
147 },
148 {
149 .gpio = 152,
150 .type = EV_KEY,
151 .code = KEY_3,
152 .desc = "extkb2",
153 .active_low = 1,
154 .debounce_interval = 50,
155 .wakeup = 1,
156 },
157 {
158 .gpio = 161,
159 .type = EV_KEY,
160 .code = KEY_4,
161 .desc = "extkb3",
162 .active_low = 1,
163 .debounce_interval = 50,
164 .wakeup = 1,
165 },
166 {
167 .gpio = 162,
168 .type = EV_KEY,
169 .code = KEY_5,
170 .desc = "extkb4",
171 .active_low = 1,
172 .debounce_interval = 50,
173 .wakeup = 1,
174 },
175};
176
177static struct gpio_keys_platform_data snowball_key_data = {
178 .buttons = snowball_key_array,
179 .nbuttons = ARRAY_SIZE(snowball_key_array),
180};
181
182static struct platform_device snowball_key_dev = {
183 .name = "gpio-keys",
184 .id = -1,
185 .dev = {
186 .platform_data = &snowball_key_data,
187 }
188};
189
190static struct smsc911x_platform_config snowball_sbnet_cfg = {
191 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
192 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
193 .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY,
194 .shift = 1,
195};
196
197static struct resource sbnet_res[] = {
198 {
199 .name = "smsc911x-memory",
200 .start = (0x5000 << 16),
201 .end = (0x5000 << 16) + 0xffff,
202 .flags = IORESOURCE_MEM,
203 },
204 {
205 .start = NOMADIK_GPIO_TO_IRQ(140),
206 .end = NOMADIK_GPIO_TO_IRQ(140),
207 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
208 },
209};
210
211static struct platform_device snowball_sbnet_dev = {
212 .name = "smsc911x",
213 .num_resources = ARRAY_SIZE(sbnet_res),
214 .resource = sbnet_res,
215 .dev = {
216 .platform_data = &snowball_sbnet_cfg,
217 },
218};
219
Rabin Vincent39ae7022010-07-26 11:12:15 +0100220static struct ab8500_platform_data ab8500_platdata = {
221 .irq_base = MOP500_AB8500_IRQ_BASE,
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100222 .regulator_reg_init = ab8500_regulator_reg_init,
223 .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init),
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100224 .regulator = ab8500_regulators,
225 .num_regulator = ARRAY_SIZE(ab8500_regulators),
Bibek Basu3ef374a2011-02-15 12:56:16 +0530226 .gpio = &ab8500_gpio_pdata,
Ola Liljaf242e502012-06-07 14:00:46 +0200227 .codec = &ab8500_codec_pdata,
Rabin Vincent39ae7022010-07-26 11:12:15 +0100228};
229
Rabin Vincentb8410a12010-08-09 19:18:17 +0530230/*
Linus Walleijfe67dfc82011-03-07 11:48:15 +0100231 * TPS61052
232 */
233
234static struct tps6105x_platform_data mop500_tps61052_data = {
235 .mode = TPS6105X_MODE_VOLTAGE,
236 .regulator_data = &tps61052_regulator,
237};
238
239/*
Rabin Vincentb8410a12010-08-09 19:18:17 +0530240 * TC35892
241 */
242
Sundar Iyer20406eb2010-12-13 09:33:14 +0530243static void mop500_tc35892_init(struct tc3589x *tc3589x, unsigned int base)
Rabin Vincentb8410a12010-08-09 19:18:17 +0530244{
Lee Jones18403422012-02-06 11:22:21 -0800245 struct device *parent = NULL;
246#if 0
247 /* FIXME: Is the sdi actually part of tc3589x? */
248 parent = tc3589x->dev;
249#endif
250 mop500_sdi_tc35892_init(parent);
Rabin Vincentb8410a12010-08-09 19:18:17 +0530251}
252
Sundar Iyer20406eb2010-12-13 09:33:14 +0530253static struct tc3589x_gpio_platform_data mop500_tc35892_gpio_data = {
Rabin Vincentb8410a12010-08-09 19:18:17 +0530254 .gpio_base = MOP500_EGPIO(0),
255 .setup = mop500_tc35892_init,
256};
257
Sundar Iyer20406eb2010-12-13 09:33:14 +0530258static struct tc3589x_platform_data mop500_tc35892_data = {
Sundar Iyer611b7592010-12-13 09:33:15 +0530259 .block = TC3589x_BLOCK_GPIO,
Rabin Vincentb8410a12010-08-09 19:18:17 +0530260 .gpio = &mop500_tc35892_gpio_data,
261 .irq_base = MOP500_EGPIO_IRQ_BASE,
262};
263
Philippe Langlaisdd7b2a02011-01-12 11:26:20 +0100264static struct lp5521_led_config lp5521_pri_led[] = {
265 [0] = {
266 .chan_nr = 0,
267 .led_current = 0x2f,
268 .max_current = 0x5f,
269 },
270 [1] = {
271 .chan_nr = 1,
272 .led_current = 0x2f,
273 .max_current = 0x5f,
274 },
275 [2] = {
276 .chan_nr = 2,
277 .led_current = 0x2f,
278 .max_current = 0x5f,
279 },
280};
281
282static struct lp5521_platform_data __initdata lp5521_pri_data = {
283 .label = "lp5521_pri",
284 .led_config = &lp5521_pri_led[0],
285 .num_channels = 3,
286 .clock_mode = LP5521_CLOCK_EXT,
287};
288
289static struct lp5521_led_config lp5521_sec_led[] = {
290 [0] = {
291 .chan_nr = 0,
292 .led_current = 0x2f,
293 .max_current = 0x5f,
294 },
295 [1] = {
296 .chan_nr = 1,
297 .led_current = 0x2f,
298 .max_current = 0x5f,
299 },
300 [2] = {
301 .chan_nr = 2,
302 .led_current = 0x2f,
303 .max_current = 0x5f,
304 },
305};
306
307static struct lp5521_platform_data __initdata lp5521_sec_data = {
308 .label = "lp5521_sec",
309 .led_config = &lp5521_sec_led[0],
310 .num_channels = 3,
311 .clock_mode = LP5521_CLOCK_EXT,
312};
313
Linus Walleijfe67dfc82011-03-07 11:48:15 +0100314static struct i2c_board_info __initdata mop500_i2c0_devices[] = {
Rabin Vincentb8410a12010-08-09 19:18:17 +0530315 {
Sundar Iyer20406eb2010-12-13 09:33:14 +0530316 I2C_BOARD_INFO("tc3589x", 0x42),
Philippe Langlaisdd7b2a02011-01-12 11:26:20 +0100317 .irq = NOMADIK_GPIO_TO_IRQ(217),
Rabin Vincentb8410a12010-08-09 19:18:17 +0530318 .platform_data = &mop500_tc35892_data,
319 },
Linus Walleijcf568c52011-03-30 14:31:42 +0200320 /* I2C0 devices only available prior to HREFv60 */
Linus Walleijfe67dfc82011-03-07 11:48:15 +0100321 {
322 I2C_BOARD_INFO("tps61052", 0x33),
323 .platform_data = &mop500_tps61052_data,
324 },
325};
326
Linus Walleijcf568c52011-03-30 14:31:42 +0200327#define NUM_PRE_V60_I2C0_DEVICES 1
328
Philippe Langlaisdd7b2a02011-01-12 11:26:20 +0100329static struct i2c_board_info __initdata mop500_i2c2_devices[] = {
330 {
331 /* lp5521 LED driver, 1st device */
332 I2C_BOARD_INFO("lp5521", 0x33),
333 .platform_data = &lp5521_pri_data,
334 },
335 {
336 /* lp5521 LED driver, 2st device */
337 I2C_BOARD_INFO("lp5521", 0x34),
338 .platform_data = &lp5521_sec_data,
339 },
Lee Jonesbb3b2182011-01-13 14:41:22 +0000340 {
341 /* Light sensor Rohm BH1780GLI */
342 I2C_BOARD_INFO("bh1780", 0x29),
343 },
Philippe Langlaisdd7b2a02011-01-12 11:26:20 +0100344};
345
Lee Jones18403422012-02-06 11:22:21 -0800346static void __init mop500_i2c_init(struct device *parent)
Rabin Vincentfbf1ead2010-09-29 19:46:32 +0530347{
Lee Jones98582d92012-04-17 15:52:26 +0100348 db8500_add_i2c0(parent, NULL);
349 db8500_add_i2c1(parent, NULL);
350 db8500_add_i2c2(parent, NULL);
351 db8500_add_i2c3(parent, NULL);
Rabin Vincentfbf1ead2010-09-29 19:46:32 +0530352}
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +0100353
Philippe Langlaisa71b8192011-01-14 10:53:59 +0100354static struct gpio_keys_button mop500_gpio_keys[] = {
355 {
356 .desc = "SFH7741 Proximity Sensor",
357 .type = EV_SW,
358 .code = SW_FRONT_PROXIMITY,
Philippe Langlaisa71b8192011-01-14 10:53:59 +0100359 .active_low = 0,
360 .can_disable = 1,
361 }
362};
363
364static struct regulator *prox_regulator;
365static int mop500_prox_activate(struct device *dev);
366static void mop500_prox_deactivate(struct device *dev);
367
368static struct gpio_keys_platform_data mop500_gpio_keys_data = {
369 .buttons = mop500_gpio_keys,
370 .nbuttons = ARRAY_SIZE(mop500_gpio_keys),
371 .enable = mop500_prox_activate,
372 .disable = mop500_prox_deactivate,
373};
374
375static struct platform_device mop500_gpio_keys_device = {
376 .name = "gpio-keys",
377 .id = 0,
378 .dev = {
379 .platform_data = &mop500_gpio_keys_data,
380 },
381};
382
383static int mop500_prox_activate(struct device *dev)
384{
385 prox_regulator = regulator_get(&mop500_gpio_keys_device.dev,
386 "vcc");
387 if (IS_ERR(prox_regulator)) {
388 dev_err(&mop500_gpio_keys_device.dev,
389 "no regulator\n");
390 return PTR_ERR(prox_regulator);
391 }
392 regulator_enable(prox_regulator);
393 return 0;
394}
395
396static void mop500_prox_deactivate(struct device *dev)
397{
398 regulator_disable(prox_regulator);
399 regulator_put(prox_regulator);
400}
401
Andreas Westin585d1882012-05-10 10:14:06 +0200402static struct cryp_platform_data u8500_cryp1_platform_data = {
403 .mem_to_engine = {
404 .dir = STEDMA40_MEM_TO_PERIPH,
405 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
406 .dst_dev_type = DB8500_DMA_DEV48_CAC1_TX,
407 .src_info.data_width = STEDMA40_WORD_WIDTH,
408 .dst_info.data_width = STEDMA40_WORD_WIDTH,
409 .mode = STEDMA40_MODE_LOGICAL,
410 .src_info.psize = STEDMA40_PSIZE_LOG_4,
411 .dst_info.psize = STEDMA40_PSIZE_LOG_4,
412 },
413 .engine_to_mem = {
414 .dir = STEDMA40_PERIPH_TO_MEM,
415 .src_dev_type = DB8500_DMA_DEV48_CAC1_RX,
416 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
417 .src_info.data_width = STEDMA40_WORD_WIDTH,
418 .dst_info.data_width = STEDMA40_WORD_WIDTH,
419 .mode = STEDMA40_MODE_LOGICAL,
420 .src_info.psize = STEDMA40_PSIZE_LOG_4,
421 .dst_info.psize = STEDMA40_PSIZE_LOG_4,
422 }
423};
424
425static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = {
426 .dir = STEDMA40_MEM_TO_PERIPH,
427 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
428 .dst_dev_type = DB8500_DMA_DEV50_HAC1_TX,
429 .src_info.data_width = STEDMA40_WORD_WIDTH,
430 .dst_info.data_width = STEDMA40_WORD_WIDTH,
431 .mode = STEDMA40_MODE_LOGICAL,
432 .src_info.psize = STEDMA40_PSIZE_LOG_16,
433 .dst_info.psize = STEDMA40_PSIZE_LOG_16,
434};
435
436static struct hash_platform_data u8500_hash1_platform_data = {
437 .mem_to_engine = &u8500_hash_dma_cfg_tx,
438 .dma_filter = stedma40_filter,
439};
440
Srinidhi Kasagard48a41c2010-02-03 13:02:48 +0100441/* add any platform devices here - TODO */
Robert Marklund350abe02011-06-20 15:55:46 +0200442static struct platform_device *mop500_platform_devs[] __initdata = {
Philippe Langlaisa71b8192011-01-14 10:53:59 +0100443 &mop500_gpio_keys_device,
Srinidhi Kasagard48a41c2010-02-03 13:02:48 +0100444};
445
Linus Walleij5d7b8462010-10-14 13:57:59 +0200446#ifdef CONFIG_STE_DMA40
447static struct stedma40_chan_cfg ssp0_dma_cfg_rx = {
448 .mode = STEDMA40_MODE_LOGICAL,
449 .dir = STEDMA40_PERIPH_TO_MEM,
450 .src_dev_type = DB8500_DMA_DEV8_SSP0_RX,
451 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
452 .src_info.data_width = STEDMA40_BYTE_WIDTH,
453 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
454};
455
456static struct stedma40_chan_cfg ssp0_dma_cfg_tx = {
457 .mode = STEDMA40_MODE_LOGICAL,
458 .dir = STEDMA40_MEM_TO_PERIPH,
459 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
460 .dst_dev_type = DB8500_DMA_DEV8_SSP0_TX,
461 .src_info.data_width = STEDMA40_BYTE_WIDTH,
462 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
463};
464#endif
465
Lee Jones15daf692012-03-15 16:47:11 +0000466static struct pl022_ssp_controller ssp0_plat = {
Linus Walleij5d7b8462010-10-14 13:57:59 +0200467 .bus_id = 0,
468#ifdef CONFIG_STE_DMA40
469 .enable_dma = 1,
470 .dma_filter = stedma40_filter,
471 .dma_rx_param = &ssp0_dma_cfg_rx,
472 .dma_tx_param = &ssp0_dma_cfg_tx,
473#else
474 .enable_dma = 0,
475#endif
476 /* on this platform, gpio 31,142,144,214 &
477 * 224 are connected as chip selects
478 */
479 .num_chipselect = 5,
480};
481
Lee Jones18403422012-02-06 11:22:21 -0800482static void __init mop500_spi_init(struct device *parent)
Rabin Vincentfbf1ead2010-09-29 19:46:32 +0530483{
Lee Jones15daf692012-03-15 16:47:11 +0000484 db8500_add_ssp0(parent, &ssp0_plat);
Rabin Vincentfbf1ead2010-09-29 19:46:32 +0530485}
486
Linus Walleij5d7b8462010-10-14 13:57:59 +0200487#ifdef CONFIG_STE_DMA40
488static struct stedma40_chan_cfg uart0_dma_cfg_rx = {
489 .mode = STEDMA40_MODE_LOGICAL,
490 .dir = STEDMA40_PERIPH_TO_MEM,
491 .src_dev_type = DB8500_DMA_DEV13_UART0_RX,
492 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
493 .src_info.data_width = STEDMA40_BYTE_WIDTH,
494 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
495};
496
497static struct stedma40_chan_cfg uart0_dma_cfg_tx = {
498 .mode = STEDMA40_MODE_LOGICAL,
499 .dir = STEDMA40_MEM_TO_PERIPH,
500 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
501 .dst_dev_type = DB8500_DMA_DEV13_UART0_TX,
502 .src_info.data_width = STEDMA40_BYTE_WIDTH,
503 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
504};
505
506static struct stedma40_chan_cfg uart1_dma_cfg_rx = {
507 .mode = STEDMA40_MODE_LOGICAL,
508 .dir = STEDMA40_PERIPH_TO_MEM,
509 .src_dev_type = DB8500_DMA_DEV12_UART1_RX,
510 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
511 .src_info.data_width = STEDMA40_BYTE_WIDTH,
512 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
513};
514
515static struct stedma40_chan_cfg uart1_dma_cfg_tx = {
516 .mode = STEDMA40_MODE_LOGICAL,
517 .dir = STEDMA40_MEM_TO_PERIPH,
518 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
519 .dst_dev_type = DB8500_DMA_DEV12_UART1_TX,
520 .src_info.data_width = STEDMA40_BYTE_WIDTH,
521 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
522};
523
524static struct stedma40_chan_cfg uart2_dma_cfg_rx = {
525 .mode = STEDMA40_MODE_LOGICAL,
526 .dir = STEDMA40_PERIPH_TO_MEM,
527 .src_dev_type = DB8500_DMA_DEV11_UART2_RX,
528 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
529 .src_info.data_width = STEDMA40_BYTE_WIDTH,
530 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
531};
532
533static struct stedma40_chan_cfg uart2_dma_cfg_tx = {
534 .mode = STEDMA40_MODE_LOGICAL,
535 .dir = STEDMA40_MEM_TO_PERIPH,
536 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
537 .dst_dev_type = DB8500_DMA_DEV11_UART2_TX,
538 .src_info.data_width = STEDMA40_BYTE_WIDTH,
539 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
540};
541#endif
542
543static struct amba_pl011_data uart0_plat = {
544#ifdef CONFIG_STE_DMA40
545 .dma_filter = stedma40_filter,
546 .dma_rx_param = &uart0_dma_cfg_rx,
547 .dma_tx_param = &uart0_dma_cfg_tx,
548#endif
549};
550
551static struct amba_pl011_data uart1_plat = {
552#ifdef CONFIG_STE_DMA40
553 .dma_filter = stedma40_filter,
554 .dma_rx_param = &uart1_dma_cfg_rx,
555 .dma_tx_param = &uart1_dma_cfg_tx,
556#endif
557};
558
559static struct amba_pl011_data uart2_plat = {
560#ifdef CONFIG_STE_DMA40
561 .dma_filter = stedma40_filter,
562 .dma_rx_param = &uart2_dma_cfg_rx,
563 .dma_tx_param = &uart2_dma_cfg_tx,
564#endif
565};
566
Lee Jones18403422012-02-06 11:22:21 -0800567static void __init mop500_uart_init(struct device *parent)
Rabin Vincentfbf1ead2010-09-29 19:46:32 +0530568{
Linus Walleij78d80c52012-05-23 21:18:46 +0200569 db8500_add_uart0(parent, &uart0_plat);
Lee Jones18403422012-02-06 11:22:21 -0800570 db8500_add_uart1(parent, &uart1_plat);
571 db8500_add_uart2(parent, &uart2_plat);
Rabin Vincentfbf1ead2010-09-29 19:46:32 +0530572}
573
Andreas Westin585d1882012-05-10 10:14:06 +0200574static void __init u8500_cryp1_hash1_init(struct device *parent)
575{
576 db8500_add_cryp1(parent, &u8500_cryp1_platform_data);
577 db8500_add_hash1(parent, &u8500_hash1_platform_data);
578}
579
Robert Marklund350abe02011-06-20 15:55:46 +0200580static struct platform_device *snowball_platform_devs[] __initdata = {
581 &snowball_led_dev,
582 &snowball_key_dev,
Lee Jonese6fada52012-05-17 13:18:36 +0100583 &snowball_sbnet_dev,
Lee Jones0b5ea1e2012-09-03 14:33:39 +0100584 &snowball_gpio_en_3v3_regulator_dev,
Robert Marklund350abe02011-06-20 15:55:46 +0200585};
586
Linus Walleij4b4f7572011-02-15 15:01:35 +0100587static void __init mop500_init_machine(void)
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +0100588{
Lee Jones18403422012-02-06 11:22:21 -0800589 struct device *parent = NULL;
Linus Walleijcf568c52011-03-30 14:31:42 +0200590 int i2c0_devs;
Lee Jonesb024a0c2012-02-06 11:22:25 -0800591 int i;
Linus Walleijcf568c52011-03-30 14:31:42 +0200592
Lee Jones110c2c22011-08-26 16:54:07 +0100593 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
Linus Walleij4b4f7572011-02-15 15:01:35 +0100594
Linus Walleijed781d392012-05-03 00:44:52 +0200595 mop500_pinmaps_init();
Lee Jones3a8e39c2012-07-06 12:46:23 +0200596 parent = u8500_init_devices(&ab8500_platdata);
Rabin Vincentea05a572010-06-03 07:58:42 +0100597
Lee Jonesb024a0c2012-02-06 11:22:25 -0800598 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
599 mop500_platform_devs[i]->dev.parent = parent;
600
Lee Jones110c2c22011-08-26 16:54:07 +0100601 platform_add_devices(mop500_platform_devs,
602 ARRAY_SIZE(mop500_platform_devs));
Srinidhi Kasagard48a41c2010-02-03 13:02:48 +0100603
Lee Jones18403422012-02-06 11:22:21 -0800604 mop500_i2c_init(parent);
605 mop500_sdi_init(parent);
606 mop500_spi_init(parent);
Lee Jones39b740b2012-09-14 15:46:29 +0100607 mop500_audio_init(parent);
Lee Jones18403422012-02-06 11:22:21 -0800608 mop500_uart_init(parent);
Hanumath Prasad008f8a22010-08-19 12:06:32 +0100609
Andreas Westin585d1882012-05-10 10:14:06 +0200610 u8500_cryp1_hash1_init(parent);
611
Linus Walleijcf568c52011-03-30 14:31:42 +0200612 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
Lee Jones110c2c22011-08-26 16:54:07 +0100613
614 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
615 i2c_register_board_info(2, mop500_i2c2_devices,
616 ARRAY_SIZE(mop500_i2c2_devices));
617
618 /* This board has full regulator constraints */
619 regulator_has_full_constraints();
Lee Jonesfd6948b2012-05-02 09:53:48 +0100620
621 mop500_uib_init();
Lee Jones110c2c22011-08-26 16:54:07 +0100622}
623
624static void __init snowball_init_machine(void)
625{
Lee Jones18403422012-02-06 11:22:21 -0800626 struct device *parent = NULL;
Lee Jonesb024a0c2012-02-06 11:22:25 -0800627 int i;
Lee Jones110c2c22011-08-26 16:54:07 +0100628
Linus Walleijed781d392012-05-03 00:44:52 +0200629 snowball_pinmaps_init();
Lee Jones3a8e39c2012-07-06 12:46:23 +0200630 parent = u8500_init_devices(&ab8500_platdata);
Lee Jones110c2c22011-08-26 16:54:07 +0100631
Lee Jonesb024a0c2012-02-06 11:22:25 -0800632 for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
633 snowball_platform_devs[i]->dev.parent = parent;
634
Lee Jones110c2c22011-08-26 16:54:07 +0100635 platform_add_devices(snowball_platform_devs,
636 ARRAY_SIZE(snowball_platform_devs));
637
Lee Jones18403422012-02-06 11:22:21 -0800638 mop500_i2c_init(parent);
639 snowball_sdi_init(parent);
640 mop500_spi_init(parent);
Lee Jones39b740b2012-09-14 15:46:29 +0100641 mop500_audio_init(parent);
Lee Jones18403422012-02-06 11:22:21 -0800642 mop500_uart_init(parent);
Lee Jones110c2c22011-08-26 16:54:07 +0100643
Lee Jones110c2c22011-08-26 16:54:07 +0100644 /* This board has full regulator constraints */
645 regulator_has_full_constraints();
646}
647
648static void __init hrefv60_init_machine(void)
649{
Lee Jones18403422012-02-06 11:22:21 -0800650 struct device *parent = NULL;
Lee Jones110c2c22011-08-26 16:54:07 +0100651 int i2c0_devs;
Lee Jonesb024a0c2012-02-06 11:22:25 -0800652 int i;
Lee Jones110c2c22011-08-26 16:54:07 +0100653
654 /*
655 * The HREFv60 board removed a GPIO expander and routed
656 * all these GPIO pins to the internal GPIO controller
657 * instead.
658 */
659 mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
660
Linus Walleijed781d392012-05-03 00:44:52 +0200661 hrefv60_pinmaps_init();
Lee Jones3a8e39c2012-07-06 12:46:23 +0200662 parent = u8500_init_devices(&ab8500_platdata);
Lee Jones110c2c22011-08-26 16:54:07 +0100663
Lee Jonesb024a0c2012-02-06 11:22:25 -0800664 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
665 mop500_platform_devs[i]->dev.parent = parent;
666
Lee Jones110c2c22011-08-26 16:54:07 +0100667 platform_add_devices(mop500_platform_devs,
668 ARRAY_SIZE(mop500_platform_devs));
669
Lee Jones18403422012-02-06 11:22:21 -0800670 mop500_i2c_init(parent);
671 hrefv60_sdi_init(parent);
672 mop500_spi_init(parent);
Lee Jones39b740b2012-09-14 15:46:29 +0100673 mop500_audio_init(parent);
Lee Jones18403422012-02-06 11:22:21 -0800674 mop500_uart_init(parent);
Lee Jones110c2c22011-08-26 16:54:07 +0100675
676 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
677
678 i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
Linus Walleijcf568c52011-03-30 14:31:42 +0200679
680 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
Philippe Langlaisdd7b2a02011-01-12 11:26:20 +0100681 i2c_register_board_info(2, mop500_i2c2_devices,
682 ARRAY_SIZE(mop500_i2c2_devices));
Linus Walleijdb245202011-04-04 10:44:51 +0200683
684 /* This board has full regulator constraints */
685 regulator_has_full_constraints();
Lee Jonesfd6948b2012-05-02 09:53:48 +0100686
687 mop500_uib_init();
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +0100688}
689
690MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
691 /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */
Nicolas Pitrebc77b1a2011-07-05 22:38:18 -0400692 .atag_offset = 0x100,
Marc Zyngier5ac21a92011-09-08 13:15:22 +0100693 .smp = smp_ops(ux500_smp_ops),
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +0100694 .map_io = u8500_map_io,
Rabin Vincent178980f2010-05-03 07:39:02 +0100695 .init_irq = ux500_init_irq,
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +0100696 /* we re-use nomadik timer here */
Rabin Vincent41ac3292010-05-03 08:28:05 +0100697 .timer = &ux500_timer,
Marc Zyngierbbf5f382011-09-06 10:23:45 +0100698 .handle_irq = gic_handle_irq,
Linus Walleij4b4f7572011-02-15 15:01:35 +0100699 .init_machine = mop500_init_machine,
Shawn Guoa010bc22012-05-02 17:10:07 +0800700 .init_late = ux500_init_late,
Linus Walleij4b4f7572011-02-15 15:01:35 +0100701MACHINE_END
702
703MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
Nicolas Pitrebc77b1a2011-07-05 22:38:18 -0400704 .atag_offset = 0x100,
Marc Zyngier5ac21a92011-09-08 13:15:22 +0100705 .smp = smp_ops(ux500_smp_ops),
Linus Walleij4b4f7572011-02-15 15:01:35 +0100706 .map_io = u8500_map_io,
707 .init_irq = ux500_init_irq,
708 .timer = &ux500_timer,
Marc Zyngierbbf5f382011-09-06 10:23:45 +0100709 .handle_irq = gic_handle_irq,
Lee Jones110c2c22011-08-26 16:54:07 +0100710 .init_machine = hrefv60_init_machine,
Shawn Guoa010bc22012-05-02 17:10:07 +0800711 .init_late = ux500_init_late,
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +0100712MACHINE_END
Robert Marklund350abe02011-06-20 15:55:46 +0200713
714MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
Nicolas Pitrebc77b1a2011-07-05 22:38:18 -0400715 .atag_offset = 0x100,
Marc Zyngier5ac21a92011-09-08 13:15:22 +0100716 .smp = smp_ops(ux500_smp_ops),
Robert Marklund350abe02011-06-20 15:55:46 +0200717 .map_io = u8500_map_io,
718 .init_irq = ux500_init_irq,
719 /* we re-use nomadik timer here */
720 .timer = &ux500_timer,
Marc Zyngierbbf5f382011-09-06 10:23:45 +0100721 .handle_irq = gic_handle_irq,
Lee Jones110c2c22011-08-26 16:54:07 +0100722 .init_machine = snowball_init_machine,
Shawn Guoa010bc22012-05-02 17:10:07 +0800723 .init_late = ux500_init_late,
Robert Marklund350abe02011-06-20 15:55:46 +0200724MACHINE_END
Arnd Bergmann2d334292012-03-07 15:04:07 +0000725
726#ifdef CONFIG_MACH_UX500_DT
Lee Jones7e0ce272012-03-15 16:46:17 +0000727
728struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
Lee Jones96bbf792012-07-06 09:06:20 +0100729 /* Requires call-back bindings. */
730 OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata),
Lee Jones513c27f2012-04-13 15:05:05 +0100731 /* Requires DMA and call-back bindings. */
Lee Jones4905af02012-03-07 17:35:04 +0000732 OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat),
733 OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat),
734 OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat),
Lee Jones513c27f2012-04-13 15:05:05 +0100735 /* Requires DMA bindings. */
Lee Jones15daf692012-03-15 16:47:11 +0000736 OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat),
Lee Jones5e1ac7d2012-05-29 14:40:04 +0800737 OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data),
Lee Jones9cf24b12012-08-30 16:11:08 +0100738 OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1", &mop500_sdi1_data),
739 OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2", &mop500_sdi2_data),
Lee Jones5e1ac7d2012-05-29 14:40:04 +0800740 OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4", &mop500_sdi4_data),
Lee Jones513c27f2012-04-13 15:05:05 +0100741 /* Requires clock name bindings. */
742 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL),
743 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e080, "gpio.1", NULL),
744 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e000, "gpio.2", NULL),
745 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e080, "gpio.3", NULL),
746 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e100, "gpio.4", NULL),
747 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e180, "gpio.5", NULL),
748 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e000, "gpio.6", NULL),
749 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e080, "gpio.7", NULL),
750 OF_DEV_AUXDATA("st,nomadik-gpio", 0xa03fe000, "gpio.8", NULL),
Lee Jones079c61e2012-04-17 16:11:02 +0100751 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80004000, "nmk-i2c.0", NULL),
752 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80122000, "nmk-i2c.1", NULL),
753 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL),
754 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
755 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
Lee Jones2b667a22012-07-06 15:59:01 +0100756 /* Requires device name bindings. */
757 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL),
Lee Jones724ebbf2012-07-25 13:58:36 +0100758 /* Requires clock name and DMA bindings. */
759 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
760 "ux500-msp-i2s.0", &msp0_platform_data),
761 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000,
762 "ux500-msp-i2s.1", &msp1_platform_data),
763 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000,
764 "ux500-msp-i2s.2", &msp2_platform_data),
765 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000,
766 "ux500-msp-i2s.3", &msp3_platform_data),
Lee Jones7e0ce272012-03-15 16:46:17 +0000767 {},
768};
769
Lee Jones2cfaa622012-04-19 21:36:30 +0100770static const struct of_device_id u8500_local_bus_nodes[] = {
Lee Jones7e0ce272012-03-15 16:46:17 +0000771 /* only create devices below soc node */
772 { .compatible = "stericsson,db8500", },
Lee Jones48a4ea62012-05-29 15:06:55 +0800773 { .compatible = "stericsson,db8500-prcmu", },
Lee Jones2cfaa622012-04-19 21:36:30 +0100774 { .compatible = "simple-bus"},
Lee Jones7e0ce272012-03-15 16:46:17 +0000775 { },
776};
777
Arnd Bergmann2d334292012-03-07 15:04:07 +0000778static void __init u8500_init_machine(void)
779{
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000780 struct device *parent = NULL;
781 int i2c0_devs;
782 int i;
783
Linus Walleijed781d392012-05-03 00:44:52 +0200784 /* Pinmaps must be in place before devices register */
785 if (of_machine_is_compatible("st-ericsson,mop500"))
786 mop500_pinmaps_init();
787 else if (of_machine_is_compatible("calaosystems,snowball-a9500"))
788 snowball_pinmaps_init();
789 else if (of_machine_is_compatible("st-ericsson,hrefv60+"))
790 hrefv60_pinmaps_init();
791
Lee Jonesf65c1982012-05-29 10:03:09 +0800792 parent = u8500_of_init_devices();
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000793
794 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
795 mop500_platform_devs[i]->dev.parent = parent;
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000796
Lee Jones7e0ce272012-03-15 16:46:17 +0000797 /* automatically probe child nodes of db8500 device */
Lee Jones2cfaa622012-04-19 21:36:30 +0100798 of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent);
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000799
800 if (of_machine_is_compatible("st-ericsson,mop500")) {
801 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000802
803 platform_add_devices(mop500_platform_devs,
804 ARRAY_SIZE(mop500_platform_devs));
805
806 mop500_sdi_init(parent);
Lee Jones39b740b2012-09-14 15:46:29 +0100807 mop500_audio_init(parent);
Lee Jones4809f902012-04-19 21:36:40 +0100808 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
809 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
810 i2c_register_board_info(2, mop500_i2c2_devices,
811 ARRAY_SIZE(mop500_i2c2_devices));
812
Lee Jonesfd6948b2012-05-02 09:53:48 +0100813 mop500_uib_init();
814
Lee Jones46a8b982012-08-09 16:47:28 +0100815 } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
Lee Jones39b740b2012-09-14 15:46:29 +0100816 mop500_of_audio_init(parent);
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000817 } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
818 /*
819 * The HREFv60 board removed a GPIO expander and routed
820 * all these GPIO pins to the internal GPIO controller
821 * instead.
822 */
823 mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000824 platform_add_devices(mop500_platform_devs,
825 ARRAY_SIZE(mop500_platform_devs));
826
Lee Jonesfd6948b2012-05-02 09:53:48 +0100827 mop500_uib_init();
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000828 }
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000829
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000830 /* This board has full regulator constraints */
831 regulator_has_full_constraints();
Arnd Bergmann2d334292012-03-07 15:04:07 +0000832}
833
834static const char * u8500_dt_board_compat[] = {
835 "calaosystems,snowball-a9500",
836 "st-ericsson,hrefv60+",
837 "st-ericsson,u8500",
838 "st-ericsson,mop500",
839 NULL,
840};
841
842
843DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)")
Marc Zyngier5ac21a92011-09-08 13:15:22 +0100844 .smp = smp_ops(ux500_smp_ops),
Arnd Bergmann2d334292012-03-07 15:04:07 +0000845 .map_io = u8500_map_io,
846 .init_irq = ux500_init_irq,
847 /* we re-use nomadik timer here */
848 .timer = &ux500_timer,
849 .handle_irq = gic_handle_irq,
850 .init_machine = u8500_init_machine,
Shawn Guoa010bc22012-05-02 17:10:07 +0800851 .init_late = ux500_init_late,
Arnd Bergmann2d334292012-03-07 15:04:07 +0000852 .dt_compat = u8500_dt_board_compat,
853MACHINE_END
854#endif