blob: 33b1f7319c17ac63a084efdb031bf9194d7dd0ad [file] [log] [blame]
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -07001/*
2 * Board support file for OMAP4430 SDP.
3 *
4 * Copyright (C) 2009 Texas Instruments
5 *
6 * Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
7 *
8 * Based on mach-omap2/board-3430sdp.c
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/platform_device.h>
18#include <linux/io.h>
19#include <linux/gpio.h>
Maulik Mankadbce06682010-02-17 14:09:32 -080020#include <linux/usb/otg.h>
Abraham Arceb2aa5e52010-05-14 12:05:26 -070021#include <linux/spi/spi.h>
Balaji T K6e30a7d2010-05-12 08:27:30 +000022#include <linux/i2c/twl.h>
Shubhrajyoti Datta94ce7a62010-09-23 18:22:49 -070023#include <linux/gpio_keys.h>
Balaji T K6e30a7d2010-05-12 08:27:30 +000024#include <linux/regulator/machine.h>
Hemanth V509b6d92010-08-02 13:18:04 +030025#include <linux/leds.h>
Hemanth Vf389f4c2010-12-17 18:15:08 -080026#include <linux/leds_pwm.h>
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -070027
28#include <mach/hardware.h>
Santosh Shilimkarfbc9be12010-05-14 12:05:26 -070029#include <mach/omap4-common.h>
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -070030#include <asm/mach-types.h>
31#include <asm/mach/arch.h>
32#include <asm/mach/map.h>
33
Tony Lindgrence491cf2009-10-20 09:40:47 -070034#include <plat/board.h>
35#include <plat/common.h>
Maulik Mankadbce06682010-02-17 14:09:32 -080036#include <plat/usb.h>
kishore kadiyala717c1fb2010-05-15 18:21:06 +000037#include <plat/mmc.h>
Manjunath Kondaiah G04aeae72010-10-08 09:58:35 -070038
Benoit Coussonfb6bf632010-08-10 17:43:15 +020039#include "mux.h"
kishore kadiyala717c1fb2010-05-15 18:21:06 +000040#include "hsmmc.h"
Manjunath Kondaiah G04aeae72010-10-08 09:58:35 -070041#include "timer-gp.h"
Paul Walmsley4814ced2010-10-08 11:40:20 -060042#include "control.h"
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -070043
Abraham Arceb2aa5e52010-05-14 12:05:26 -070044#define ETH_KS8851_IRQ 34
45#define ETH_KS8851_POWER_ON 48
46#define ETH_KS8851_QUART 138
Shubhrajyoti Datta94ce7a62010-09-23 18:22:49 -070047#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
48#define OMAP4_SFH7741_ENABLE_GPIO 188
Abraham Arceb2aa5e52010-05-14 12:05:26 -070049
Hemanth V509b6d92010-08-02 13:18:04 +030050static struct gpio_led sdp4430_gpio_leds[] = {
51 {
52 .name = "omap4:green:debug0",
53 .gpio = 61,
54 },
55 {
56 .name = "omap4:green:debug1",
57 .gpio = 30,
58 },
59 {
60 .name = "omap4:green:debug2",
61 .gpio = 7,
62 },
63 {
64 .name = "omap4:green:debug3",
65 .gpio = 8,
66 },
67 {
68 .name = "omap4:green:debug4",
69 .gpio = 50,
70 },
71 {
72 .name = "omap4:blue:user",
73 .gpio = 169,
74 },
75 {
76 .name = "omap4:red:user",
77 .gpio = 170,
78 },
79 {
80 .name = "omap4:green:user",
81 .gpio = 139,
82 },
83
84};
85
Shubhrajyoti Datta94ce7a62010-09-23 18:22:49 -070086static struct gpio_keys_button sdp4430_gpio_keys[] = {
87 {
88 .desc = "Proximity Sensor",
89 .type = EV_SW,
90 .code = SW_FRONT_PROXIMITY,
91 .gpio = OMAP4_SFH7741_SENSOR_OUTPUT_GPIO,
92 .active_low = 0,
93 }
94};
95
Hemanth V509b6d92010-08-02 13:18:04 +030096static struct gpio_led_platform_data sdp4430_led_data = {
97 .leds = sdp4430_gpio_leds,
98 .num_leds = ARRAY_SIZE(sdp4430_gpio_leds),
99};
100
Hemanth Vf389f4c2010-12-17 18:15:08 -0800101static struct led_pwm sdp4430_pwm_leds[] = {
102 {
103 .name = "omap4:green:chrg",
104 .pwm_id = 1,
105 .max_brightness = 255,
106 .pwm_period_ns = 7812500,
107 },
108};
109
110static struct led_pwm_platform_data sdp4430_pwm_data = {
111 .num_leds = ARRAY_SIZE(sdp4430_pwm_leds),
112 .leds = sdp4430_pwm_leds,
113};
114
115static struct platform_device sdp4430_leds_pwm = {
116 .name = "leds_pwm",
117 .id = -1,
118 .dev = {
119 .platform_data = &sdp4430_pwm_data,
120 },
121};
122
Shubhrajyoti Datta94ce7a62010-09-23 18:22:49 -0700123static int omap_prox_activate(struct device *dev)
124{
125 gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1);
126 return 0;
127}
128
129static void omap_prox_deactivate(struct device *dev)
130{
131 gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 0);
132}
133
134static struct gpio_keys_platform_data sdp4430_gpio_keys_data = {
135 .buttons = sdp4430_gpio_keys,
136 .nbuttons = ARRAY_SIZE(sdp4430_gpio_keys),
137 .enable = omap_prox_activate,
138 .disable = omap_prox_deactivate,
139};
140
141static struct platform_device sdp4430_gpio_keys_device = {
142 .name = "gpio-keys",
143 .id = -1,
144 .dev = {
145 .platform_data = &sdp4430_gpio_keys_data,
146 },
147};
148
Hemanth V509b6d92010-08-02 13:18:04 +0300149static struct platform_device sdp4430_leds_gpio = {
150 .name = "leds-gpio",
151 .id = -1,
152 .dev = {
153 .platform_data = &sdp4430_led_data,
154 },
155};
Abraham Arceb2aa5e52010-05-14 12:05:26 -0700156static struct spi_board_info sdp4430_spi_board_info[] __initdata = {
157 {
158 .modalias = "ks8851",
159 .bus_num = 1,
160 .chip_select = 0,
161 .max_speed_hz = 24000000,
162 .irq = ETH_KS8851_IRQ,
163 },
164};
165
166static int omap_ethernet_init(void)
167{
168 int status;
169
170 /* Request of GPIO lines */
171
172 status = gpio_request(ETH_KS8851_POWER_ON, "eth_power");
173 if (status) {
174 pr_err("Cannot request GPIO %d\n", ETH_KS8851_POWER_ON);
175 return status;
176 }
177
178 status = gpio_request(ETH_KS8851_QUART, "quart");
179 if (status) {
180 pr_err("Cannot request GPIO %d\n", ETH_KS8851_QUART);
181 goto error1;
182 }
183
184 status = gpio_request(ETH_KS8851_IRQ, "eth_irq");
185 if (status) {
186 pr_err("Cannot request GPIO %d\n", ETH_KS8851_IRQ);
187 goto error2;
188 }
189
190 /* Configuration of requested GPIO lines */
191
192 status = gpio_direction_output(ETH_KS8851_POWER_ON, 1);
193 if (status) {
194 pr_err("Cannot set output GPIO %d\n", ETH_KS8851_IRQ);
195 goto error3;
196 }
197
198 status = gpio_direction_output(ETH_KS8851_QUART, 1);
199 if (status) {
200 pr_err("Cannot set output GPIO %d\n", ETH_KS8851_QUART);
201 goto error3;
202 }
203
204 status = gpio_direction_input(ETH_KS8851_IRQ);
205 if (status) {
206 pr_err("Cannot set input GPIO %d\n", ETH_KS8851_IRQ);
207 goto error3;
208 }
209
210 return 0;
211
212error3:
213 gpio_free(ETH_KS8851_IRQ);
214error2:
215 gpio_free(ETH_KS8851_QUART);
216error1:
217 gpio_free(ETH_KS8851_POWER_ON);
218 return status;
219}
220
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700221static struct platform_device sdp4430_lcd_device = {
222 .name = "sdp4430_lcd",
223 .id = -1,
224};
225
226static struct platform_device *sdp4430_devices[] __initdata = {
227 &sdp4430_lcd_device,
Shubhrajyoti Datta94ce7a62010-09-23 18:22:49 -0700228 &sdp4430_gpio_keys_device,
Hemanth V509b6d92010-08-02 13:18:04 +0300229 &sdp4430_leds_gpio,
Hemanth Vf389f4c2010-12-17 18:15:08 -0800230 &sdp4430_leds_pwm,
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700231};
232
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700233static struct omap_lcd_config sdp4430_lcd_config __initdata = {
234 .ctrl_name = "internal",
235};
236
237static struct omap_board_config_kernel sdp4430_config[] __initdata = {
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700238 { OMAP_TAG_LCD, &sdp4430_lcd_config },
239};
240
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700241static void __init omap_4430sdp_init_irq(void)
242{
Santosh Shilimkar5b7815b2009-10-22 14:48:14 -0700243 omap_board_config = sdp4430_config;
244 omap_board_config_size = ARRAY_SIZE(sdp4430_config);
Jean Pihet58cda882009-07-24 19:43:25 -0600245 omap2_init_common_hw(NULL, NULL);
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700246#ifdef CONFIG_OMAP_32K_TIMER
247 omap2_gp_clockevent_set_gptimer(1);
248#endif
249 gic_init_irq();
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700250}
251
Maulik Mankadbce06682010-02-17 14:09:32 -0800252static struct omap_musb_board_data musb_board_data = {
253 .interface_type = MUSB_INTERFACE_UTMI,
254 .mode = MUSB_PERIPHERAL,
255 .power = 100,
256};
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000257
258static struct omap2_hsmmc_info mmc[] = {
259 {
260 .mmc = 1,
Sukumar Ghorai3a638332010-09-15 14:49:23 +0000261 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000262 .gpio_wp = -EINVAL,
263 },
264 {
265 .mmc = 2,
Sukumar Ghorai3a638332010-09-15 14:49:23 +0000266 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000267 .gpio_cd = -EINVAL,
268 .gpio_wp = -EINVAL,
269 .nonremovable = true,
kishore kadiyala64be9782010-10-01 16:35:28 -0700270 .ocr_mask = MMC_VDD_29_30,
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000271 },
272 {} /* Terminator */
273};
274
Santosh Shilimkar50263912010-08-02 13:18:03 +0300275static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
276 {
277 .supply = "vmmc",
278 .dev_name = "mmci-omap-hs.1",
279 },
280};
Balaji T K6e30a7d2010-05-12 08:27:30 +0000281static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
282 {
283 .supply = "vmmc",
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000284 .dev_name = "mmci-omap-hs.0",
Balaji T K6e30a7d2010-05-12 08:27:30 +0000285 },
Balaji T K6e30a7d2010-05-12 08:27:30 +0000286};
287
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000288static int omap4_twl6030_hsmmc_late_init(struct device *dev)
289{
290 int ret = 0;
291 struct platform_device *pdev = container_of(dev,
292 struct platform_device, dev);
293 struct omap_mmc_platform_data *pdata = dev->platform_data;
294
295 /* Setting MMC1 Card detect Irq */
kishore kadiyala72f2e2c2010-09-24 17:13:20 +0000296 if (pdev->id == 0) {
297 ret = twl6030_mmc_card_detect_config();
298 if (ret)
299 pr_err("Failed configuring MMC1 card detect\n");
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000300 pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
301 MMCDETECT_INTR_OFFSET;
kishore kadiyala72f2e2c2010-09-24 17:13:20 +0000302 pdata->slots[0].card_detect = twl6030_mmc_card_detect;
303 }
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000304 return ret;
305}
306
307static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
308{
Benoit Cousson531c21b2010-10-01 16:35:26 -0700309 struct omap_mmc_platform_data *pdata;
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000310
Benoit Cousson531c21b2010-10-01 16:35:26 -0700311 /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
312 if (!dev) {
313 pr_err("Failed %s\n", __func__);
314 return;
315 }
316 pdata = dev->platform_data;
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000317 pdata->init = omap4_twl6030_hsmmc_late_init;
318}
319
320static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
321{
322 struct omap2_hsmmc_info *c;
323
324 omap2_hsmmc_init(controllers);
325 for (c = controllers; c->mmc; c++)
326 omap4_twl6030_hsmmc_set_late_init(c->dev);
327
328 return 0;
329}
330
Balaji T K6e30a7d2010-05-12 08:27:30 +0000331static struct regulator_init_data sdp4430_vaux1 = {
332 .constraints = {
333 .min_uV = 1000000,
334 .max_uV = 3000000,
335 .apply_uV = true,
336 .valid_modes_mask = REGULATOR_MODE_NORMAL
337 | REGULATOR_MODE_STANDBY,
338 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
339 | REGULATOR_CHANGE_MODE
340 | REGULATOR_CHANGE_STATUS,
341 },
Santosh Shilimkar50263912010-08-02 13:18:03 +0300342 .num_consumer_supplies = 1,
343 .consumer_supplies = sdp4430_vaux_supply,
Balaji T K6e30a7d2010-05-12 08:27:30 +0000344};
345
346static struct regulator_init_data sdp4430_vaux2 = {
347 .constraints = {
348 .min_uV = 1200000,
349 .max_uV = 2800000,
350 .apply_uV = true,
351 .valid_modes_mask = REGULATOR_MODE_NORMAL
352 | REGULATOR_MODE_STANDBY,
353 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
354 | REGULATOR_CHANGE_MODE
355 | REGULATOR_CHANGE_STATUS,
356 },
357};
358
359static struct regulator_init_data sdp4430_vaux3 = {
360 .constraints = {
361 .min_uV = 1000000,
362 .max_uV = 3000000,
363 .apply_uV = true,
364 .valid_modes_mask = REGULATOR_MODE_NORMAL
365 | REGULATOR_MODE_STANDBY,
366 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
367 | REGULATOR_CHANGE_MODE
368 | REGULATOR_CHANGE_STATUS,
369 },
370};
371
372/* VMMC1 for MMC1 card */
373static struct regulator_init_data sdp4430_vmmc = {
374 .constraints = {
375 .min_uV = 1200000,
376 .max_uV = 3000000,
377 .apply_uV = true,
378 .valid_modes_mask = REGULATOR_MODE_NORMAL
379 | REGULATOR_MODE_STANDBY,
380 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
381 | REGULATOR_CHANGE_MODE
382 | REGULATOR_CHANGE_STATUS,
383 },
Santosh Shilimkar50263912010-08-02 13:18:03 +0300384 .num_consumer_supplies = 1,
Balaji T K6e30a7d2010-05-12 08:27:30 +0000385 .consumer_supplies = sdp4430_vmmc_supply,
386};
387
388static struct regulator_init_data sdp4430_vpp = {
389 .constraints = {
390 .min_uV = 1800000,
391 .max_uV = 2500000,
392 .apply_uV = true,
393 .valid_modes_mask = REGULATOR_MODE_NORMAL
394 | REGULATOR_MODE_STANDBY,
395 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
396 | REGULATOR_CHANGE_MODE
397 | REGULATOR_CHANGE_STATUS,
398 },
399};
400
401static struct regulator_init_data sdp4430_vusim = {
402 .constraints = {
403 .min_uV = 1200000,
404 .max_uV = 2900000,
405 .apply_uV = true,
406 .valid_modes_mask = REGULATOR_MODE_NORMAL
407 | REGULATOR_MODE_STANDBY,
408 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
409 | REGULATOR_CHANGE_MODE
410 | REGULATOR_CHANGE_STATUS,
411 },
412};
413
414static struct regulator_init_data sdp4430_vana = {
415 .constraints = {
416 .min_uV = 2100000,
417 .max_uV = 2100000,
418 .apply_uV = true,
419 .valid_modes_mask = REGULATOR_MODE_NORMAL
420 | REGULATOR_MODE_STANDBY,
421 .valid_ops_mask = REGULATOR_CHANGE_MODE
422 | REGULATOR_CHANGE_STATUS,
423 },
424};
425
426static struct regulator_init_data sdp4430_vcxio = {
427 .constraints = {
428 .min_uV = 1800000,
429 .max_uV = 1800000,
430 .apply_uV = true,
431 .valid_modes_mask = REGULATOR_MODE_NORMAL
432 | REGULATOR_MODE_STANDBY,
433 .valid_ops_mask = REGULATOR_CHANGE_MODE
434 | REGULATOR_CHANGE_STATUS,
435 },
436};
437
438static struct regulator_init_data sdp4430_vdac = {
439 .constraints = {
440 .min_uV = 1800000,
441 .max_uV = 1800000,
442 .apply_uV = true,
443 .valid_modes_mask = REGULATOR_MODE_NORMAL
444 | REGULATOR_MODE_STANDBY,
445 .valid_ops_mask = REGULATOR_CHANGE_MODE
446 | REGULATOR_CHANGE_STATUS,
447 },
448};
449
450static struct regulator_init_data sdp4430_vusb = {
451 .constraints = {
452 .min_uV = 3300000,
453 .max_uV = 3300000,
454 .apply_uV = true,
455 .valid_modes_mask = REGULATOR_MODE_NORMAL
456 | REGULATOR_MODE_STANDBY,
457 .valid_ops_mask = REGULATOR_CHANGE_MODE
458 | REGULATOR_CHANGE_STATUS,
459 },
460};
461
462static struct twl4030_platform_data sdp4430_twldata = {
463 .irq_base = TWL6030_IRQ_BASE,
464 .irq_end = TWL6030_IRQ_END,
465
466 /* Regulators */
467 .vmmc = &sdp4430_vmmc,
468 .vpp = &sdp4430_vpp,
469 .vusim = &sdp4430_vusim,
470 .vana = &sdp4430_vana,
471 .vcxio = &sdp4430_vcxio,
472 .vdac = &sdp4430_vdac,
473 .vusb = &sdp4430_vusb,
474 .vaux1 = &sdp4430_vaux1,
475 .vaux2 = &sdp4430_vaux2,
476 .vaux3 = &sdp4430_vaux3,
477};
478
479static struct i2c_board_info __initdata sdp4430_i2c_boardinfo[] = {
480 {
481 I2C_BOARD_INFO("twl6030", 0x48),
482 .flags = I2C_CLIENT_WAKE,
483 .irq = OMAP44XX_IRQ_SYS_1N,
484 .platform_data = &sdp4430_twldata,
485 },
486};
Shubhrajyoti Datta83078f92010-08-02 13:18:04 +0300487static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
488 {
489 I2C_BOARD_INFO("tmp105", 0x48),
490 },
Hemanth Vd048aca2010-12-17 18:15:08 -0800491 {
492 I2C_BOARD_INFO("bh1780", 0x29),
493 },
Shubhrajyoti Datta83078f92010-08-02 13:18:04 +0300494};
Shubhrajyoti Datta0df891b2010-09-23 18:22:47 -0700495static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
496 {
497 I2C_BOARD_INFO("hmc5843", 0x1e),
498 },
499};
Santosh Shilimkarbaeb73e2010-05-12 08:27:29 +0000500static int __init omap4_i2c_init(void)
501{
502 /*
503 * Phoenix Audio IC needs I2C1 to
504 * start with 400 KHz or less
505 */
Balaji T K6e30a7d2010-05-12 08:27:30 +0000506 omap_register_i2c_bus(1, 400, sdp4430_i2c_boardinfo,
507 ARRAY_SIZE(sdp4430_i2c_boardinfo));
Santosh Shilimkarbaeb73e2010-05-12 08:27:29 +0000508 omap_register_i2c_bus(2, 400, NULL, 0);
Shubhrajyoti Datta83078f92010-08-02 13:18:04 +0300509 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
510 ARRAY_SIZE(sdp4430_i2c_3_boardinfo));
Shubhrajyoti Datta0df891b2010-09-23 18:22:47 -0700511 omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo,
512 ARRAY_SIZE(sdp4430_i2c_4_boardinfo));
Santosh Shilimkarbaeb73e2010-05-12 08:27:29 +0000513 return 0;
514}
Shubhrajyoti Datta94ce7a62010-09-23 18:22:49 -0700515
516static void __init omap_sfh7741prox_init(void)
517{
518 int error;
519
520 error = gpio_request(OMAP4_SFH7741_ENABLE_GPIO, "sfh7741");
521 if (error < 0) {
522 pr_err("%s:failed to request GPIO %d, error %d\n",
523 __func__, OMAP4_SFH7741_ENABLE_GPIO, error);
524 return;
525 }
526
527 error = gpio_direction_output(OMAP4_SFH7741_ENABLE_GPIO , 0);
528 if (error < 0) {
529 pr_err("%s: GPIO configuration failed: GPIO %d,error %d\n",
530 __func__, OMAP4_SFH7741_ENABLE_GPIO, error);
531 gpio_free(OMAP4_SFH7741_ENABLE_GPIO);
532 }
533}
534
Benoit Coussonfb6bf632010-08-10 17:43:15 +0200535#ifdef CONFIG_OMAP_MUX
536static struct omap_board_mux board_mux[] __initdata = {
537 { .reg_offset = OMAP_MUX_TERMINATOR },
538};
539#else
540#define board_mux NULL
541#endif
542
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700543static void __init omap_4430sdp_init(void)
544{
Abraham Arceb2aa5e52010-05-14 12:05:26 -0700545 int status;
Benoit Cousson6fea7b02010-09-27 10:50:33 +0200546 int package = OMAP_PACKAGE_CBS;
Abraham Arceb2aa5e52010-05-14 12:05:26 -0700547
Benoit Cousson6fea7b02010-09-27 10:50:33 +0200548 if (omap_rev() == OMAP4430_REV_ES1_0)
549 package = OMAP_PACKAGE_CBL;
550 omap4_mux_init(board_mux, package);
551
Santosh Shilimkarbaeb73e2010-05-12 08:27:29 +0000552 omap4_i2c_init();
Shubhrajyoti Datta94ce7a62010-09-23 18:22:49 -0700553 omap_sfh7741prox_init();
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700554 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700555 omap_serial_init();
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000556 omap4_twl6030_hsmmc_init(mmc);
Maulik Mankadbce06682010-02-17 14:09:32 -0800557 /* OMAP4 SDP uses internal transceiver so register nop transceiver */
558 usb_nop_xceiv_register();
Santosh Shilimkarae46ec772010-02-16 19:29:20 +0530559 /* FIXME: allow multi-omap to boot until musb is updated for omap4 */
560 if (!cpu_is_omap44xx())
561 usb_musb_init(&musb_board_data);
Abraham Arceb2aa5e52010-05-14 12:05:26 -0700562
563 status = omap_ethernet_init();
564 if (status) {
565 pr_err("Ethernet initialization failed: %d\n", status);
566 } else {
567 sdp4430_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ);
568 spi_register_board_info(sdp4430_spi_board_info,
569 ARRAY_SIZE(sdp4430_spi_board_info));
570 }
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700571}
572
573static void __init omap_4430sdp_map_io(void)
574{
575 omap2_set_globals_443x();
Tony Lindgren6fbd55d2010-02-12 12:26:47 -0800576 omap44xx_map_common_io();
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700577}
578
579MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
580 /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700581 .boot_params = 0x80000100,
582 .map_io = omap_4430sdp_map_io,
Russell King71ee7da2010-05-23 10:18:16 +0100583 .reserve = omap_reserve,
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700584 .init_irq = omap_4430sdp_init_irq,
585 .init_machine = omap_4430sdp_init,
586 .timer = &omap_timer,
587MACHINE_END