blob: 416d436111f29bbc64c267f104ab2838cf3db0ac [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 Walleijfe67dfc2011-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>
40
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +010041#include <asm/mach-types.h>
42#include <asm/mach/arch.h>
Marc Zyngierbbf5f382011-09-06 10:23:45 +010043#include <asm/hardware/gic.h>
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +010044
Linus Walleij5d7b8462010-10-14 13:57:59 +020045#include <plat/ste_dma40.h>
Linus Walleij0f332862011-08-22 08:33:30 +010046#include <plat/gpio-nomadik.h>
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +010047
48#include <mach/hardware.h>
49#include <mach/setup.h>
Rabin Vincent9e4e7fe2010-05-03 08:03:52 +010050#include <mach/devices.h>
Linus Walleij29aeb3c2010-09-06 22:15:08 +010051#include <mach/irqs.h>
Arnd Bergmanndb298da2012-08-24 15:19:33 +020052#include <linux/platform_data/crypto-ux500.h>
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +010053
Linus Walleij5d7b8462010-10-14 13:57:59 +020054#include "ste-dma40-db8500.h"
Rabin Vincentfbf1ead2010-09-29 19:46:32 +053055#include "devices-db8500.h"
Hanumath Prasad008f8a22010-08-19 12:06:32 +010056#include "board-mop500.h"
Bengt Jonssona1e516e2010-12-10 11:08:48 +010057#include "board-mop500-regulators.h"
Rabin Vincentea05a572010-06-03 07:58:42 +010058
Robert Marklund350abe02011-06-20 15:55:46 +020059static struct gpio_led snowball_led_array[] = {
60 {
61 .name = "user_led",
Lee Jonesc525f072012-05-02 09:20:37 +010062 .default_trigger = "heartbeat",
Robert Marklund350abe02011-06-20 15:55:46 +020063 .gpio = 142,
64 },
65};
66
67static struct gpio_led_platform_data snowball_led_data = {
68 .leds = snowball_led_array,
69 .num_leds = ARRAY_SIZE(snowball_led_array),
70};
71
72static struct platform_device snowball_led_dev = {
73 .name = "leds-gpio",
74 .dev = {
75 .platform_data = &snowball_led_data,
76 },
77};
78
Lee Jones0b5ea1e2012-09-03 14:33:39 +010079static struct fixed_voltage_config snowball_gpio_en_3v3_data = {
80 .supply_name = "EN-3V3",
81 .gpio = SNOWBALL_EN_3V3_ETH_GPIO,
82 .microvolts = 3300000,
83 .enable_high = 1,
84 .init_data = &gpio_en_3v3_regulator,
85 .startup_delay = 5000, /* 1200us */
86};
87
88static struct platform_device snowball_gpio_en_3v3_regulator_dev = {
89 .name = "reg-fixed-voltage",
90 .id = 1,
91 .dev = {
92 .platform_data = &snowball_gpio_en_3v3_data,
93 },
94};
95
Bibek Basu3ef374a2011-02-15 12:56:16 +053096static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
Philippe Langlaisa1524ee2012-02-13 10:52:25 +010097 .gpio_base = MOP500_AB8500_PIN_GPIO(1),
Bibek Basu3ef374a2011-02-15 12:56:16 +053098 .irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE,
99 /* config_reg is the initial configuration of ab8500 pins.
100 * The pins can be configured as GPIO or alt functions based
101 * on value present in GpioSel1 to GpioSel6 and AlternatFunction
102 * register. This is the array of 7 configuration settings.
103 * One has to compile time decide these settings. Below is the
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300104 * explanation of these setting
Bibek Basu3ef374a2011-02-15 12:56:16 +0530105 * GpioSel1 = 0x00 => Pins GPIO1 to GPIO8 are not used as GPIO
106 * GpioSel2 = 0x1E => Pins GPIO10 to GPIO13 are configured as GPIO
107 * GpioSel3 = 0x80 => Pin GPIO24 is configured as GPIO
108 * GpioSel4 = 0x01 => Pin GPIo25 is configured as GPIO
109 * GpioSel5 = 0x7A => Pins GPIO34, GPIO36 to GPIO39 are conf as GPIO
110 * GpioSel6 = 0x00 => Pins GPIO41 & GPIo42 are not configured as GPIO
111 * AlternaFunction = 0x00 => If Pins GPIO10 to 13 are not configured
112 * as GPIO then this register selectes the alternate fucntions
113 */
114 .config_reg = {0x00, 0x1E, 0x80, 0x01,
115 0x7A, 0x00, 0x00},
116};
117
Ola Liljaf242e502012-06-07 14:00:46 +0200118/* ab8500-codec */
119static struct ab8500_codec_platform_data ab8500_codec_pdata = {
120 .amics = {
121 .mic1_type = AMIC_TYPE_DIFFERENTIAL,
122 .mic2_type = AMIC_TYPE_DIFFERENTIAL,
123 .mic1a_micbias = AMIC_MICBIAS_VAMIC1,
124 .mic1b_micbias = AMIC_MICBIAS_VAMIC1,
125 .mic2_micbias = AMIC_MICBIAS_VAMIC2
126 },
127 .ear_cmv = EAR_CMV_0_95V
128};
129
Robert Marklund350abe02011-06-20 15:55:46 +0200130static struct gpio_keys_button snowball_key_array[] = {
131 {
132 .gpio = 32,
133 .type = EV_KEY,
134 .code = KEY_1,
135 .desc = "userpb",
136 .active_low = 1,
137 .debounce_interval = 50,
138 .wakeup = 1,
139 },
140 {
141 .gpio = 151,
142 .type = EV_KEY,
143 .code = KEY_2,
144 .desc = "extkb1",
145 .active_low = 1,
146 .debounce_interval = 50,
147 .wakeup = 1,
148 },
149 {
150 .gpio = 152,
151 .type = EV_KEY,
152 .code = KEY_3,
153 .desc = "extkb2",
154 .active_low = 1,
155 .debounce_interval = 50,
156 .wakeup = 1,
157 },
158 {
159 .gpio = 161,
160 .type = EV_KEY,
161 .code = KEY_4,
162 .desc = "extkb3",
163 .active_low = 1,
164 .debounce_interval = 50,
165 .wakeup = 1,
166 },
167 {
168 .gpio = 162,
169 .type = EV_KEY,
170 .code = KEY_5,
171 .desc = "extkb4",
172 .active_low = 1,
173 .debounce_interval = 50,
174 .wakeup = 1,
175 },
176};
177
178static struct gpio_keys_platform_data snowball_key_data = {
179 .buttons = snowball_key_array,
180 .nbuttons = ARRAY_SIZE(snowball_key_array),
181};
182
183static struct platform_device snowball_key_dev = {
184 .name = "gpio-keys",
185 .id = -1,
186 .dev = {
187 .platform_data = &snowball_key_data,
188 }
189};
190
191static struct smsc911x_platform_config snowball_sbnet_cfg = {
192 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
193 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
194 .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY,
195 .shift = 1,
196};
197
198static struct resource sbnet_res[] = {
199 {
200 .name = "smsc911x-memory",
201 .start = (0x5000 << 16),
202 .end = (0x5000 << 16) + 0xffff,
203 .flags = IORESOURCE_MEM,
204 },
205 {
206 .start = NOMADIK_GPIO_TO_IRQ(140),
207 .end = NOMADIK_GPIO_TO_IRQ(140),
208 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
209 },
210};
211
212static struct platform_device snowball_sbnet_dev = {
213 .name = "smsc911x",
214 .num_resources = ARRAY_SIZE(sbnet_res),
215 .resource = sbnet_res,
216 .dev = {
217 .platform_data = &snowball_sbnet_cfg,
218 },
219};
220
Rabin Vincent39ae7022010-07-26 11:12:15 +0100221static struct ab8500_platform_data ab8500_platdata = {
222 .irq_base = MOP500_AB8500_IRQ_BASE,
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100223 .regulator_reg_init = ab8500_regulator_reg_init,
224 .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init),
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100225 .regulator = ab8500_regulators,
226 .num_regulator = ARRAY_SIZE(ab8500_regulators),
Bibek Basu3ef374a2011-02-15 12:56:16 +0530227 .gpio = &ab8500_gpio_pdata,
Ola Liljaf242e502012-06-07 14:00:46 +0200228 .codec = &ab8500_codec_pdata,
Rabin Vincent39ae7022010-07-26 11:12:15 +0100229};
230
Rabin Vincentb8410a12010-08-09 19:18:17 +0530231/*
Linus Walleijfe67dfc2011-03-07 11:48:15 +0100232 * TPS61052
233 */
234
235static struct tps6105x_platform_data mop500_tps61052_data = {
236 .mode = TPS6105X_MODE_VOLTAGE,
237 .regulator_data = &tps61052_regulator,
238};
239
240/*
Rabin Vincentb8410a12010-08-09 19:18:17 +0530241 * TC35892
242 */
243
Sundar Iyer20406eb2010-12-13 09:33:14 +0530244static void mop500_tc35892_init(struct tc3589x *tc3589x, unsigned int base)
Rabin Vincentb8410a12010-08-09 19:18:17 +0530245{
Lee Jones18403422012-02-06 11:22:21 -0800246 struct device *parent = NULL;
247#if 0
248 /* FIXME: Is the sdi actually part of tc3589x? */
249 parent = tc3589x->dev;
250#endif
251 mop500_sdi_tc35892_init(parent);
Rabin Vincentb8410a12010-08-09 19:18:17 +0530252}
253
Sundar Iyer20406eb2010-12-13 09:33:14 +0530254static struct tc3589x_gpio_platform_data mop500_tc35892_gpio_data = {
Rabin Vincentb8410a12010-08-09 19:18:17 +0530255 .gpio_base = MOP500_EGPIO(0),
256 .setup = mop500_tc35892_init,
257};
258
Sundar Iyer20406eb2010-12-13 09:33:14 +0530259static struct tc3589x_platform_data mop500_tc35892_data = {
Sundar Iyer611b7592010-12-13 09:33:15 +0530260 .block = TC3589x_BLOCK_GPIO,
Rabin Vincentb8410a12010-08-09 19:18:17 +0530261 .gpio = &mop500_tc35892_gpio_data,
262 .irq_base = MOP500_EGPIO_IRQ_BASE,
263};
264
Philippe Langlaisdd7b2a02011-01-12 11:26:20 +0100265static struct lp5521_led_config lp5521_pri_led[] = {
266 [0] = {
267 .chan_nr = 0,
268 .led_current = 0x2f,
269 .max_current = 0x5f,
270 },
271 [1] = {
272 .chan_nr = 1,
273 .led_current = 0x2f,
274 .max_current = 0x5f,
275 },
276 [2] = {
277 .chan_nr = 2,
278 .led_current = 0x2f,
279 .max_current = 0x5f,
280 },
281};
282
283static struct lp5521_platform_data __initdata lp5521_pri_data = {
284 .label = "lp5521_pri",
285 .led_config = &lp5521_pri_led[0],
286 .num_channels = 3,
287 .clock_mode = LP5521_CLOCK_EXT,
288};
289
290static struct lp5521_led_config lp5521_sec_led[] = {
291 [0] = {
292 .chan_nr = 0,
293 .led_current = 0x2f,
294 .max_current = 0x5f,
295 },
296 [1] = {
297 .chan_nr = 1,
298 .led_current = 0x2f,
299 .max_current = 0x5f,
300 },
301 [2] = {
302 .chan_nr = 2,
303 .led_current = 0x2f,
304 .max_current = 0x5f,
305 },
306};
307
308static struct lp5521_platform_data __initdata lp5521_sec_data = {
309 .label = "lp5521_sec",
310 .led_config = &lp5521_sec_led[0],
311 .num_channels = 3,
312 .clock_mode = LP5521_CLOCK_EXT,
313};
314
Linus Walleijfe67dfc2011-03-07 11:48:15 +0100315static struct i2c_board_info __initdata mop500_i2c0_devices[] = {
Rabin Vincentb8410a12010-08-09 19:18:17 +0530316 {
Sundar Iyer20406eb2010-12-13 09:33:14 +0530317 I2C_BOARD_INFO("tc3589x", 0x42),
Philippe Langlaisdd7b2a02011-01-12 11:26:20 +0100318 .irq = NOMADIK_GPIO_TO_IRQ(217),
Rabin Vincentb8410a12010-08-09 19:18:17 +0530319 .platform_data = &mop500_tc35892_data,
320 },
Linus Walleijcf568c52011-03-30 14:31:42 +0200321 /* I2C0 devices only available prior to HREFv60 */
Linus Walleijfe67dfc2011-03-07 11:48:15 +0100322 {
323 I2C_BOARD_INFO("tps61052", 0x33),
324 .platform_data = &mop500_tps61052_data,
325 },
326};
327
Linus Walleijcf568c52011-03-30 14:31:42 +0200328#define NUM_PRE_V60_I2C0_DEVICES 1
329
Philippe Langlaisdd7b2a02011-01-12 11:26:20 +0100330static struct i2c_board_info __initdata mop500_i2c2_devices[] = {
331 {
332 /* lp5521 LED driver, 1st device */
333 I2C_BOARD_INFO("lp5521", 0x33),
334 .platform_data = &lp5521_pri_data,
335 },
336 {
337 /* lp5521 LED driver, 2st device */
338 I2C_BOARD_INFO("lp5521", 0x34),
339 .platform_data = &lp5521_sec_data,
340 },
Lee Jonesbb3b2182011-01-13 14:41:22 +0000341 {
342 /* Light sensor Rohm BH1780GLI */
343 I2C_BOARD_INFO("bh1780", 0x29),
344 },
Philippe Langlaisdd7b2a02011-01-12 11:26:20 +0100345};
346
Lee Jones18403422012-02-06 11:22:21 -0800347static void __init mop500_i2c_init(struct device *parent)
Rabin Vincentfbf1ead2010-09-29 19:46:32 +0530348{
Lee Jones98582d92012-04-17 15:52:26 +0100349 db8500_add_i2c0(parent, NULL);
350 db8500_add_i2c1(parent, NULL);
351 db8500_add_i2c2(parent, NULL);
352 db8500_add_i2c3(parent, NULL);
Rabin Vincentfbf1ead2010-09-29 19:46:32 +0530353}
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +0100354
Philippe Langlaisa71b8192011-01-14 10:53:59 +0100355static struct gpio_keys_button mop500_gpio_keys[] = {
356 {
357 .desc = "SFH7741 Proximity Sensor",
358 .type = EV_SW,
359 .code = SW_FRONT_PROXIMITY,
Philippe Langlaisa71b8192011-01-14 10:53:59 +0100360 .active_low = 0,
361 .can_disable = 1,
362 }
363};
364
365static struct regulator *prox_regulator;
366static int mop500_prox_activate(struct device *dev);
367static void mop500_prox_deactivate(struct device *dev);
368
369static struct gpio_keys_platform_data mop500_gpio_keys_data = {
370 .buttons = mop500_gpio_keys,
371 .nbuttons = ARRAY_SIZE(mop500_gpio_keys),
372 .enable = mop500_prox_activate,
373 .disable = mop500_prox_deactivate,
374};
375
376static struct platform_device mop500_gpio_keys_device = {
377 .name = "gpio-keys",
378 .id = 0,
379 .dev = {
380 .platform_data = &mop500_gpio_keys_data,
381 },
382};
383
384static int mop500_prox_activate(struct device *dev)
385{
386 prox_regulator = regulator_get(&mop500_gpio_keys_device.dev,
387 "vcc");
388 if (IS_ERR(prox_regulator)) {
389 dev_err(&mop500_gpio_keys_device.dev,
390 "no regulator\n");
391 return PTR_ERR(prox_regulator);
392 }
393 regulator_enable(prox_regulator);
394 return 0;
395}
396
397static void mop500_prox_deactivate(struct device *dev)
398{
399 regulator_disable(prox_regulator);
400 regulator_put(prox_regulator);
401}
402
Andreas Westin585d1882012-05-10 10:14:06 +0200403static struct cryp_platform_data u8500_cryp1_platform_data = {
404 .mem_to_engine = {
405 .dir = STEDMA40_MEM_TO_PERIPH,
406 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
407 .dst_dev_type = DB8500_DMA_DEV48_CAC1_TX,
408 .src_info.data_width = STEDMA40_WORD_WIDTH,
409 .dst_info.data_width = STEDMA40_WORD_WIDTH,
410 .mode = STEDMA40_MODE_LOGICAL,
411 .src_info.psize = STEDMA40_PSIZE_LOG_4,
412 .dst_info.psize = STEDMA40_PSIZE_LOG_4,
413 },
414 .engine_to_mem = {
415 .dir = STEDMA40_PERIPH_TO_MEM,
416 .src_dev_type = DB8500_DMA_DEV48_CAC1_RX,
417 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
418 .src_info.data_width = STEDMA40_WORD_WIDTH,
419 .dst_info.data_width = STEDMA40_WORD_WIDTH,
420 .mode = STEDMA40_MODE_LOGICAL,
421 .src_info.psize = STEDMA40_PSIZE_LOG_4,
422 .dst_info.psize = STEDMA40_PSIZE_LOG_4,
423 }
424};
425
426static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = {
427 .dir = STEDMA40_MEM_TO_PERIPH,
428 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
429 .dst_dev_type = DB8500_DMA_DEV50_HAC1_TX,
430 .src_info.data_width = STEDMA40_WORD_WIDTH,
431 .dst_info.data_width = STEDMA40_WORD_WIDTH,
432 .mode = STEDMA40_MODE_LOGICAL,
433 .src_info.psize = STEDMA40_PSIZE_LOG_16,
434 .dst_info.psize = STEDMA40_PSIZE_LOG_16,
435};
436
437static struct hash_platform_data u8500_hash1_platform_data = {
438 .mem_to_engine = &u8500_hash_dma_cfg_tx,
439 .dma_filter = stedma40_filter,
440};
441
Srinidhi Kasagard48a41c2010-02-03 13:02:48 +0100442/* add any platform devices here - TODO */
Robert Marklund350abe02011-06-20 15:55:46 +0200443static struct platform_device *mop500_platform_devs[] __initdata = {
Philippe Langlaisa71b8192011-01-14 10:53:59 +0100444 &mop500_gpio_keys_device,
Srinidhi Kasagard48a41c2010-02-03 13:02:48 +0100445};
446
Linus Walleij5d7b8462010-10-14 13:57:59 +0200447#ifdef CONFIG_STE_DMA40
448static struct stedma40_chan_cfg ssp0_dma_cfg_rx = {
449 .mode = STEDMA40_MODE_LOGICAL,
450 .dir = STEDMA40_PERIPH_TO_MEM,
451 .src_dev_type = DB8500_DMA_DEV8_SSP0_RX,
452 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
453 .src_info.data_width = STEDMA40_BYTE_WIDTH,
454 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
455};
456
457static struct stedma40_chan_cfg ssp0_dma_cfg_tx = {
458 .mode = STEDMA40_MODE_LOGICAL,
459 .dir = STEDMA40_MEM_TO_PERIPH,
460 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
461 .dst_dev_type = DB8500_DMA_DEV8_SSP0_TX,
462 .src_info.data_width = STEDMA40_BYTE_WIDTH,
463 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
464};
465#endif
466
Lee Jones15daf692012-03-15 16:47:11 +0000467static struct pl022_ssp_controller ssp0_plat = {
Linus Walleij5d7b8462010-10-14 13:57:59 +0200468 .bus_id = 0,
469#ifdef CONFIG_STE_DMA40
470 .enable_dma = 1,
471 .dma_filter = stedma40_filter,
472 .dma_rx_param = &ssp0_dma_cfg_rx,
473 .dma_tx_param = &ssp0_dma_cfg_tx,
474#else
475 .enable_dma = 0,
476#endif
477 /* on this platform, gpio 31,142,144,214 &
478 * 224 are connected as chip selects
479 */
480 .num_chipselect = 5,
481};
482
Lee Jones18403422012-02-06 11:22:21 -0800483static void __init mop500_spi_init(struct device *parent)
Rabin Vincentfbf1ead2010-09-29 19:46:32 +0530484{
Lee Jones15daf692012-03-15 16:47:11 +0000485 db8500_add_ssp0(parent, &ssp0_plat);
Rabin Vincentfbf1ead2010-09-29 19:46:32 +0530486}
487
Linus Walleij5d7b8462010-10-14 13:57:59 +0200488#ifdef CONFIG_STE_DMA40
489static struct stedma40_chan_cfg uart0_dma_cfg_rx = {
490 .mode = STEDMA40_MODE_LOGICAL,
491 .dir = STEDMA40_PERIPH_TO_MEM,
492 .src_dev_type = DB8500_DMA_DEV13_UART0_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
498static struct stedma40_chan_cfg uart0_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_DEV13_UART0_TX,
503 .src_info.data_width = STEDMA40_BYTE_WIDTH,
504 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
505};
506
507static struct stedma40_chan_cfg uart1_dma_cfg_rx = {
508 .mode = STEDMA40_MODE_LOGICAL,
509 .dir = STEDMA40_PERIPH_TO_MEM,
510 .src_dev_type = DB8500_DMA_DEV12_UART1_RX,
511 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
512 .src_info.data_width = STEDMA40_BYTE_WIDTH,
513 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
514};
515
516static struct stedma40_chan_cfg uart1_dma_cfg_tx = {
517 .mode = STEDMA40_MODE_LOGICAL,
518 .dir = STEDMA40_MEM_TO_PERIPH,
519 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
520 .dst_dev_type = DB8500_DMA_DEV12_UART1_TX,
521 .src_info.data_width = STEDMA40_BYTE_WIDTH,
522 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
523};
524
525static struct stedma40_chan_cfg uart2_dma_cfg_rx = {
526 .mode = STEDMA40_MODE_LOGICAL,
527 .dir = STEDMA40_PERIPH_TO_MEM,
528 .src_dev_type = DB8500_DMA_DEV11_UART2_RX,
529 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
530 .src_info.data_width = STEDMA40_BYTE_WIDTH,
531 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
532};
533
534static struct stedma40_chan_cfg uart2_dma_cfg_tx = {
535 .mode = STEDMA40_MODE_LOGICAL,
536 .dir = STEDMA40_MEM_TO_PERIPH,
537 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
538 .dst_dev_type = DB8500_DMA_DEV11_UART2_TX,
539 .src_info.data_width = STEDMA40_BYTE_WIDTH,
540 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
541};
542#endif
543
544static struct amba_pl011_data uart0_plat = {
545#ifdef CONFIG_STE_DMA40
546 .dma_filter = stedma40_filter,
547 .dma_rx_param = &uart0_dma_cfg_rx,
548 .dma_tx_param = &uart0_dma_cfg_tx,
549#endif
550};
551
552static struct amba_pl011_data uart1_plat = {
553#ifdef CONFIG_STE_DMA40
554 .dma_filter = stedma40_filter,
555 .dma_rx_param = &uart1_dma_cfg_rx,
556 .dma_tx_param = &uart1_dma_cfg_tx,
557#endif
558};
559
560static struct amba_pl011_data uart2_plat = {
561#ifdef CONFIG_STE_DMA40
562 .dma_filter = stedma40_filter,
563 .dma_rx_param = &uart2_dma_cfg_rx,
564 .dma_tx_param = &uart2_dma_cfg_tx,
565#endif
566};
567
Lee Jones18403422012-02-06 11:22:21 -0800568static void __init mop500_uart_init(struct device *parent)
Rabin Vincentfbf1ead2010-09-29 19:46:32 +0530569{
Linus Walleij78d80c52012-05-23 21:18:46 +0200570 db8500_add_uart0(parent, &uart0_plat);
Lee Jones18403422012-02-06 11:22:21 -0800571 db8500_add_uart1(parent, &uart1_plat);
572 db8500_add_uart2(parent, &uart2_plat);
Rabin Vincentfbf1ead2010-09-29 19:46:32 +0530573}
574
Andreas Westin585d1882012-05-10 10:14:06 +0200575static void __init u8500_cryp1_hash1_init(struct device *parent)
576{
577 db8500_add_cryp1(parent, &u8500_cryp1_platform_data);
578 db8500_add_hash1(parent, &u8500_hash1_platform_data);
579}
580
Robert Marklund350abe02011-06-20 15:55:46 +0200581static struct platform_device *snowball_platform_devs[] __initdata = {
582 &snowball_led_dev,
583 &snowball_key_dev,
Lee Jonese6fada52012-05-17 13:18:36 +0100584 &snowball_sbnet_dev,
Lee Jones0b5ea1e2012-09-03 14:33:39 +0100585 &snowball_gpio_en_3v3_regulator_dev,
Robert Marklund350abe02011-06-20 15:55:46 +0200586};
587
Linus Walleij4b4f7572011-02-15 15:01:35 +0100588static void __init mop500_init_machine(void)
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +0100589{
Lee Jones18403422012-02-06 11:22:21 -0800590 struct device *parent = NULL;
Linus Walleijcf568c52011-03-30 14:31:42 +0200591 int i2c0_devs;
Lee Jonesb024a0c2012-02-06 11:22:25 -0800592 int i;
Linus Walleijcf568c52011-03-30 14:31:42 +0200593
Lee Jones110c2c22011-08-26 16:54:07 +0100594 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
Linus Walleij4b4f7572011-02-15 15:01:35 +0100595
Linus Walleijed781d392012-05-03 00:44:52 +0200596 mop500_pinmaps_init();
Lee Jones3a8e39c2012-07-06 12:46:23 +0200597 parent = u8500_init_devices(&ab8500_platdata);
Rabin Vincentea05a572010-06-03 07:58:42 +0100598
Lee Jonesb024a0c2012-02-06 11:22:25 -0800599 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
600 mop500_platform_devs[i]->dev.parent = parent;
601
Lee Jones110c2c22011-08-26 16:54:07 +0100602 platform_add_devices(mop500_platform_devs,
603 ARRAY_SIZE(mop500_platform_devs));
Srinidhi Kasagard48a41c2010-02-03 13:02:48 +0100604
Lee Jones18403422012-02-06 11:22:21 -0800605 mop500_i2c_init(parent);
606 mop500_sdi_init(parent);
607 mop500_spi_init(parent);
Lee Jones39b740b2012-09-14 15:46:29 +0100608 mop500_audio_init(parent);
Lee Jones18403422012-02-06 11:22:21 -0800609 mop500_uart_init(parent);
Hanumath Prasad008f8a22010-08-19 12:06:32 +0100610
Andreas Westin585d1882012-05-10 10:14:06 +0200611 u8500_cryp1_hash1_init(parent);
612
Linus Walleijcf568c52011-03-30 14:31:42 +0200613 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
Lee Jones110c2c22011-08-26 16:54:07 +0100614
615 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
616 i2c_register_board_info(2, mop500_i2c2_devices,
617 ARRAY_SIZE(mop500_i2c2_devices));
618
619 /* This board has full regulator constraints */
620 regulator_has_full_constraints();
Lee Jonesfd6948b2012-05-02 09:53:48 +0100621
622 mop500_uib_init();
Lee Jones110c2c22011-08-26 16:54:07 +0100623}
624
625static void __init snowball_init_machine(void)
626{
Lee Jones18403422012-02-06 11:22:21 -0800627 struct device *parent = NULL;
Lee Jonesb024a0c2012-02-06 11:22:25 -0800628 int i;
Lee Jones110c2c22011-08-26 16:54:07 +0100629
Linus Walleijed781d392012-05-03 00:44:52 +0200630 snowball_pinmaps_init();
Lee Jones3a8e39c2012-07-06 12:46:23 +0200631 parent = u8500_init_devices(&ab8500_platdata);
Lee Jones110c2c22011-08-26 16:54:07 +0100632
Lee Jonesb024a0c2012-02-06 11:22:25 -0800633 for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
634 snowball_platform_devs[i]->dev.parent = parent;
635
Lee Jones110c2c22011-08-26 16:54:07 +0100636 platform_add_devices(snowball_platform_devs,
637 ARRAY_SIZE(snowball_platform_devs));
638
Lee Jones18403422012-02-06 11:22:21 -0800639 mop500_i2c_init(parent);
640 snowball_sdi_init(parent);
641 mop500_spi_init(parent);
Lee Jones39b740b2012-09-14 15:46:29 +0100642 mop500_audio_init(parent);
Lee Jones18403422012-02-06 11:22:21 -0800643 mop500_uart_init(parent);
Lee Jones110c2c22011-08-26 16:54:07 +0100644
Lee Jones110c2c22011-08-26 16:54:07 +0100645 /* This board has full regulator constraints */
646 regulator_has_full_constraints();
647}
648
649static void __init hrefv60_init_machine(void)
650{
Lee Jones18403422012-02-06 11:22:21 -0800651 struct device *parent = NULL;
Lee Jones110c2c22011-08-26 16:54:07 +0100652 int i2c0_devs;
Lee Jonesb024a0c2012-02-06 11:22:25 -0800653 int i;
Lee Jones110c2c22011-08-26 16:54:07 +0100654
655 /*
656 * The HREFv60 board removed a GPIO expander and routed
657 * all these GPIO pins to the internal GPIO controller
658 * instead.
659 */
660 mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
661
Linus Walleijed781d392012-05-03 00:44:52 +0200662 hrefv60_pinmaps_init();
Lee Jones3a8e39c2012-07-06 12:46:23 +0200663 parent = u8500_init_devices(&ab8500_platdata);
Lee Jones110c2c22011-08-26 16:54:07 +0100664
Lee Jonesb024a0c2012-02-06 11:22:25 -0800665 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
666 mop500_platform_devs[i]->dev.parent = parent;
667
Lee Jones110c2c22011-08-26 16:54:07 +0100668 platform_add_devices(mop500_platform_devs,
669 ARRAY_SIZE(mop500_platform_devs));
670
Lee Jones18403422012-02-06 11:22:21 -0800671 mop500_i2c_init(parent);
672 hrefv60_sdi_init(parent);
673 mop500_spi_init(parent);
Lee Jones39b740b2012-09-14 15:46:29 +0100674 mop500_audio_init(parent);
Lee Jones18403422012-02-06 11:22:21 -0800675 mop500_uart_init(parent);
Lee Jones110c2c22011-08-26 16:54:07 +0100676
677 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
678
679 i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
Linus Walleijcf568c52011-03-30 14:31:42 +0200680
681 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
Philippe Langlaisdd7b2a02011-01-12 11:26:20 +0100682 i2c_register_board_info(2, mop500_i2c2_devices,
683 ARRAY_SIZE(mop500_i2c2_devices));
Linus Walleijdb245202011-04-04 10:44:51 +0200684
685 /* This board has full regulator constraints */
686 regulator_has_full_constraints();
Lee Jonesfd6948b2012-05-02 09:53:48 +0100687
688 mop500_uib_init();
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +0100689}
690
691MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
692 /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */
Nicolas Pitrebc77b1a2011-07-05 22:38:18 -0400693 .atag_offset = 0x100,
Marc Zyngier5ac21a92011-09-08 13:15:22 +0100694 .smp = smp_ops(ux500_smp_ops),
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +0100695 .map_io = u8500_map_io,
Rabin Vincent178980f2010-05-03 07:39:02 +0100696 .init_irq = ux500_init_irq,
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +0100697 /* we re-use nomadik timer here */
Rabin Vincent41ac3292010-05-03 08:28:05 +0100698 .timer = &ux500_timer,
Marc Zyngierbbf5f382011-09-06 10:23:45 +0100699 .handle_irq = gic_handle_irq,
Linus Walleij4b4f7572011-02-15 15:01:35 +0100700 .init_machine = mop500_init_machine,
Shawn Guoa010bc22012-05-02 17:10:07 +0800701 .init_late = ux500_init_late,
Linus Walleij4b4f7572011-02-15 15:01:35 +0100702MACHINE_END
703
704MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
Nicolas Pitrebc77b1a2011-07-05 22:38:18 -0400705 .atag_offset = 0x100,
Marc Zyngier5ac21a92011-09-08 13:15:22 +0100706 .smp = smp_ops(ux500_smp_ops),
Linus Walleij4b4f7572011-02-15 15:01:35 +0100707 .map_io = u8500_map_io,
708 .init_irq = ux500_init_irq,
709 .timer = &ux500_timer,
Marc Zyngierbbf5f382011-09-06 10:23:45 +0100710 .handle_irq = gic_handle_irq,
Lee Jones110c2c22011-08-26 16:54:07 +0100711 .init_machine = hrefv60_init_machine,
Shawn Guoa010bc22012-05-02 17:10:07 +0800712 .init_late = ux500_init_late,
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +0100713MACHINE_END
Robert Marklund350abe02011-06-20 15:55:46 +0200714
715MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
Nicolas Pitrebc77b1a2011-07-05 22:38:18 -0400716 .atag_offset = 0x100,
Marc Zyngier5ac21a92011-09-08 13:15:22 +0100717 .smp = smp_ops(ux500_smp_ops),
Robert Marklund350abe02011-06-20 15:55:46 +0200718 .map_io = u8500_map_io,
719 .init_irq = ux500_init_irq,
720 /* we re-use nomadik timer here */
721 .timer = &ux500_timer,
Marc Zyngierbbf5f382011-09-06 10:23:45 +0100722 .handle_irq = gic_handle_irq,
Lee Jones110c2c22011-08-26 16:54:07 +0100723 .init_machine = snowball_init_machine,
Shawn Guoa010bc22012-05-02 17:10:07 +0800724 .init_late = ux500_init_late,
Robert Marklund350abe02011-06-20 15:55:46 +0200725MACHINE_END
Arnd Bergmann2d334292012-03-07 15:04:07 +0000726
727#ifdef CONFIG_MACH_UX500_DT
Lee Jones7e0ce272012-03-15 16:46:17 +0000728
729struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
Lee Jones96bbf792012-07-06 09:06:20 +0100730 /* Requires call-back bindings. */
731 OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata),
Lee Jones513c27f2012-04-13 15:05:05 +0100732 /* Requires DMA and call-back bindings. */
Lee Jones4905af02012-03-07 17:35:04 +0000733 OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat),
734 OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat),
735 OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat),
Lee Jones513c27f2012-04-13 15:05:05 +0100736 /* Requires DMA bindings. */
Lee Jones15daf692012-03-15 16:47:11 +0000737 OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat),
Lee Jones5e1ac7d2012-05-29 14:40:04 +0800738 OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data),
Lee Jones9cf24b12012-08-30 16:11:08 +0100739 OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1", &mop500_sdi1_data),
740 OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2", &mop500_sdi2_data),
Lee Jones5e1ac7d2012-05-29 14:40:04 +0800741 OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4", &mop500_sdi4_data),
Lee Jones513c27f2012-04-13 15:05:05 +0100742 /* Requires clock name bindings. */
743 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL),
744 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e080, "gpio.1", NULL),
745 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e000, "gpio.2", NULL),
746 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e080, "gpio.3", NULL),
747 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e100, "gpio.4", NULL),
748 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e180, "gpio.5", NULL),
749 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e000, "gpio.6", NULL),
750 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e080, "gpio.7", NULL),
751 OF_DEV_AUXDATA("st,nomadik-gpio", 0xa03fe000, "gpio.8", NULL),
Lee Jones079c61e2012-04-17 16:11:02 +0100752 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80004000, "nmk-i2c.0", NULL),
753 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80122000, "nmk-i2c.1", NULL),
754 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL),
755 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
756 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
Lee Jones2b667a22012-07-06 15:59:01 +0100757 /* Requires device name bindings. */
758 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL),
Lee Jones724ebbf2012-07-25 13:58:36 +0100759 /* Requires clock name and DMA bindings. */
760 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
761 "ux500-msp-i2s.0", &msp0_platform_data),
762 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000,
763 "ux500-msp-i2s.1", &msp1_platform_data),
764 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000,
765 "ux500-msp-i2s.2", &msp2_platform_data),
766 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000,
767 "ux500-msp-i2s.3", &msp3_platform_data),
Lee Jones7e0ce272012-03-15 16:46:17 +0000768 {},
769};
770
Lee Jones2cfaa622012-04-19 21:36:30 +0100771static const struct of_device_id u8500_local_bus_nodes[] = {
Lee Jones7e0ce272012-03-15 16:46:17 +0000772 /* only create devices below soc node */
773 { .compatible = "stericsson,db8500", },
Lee Jones48a4ea62012-05-29 15:06:55 +0800774 { .compatible = "stericsson,db8500-prcmu", },
Lee Jones2cfaa622012-04-19 21:36:30 +0100775 { .compatible = "simple-bus"},
Lee Jones7e0ce272012-03-15 16:46:17 +0000776 { },
777};
778
Arnd Bergmann2d334292012-03-07 15:04:07 +0000779static void __init u8500_init_machine(void)
780{
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000781 struct device *parent = NULL;
782 int i2c0_devs;
783 int i;
784
Linus Walleijed781d392012-05-03 00:44:52 +0200785 /* Pinmaps must be in place before devices register */
786 if (of_machine_is_compatible("st-ericsson,mop500"))
787 mop500_pinmaps_init();
788 else if (of_machine_is_compatible("calaosystems,snowball-a9500"))
789 snowball_pinmaps_init();
790 else if (of_machine_is_compatible("st-ericsson,hrefv60+"))
791 hrefv60_pinmaps_init();
792
Lee Jonesf65c1982012-05-29 10:03:09 +0800793 parent = u8500_of_init_devices();
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000794
795 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
796 mop500_platform_devs[i]->dev.parent = parent;
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000797
Lee Jones7e0ce272012-03-15 16:46:17 +0000798 /* automatically probe child nodes of db8500 device */
Lee Jones2cfaa622012-04-19 21:36:30 +0100799 of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent);
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000800
801 if (of_machine_is_compatible("st-ericsson,mop500")) {
802 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000803
804 platform_add_devices(mop500_platform_devs,
805 ARRAY_SIZE(mop500_platform_devs));
806
807 mop500_sdi_init(parent);
Lee Jones39b740b2012-09-14 15:46:29 +0100808 mop500_audio_init(parent);
Lee Jones4809f902012-04-19 21:36:40 +0100809 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
810 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
811 i2c_register_board_info(2, mop500_i2c2_devices,
812 ARRAY_SIZE(mop500_i2c2_devices));
813
Lee Jonesfd6948b2012-05-02 09:53:48 +0100814 mop500_uib_init();
815
Lee Jones46a8b982012-08-09 16:47:28 +0100816 } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
Lee Jones39b740b2012-09-14 15:46:29 +0100817 mop500_of_audio_init(parent);
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000818 } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
819 /*
820 * The HREFv60 board removed a GPIO expander and routed
821 * all these GPIO pins to the internal GPIO controller
822 * instead.
823 */
824 mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000825 platform_add_devices(mop500_platform_devs,
826 ARRAY_SIZE(mop500_platform_devs));
827
Lee Jonesfd6948b2012-05-02 09:53:48 +0100828 mop500_uib_init();
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000829 }
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000830
Arnd Bergmann7734fed2012-03-02 22:25:02 +0000831 /* This board has full regulator constraints */
832 regulator_has_full_constraints();
Arnd Bergmann2d334292012-03-07 15:04:07 +0000833}
834
835static const char * u8500_dt_board_compat[] = {
836 "calaosystems,snowball-a9500",
837 "st-ericsson,hrefv60+",
838 "st-ericsson,u8500",
839 "st-ericsson,mop500",
840 NULL,
841};
842
843
844DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)")
Marc Zyngier5ac21a92011-09-08 13:15:22 +0100845 .smp = smp_ops(ux500_smp_ops),
Arnd Bergmann2d334292012-03-07 15:04:07 +0000846 .map_io = u8500_map_io,
847 .init_irq = ux500_init_irq,
848 /* we re-use nomadik timer here */
849 .timer = &ux500_timer,
850 .handle_irq = gic_handle_irq,
851 .init_machine = u8500_init_machine,
Shawn Guoa010bc22012-05-02 17:10:07 +0800852 .init_late = ux500_init_late,
Arnd Bergmann2d334292012-03-07 15:04:07 +0000853 .dt_compat = u8500_dt_board_compat,
854MACHINE_END
855#endif