diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 70 |
1 files changed, 65 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 4bb2c5d151ec..9447644774c2 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/spi/spi.h> | 21 | #include <linux/spi/spi.h> |
22 | #include <linux/i2c/twl.h> | 22 | #include <linux/i2c/twl.h> |
23 | #include <linux/regulator/machine.h> | 23 | #include <linux/regulator/machine.h> |
24 | #include <linux/leds.h> | ||
24 | 25 | ||
25 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
26 | #include <mach/omap4-common.h> | 27 | #include <mach/omap4-common.h> |
@@ -40,6 +41,54 @@ | |||
40 | #define ETH_KS8851_POWER_ON 48 | 41 | #define ETH_KS8851_POWER_ON 48 |
41 | #define ETH_KS8851_QUART 138 | 42 | #define ETH_KS8851_QUART 138 |
42 | 43 | ||
44 | static struct gpio_led sdp4430_gpio_leds[] = { | ||
45 | { | ||
46 | .name = "omap4:green:debug0", | ||
47 | .gpio = 61, | ||
48 | }, | ||
49 | { | ||
50 | .name = "omap4:green:debug1", | ||
51 | .gpio = 30, | ||
52 | }, | ||
53 | { | ||
54 | .name = "omap4:green:debug2", | ||
55 | .gpio = 7, | ||
56 | }, | ||
57 | { | ||
58 | .name = "omap4:green:debug3", | ||
59 | .gpio = 8, | ||
60 | }, | ||
61 | { | ||
62 | .name = "omap4:green:debug4", | ||
63 | .gpio = 50, | ||
64 | }, | ||
65 | { | ||
66 | .name = "omap4:blue:user", | ||
67 | .gpio = 169, | ||
68 | }, | ||
69 | { | ||
70 | .name = "omap4:red:user", | ||
71 | .gpio = 170, | ||
72 | }, | ||
73 | { | ||
74 | .name = "omap4:green:user", | ||
75 | .gpio = 139, | ||
76 | }, | ||
77 | |||
78 | }; | ||
79 | |||
80 | static struct gpio_led_platform_data sdp4430_led_data = { | ||
81 | .leds = sdp4430_gpio_leds, | ||
82 | .num_leds = ARRAY_SIZE(sdp4430_gpio_leds), | ||
83 | }; | ||
84 | |||
85 | static struct platform_device sdp4430_leds_gpio = { | ||
86 | .name = "leds-gpio", | ||
87 | .id = -1, | ||
88 | .dev = { | ||
89 | .platform_data = &sdp4430_led_data, | ||
90 | }, | ||
91 | }; | ||
43 | static struct spi_board_info sdp4430_spi_board_info[] __initdata = { | 92 | static struct spi_board_info sdp4430_spi_board_info[] __initdata = { |
44 | { | 93 | { |
45 | .modalias = "ks8851", | 94 | .modalias = "ks8851", |
@@ -112,6 +161,7 @@ static struct platform_device sdp4430_lcd_device = { | |||
112 | 161 | ||
113 | static struct platform_device *sdp4430_devices[] __initdata = { | 162 | static struct platform_device *sdp4430_devices[] __initdata = { |
114 | &sdp4430_lcd_device, | 163 | &sdp4430_lcd_device, |
164 | &sdp4430_leds_gpio, | ||
115 | }; | 165 | }; |
116 | 166 | ||
117 | static struct omap_lcd_config sdp4430_lcd_config __initdata = { | 167 | static struct omap_lcd_config sdp4430_lcd_config __initdata = { |
@@ -156,14 +206,16 @@ static struct omap2_hsmmc_info mmc[] = { | |||
156 | {} /* Terminator */ | 206 | {} /* Terminator */ |
157 | }; | 207 | }; |
158 | 208 | ||
159 | static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { | 209 | static struct regulator_consumer_supply sdp4430_vaux_supply[] = { |
160 | { | 210 | { |
161 | .supply = "vmmc", | 211 | .supply = "vmmc", |
162 | .dev_name = "mmci-omap-hs.0", | 212 | .dev_name = "mmci-omap-hs.1", |
163 | }, | 213 | }, |
214 | }; | ||
215 | static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { | ||
164 | { | 216 | { |
165 | .supply = "vmmc", | 217 | .supply = "vmmc", |
166 | .dev_name = "mmci-omap-hs.1", | 218 | .dev_name = "mmci-omap-hs.0", |
167 | }, | 219 | }, |
168 | }; | 220 | }; |
169 | 221 | ||
@@ -210,6 +262,8 @@ static struct regulator_init_data sdp4430_vaux1 = { | |||
210 | | REGULATOR_CHANGE_MODE | 262 | | REGULATOR_CHANGE_MODE |
211 | | REGULATOR_CHANGE_STATUS, | 263 | | REGULATOR_CHANGE_STATUS, |
212 | }, | 264 | }, |
265 | .num_consumer_supplies = 1, | ||
266 | .consumer_supplies = sdp4430_vaux_supply, | ||
213 | }; | 267 | }; |
214 | 268 | ||
215 | static struct regulator_init_data sdp4430_vaux2 = { | 269 | static struct regulator_init_data sdp4430_vaux2 = { |
@@ -250,7 +304,7 @@ static struct regulator_init_data sdp4430_vmmc = { | |||
250 | | REGULATOR_CHANGE_MODE | 304 | | REGULATOR_CHANGE_MODE |
251 | | REGULATOR_CHANGE_STATUS, | 305 | | REGULATOR_CHANGE_STATUS, |
252 | }, | 306 | }, |
253 | .num_consumer_supplies = 2, | 307 | .num_consumer_supplies = 1, |
254 | .consumer_supplies = sdp4430_vmmc_supply, | 308 | .consumer_supplies = sdp4430_vmmc_supply, |
255 | }; | 309 | }; |
256 | 310 | ||
@@ -353,6 +407,11 @@ static struct i2c_board_info __initdata sdp4430_i2c_boardinfo[] = { | |||
353 | .platform_data = &sdp4430_twldata, | 407 | .platform_data = &sdp4430_twldata, |
354 | }, | 408 | }, |
355 | }; | 409 | }; |
410 | static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { | ||
411 | { | ||
412 | I2C_BOARD_INFO("tmp105", 0x48), | ||
413 | }, | ||
414 | }; | ||
356 | static int __init omap4_i2c_init(void) | 415 | static int __init omap4_i2c_init(void) |
357 | { | 416 | { |
358 | /* | 417 | /* |
@@ -362,7 +421,8 @@ static int __init omap4_i2c_init(void) | |||
362 | omap_register_i2c_bus(1, 400, sdp4430_i2c_boardinfo, | 421 | omap_register_i2c_bus(1, 400, sdp4430_i2c_boardinfo, |
363 | ARRAY_SIZE(sdp4430_i2c_boardinfo)); | 422 | ARRAY_SIZE(sdp4430_i2c_boardinfo)); |
364 | omap_register_i2c_bus(2, 400, NULL, 0); | 423 | omap_register_i2c_bus(2, 400, NULL, 0); |
365 | omap_register_i2c_bus(3, 400, NULL, 0); | 424 | omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, |
425 | ARRAY_SIZE(sdp4430_i2c_3_boardinfo)); | ||
366 | omap_register_i2c_bus(4, 400, NULL, 0); | 426 | omap_register_i2c_bus(4, 400, NULL, 0); |
367 | return 0; | 427 | return 0; |
368 | } | 428 | } |