blob: 1cb208b6e62623168da8a181c45516e374f4a34c [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);
Paul Walmsley48057342010-12-21 15:25:10 -0700245 omap2_init_common_infrastructure();
246 omap2_init_common_devices(NULL, NULL);
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700247#ifdef CONFIG_OMAP_32K_TIMER
248 omap2_gp_clockevent_set_gptimer(1);
249#endif
250 gic_init_irq();
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700251}
252
Maulik Mankadbce06682010-02-17 14:09:32 -0800253static struct omap_musb_board_data musb_board_data = {
254 .interface_type = MUSB_INTERFACE_UTMI,
255 .mode = MUSB_PERIPHERAL,
256 .power = 100,
257};
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000258
259static struct omap2_hsmmc_info mmc[] = {
260 {
261 .mmc = 1,
Sukumar Ghorai3a638332010-09-15 14:49:23 +0000262 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000263 .gpio_wp = -EINVAL,
264 },
265 {
266 .mmc = 2,
Sukumar Ghorai3a638332010-09-15 14:49:23 +0000267 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000268 .gpio_cd = -EINVAL,
269 .gpio_wp = -EINVAL,
270 .nonremovable = true,
kishore kadiyala64be9782010-10-01 16:35:28 -0700271 .ocr_mask = MMC_VDD_29_30,
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000272 },
273 {} /* Terminator */
274};
275
Santosh Shilimkar50263912010-08-02 13:18:03 +0300276static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
277 {
278 .supply = "vmmc",
279 .dev_name = "mmci-omap-hs.1",
280 },
281};
Balaji T K6e30a7d2010-05-12 08:27:30 +0000282static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
283 {
284 .supply = "vmmc",
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000285 .dev_name = "mmci-omap-hs.0",
Balaji T K6e30a7d2010-05-12 08:27:30 +0000286 },
Balaji T K6e30a7d2010-05-12 08:27:30 +0000287};
288
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000289static int omap4_twl6030_hsmmc_late_init(struct device *dev)
290{
291 int ret = 0;
292 struct platform_device *pdev = container_of(dev,
293 struct platform_device, dev);
294 struct omap_mmc_platform_data *pdata = dev->platform_data;
295
296 /* Setting MMC1 Card detect Irq */
kishore kadiyala72f2e2c2010-09-24 17:13:20 +0000297 if (pdev->id == 0) {
298 ret = twl6030_mmc_card_detect_config();
299 if (ret)
300 pr_err("Failed configuring MMC1 card detect\n");
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000301 pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
302 MMCDETECT_INTR_OFFSET;
kishore kadiyala72f2e2c2010-09-24 17:13:20 +0000303 pdata->slots[0].card_detect = twl6030_mmc_card_detect;
304 }
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000305 return ret;
306}
307
308static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
309{
Benoit Cousson531c21b2010-10-01 16:35:26 -0700310 struct omap_mmc_platform_data *pdata;
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000311
Benoit Cousson531c21b2010-10-01 16:35:26 -0700312 /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
313 if (!dev) {
314 pr_err("Failed %s\n", __func__);
315 return;
316 }
317 pdata = dev->platform_data;
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000318 pdata->init = omap4_twl6030_hsmmc_late_init;
319}
320
321static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
322{
323 struct omap2_hsmmc_info *c;
324
325 omap2_hsmmc_init(controllers);
326 for (c = controllers; c->mmc; c++)
327 omap4_twl6030_hsmmc_set_late_init(c->dev);
328
329 return 0;
330}
331
Balaji T K6e30a7d2010-05-12 08:27:30 +0000332static struct regulator_init_data sdp4430_vaux1 = {
333 .constraints = {
334 .min_uV = 1000000,
335 .max_uV = 3000000,
336 .apply_uV = true,
337 .valid_modes_mask = REGULATOR_MODE_NORMAL
338 | REGULATOR_MODE_STANDBY,
339 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
340 | REGULATOR_CHANGE_MODE
341 | REGULATOR_CHANGE_STATUS,
342 },
Santosh Shilimkar50263912010-08-02 13:18:03 +0300343 .num_consumer_supplies = 1,
344 .consumer_supplies = sdp4430_vaux_supply,
Balaji T K6e30a7d2010-05-12 08:27:30 +0000345};
346
347static struct regulator_init_data sdp4430_vaux2 = {
348 .constraints = {
349 .min_uV = 1200000,
350 .max_uV = 2800000,
351 .apply_uV = true,
352 .valid_modes_mask = REGULATOR_MODE_NORMAL
353 | REGULATOR_MODE_STANDBY,
354 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
355 | REGULATOR_CHANGE_MODE
356 | REGULATOR_CHANGE_STATUS,
357 },
358};
359
360static struct regulator_init_data sdp4430_vaux3 = {
361 .constraints = {
362 .min_uV = 1000000,
363 .max_uV = 3000000,
364 .apply_uV = true,
365 .valid_modes_mask = REGULATOR_MODE_NORMAL
366 | REGULATOR_MODE_STANDBY,
367 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
368 | REGULATOR_CHANGE_MODE
369 | REGULATOR_CHANGE_STATUS,
370 },
371};
372
373/* VMMC1 for MMC1 card */
374static struct regulator_init_data sdp4430_vmmc = {
375 .constraints = {
376 .min_uV = 1200000,
377 .max_uV = 3000000,
378 .apply_uV = true,
379 .valid_modes_mask = REGULATOR_MODE_NORMAL
380 | REGULATOR_MODE_STANDBY,
381 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
382 | REGULATOR_CHANGE_MODE
383 | REGULATOR_CHANGE_STATUS,
384 },
Santosh Shilimkar50263912010-08-02 13:18:03 +0300385 .num_consumer_supplies = 1,
Balaji T K6e30a7d2010-05-12 08:27:30 +0000386 .consumer_supplies = sdp4430_vmmc_supply,
387};
388
389static struct regulator_init_data sdp4430_vpp = {
390 .constraints = {
391 .min_uV = 1800000,
392 .max_uV = 2500000,
393 .apply_uV = true,
394 .valid_modes_mask = REGULATOR_MODE_NORMAL
395 | REGULATOR_MODE_STANDBY,
396 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
397 | REGULATOR_CHANGE_MODE
398 | REGULATOR_CHANGE_STATUS,
399 },
400};
401
402static struct regulator_init_data sdp4430_vusim = {
403 .constraints = {
404 .min_uV = 1200000,
405 .max_uV = 2900000,
406 .apply_uV = true,
407 .valid_modes_mask = REGULATOR_MODE_NORMAL
408 | REGULATOR_MODE_STANDBY,
409 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
410 | REGULATOR_CHANGE_MODE
411 | REGULATOR_CHANGE_STATUS,
412 },
413};
414
415static struct regulator_init_data sdp4430_vana = {
416 .constraints = {
417 .min_uV = 2100000,
418 .max_uV = 2100000,
419 .apply_uV = true,
420 .valid_modes_mask = REGULATOR_MODE_NORMAL
421 | REGULATOR_MODE_STANDBY,
422 .valid_ops_mask = REGULATOR_CHANGE_MODE
423 | REGULATOR_CHANGE_STATUS,
424 },
425};
426
427static struct regulator_init_data sdp4430_vcxio = {
428 .constraints = {
429 .min_uV = 1800000,
430 .max_uV = 1800000,
431 .apply_uV = true,
432 .valid_modes_mask = REGULATOR_MODE_NORMAL
433 | REGULATOR_MODE_STANDBY,
434 .valid_ops_mask = REGULATOR_CHANGE_MODE
435 | REGULATOR_CHANGE_STATUS,
436 },
437};
438
439static struct regulator_init_data sdp4430_vdac = {
440 .constraints = {
441 .min_uV = 1800000,
442 .max_uV = 1800000,
443 .apply_uV = true,
444 .valid_modes_mask = REGULATOR_MODE_NORMAL
445 | REGULATOR_MODE_STANDBY,
446 .valid_ops_mask = REGULATOR_CHANGE_MODE
447 | REGULATOR_CHANGE_STATUS,
448 },
449};
450
451static struct regulator_init_data sdp4430_vusb = {
452 .constraints = {
453 .min_uV = 3300000,
454 .max_uV = 3300000,
455 .apply_uV = true,
456 .valid_modes_mask = REGULATOR_MODE_NORMAL
457 | REGULATOR_MODE_STANDBY,
458 .valid_ops_mask = REGULATOR_CHANGE_MODE
459 | REGULATOR_CHANGE_STATUS,
460 },
461};
462
463static struct twl4030_platform_data sdp4430_twldata = {
464 .irq_base = TWL6030_IRQ_BASE,
465 .irq_end = TWL6030_IRQ_END,
466
467 /* Regulators */
468 .vmmc = &sdp4430_vmmc,
469 .vpp = &sdp4430_vpp,
470 .vusim = &sdp4430_vusim,
471 .vana = &sdp4430_vana,
472 .vcxio = &sdp4430_vcxio,
473 .vdac = &sdp4430_vdac,
474 .vusb = &sdp4430_vusb,
475 .vaux1 = &sdp4430_vaux1,
476 .vaux2 = &sdp4430_vaux2,
477 .vaux3 = &sdp4430_vaux3,
478};
479
480static struct i2c_board_info __initdata sdp4430_i2c_boardinfo[] = {
481 {
482 I2C_BOARD_INFO("twl6030", 0x48),
483 .flags = I2C_CLIENT_WAKE,
484 .irq = OMAP44XX_IRQ_SYS_1N,
485 .platform_data = &sdp4430_twldata,
486 },
487};
Shubhrajyoti Datta83078f92010-08-02 13:18:04 +0300488static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
489 {
490 I2C_BOARD_INFO("tmp105", 0x48),
491 },
Hemanth Vd048aca2010-12-17 18:15:08 -0800492 {
493 I2C_BOARD_INFO("bh1780", 0x29),
494 },
Shubhrajyoti Datta83078f92010-08-02 13:18:04 +0300495};
Shubhrajyoti Datta0df891b2010-09-23 18:22:47 -0700496static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
497 {
498 I2C_BOARD_INFO("hmc5843", 0x1e),
499 },
500};
Santosh Shilimkarbaeb73e2010-05-12 08:27:29 +0000501static int __init omap4_i2c_init(void)
502{
503 /*
504 * Phoenix Audio IC needs I2C1 to
505 * start with 400 KHz or less
506 */
Balaji T K6e30a7d2010-05-12 08:27:30 +0000507 omap_register_i2c_bus(1, 400, sdp4430_i2c_boardinfo,
508 ARRAY_SIZE(sdp4430_i2c_boardinfo));
Santosh Shilimkarbaeb73e2010-05-12 08:27:29 +0000509 omap_register_i2c_bus(2, 400, NULL, 0);
Shubhrajyoti Datta83078f92010-08-02 13:18:04 +0300510 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
511 ARRAY_SIZE(sdp4430_i2c_3_boardinfo));
Shubhrajyoti Datta0df891b2010-09-23 18:22:47 -0700512 omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo,
513 ARRAY_SIZE(sdp4430_i2c_4_boardinfo));
Santosh Shilimkarbaeb73e2010-05-12 08:27:29 +0000514 return 0;
515}
Shubhrajyoti Datta94ce7a62010-09-23 18:22:49 -0700516
517static void __init omap_sfh7741prox_init(void)
518{
519 int error;
520
521 error = gpio_request(OMAP4_SFH7741_ENABLE_GPIO, "sfh7741");
522 if (error < 0) {
523 pr_err("%s:failed to request GPIO %d, error %d\n",
524 __func__, OMAP4_SFH7741_ENABLE_GPIO, error);
525 return;
526 }
527
528 error = gpio_direction_output(OMAP4_SFH7741_ENABLE_GPIO , 0);
529 if (error < 0) {
530 pr_err("%s: GPIO configuration failed: GPIO %d,error %d\n",
531 __func__, OMAP4_SFH7741_ENABLE_GPIO, error);
532 gpio_free(OMAP4_SFH7741_ENABLE_GPIO);
533 }
534}
535
Benoit Coussonfb6bf632010-08-10 17:43:15 +0200536#ifdef CONFIG_OMAP_MUX
537static struct omap_board_mux board_mux[] __initdata = {
538 { .reg_offset = OMAP_MUX_TERMINATOR },
539};
540#else
541#define board_mux NULL
542#endif
543
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700544static void __init omap_4430sdp_init(void)
545{
Abraham Arceb2aa5e52010-05-14 12:05:26 -0700546 int status;
Benoit Cousson6fea7b02010-09-27 10:50:33 +0200547 int package = OMAP_PACKAGE_CBS;
Abraham Arceb2aa5e52010-05-14 12:05:26 -0700548
Benoit Cousson6fea7b02010-09-27 10:50:33 +0200549 if (omap_rev() == OMAP4430_REV_ES1_0)
550 package = OMAP_PACKAGE_CBL;
551 omap4_mux_init(board_mux, package);
552
Santosh Shilimkarbaeb73e2010-05-12 08:27:29 +0000553 omap4_i2c_init();
Shubhrajyoti Datta94ce7a62010-09-23 18:22:49 -0700554 omap_sfh7741prox_init();
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700555 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700556 omap_serial_init();
kishore kadiyala717c1fb2010-05-15 18:21:06 +0000557 omap4_twl6030_hsmmc_init(mmc);
Maulik Mankadbce06682010-02-17 14:09:32 -0800558 /* OMAP4 SDP uses internal transceiver so register nop transceiver */
559 usb_nop_xceiv_register();
Santosh Shilimkarae46ec772010-02-16 19:29:20 +0530560 /* FIXME: allow multi-omap to boot until musb is updated for omap4 */
561 if (!cpu_is_omap44xx())
562 usb_musb_init(&musb_board_data);
Abraham Arceb2aa5e52010-05-14 12:05:26 -0700563
564 status = omap_ethernet_init();
565 if (status) {
566 pr_err("Ethernet initialization failed: %d\n", status);
567 } else {
568 sdp4430_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ);
569 spi_register_board_info(sdp4430_spi_board_info,
570 ARRAY_SIZE(sdp4430_spi_board_info));
571 }
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700572}
573
574static void __init omap_4430sdp_map_io(void)
575{
576 omap2_set_globals_443x();
Tony Lindgren6fbd55d2010-02-12 12:26:47 -0800577 omap44xx_map_common_io();
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700578}
579
580MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
581 /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700582 .boot_params = 0x80000100,
583 .map_io = omap_4430sdp_map_io,
Russell King71ee7da2010-05-23 10:18:16 +0100584 .reserve = omap_reserve,
Santosh Shilimkar46ba0ab2009-05-28 14:16:05 -0700585 .init_irq = omap_4430sdp_init_irq,
586 .init_machine = omap_4430sdp_init,
587 .timer = &omap_timer,
588MACHINE_END