Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008-2009 ST-Ericsson |
| 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> |
Rabin Vincent | ea05a57 | 2010-06-03 07:58:42 +0100 | [diff] [blame] | 17 | #include <linux/gpio.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 18 | #include <linux/amba/bus.h> |
| 19 | #include <linux/amba/pl022.h> |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 20 | #include <linux/amba/serial.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 21 | #include <linux/spi/spi.h> |
Linus Walleij | ee66e65 | 2011-12-02 14:16:33 +0100 | [diff] [blame] | 22 | #include <linux/mfd/abx500/ab8500.h> |
Bengt Jonsson | 79568b94 | 2011-03-11 11:54:46 +0100 | [diff] [blame] | 23 | #include <linux/regulator/ab8500.h> |
Sundar Iyer | 20406eb | 2010-12-13 09:33:14 +0530 | [diff] [blame] | 24 | #include <linux/mfd/tc3589x.h> |
Linus Walleij | fe67dfc8 | 2011-03-07 11:48:15 +0100 | [diff] [blame] | 25 | #include <linux/mfd/tps6105x.h> |
Linus Walleij | ee66e65 | 2011-12-02 14:16:33 +0100 | [diff] [blame] | 26 | #include <linux/mfd/abx500/ab8500-gpio.h> |
Philippe Langlais | dd7b2a0 | 2011-01-12 11:26:20 +0100 | [diff] [blame] | 27 | #include <linux/leds-lp5521.h> |
Philippe Langlais | a71b819 | 2011-01-14 10:53:59 +0100 | [diff] [blame] | 28 | #include <linux/input.h> |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 29 | #include <linux/smsc911x.h> |
Philippe Langlais | a71b819 | 2011-01-14 10:53:59 +0100 | [diff] [blame] | 30 | #include <linux/gpio_keys.h> |
Shreshtha Kumar Sahu | 1a7d436 | 2011-06-13 10:11:44 +0200 | [diff] [blame] | 31 | #include <linux/delay.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 32 | |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 33 | #include <linux/leds.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 34 | #include <asm/mach-types.h> |
| 35 | #include <asm/mach/arch.h> |
Marc Zyngier | bbf5f38 | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 36 | #include <asm/hardware/gic.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 37 | |
Srinidhi Kasagar | d48a41c | 2010-02-03 13:02:48 +0100 | [diff] [blame] | 38 | #include <plat/i2c.h> |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 39 | #include <plat/ste_dma40.h> |
Shreshtha Kumar Sahu | 1a7d436 | 2011-06-13 10:11:44 +0200 | [diff] [blame] | 40 | #include <plat/pincfg.h> |
Linus Walleij | 0f33286 | 2011-08-22 08:33:30 +0100 | [diff] [blame] | 41 | #include <plat/gpio-nomadik.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 42 | |
| 43 | #include <mach/hardware.h> |
| 44 | #include <mach/setup.h> |
Rabin Vincent | 9e4e7fe | 2010-05-03 08:03:52 +0100 | [diff] [blame] | 45 | #include <mach/devices.h> |
Linus Walleij | 29aeb3c | 2010-09-06 22:15:08 +0100 | [diff] [blame] | 46 | #include <mach/irqs.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 47 | |
Shreshtha Kumar Sahu | 1a7d436 | 2011-06-13 10:11:44 +0200 | [diff] [blame] | 48 | #include "pins-db8500.h" |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 49 | #include "ste-dma40-db8500.h" |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 50 | #include "devices-db8500.h" |
Hanumath Prasad | 008f8a2 | 2010-08-19 12:06:32 +0100 | [diff] [blame] | 51 | #include "board-mop500.h" |
Bengt Jonsson | a1e516e | 2010-12-10 11:08:48 +0100 | [diff] [blame] | 52 | #include "board-mop500-regulators.h" |
Rabin Vincent | ea05a57 | 2010-06-03 07:58:42 +0100 | [diff] [blame] | 53 | |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 54 | static struct gpio_led snowball_led_array[] = { |
| 55 | { |
| 56 | .name = "user_led", |
| 57 | .default_trigger = "none", |
| 58 | .gpio = 142, |
| 59 | }, |
| 60 | }; |
| 61 | |
| 62 | static struct gpio_led_platform_data snowball_led_data = { |
| 63 | .leds = snowball_led_array, |
| 64 | .num_leds = ARRAY_SIZE(snowball_led_array), |
| 65 | }; |
| 66 | |
| 67 | static struct platform_device snowball_led_dev = { |
| 68 | .name = "leds-gpio", |
| 69 | .dev = { |
| 70 | .platform_data = &snowball_led_data, |
| 71 | }, |
| 72 | }; |
| 73 | |
Bibek Basu | 3ef374a | 2011-02-15 12:56:16 +0530 | [diff] [blame] | 74 | static struct ab8500_gpio_platform_data ab8500_gpio_pdata = { |
| 75 | .gpio_base = MOP500_AB8500_GPIO(0), |
| 76 | .irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE, |
| 77 | /* config_reg is the initial configuration of ab8500 pins. |
| 78 | * The pins can be configured as GPIO or alt functions based |
| 79 | * on value present in GpioSel1 to GpioSel6 and AlternatFunction |
| 80 | * register. This is the array of 7 configuration settings. |
| 81 | * One has to compile time decide these settings. Below is the |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 82 | * explanation of these setting |
Bibek Basu | 3ef374a | 2011-02-15 12:56:16 +0530 | [diff] [blame] | 83 | * GpioSel1 = 0x00 => Pins GPIO1 to GPIO8 are not used as GPIO |
| 84 | * GpioSel2 = 0x1E => Pins GPIO10 to GPIO13 are configured as GPIO |
| 85 | * GpioSel3 = 0x80 => Pin GPIO24 is configured as GPIO |
| 86 | * GpioSel4 = 0x01 => Pin GPIo25 is configured as GPIO |
| 87 | * GpioSel5 = 0x7A => Pins GPIO34, GPIO36 to GPIO39 are conf as GPIO |
| 88 | * GpioSel6 = 0x00 => Pins GPIO41 & GPIo42 are not configured as GPIO |
| 89 | * AlternaFunction = 0x00 => If Pins GPIO10 to 13 are not configured |
| 90 | * as GPIO then this register selectes the alternate fucntions |
| 91 | */ |
| 92 | .config_reg = {0x00, 0x1E, 0x80, 0x01, |
| 93 | 0x7A, 0x00, 0x00}, |
| 94 | }; |
| 95 | |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 96 | static struct gpio_keys_button snowball_key_array[] = { |
| 97 | { |
| 98 | .gpio = 32, |
| 99 | .type = EV_KEY, |
| 100 | .code = KEY_1, |
| 101 | .desc = "userpb", |
| 102 | .active_low = 1, |
| 103 | .debounce_interval = 50, |
| 104 | .wakeup = 1, |
| 105 | }, |
| 106 | { |
| 107 | .gpio = 151, |
| 108 | .type = EV_KEY, |
| 109 | .code = KEY_2, |
| 110 | .desc = "extkb1", |
| 111 | .active_low = 1, |
| 112 | .debounce_interval = 50, |
| 113 | .wakeup = 1, |
| 114 | }, |
| 115 | { |
| 116 | .gpio = 152, |
| 117 | .type = EV_KEY, |
| 118 | .code = KEY_3, |
| 119 | .desc = "extkb2", |
| 120 | .active_low = 1, |
| 121 | .debounce_interval = 50, |
| 122 | .wakeup = 1, |
| 123 | }, |
| 124 | { |
| 125 | .gpio = 161, |
| 126 | .type = EV_KEY, |
| 127 | .code = KEY_4, |
| 128 | .desc = "extkb3", |
| 129 | .active_low = 1, |
| 130 | .debounce_interval = 50, |
| 131 | .wakeup = 1, |
| 132 | }, |
| 133 | { |
| 134 | .gpio = 162, |
| 135 | .type = EV_KEY, |
| 136 | .code = KEY_5, |
| 137 | .desc = "extkb4", |
| 138 | .active_low = 1, |
| 139 | .debounce_interval = 50, |
| 140 | .wakeup = 1, |
| 141 | }, |
| 142 | }; |
| 143 | |
| 144 | static struct gpio_keys_platform_data snowball_key_data = { |
| 145 | .buttons = snowball_key_array, |
| 146 | .nbuttons = ARRAY_SIZE(snowball_key_array), |
| 147 | }; |
| 148 | |
| 149 | static struct platform_device snowball_key_dev = { |
| 150 | .name = "gpio-keys", |
| 151 | .id = -1, |
| 152 | .dev = { |
| 153 | .platform_data = &snowball_key_data, |
| 154 | } |
| 155 | }; |
| 156 | |
| 157 | static struct smsc911x_platform_config snowball_sbnet_cfg = { |
| 158 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, |
| 159 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, |
| 160 | .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY, |
| 161 | .shift = 1, |
| 162 | }; |
| 163 | |
| 164 | static struct resource sbnet_res[] = { |
| 165 | { |
| 166 | .name = "smsc911x-memory", |
| 167 | .start = (0x5000 << 16), |
| 168 | .end = (0x5000 << 16) + 0xffff, |
| 169 | .flags = IORESOURCE_MEM, |
| 170 | }, |
| 171 | { |
| 172 | .start = NOMADIK_GPIO_TO_IRQ(140), |
| 173 | .end = NOMADIK_GPIO_TO_IRQ(140), |
| 174 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
| 175 | }, |
| 176 | }; |
| 177 | |
| 178 | static struct platform_device snowball_sbnet_dev = { |
| 179 | .name = "smsc911x", |
| 180 | .num_resources = ARRAY_SIZE(sbnet_res), |
| 181 | .resource = sbnet_res, |
| 182 | .dev = { |
| 183 | .platform_data = &snowball_sbnet_cfg, |
| 184 | }, |
| 185 | }; |
| 186 | |
Rabin Vincent | 39ae702 | 2010-07-26 11:12:15 +0100 | [diff] [blame] | 187 | static struct ab8500_platform_data ab8500_platdata = { |
| 188 | .irq_base = MOP500_AB8500_IRQ_BASE, |
Bengt Jonsson | dfa3a82 | 2011-03-09 13:34:17 +0100 | [diff] [blame] | 189 | .regulator_reg_init = ab8500_regulator_reg_init, |
| 190 | .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init), |
Bengt Jonsson | a1e516e | 2010-12-10 11:08:48 +0100 | [diff] [blame] | 191 | .regulator = ab8500_regulators, |
| 192 | .num_regulator = ARRAY_SIZE(ab8500_regulators), |
Bibek Basu | 3ef374a | 2011-02-15 12:56:16 +0530 | [diff] [blame] | 193 | .gpio = &ab8500_gpio_pdata, |
Rabin Vincent | 39ae702 | 2010-07-26 11:12:15 +0100 | [diff] [blame] | 194 | }; |
| 195 | |
Linus Walleij | 29aeb3c | 2010-09-06 22:15:08 +0100 | [diff] [blame] | 196 | static struct resource ab8500_resources[] = { |
| 197 | [0] = { |
Rabin Vincent | 22039b7 | 2010-12-08 11:07:56 +0530 | [diff] [blame] | 198 | .start = IRQ_DB8500_AB8500, |
| 199 | .end = IRQ_DB8500_AB8500, |
| 200 | .flags = IORESOURCE_IRQ |
Linus Walleij | 29aeb3c | 2010-09-06 22:15:08 +0100 | [diff] [blame] | 201 | } |
| 202 | }; |
| 203 | |
| 204 | struct platform_device ab8500_device = { |
| 205 | .name = "ab8500-i2c", |
| 206 | .id = 0, |
| 207 | .dev = { |
| 208 | .platform_data = &ab8500_platdata, |
| 209 | }, |
| 210 | .num_resources = 1, |
| 211 | .resource = ab8500_resources, |
| 212 | }; |
| 213 | |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 214 | /* |
Linus Walleij | fe67dfc8 | 2011-03-07 11:48:15 +0100 | [diff] [blame] | 215 | * TPS61052 |
| 216 | */ |
| 217 | |
| 218 | static struct tps6105x_platform_data mop500_tps61052_data = { |
| 219 | .mode = TPS6105X_MODE_VOLTAGE, |
| 220 | .regulator_data = &tps61052_regulator, |
| 221 | }; |
| 222 | |
| 223 | /* |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 224 | * TC35892 |
| 225 | */ |
| 226 | |
Sundar Iyer | 20406eb | 2010-12-13 09:33:14 +0530 | [diff] [blame] | 227 | static void mop500_tc35892_init(struct tc3589x *tc3589x, unsigned int base) |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 228 | { |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 229 | struct device *parent = NULL; |
| 230 | #if 0 |
| 231 | /* FIXME: Is the sdi actually part of tc3589x? */ |
| 232 | parent = tc3589x->dev; |
| 233 | #endif |
| 234 | mop500_sdi_tc35892_init(parent); |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 235 | } |
| 236 | |
Sundar Iyer | 20406eb | 2010-12-13 09:33:14 +0530 | [diff] [blame] | 237 | static struct tc3589x_gpio_platform_data mop500_tc35892_gpio_data = { |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 238 | .gpio_base = MOP500_EGPIO(0), |
| 239 | .setup = mop500_tc35892_init, |
| 240 | }; |
| 241 | |
Sundar Iyer | 20406eb | 2010-12-13 09:33:14 +0530 | [diff] [blame] | 242 | static struct tc3589x_platform_data mop500_tc35892_data = { |
Sundar Iyer | 611b759 | 2010-12-13 09:33:15 +0530 | [diff] [blame] | 243 | .block = TC3589x_BLOCK_GPIO, |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 244 | .gpio = &mop500_tc35892_gpio_data, |
| 245 | .irq_base = MOP500_EGPIO_IRQ_BASE, |
| 246 | }; |
| 247 | |
Philippe Langlais | dd7b2a0 | 2011-01-12 11:26:20 +0100 | [diff] [blame] | 248 | static struct lp5521_led_config lp5521_pri_led[] = { |
| 249 | [0] = { |
| 250 | .chan_nr = 0, |
| 251 | .led_current = 0x2f, |
| 252 | .max_current = 0x5f, |
| 253 | }, |
| 254 | [1] = { |
| 255 | .chan_nr = 1, |
| 256 | .led_current = 0x2f, |
| 257 | .max_current = 0x5f, |
| 258 | }, |
| 259 | [2] = { |
| 260 | .chan_nr = 2, |
| 261 | .led_current = 0x2f, |
| 262 | .max_current = 0x5f, |
| 263 | }, |
| 264 | }; |
| 265 | |
| 266 | static struct lp5521_platform_data __initdata lp5521_pri_data = { |
| 267 | .label = "lp5521_pri", |
| 268 | .led_config = &lp5521_pri_led[0], |
| 269 | .num_channels = 3, |
| 270 | .clock_mode = LP5521_CLOCK_EXT, |
| 271 | }; |
| 272 | |
| 273 | static struct lp5521_led_config lp5521_sec_led[] = { |
| 274 | [0] = { |
| 275 | .chan_nr = 0, |
| 276 | .led_current = 0x2f, |
| 277 | .max_current = 0x5f, |
| 278 | }, |
| 279 | [1] = { |
| 280 | .chan_nr = 1, |
| 281 | .led_current = 0x2f, |
| 282 | .max_current = 0x5f, |
| 283 | }, |
| 284 | [2] = { |
| 285 | .chan_nr = 2, |
| 286 | .led_current = 0x2f, |
| 287 | .max_current = 0x5f, |
| 288 | }, |
| 289 | }; |
| 290 | |
| 291 | static struct lp5521_platform_data __initdata lp5521_sec_data = { |
| 292 | .label = "lp5521_sec", |
| 293 | .led_config = &lp5521_sec_led[0], |
| 294 | .num_channels = 3, |
| 295 | .clock_mode = LP5521_CLOCK_EXT, |
| 296 | }; |
| 297 | |
Linus Walleij | fe67dfc8 | 2011-03-07 11:48:15 +0100 | [diff] [blame] | 298 | static struct i2c_board_info __initdata mop500_i2c0_devices[] = { |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 299 | { |
Sundar Iyer | 20406eb | 2010-12-13 09:33:14 +0530 | [diff] [blame] | 300 | I2C_BOARD_INFO("tc3589x", 0x42), |
Philippe Langlais | dd7b2a0 | 2011-01-12 11:26:20 +0100 | [diff] [blame] | 301 | .irq = NOMADIK_GPIO_TO_IRQ(217), |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 302 | .platform_data = &mop500_tc35892_data, |
| 303 | }, |
Linus Walleij | cf568c5 | 2011-03-30 14:31:42 +0200 | [diff] [blame] | 304 | /* I2C0 devices only available prior to HREFv60 */ |
Linus Walleij | fe67dfc8 | 2011-03-07 11:48:15 +0100 | [diff] [blame] | 305 | { |
| 306 | I2C_BOARD_INFO("tps61052", 0x33), |
| 307 | .platform_data = &mop500_tps61052_data, |
| 308 | }, |
| 309 | }; |
| 310 | |
Linus Walleij | cf568c5 | 2011-03-30 14:31:42 +0200 | [diff] [blame] | 311 | #define NUM_PRE_V60_I2C0_DEVICES 1 |
| 312 | |
Philippe Langlais | dd7b2a0 | 2011-01-12 11:26:20 +0100 | [diff] [blame] | 313 | static struct i2c_board_info __initdata mop500_i2c2_devices[] = { |
| 314 | { |
| 315 | /* lp5521 LED driver, 1st device */ |
| 316 | I2C_BOARD_INFO("lp5521", 0x33), |
| 317 | .platform_data = &lp5521_pri_data, |
| 318 | }, |
| 319 | { |
| 320 | /* lp5521 LED driver, 2st device */ |
| 321 | I2C_BOARD_INFO("lp5521", 0x34), |
| 322 | .platform_data = &lp5521_sec_data, |
| 323 | }, |
Lee Jones | bb3b218 | 2011-01-13 14:41:22 +0000 | [diff] [blame] | 324 | { |
| 325 | /* Light sensor Rohm BH1780GLI */ |
| 326 | I2C_BOARD_INFO("bh1780", 0x29), |
| 327 | }, |
Philippe Langlais | dd7b2a0 | 2011-01-12 11:26:20 +0100 | [diff] [blame] | 328 | }; |
| 329 | |
Linus Walleij | 2b030bd | 2011-05-13 12:31:13 +0200 | [diff] [blame] | 330 | #define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, t_out, _sm) \ |
Rabin Vincent | f9faf23 | 2010-05-03 08:24:37 +0100 | [diff] [blame] | 331 | static struct nmk_i2c_controller u8500_i2c##id##_data = { \ |
Srinidhi Kasagar | d48a41c | 2010-02-03 13:02:48 +0100 | [diff] [blame] | 332 | /* \ |
| 333 | * slave data setup time, which is \ |
| 334 | * 250 ns,100ns,10ns which is 14,6,2 \ |
| 335 | * respectively for a 48 Mhz \ |
| 336 | * i2c clock \ |
| 337 | */ \ |
| 338 | .slsu = _slsu, \ |
| 339 | /* Tx FIFO threshold */ \ |
| 340 | .tft = _tft, \ |
| 341 | /* Rx FIFO threshold */ \ |
| 342 | .rft = _rft, \ |
| 343 | /* std. mode operation */ \ |
| 344 | .clk_freq = clk, \ |
Linus Walleij | 2b030bd | 2011-05-13 12:31:13 +0200 | [diff] [blame] | 345 | /* Slave response timeout(ms) */\ |
| 346 | .timeout = t_out, \ |
Srinidhi Kasagar | d48a41c | 2010-02-03 13:02:48 +0100 | [diff] [blame] | 347 | .sm = _sm, \ |
| 348 | } |
| 349 | |
| 350 | /* |
| 351 | * The board uses 4 i2c controllers, initialize all of |
| 352 | * them with slave data setup time of 250 ns, |
Linus Walleij | 2b030bd | 2011-05-13 12:31:13 +0200 | [diff] [blame] | 353 | * Tx & Rx FIFO threshold values as 8 and standard |
Srinidhi Kasagar | d48a41c | 2010-02-03 13:02:48 +0100 | [diff] [blame] | 354 | * mode of operation |
| 355 | */ |
Linus Walleij | 2b030bd | 2011-05-13 12:31:13 +0200 | [diff] [blame] | 356 | U8500_I2C_CONTROLLER(0, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); |
| 357 | U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); |
| 358 | U8500_I2C_CONTROLLER(2, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); |
| 359 | U8500_I2C_CONTROLLER(3, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); |
Srinidhi Kasagar | d48a41c | 2010-02-03 13:02:48 +0100 | [diff] [blame] | 360 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 361 | static void __init mop500_i2c_init(struct device *parent) |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 362 | { |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 363 | db8500_add_i2c0(parent, &u8500_i2c0_data); |
| 364 | db8500_add_i2c1(parent, &u8500_i2c1_data); |
| 365 | db8500_add_i2c2(parent, &u8500_i2c2_data); |
| 366 | db8500_add_i2c3(parent, &u8500_i2c3_data); |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 367 | } |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 368 | |
Philippe Langlais | a71b819 | 2011-01-14 10:53:59 +0100 | [diff] [blame] | 369 | static struct gpio_keys_button mop500_gpio_keys[] = { |
| 370 | { |
| 371 | .desc = "SFH7741 Proximity Sensor", |
| 372 | .type = EV_SW, |
| 373 | .code = SW_FRONT_PROXIMITY, |
Philippe Langlais | a71b819 | 2011-01-14 10:53:59 +0100 | [diff] [blame] | 374 | .active_low = 0, |
| 375 | .can_disable = 1, |
| 376 | } |
| 377 | }; |
| 378 | |
| 379 | static struct regulator *prox_regulator; |
| 380 | static int mop500_prox_activate(struct device *dev); |
| 381 | static void mop500_prox_deactivate(struct device *dev); |
| 382 | |
| 383 | static struct gpio_keys_platform_data mop500_gpio_keys_data = { |
| 384 | .buttons = mop500_gpio_keys, |
| 385 | .nbuttons = ARRAY_SIZE(mop500_gpio_keys), |
| 386 | .enable = mop500_prox_activate, |
| 387 | .disable = mop500_prox_deactivate, |
| 388 | }; |
| 389 | |
| 390 | static struct platform_device mop500_gpio_keys_device = { |
| 391 | .name = "gpio-keys", |
| 392 | .id = 0, |
| 393 | .dev = { |
| 394 | .platform_data = &mop500_gpio_keys_data, |
| 395 | }, |
| 396 | }; |
| 397 | |
| 398 | static int mop500_prox_activate(struct device *dev) |
| 399 | { |
| 400 | prox_regulator = regulator_get(&mop500_gpio_keys_device.dev, |
| 401 | "vcc"); |
| 402 | if (IS_ERR(prox_regulator)) { |
| 403 | dev_err(&mop500_gpio_keys_device.dev, |
| 404 | "no regulator\n"); |
| 405 | return PTR_ERR(prox_regulator); |
| 406 | } |
| 407 | regulator_enable(prox_regulator); |
| 408 | return 0; |
| 409 | } |
| 410 | |
| 411 | static void mop500_prox_deactivate(struct device *dev) |
| 412 | { |
| 413 | regulator_disable(prox_regulator); |
| 414 | regulator_put(prox_regulator); |
| 415 | } |
| 416 | |
Srinidhi Kasagar | d48a41c | 2010-02-03 13:02:48 +0100 | [diff] [blame] | 417 | /* add any platform devices here - TODO */ |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 418 | static struct platform_device *mop500_platform_devs[] __initdata = { |
Philippe Langlais | a71b819 | 2011-01-14 10:53:59 +0100 | [diff] [blame] | 419 | &mop500_gpio_keys_device, |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 420 | &ab8500_device, |
Srinidhi Kasagar | d48a41c | 2010-02-03 13:02:48 +0100 | [diff] [blame] | 421 | }; |
| 422 | |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 423 | #ifdef CONFIG_STE_DMA40 |
| 424 | static struct stedma40_chan_cfg ssp0_dma_cfg_rx = { |
| 425 | .mode = STEDMA40_MODE_LOGICAL, |
| 426 | .dir = STEDMA40_PERIPH_TO_MEM, |
| 427 | .src_dev_type = DB8500_DMA_DEV8_SSP0_RX, |
| 428 | .dst_dev_type = STEDMA40_DEV_DST_MEMORY, |
| 429 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 430 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 431 | }; |
| 432 | |
| 433 | static struct stedma40_chan_cfg ssp0_dma_cfg_tx = { |
| 434 | .mode = STEDMA40_MODE_LOGICAL, |
| 435 | .dir = STEDMA40_MEM_TO_PERIPH, |
| 436 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, |
| 437 | .dst_dev_type = DB8500_DMA_DEV8_SSP0_TX, |
| 438 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 439 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 440 | }; |
| 441 | #endif |
| 442 | |
| 443 | static struct pl022_ssp_controller ssp0_platform_data = { |
| 444 | .bus_id = 0, |
| 445 | #ifdef CONFIG_STE_DMA40 |
| 446 | .enable_dma = 1, |
| 447 | .dma_filter = stedma40_filter, |
| 448 | .dma_rx_param = &ssp0_dma_cfg_rx, |
| 449 | .dma_tx_param = &ssp0_dma_cfg_tx, |
| 450 | #else |
| 451 | .enable_dma = 0, |
| 452 | #endif |
| 453 | /* on this platform, gpio 31,142,144,214 & |
| 454 | * 224 are connected as chip selects |
| 455 | */ |
| 456 | .num_chipselect = 5, |
| 457 | }; |
| 458 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 459 | static void __init mop500_spi_init(struct device *parent) |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 460 | { |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 461 | db8500_add_ssp0(parent, &ssp0_platform_data); |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 462 | } |
| 463 | |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 464 | #ifdef CONFIG_STE_DMA40 |
| 465 | static struct stedma40_chan_cfg uart0_dma_cfg_rx = { |
| 466 | .mode = STEDMA40_MODE_LOGICAL, |
| 467 | .dir = STEDMA40_PERIPH_TO_MEM, |
| 468 | .src_dev_type = DB8500_DMA_DEV13_UART0_RX, |
| 469 | .dst_dev_type = STEDMA40_DEV_DST_MEMORY, |
| 470 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 471 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 472 | }; |
| 473 | |
| 474 | static struct stedma40_chan_cfg uart0_dma_cfg_tx = { |
| 475 | .mode = STEDMA40_MODE_LOGICAL, |
| 476 | .dir = STEDMA40_MEM_TO_PERIPH, |
| 477 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, |
| 478 | .dst_dev_type = DB8500_DMA_DEV13_UART0_TX, |
| 479 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 480 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 481 | }; |
| 482 | |
| 483 | static struct stedma40_chan_cfg uart1_dma_cfg_rx = { |
| 484 | .mode = STEDMA40_MODE_LOGICAL, |
| 485 | .dir = STEDMA40_PERIPH_TO_MEM, |
| 486 | .src_dev_type = DB8500_DMA_DEV12_UART1_RX, |
| 487 | .dst_dev_type = STEDMA40_DEV_DST_MEMORY, |
| 488 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 489 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 490 | }; |
| 491 | |
| 492 | static struct stedma40_chan_cfg uart1_dma_cfg_tx = { |
| 493 | .mode = STEDMA40_MODE_LOGICAL, |
| 494 | .dir = STEDMA40_MEM_TO_PERIPH, |
| 495 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, |
| 496 | .dst_dev_type = DB8500_DMA_DEV12_UART1_TX, |
| 497 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 498 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 499 | }; |
| 500 | |
| 501 | static struct stedma40_chan_cfg uart2_dma_cfg_rx = { |
| 502 | .mode = STEDMA40_MODE_LOGICAL, |
| 503 | .dir = STEDMA40_PERIPH_TO_MEM, |
| 504 | .src_dev_type = DB8500_DMA_DEV11_UART2_RX, |
| 505 | .dst_dev_type = STEDMA40_DEV_DST_MEMORY, |
| 506 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 507 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 508 | }; |
| 509 | |
| 510 | static struct stedma40_chan_cfg uart2_dma_cfg_tx = { |
| 511 | .mode = STEDMA40_MODE_LOGICAL, |
| 512 | .dir = STEDMA40_MEM_TO_PERIPH, |
| 513 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, |
| 514 | .dst_dev_type = DB8500_DMA_DEV11_UART2_TX, |
| 515 | .src_info.data_width = STEDMA40_BYTE_WIDTH, |
| 516 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, |
| 517 | }; |
| 518 | #endif |
| 519 | |
Shreshtha Kumar Sahu | 1a7d436 | 2011-06-13 10:11:44 +0200 | [diff] [blame] | 520 | |
| 521 | static pin_cfg_t mop500_pins_uart0[] = { |
| 522 | GPIO0_U0_CTSn | PIN_INPUT_PULLUP, |
| 523 | GPIO1_U0_RTSn | PIN_OUTPUT_HIGH, |
| 524 | GPIO2_U0_RXD | PIN_INPUT_PULLUP, |
| 525 | GPIO3_U0_TXD | PIN_OUTPUT_HIGH, |
| 526 | }; |
| 527 | |
| 528 | #define PRCC_K_SOFTRST_SET 0x18 |
| 529 | #define PRCC_K_SOFTRST_CLEAR 0x1C |
| 530 | static void ux500_uart0_reset(void) |
| 531 | { |
| 532 | void __iomem *prcc_rst_set, *prcc_rst_clr; |
| 533 | |
| 534 | prcc_rst_set = (void __iomem *)IO_ADDRESS(U8500_CLKRST1_BASE + |
| 535 | PRCC_K_SOFTRST_SET); |
| 536 | prcc_rst_clr = (void __iomem *)IO_ADDRESS(U8500_CLKRST1_BASE + |
| 537 | PRCC_K_SOFTRST_CLEAR); |
| 538 | |
| 539 | /* Activate soft reset PRCC_K_SOFTRST_CLEAR */ |
| 540 | writel((readl(prcc_rst_clr) | 0x1), prcc_rst_clr); |
| 541 | udelay(1); |
| 542 | |
| 543 | /* Release soft reset PRCC_K_SOFTRST_SET */ |
| 544 | writel((readl(prcc_rst_set) | 0x1), prcc_rst_set); |
| 545 | udelay(1); |
| 546 | } |
| 547 | |
| 548 | static void ux500_uart0_init(void) |
| 549 | { |
| 550 | int ret; |
| 551 | |
| 552 | ret = nmk_config_pins(mop500_pins_uart0, |
| 553 | ARRAY_SIZE(mop500_pins_uart0)); |
| 554 | if (ret < 0) |
| 555 | pr_err("pl011: uart pins_enable failed\n"); |
| 556 | } |
| 557 | |
| 558 | static void ux500_uart0_exit(void) |
| 559 | { |
| 560 | int ret; |
| 561 | |
| 562 | ret = nmk_config_pins_sleep(mop500_pins_uart0, |
| 563 | ARRAY_SIZE(mop500_pins_uart0)); |
| 564 | if (ret < 0) |
| 565 | pr_err("pl011: uart pins_disable failed\n"); |
| 566 | } |
| 567 | |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 568 | static struct amba_pl011_data uart0_plat = { |
| 569 | #ifdef CONFIG_STE_DMA40 |
| 570 | .dma_filter = stedma40_filter, |
| 571 | .dma_rx_param = &uart0_dma_cfg_rx, |
| 572 | .dma_tx_param = &uart0_dma_cfg_tx, |
| 573 | #endif |
Shreshtha Kumar Sahu | 1a7d436 | 2011-06-13 10:11:44 +0200 | [diff] [blame] | 574 | .init = ux500_uart0_init, |
| 575 | .exit = ux500_uart0_exit, |
| 576 | .reset = ux500_uart0_reset, |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 577 | }; |
| 578 | |
| 579 | static struct amba_pl011_data uart1_plat = { |
| 580 | #ifdef CONFIG_STE_DMA40 |
| 581 | .dma_filter = stedma40_filter, |
| 582 | .dma_rx_param = &uart1_dma_cfg_rx, |
| 583 | .dma_tx_param = &uart1_dma_cfg_tx, |
| 584 | #endif |
| 585 | }; |
| 586 | |
| 587 | static struct amba_pl011_data uart2_plat = { |
| 588 | #ifdef CONFIG_STE_DMA40 |
| 589 | .dma_filter = stedma40_filter, |
| 590 | .dma_rx_param = &uart2_dma_cfg_rx, |
| 591 | .dma_tx_param = &uart2_dma_cfg_tx, |
| 592 | #endif |
| 593 | }; |
| 594 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 595 | static void __init mop500_uart_init(struct device *parent) |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 596 | { |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 597 | db8500_add_uart0(parent, &uart0_plat); |
| 598 | db8500_add_uart1(parent, &uart1_plat); |
| 599 | db8500_add_uart2(parent, &uart2_plat); |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 600 | } |
| 601 | |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 602 | static struct platform_device *snowball_platform_devs[] __initdata = { |
| 603 | &snowball_led_dev, |
| 604 | &snowball_key_dev, |
| 605 | &snowball_sbnet_dev, |
| 606 | &ab8500_device, |
| 607 | }; |
| 608 | |
Linus Walleij | 4b4f757 | 2011-02-15 15:01:35 +0100 | [diff] [blame] | 609 | static void __init mop500_init_machine(void) |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 610 | { |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 611 | struct device *parent = NULL; |
Linus Walleij | cf568c5 | 2011-03-30 14:31:42 +0200 | [diff] [blame] | 612 | int i2c0_devs; |
Lee Jones | b024a0c | 2012-02-06 11:22:25 -0800 | [diff] [blame^] | 613 | int i; |
Linus Walleij | cf568c5 | 2011-03-30 14:31:42 +0200 | [diff] [blame] | 614 | |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 615 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; |
Linus Walleij | 4b4f757 | 2011-02-15 15:01:35 +0100 | [diff] [blame] | 616 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 617 | parent = u8500_init_devices(); |
Rabin Vincent | ea05a57 | 2010-06-03 07:58:42 +0100 | [diff] [blame] | 618 | |
Rabin Vincent | fe05203 | 2011-02-11 17:07:21 -0700 | [diff] [blame] | 619 | mop500_pins_init(); |
Rabin Vincent | ea05a57 | 2010-06-03 07:58:42 +0100 | [diff] [blame] | 620 | |
Lee Jones | b024a0c | 2012-02-06 11:22:25 -0800 | [diff] [blame^] | 621 | for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) |
| 622 | mop500_platform_devs[i]->dev.parent = parent; |
| 623 | |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 624 | platform_add_devices(mop500_platform_devs, |
| 625 | ARRAY_SIZE(mop500_platform_devs)); |
Srinidhi Kasagar | d48a41c | 2010-02-03 13:02:48 +0100 | [diff] [blame] | 626 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 627 | mop500_i2c_init(parent); |
| 628 | mop500_sdi_init(parent); |
| 629 | mop500_spi_init(parent); |
| 630 | mop500_uart_init(parent); |
Hanumath Prasad | 008f8a2 | 2010-08-19 12:06:32 +0100 | [diff] [blame] | 631 | |
Linus Walleij | cf568c5 | 2011-03-30 14:31:42 +0200 | [diff] [blame] | 632 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 633 | |
| 634 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); |
| 635 | i2c_register_board_info(2, mop500_i2c2_devices, |
| 636 | ARRAY_SIZE(mop500_i2c2_devices)); |
| 637 | |
| 638 | /* This board has full regulator constraints */ |
| 639 | regulator_has_full_constraints(); |
| 640 | } |
| 641 | |
| 642 | static void __init snowball_init_machine(void) |
| 643 | { |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 644 | struct device *parent = NULL; |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 645 | int i2c0_devs; |
Lee Jones | b024a0c | 2012-02-06 11:22:25 -0800 | [diff] [blame^] | 646 | int i; |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 647 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 648 | parent = u8500_init_devices(); |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 649 | |
| 650 | snowball_pins_init(); |
| 651 | |
Lee Jones | b024a0c | 2012-02-06 11:22:25 -0800 | [diff] [blame^] | 652 | for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++) |
| 653 | snowball_platform_devs[i]->dev.parent = parent; |
| 654 | |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 655 | platform_add_devices(snowball_platform_devs, |
| 656 | ARRAY_SIZE(snowball_platform_devs)); |
| 657 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 658 | mop500_i2c_init(parent); |
| 659 | snowball_sdi_init(parent); |
| 660 | mop500_spi_init(parent); |
| 661 | mop500_uart_init(parent); |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 662 | |
| 663 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
| 664 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); |
| 665 | i2c_register_board_info(2, mop500_i2c2_devices, |
| 666 | ARRAY_SIZE(mop500_i2c2_devices)); |
| 667 | |
| 668 | /* This board has full regulator constraints */ |
| 669 | regulator_has_full_constraints(); |
| 670 | } |
| 671 | |
| 672 | static void __init hrefv60_init_machine(void) |
| 673 | { |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 674 | struct device *parent = NULL; |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 675 | int i2c0_devs; |
Lee Jones | b024a0c | 2012-02-06 11:22:25 -0800 | [diff] [blame^] | 676 | int i; |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 677 | |
| 678 | /* |
| 679 | * The HREFv60 board removed a GPIO expander and routed |
| 680 | * all these GPIO pins to the internal GPIO controller |
| 681 | * instead. |
| 682 | */ |
| 683 | mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; |
| 684 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 685 | parent = u8500_init_devices(); |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 686 | |
| 687 | hrefv60_pins_init(); |
| 688 | |
Lee Jones | b024a0c | 2012-02-06 11:22:25 -0800 | [diff] [blame^] | 689 | for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) |
| 690 | mop500_platform_devs[i]->dev.parent = parent; |
| 691 | |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 692 | platform_add_devices(mop500_platform_devs, |
| 693 | ARRAY_SIZE(mop500_platform_devs)); |
| 694 | |
Lee Jones | 1840342 | 2012-02-06 11:22:21 -0800 | [diff] [blame] | 695 | mop500_i2c_init(parent); |
| 696 | hrefv60_sdi_init(parent); |
| 697 | mop500_spi_init(parent); |
| 698 | mop500_uart_init(parent); |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 699 | |
| 700 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
| 701 | |
| 702 | i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; |
Linus Walleij | cf568c5 | 2011-03-30 14:31:42 +0200 | [diff] [blame] | 703 | |
| 704 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); |
Philippe Langlais | dd7b2a0 | 2011-01-12 11:26:20 +0100 | [diff] [blame] | 705 | i2c_register_board_info(2, mop500_i2c2_devices, |
| 706 | ARRAY_SIZE(mop500_i2c2_devices)); |
Linus Walleij | db24520 | 2011-04-04 10:44:51 +0200 | [diff] [blame] | 707 | |
| 708 | /* This board has full regulator constraints */ |
| 709 | regulator_has_full_constraints(); |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 710 | } |
| 711 | |
| 712 | MACHINE_START(U8500, "ST-Ericsson MOP500 platform") |
| 713 | /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */ |
Nicolas Pitre | bc77b1a | 2011-07-05 22:38:18 -0400 | [diff] [blame] | 714 | .atag_offset = 0x100, |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 715 | .map_io = u8500_map_io, |
Rabin Vincent | 178980f | 2010-05-03 07:39:02 +0100 | [diff] [blame] | 716 | .init_irq = ux500_init_irq, |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 717 | /* we re-use nomadik timer here */ |
Rabin Vincent | 41ac329 | 2010-05-03 08:28:05 +0100 | [diff] [blame] | 718 | .timer = &ux500_timer, |
Marc Zyngier | bbf5f38 | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 719 | .handle_irq = gic_handle_irq, |
Linus Walleij | 4b4f757 | 2011-02-15 15:01:35 +0100 | [diff] [blame] | 720 | .init_machine = mop500_init_machine, |
| 721 | MACHINE_END |
| 722 | |
| 723 | MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") |
Nicolas Pitre | bc77b1a | 2011-07-05 22:38:18 -0400 | [diff] [blame] | 724 | .atag_offset = 0x100, |
Linus Walleij | 4b4f757 | 2011-02-15 15:01:35 +0100 | [diff] [blame] | 725 | .map_io = u8500_map_io, |
| 726 | .init_irq = ux500_init_irq, |
| 727 | .timer = &ux500_timer, |
Marc Zyngier | bbf5f38 | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 728 | .handle_irq = gic_handle_irq, |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 729 | .init_machine = hrefv60_init_machine, |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 730 | MACHINE_END |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 731 | |
| 732 | MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") |
Nicolas Pitre | bc77b1a | 2011-07-05 22:38:18 -0400 | [diff] [blame] | 733 | .atag_offset = 0x100, |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 734 | .map_io = u8500_map_io, |
| 735 | .init_irq = ux500_init_irq, |
| 736 | /* we re-use nomadik timer here */ |
| 737 | .timer = &ux500_timer, |
Marc Zyngier | bbf5f38 | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 738 | .handle_irq = gic_handle_irq, |
Lee Jones | 110c2c2 | 2011-08-26 16:54:07 +0100 | [diff] [blame] | 739 | .init_machine = snowball_init_machine, |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 740 | MACHINE_END |