David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 1 | /* |
| 2 | * Board support file for OMAP4430 based PandaBoard. |
| 3 | * |
| 4 | * Copyright (C) 2010 Texas Instruments |
| 5 | * |
| 6 | * Author: David Anders <x0132446@ti.com> |
| 7 | * |
| 8 | * Based on mach-omap2/board-4430sdp.c |
| 9 | * |
| 10 | * Author: Santosh Shilimkar <santosh.shilimkar@ti.com> |
| 11 | * |
| 12 | * Based on mach-omap2/board-3430sdp.c |
| 13 | * |
| 14 | * This program is free software; you can redistribute it and/or modify |
| 15 | * it under the terms of the GNU General Public License version 2 as |
| 16 | * published by the Free Software Foundation. |
| 17 | */ |
| 18 | |
| 19 | #include <linux/kernel.h> |
| 20 | #include <linux/init.h> |
| 21 | #include <linux/platform_device.h> |
Anand Gadiyar | 1740d48 | 2011-01-10 14:42:15 +0000 | [diff] [blame] | 22 | #include <linux/clk.h> |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 23 | #include <linux/io.h> |
Ricardo Salveti de Araujo | 3da434a | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 24 | #include <linux/leds.h> |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 25 | #include <linux/gpio.h> |
| 26 | #include <linux/usb/otg.h> |
| 27 | #include <linux/i2c/twl.h> |
| 28 | #include <linux/regulator/machine.h> |
Panduranga Mallireddy | edc8406 | 2011-02-15 03:40:34 -0500 | [diff] [blame] | 29 | #include <linux/regulator/fixed.h> |
Panduranga Mallireddy | b17e0979 | 2011-02-15 03:40:35 -0500 | [diff] [blame] | 30 | #include <linux/wl12xx.h> |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 31 | |
| 32 | #include <mach/hardware.h> |
| 33 | #include <mach/omap4-common.h> |
| 34 | #include <asm/mach-types.h> |
| 35 | #include <asm/mach/arch.h> |
| 36 | #include <asm/mach/map.h> |
Tomi Valkeinen | a0b38cc | 2011-05-11 14:05:07 +0300 | [diff] [blame] | 37 | #include <video/omapdss.h> |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 38 | |
| 39 | #include <plat/board.h> |
| 40 | #include <plat/common.h> |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 41 | #include <plat/usb.h> |
| 42 | #include <plat/mmc.h> |
Tomi Valkeinen | f8ae2f0 | 2011-05-10 19:48:10 +0300 | [diff] [blame] | 43 | #include <video/omap-panel-generic-dpi.h> |
Manjunath Kondaiah G | 04aeae7 | 2010-10-08 09:58:35 -0700 | [diff] [blame] | 44 | #include "timer-gp.h" |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 45 | |
Paul Walmsley | 4814ced | 2010-10-08 11:40:20 -0600 | [diff] [blame] | 46 | #include "hsmmc.h" |
| 47 | #include "control.h" |
sricharan | fc63de82 | 2010-11-08 19:26:11 +0530 | [diff] [blame] | 48 | #include "mux.h" |
Mike Rapoport | fbd8071 | 2011-04-25 01:09:06 +0300 | [diff] [blame] | 49 | #include "common-board-devices.h" |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 50 | |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 51 | #define GPIO_HUB_POWER 1 |
| 52 | #define GPIO_HUB_NRESET 62 |
Panduranga Mallireddy | edc8406 | 2011-02-15 03:40:34 -0500 | [diff] [blame] | 53 | #define GPIO_WIFI_PMENA 43 |
Panduranga Mallireddy | b17e0979 | 2011-02-15 03:40:35 -0500 | [diff] [blame] | 54 | #define GPIO_WIFI_IRQ 53 |
K, Mythri P | 17c84ef | 2011-03-14 23:57:42 -0500 | [diff] [blame] | 55 | #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ |
| 56 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 57 | |
Guy Eilam | ec179ea5 | 2011-02-25 06:52:35 +0000 | [diff] [blame] | 58 | /* wl127x BT, FM, GPS connectivity chip */ |
| 59 | static int wl1271_gpios[] = {46, -1, -1}; |
| 60 | static struct platform_device wl1271_device = { |
| 61 | .name = "kim", |
| 62 | .id = -1, |
| 63 | .dev = { |
| 64 | .platform_data = &wl1271_gpios, |
| 65 | }, |
| 66 | }; |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 67 | |
Ricardo Salveti de Araujo | 3da434a | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 68 | static struct gpio_led gpio_leds[] = { |
| 69 | { |
| 70 | .name = "pandaboard::status1", |
| 71 | .default_trigger = "heartbeat", |
| 72 | .gpio = 7, |
| 73 | }, |
| 74 | { |
| 75 | .name = "pandaboard::status2", |
| 76 | .default_trigger = "mmc0", |
| 77 | .gpio = 8, |
| 78 | }, |
| 79 | }; |
| 80 | |
| 81 | static struct gpio_led_platform_data gpio_led_info = { |
| 82 | .leds = gpio_leds, |
| 83 | .num_leds = ARRAY_SIZE(gpio_leds), |
| 84 | }; |
| 85 | |
| 86 | static struct platform_device leds_gpio = { |
| 87 | .name = "leds-gpio", |
| 88 | .id = -1, |
| 89 | .dev = { |
| 90 | .platform_data = &gpio_led_info, |
| 91 | }, |
| 92 | }; |
| 93 | |
| 94 | static struct platform_device *panda_devices[] __initdata = { |
| 95 | &leds_gpio, |
Guy Eilam | ec179ea5 | 2011-02-25 06:52:35 +0000 | [diff] [blame] | 96 | &wl1271_device, |
Ricardo Salveti de Araujo | 3da434a | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 97 | }; |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 98 | |
Russell King - ARM Linux | 3dc3bad | 2011-02-14 15:40:20 -0800 | [diff] [blame] | 99 | static void __init omap4_panda_init_early(void) |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 100 | { |
Paul Walmsley | 4805734 | 2010-12-21 15:25:10 -0700 | [diff] [blame] | 101 | omap2_init_common_infrastructure(); |
| 102 | omap2_init_common_devices(NULL, NULL); |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 103 | } |
| 104 | |
Keshava Munegowda | 181b250 | 2011-03-01 20:08:16 +0530 | [diff] [blame] | 105 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { |
| 106 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
| 107 | .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 108 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 109 | .phy_reset = false, |
| 110 | .reset_gpio_port[0] = -EINVAL, |
| 111 | .reset_gpio_port[1] = -EINVAL, |
| 112 | .reset_gpio_port[2] = -EINVAL |
| 113 | }; |
| 114 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 115 | static struct gpio panda_ehci_gpios[] __initdata = { |
| 116 | { GPIO_HUB_POWER, GPIOF_OUT_INIT_LOW, "hub_power" }, |
| 117 | { GPIO_HUB_NRESET, GPIOF_OUT_INIT_LOW, "hub_nreset" }, |
| 118 | }; |
| 119 | |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 120 | static void __init omap4_ehci_init(void) |
| 121 | { |
| 122 | int ret; |
Anand Gadiyar | 1740d48 | 2011-01-10 14:42:15 +0000 | [diff] [blame] | 123 | struct clk *phy_ref_clk; |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 124 | |
Anand Gadiyar | 1740d48 | 2011-01-10 14:42:15 +0000 | [diff] [blame] | 125 | /* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */ |
| 126 | phy_ref_clk = clk_get(NULL, "auxclk3_ck"); |
| 127 | if (IS_ERR(phy_ref_clk)) { |
| 128 | pr_err("Cannot request auxclk3\n"); |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 129 | return; |
Anand Gadiyar | 1740d48 | 2011-01-10 14:42:15 +0000 | [diff] [blame] | 130 | } |
| 131 | clk_set_rate(phy_ref_clk, 19200000); |
| 132 | clk_enable(phy_ref_clk); |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 133 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 134 | /* disable the power to the usb hub prior to init and reset phy+hub */ |
| 135 | ret = gpio_request_array(panda_ehci_gpios, |
| 136 | ARRAY_SIZE(panda_ehci_gpios)); |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 137 | if (ret) { |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 138 | pr_err("Unable to initialize EHCI power/reset\n"); |
| 139 | return; |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 140 | } |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 141 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 142 | gpio_export(GPIO_HUB_POWER, 0); |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 143 | gpio_export(GPIO_HUB_NRESET, 0); |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 144 | gpio_set_value(GPIO_HUB_NRESET, 1); |
| 145 | |
Keshava Munegowda | 9e64bb1 | 2011-03-01 20:08:19 +0530 | [diff] [blame] | 146 | usbhs_init(&usbhs_bdata); |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 147 | |
| 148 | /* enable power to hub */ |
| 149 | gpio_set_value(GPIO_HUB_POWER, 1); |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 150 | } |
| 151 | |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 152 | static struct omap_musb_board_data musb_board_data = { |
| 153 | .interface_type = MUSB_INTERFACE_UTMI, |
Hema HK | 09e7200 | 2010-12-10 18:11:42 +0530 | [diff] [blame] | 154 | .mode = MUSB_OTG, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 155 | .power = 100, |
| 156 | }; |
| 157 | |
Hema HK | e70357e3 | 2010-12-10 18:09:52 +0530 | [diff] [blame] | 158 | static struct twl4030_usb_data omap4_usbphy_data = { |
| 159 | .phy_init = omap4430_phy_init, |
| 160 | .phy_exit = omap4430_phy_exit, |
| 161 | .phy_power = omap4430_phy_power, |
| 162 | .phy_set_clock = omap4430_phy_set_clk, |
Hema HK | ee896e3 | 2011-02-17 12:06:07 +0530 | [diff] [blame] | 163 | .phy_suspend = omap4430_phy_suspend, |
Hema HK | e70357e3 | 2010-12-10 18:09:52 +0530 | [diff] [blame] | 164 | }; |
| 165 | |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 166 | static struct omap2_hsmmc_info mmc[] = { |
| 167 | { |
| 168 | .mmc = 1, |
Sukumar Ghorai | 3a63833 | 2010-09-15 14:49:23 +0000 | [diff] [blame] | 169 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 170 | .gpio_wp = -EINVAL, |
Raghuveer Murthy | 5b59cc2 | 2010-12-21 14:14:34 +0000 | [diff] [blame] | 171 | .gpio_cd = -EINVAL, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 172 | }, |
Panduranga Mallireddy | b17e0979 | 2011-02-15 03:40:35 -0500 | [diff] [blame] | 173 | { |
| 174 | .name = "wl1271", |
| 175 | .mmc = 5, |
| 176 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, |
| 177 | .gpio_wp = -EINVAL, |
| 178 | .gpio_cd = -EINVAL, |
| 179 | .ocr_mask = MMC_VDD_165_195, |
| 180 | .nonremovable = true, |
| 181 | }, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 182 | {} /* Terminator */ |
| 183 | }; |
| 184 | |
| 185 | static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { |
| 186 | { |
| 187 | .supply = "vmmc", |
Kishore Kadiyala | 0005ae7 | 2011-02-28 20:48:05 +0530 | [diff] [blame] | 188 | .dev_name = "omap_hsmmc.0", |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 189 | }, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 190 | }; |
| 191 | |
Panduranga Mallireddy | edc8406 | 2011-02-15 03:40:34 -0500 | [diff] [blame] | 192 | static struct regulator_consumer_supply omap4_panda_vmmc5_supply = { |
| 193 | .supply = "vmmc", |
Kishore Kadiyala | 0005ae7 | 2011-02-28 20:48:05 +0530 | [diff] [blame] | 194 | .dev_name = "omap_hsmmc.4", |
Panduranga Mallireddy | edc8406 | 2011-02-15 03:40:34 -0500 | [diff] [blame] | 195 | }; |
| 196 | |
| 197 | static struct regulator_init_data panda_vmmc5 = { |
| 198 | .constraints = { |
| 199 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 200 | }, |
| 201 | .num_consumer_supplies = 1, |
| 202 | .consumer_supplies = &omap4_panda_vmmc5_supply, |
| 203 | }; |
| 204 | |
| 205 | static struct fixed_voltage_config panda_vwlan = { |
| 206 | .supply_name = "vwl1271", |
| 207 | .microvolts = 1800000, /* 1.8V */ |
| 208 | .gpio = GPIO_WIFI_PMENA, |
| 209 | .startup_delay = 70000, /* 70msec */ |
| 210 | .enable_high = 1, |
| 211 | .enabled_at_boot = 0, |
| 212 | .init_data = &panda_vmmc5, |
| 213 | }; |
| 214 | |
| 215 | static struct platform_device omap_vwlan_device = { |
| 216 | .name = "reg-fixed-voltage", |
| 217 | .id = 1, |
| 218 | .dev = { |
| 219 | .platform_data = &panda_vwlan, |
| 220 | }, |
| 221 | }; |
| 222 | |
Panduranga Mallireddy | b17e0979 | 2011-02-15 03:40:35 -0500 | [diff] [blame] | 223 | struct wl12xx_platform_data omap_panda_wlan_data __initdata = { |
| 224 | .irq = OMAP_GPIO_IRQ(GPIO_WIFI_IRQ), |
| 225 | /* PANDA ref clock is 38.4 MHz */ |
| 226 | .board_ref_clock = 2, |
| 227 | }; |
| 228 | |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 229 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) |
| 230 | { |
| 231 | int ret = 0; |
| 232 | struct platform_device *pdev = container_of(dev, |
| 233 | struct platform_device, dev); |
| 234 | struct omap_mmc_platform_data *pdata = dev->platform_data; |
| 235 | |
Menon, Nishanth | bf56f0a | 2010-10-19 09:50:25 -0500 | [diff] [blame] | 236 | if (!pdata) { |
| 237 | dev_err(dev, "%s: NULL platform data\n", __func__); |
| 238 | return -EINVAL; |
| 239 | } |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 240 | /* Setting MMC1 Card detect Irq */ |
Menon, Nishanth | bf56f0a | 2010-10-19 09:50:25 -0500 | [diff] [blame] | 241 | if (pdev->id == 0) { |
| 242 | ret = twl6030_mmc_card_detect_config(); |
| 243 | if (ret) |
| 244 | dev_err(dev, "%s: Error card detect config(%d)\n", |
| 245 | __func__, ret); |
| 246 | else |
| 247 | pdata->slots[0].card_detect = twl6030_mmc_card_detect; |
| 248 | } |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 249 | return ret; |
| 250 | } |
| 251 | |
| 252 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) |
| 253 | { |
David Anders | b9b5262 | 2010-10-07 19:36:29 +0000 | [diff] [blame] | 254 | struct omap_mmc_platform_data *pdata; |
| 255 | |
| 256 | /* dev can be null if CONFIG_MMC_OMAP_HS is not set */ |
| 257 | if (!dev) { |
| 258 | pr_err("Failed omap4_twl6030_hsmmc_set_late_init\n"); |
| 259 | return; |
| 260 | } |
| 261 | pdata = dev->platform_data; |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 262 | |
| 263 | pdata->init = omap4_twl6030_hsmmc_late_init; |
| 264 | } |
| 265 | |
| 266 | static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers) |
| 267 | { |
| 268 | struct omap2_hsmmc_info *c; |
| 269 | |
| 270 | omap2_hsmmc_init(controllers); |
| 271 | for (c = controllers; c->mmc; c++) |
| 272 | omap4_twl6030_hsmmc_set_late_init(c->dev); |
| 273 | |
| 274 | return 0; |
| 275 | } |
| 276 | |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 277 | static struct regulator_init_data omap4_panda_vaux2 = { |
| 278 | .constraints = { |
| 279 | .min_uV = 1200000, |
| 280 | .max_uV = 2800000, |
| 281 | .apply_uV = true, |
| 282 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 283 | | REGULATOR_MODE_STANDBY, |
| 284 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 285 | | REGULATOR_CHANGE_MODE |
| 286 | | REGULATOR_CHANGE_STATUS, |
| 287 | }, |
| 288 | }; |
| 289 | |
| 290 | static struct regulator_init_data omap4_panda_vaux3 = { |
| 291 | .constraints = { |
| 292 | .min_uV = 1000000, |
| 293 | .max_uV = 3000000, |
| 294 | .apply_uV = true, |
| 295 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 296 | | REGULATOR_MODE_STANDBY, |
| 297 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 298 | | REGULATOR_CHANGE_MODE |
| 299 | | REGULATOR_CHANGE_STATUS, |
| 300 | }, |
| 301 | }; |
| 302 | |
| 303 | /* VMMC1 for MMC1 card */ |
| 304 | static struct regulator_init_data omap4_panda_vmmc = { |
| 305 | .constraints = { |
| 306 | .min_uV = 1200000, |
| 307 | .max_uV = 3000000, |
| 308 | .apply_uV = true, |
| 309 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 310 | | REGULATOR_MODE_STANDBY, |
| 311 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 312 | | REGULATOR_CHANGE_MODE |
| 313 | | REGULATOR_CHANGE_STATUS, |
| 314 | }, |
David Anders | 191183b | 2010-10-07 19:36:28 +0000 | [diff] [blame] | 315 | .num_consumer_supplies = 1, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 316 | .consumer_supplies = omap4_panda_vmmc_supply, |
| 317 | }; |
| 318 | |
| 319 | static struct regulator_init_data omap4_panda_vpp = { |
| 320 | .constraints = { |
| 321 | .min_uV = 1800000, |
| 322 | .max_uV = 2500000, |
| 323 | .apply_uV = true, |
| 324 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 325 | | REGULATOR_MODE_STANDBY, |
| 326 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 327 | | REGULATOR_CHANGE_MODE |
| 328 | | REGULATOR_CHANGE_STATUS, |
| 329 | }, |
| 330 | }; |
| 331 | |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 332 | static struct regulator_init_data omap4_panda_vana = { |
| 333 | .constraints = { |
| 334 | .min_uV = 2100000, |
| 335 | .max_uV = 2100000, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 336 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 337 | | REGULATOR_MODE_STANDBY, |
| 338 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 339 | | REGULATOR_CHANGE_STATUS, |
| 340 | }, |
| 341 | }; |
| 342 | |
| 343 | static struct regulator_init_data omap4_panda_vcxio = { |
| 344 | .constraints = { |
| 345 | .min_uV = 1800000, |
| 346 | .max_uV = 1800000, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 347 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 348 | | REGULATOR_MODE_STANDBY, |
| 349 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 350 | | REGULATOR_CHANGE_STATUS, |
| 351 | }, |
| 352 | }; |
| 353 | |
| 354 | static struct regulator_init_data omap4_panda_vdac = { |
| 355 | .constraints = { |
| 356 | .min_uV = 1800000, |
| 357 | .max_uV = 1800000, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 358 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 359 | | REGULATOR_MODE_STANDBY, |
| 360 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 361 | | REGULATOR_CHANGE_STATUS, |
| 362 | }, |
| 363 | }; |
| 364 | |
| 365 | static struct regulator_init_data omap4_panda_vusb = { |
| 366 | .constraints = { |
| 367 | .min_uV = 3300000, |
| 368 | .max_uV = 3300000, |
| 369 | .apply_uV = true, |
| 370 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 371 | | REGULATOR_MODE_STANDBY, |
| 372 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 373 | | REGULATOR_CHANGE_STATUS, |
| 374 | }, |
| 375 | }; |
| 376 | |
Balaji T K | 8af1b0d | 2011-02-10 18:45:26 +0530 | [diff] [blame] | 377 | static struct regulator_init_data omap4_panda_clk32kg = { |
| 378 | .constraints = { |
| 379 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 380 | }, |
| 381 | }; |
| 382 | |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 383 | static struct twl4030_platform_data omap4_panda_twldata = { |
| 384 | .irq_base = TWL6030_IRQ_BASE, |
| 385 | .irq_end = TWL6030_IRQ_END, |
| 386 | |
| 387 | /* Regulators */ |
| 388 | .vmmc = &omap4_panda_vmmc, |
| 389 | .vpp = &omap4_panda_vpp, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 390 | .vana = &omap4_panda_vana, |
| 391 | .vcxio = &omap4_panda_vcxio, |
| 392 | .vdac = &omap4_panda_vdac, |
| 393 | .vusb = &omap4_panda_vusb, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 394 | .vaux2 = &omap4_panda_vaux2, |
| 395 | .vaux3 = &omap4_panda_vaux3, |
Balaji T K | 8af1b0d | 2011-02-10 18:45:26 +0530 | [diff] [blame] | 396 | .clk32kg = &omap4_panda_clk32kg, |
Hema HK | e70357e3 | 2010-12-10 18:09:52 +0530 | [diff] [blame] | 397 | .usb = &omap4_usbphy_data, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 398 | }; |
| 399 | |
Murthy, Raghuveer | b295d6e | 2011-03-14 07:52:25 -0500 | [diff] [blame] | 400 | /* |
| 401 | * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM |
| 402 | * is connected as I2C slave device, and can be accessed at address 0x50 |
| 403 | */ |
| 404 | static struct i2c_board_info __initdata panda_i2c_eeprom[] = { |
| 405 | { |
| 406 | I2C_BOARD_INFO("eeprom", 0x50), |
| 407 | }, |
| 408 | }; |
| 409 | |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 410 | static int __init omap4_panda_i2c_init(void) |
| 411 | { |
Mike Rapoport | fbd8071 | 2011-04-25 01:09:06 +0300 | [diff] [blame] | 412 | omap4_pmic_init("twl6030", &omap4_panda_twldata); |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 413 | omap_register_i2c_bus(2, 400, NULL, 0); |
Murthy, Raghuveer | b295d6e | 2011-03-14 07:52:25 -0500 | [diff] [blame] | 414 | /* |
| 415 | * Bus 3 is attached to the DVI port where devices like the pico DLP |
| 416 | * projector don't work reliably with 400kHz |
| 417 | */ |
| 418 | omap_register_i2c_bus(3, 100, panda_i2c_eeprom, |
| 419 | ARRAY_SIZE(panda_i2c_eeprom)); |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 420 | omap_register_i2c_bus(4, 400, NULL, 0); |
| 421 | return 0; |
| 422 | } |
sricharan | fc63de82 | 2010-11-08 19:26:11 +0530 | [diff] [blame] | 423 | |
| 424 | #ifdef CONFIG_OMAP_MUX |
| 425 | static struct omap_board_mux board_mux[] __initdata = { |
Panduranga Mallireddy | 66e171a | 2011-02-15 03:40:32 -0500 | [diff] [blame] | 426 | /* WLAN IRQ - GPIO 53 */ |
| 427 | OMAP4_MUX(GPMC_NCS3, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), |
| 428 | /* WLAN POWER ENABLE - GPIO 43 */ |
| 429 | OMAP4_MUX(GPMC_A19, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT), |
| 430 | /* WLAN SDIO: MMC5 CMD */ |
| 431 | OMAP4_MUX(SDMMC5_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), |
| 432 | /* WLAN SDIO: MMC5 CLK */ |
| 433 | OMAP4_MUX(SDMMC5_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), |
| 434 | /* WLAN SDIO: MMC5 DAT[0-3] */ |
| 435 | OMAP4_MUX(SDMMC5_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), |
| 436 | OMAP4_MUX(SDMMC5_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), |
| 437 | OMAP4_MUX(SDMMC5_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), |
| 438 | OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), |
Murthy, Raghuveer | b295d6e | 2011-03-14 07:52:25 -0500 | [diff] [blame] | 439 | /* gpio 0 - TFP410 PD */ |
| 440 | OMAP4_MUX(KPD_COL1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3), |
| 441 | /* dispc2_data23 */ |
| 442 | OMAP4_MUX(USBB2_ULPITLL_STP, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 443 | /* dispc2_data22 */ |
| 444 | OMAP4_MUX(USBB2_ULPITLL_DIR, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 445 | /* dispc2_data21 */ |
| 446 | OMAP4_MUX(USBB2_ULPITLL_NXT, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 447 | /* dispc2_data20 */ |
| 448 | OMAP4_MUX(USBB2_ULPITLL_DAT0, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 449 | /* dispc2_data19 */ |
| 450 | OMAP4_MUX(USBB2_ULPITLL_DAT1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 451 | /* dispc2_data18 */ |
| 452 | OMAP4_MUX(USBB2_ULPITLL_DAT2, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 453 | /* dispc2_data15 */ |
| 454 | OMAP4_MUX(USBB2_ULPITLL_DAT3, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 455 | /* dispc2_data14 */ |
| 456 | OMAP4_MUX(USBB2_ULPITLL_DAT4, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 457 | /* dispc2_data13 */ |
| 458 | OMAP4_MUX(USBB2_ULPITLL_DAT5, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 459 | /* dispc2_data12 */ |
| 460 | OMAP4_MUX(USBB2_ULPITLL_DAT6, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 461 | /* dispc2_data11 */ |
| 462 | OMAP4_MUX(USBB2_ULPITLL_DAT7, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 463 | /* dispc2_data10 */ |
| 464 | OMAP4_MUX(DPM_EMU3, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 465 | /* dispc2_data9 */ |
| 466 | OMAP4_MUX(DPM_EMU4, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 467 | /* dispc2_data16 */ |
| 468 | OMAP4_MUX(DPM_EMU5, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 469 | /* dispc2_data17 */ |
| 470 | OMAP4_MUX(DPM_EMU6, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 471 | /* dispc2_hsync */ |
| 472 | OMAP4_MUX(DPM_EMU7, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 473 | /* dispc2_pclk */ |
| 474 | OMAP4_MUX(DPM_EMU8, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 475 | /* dispc2_vsync */ |
| 476 | OMAP4_MUX(DPM_EMU9, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 477 | /* dispc2_de */ |
| 478 | OMAP4_MUX(DPM_EMU10, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 479 | /* dispc2_data8 */ |
| 480 | OMAP4_MUX(DPM_EMU11, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 481 | /* dispc2_data7 */ |
| 482 | OMAP4_MUX(DPM_EMU12, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 483 | /* dispc2_data6 */ |
| 484 | OMAP4_MUX(DPM_EMU13, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 485 | /* dispc2_data5 */ |
| 486 | OMAP4_MUX(DPM_EMU14, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 487 | /* dispc2_data4 */ |
| 488 | OMAP4_MUX(DPM_EMU15, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 489 | /* dispc2_data3 */ |
| 490 | OMAP4_MUX(DPM_EMU16, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 491 | /* dispc2_data2 */ |
| 492 | OMAP4_MUX(DPM_EMU17, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 493 | /* dispc2_data1 */ |
| 494 | OMAP4_MUX(DPM_EMU18, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
| 495 | /* dispc2_data0 */ |
| 496 | OMAP4_MUX(DPM_EMU19, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
sricharan | fc63de82 | 2010-11-08 19:26:11 +0530 | [diff] [blame] | 497 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
| 498 | }; |
R Sricharan | 573efc2 | 2011-03-11 06:04:46 +0000 | [diff] [blame] | 499 | |
| 500 | static struct omap_device_pad serial2_pads[] __initdata = { |
| 501 | OMAP_MUX_STATIC("uart2_cts.uart2_cts", |
| 502 | OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), |
| 503 | OMAP_MUX_STATIC("uart2_rts.uart2_rts", |
| 504 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), |
| 505 | OMAP_MUX_STATIC("uart2_rx.uart2_rx", |
| 506 | OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), |
| 507 | OMAP_MUX_STATIC("uart2_tx.uart2_tx", |
| 508 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), |
| 509 | }; |
| 510 | |
| 511 | static struct omap_device_pad serial3_pads[] __initdata = { |
| 512 | OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx", |
| 513 | OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), |
| 514 | OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd", |
| 515 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), |
| 516 | OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx", |
| 517 | OMAP_PIN_INPUT | OMAP_MUX_MODE0), |
| 518 | OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx", |
| 519 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), |
| 520 | }; |
| 521 | |
| 522 | static struct omap_device_pad serial4_pads[] __initdata = { |
| 523 | OMAP_MUX_STATIC("uart4_rx.uart4_rx", |
| 524 | OMAP_PIN_INPUT | OMAP_MUX_MODE0), |
| 525 | OMAP_MUX_STATIC("uart4_tx.uart4_tx", |
| 526 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), |
| 527 | }; |
| 528 | |
| 529 | static struct omap_board_data serial2_data = { |
| 530 | .id = 1, |
| 531 | .pads = serial2_pads, |
| 532 | .pads_cnt = ARRAY_SIZE(serial2_pads), |
| 533 | }; |
| 534 | |
| 535 | static struct omap_board_data serial3_data = { |
| 536 | .id = 2, |
| 537 | .pads = serial3_pads, |
| 538 | .pads_cnt = ARRAY_SIZE(serial3_pads), |
| 539 | }; |
| 540 | |
| 541 | static struct omap_board_data serial4_data = { |
| 542 | .id = 3, |
| 543 | .pads = serial4_pads, |
| 544 | .pads_cnt = ARRAY_SIZE(serial4_pads), |
| 545 | }; |
| 546 | |
| 547 | static inline void board_serial_init(void) |
| 548 | { |
| 549 | struct omap_board_data bdata; |
| 550 | bdata.flags = 0; |
| 551 | bdata.pads = NULL; |
| 552 | bdata.pads_cnt = 0; |
| 553 | bdata.id = 0; |
| 554 | /* pass dummy data for UART1 */ |
| 555 | omap_serial_init_port(&bdata); |
| 556 | |
| 557 | omap_serial_init_port(&serial2_data); |
| 558 | omap_serial_init_port(&serial3_data); |
| 559 | omap_serial_init_port(&serial4_data); |
| 560 | } |
sricharan | fc63de82 | 2010-11-08 19:26:11 +0530 | [diff] [blame] | 561 | #else |
| 562 | #define board_mux NULL |
R Sricharan | 573efc2 | 2011-03-11 06:04:46 +0000 | [diff] [blame] | 563 | |
| 564 | static inline void board_serial_init(void) |
| 565 | { |
| 566 | omap_serial_init(); |
| 567 | } |
sricharan | fc63de82 | 2010-11-08 19:26:11 +0530 | [diff] [blame] | 568 | #endif |
| 569 | |
Murthy, Raghuveer | b295d6e | 2011-03-14 07:52:25 -0500 | [diff] [blame] | 570 | /* Display DVI */ |
| 571 | #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 |
| 572 | |
| 573 | static int omap4_panda_enable_dvi(struct omap_dss_device *dssdev) |
| 574 | { |
| 575 | gpio_set_value(dssdev->reset_gpio, 1); |
| 576 | return 0; |
| 577 | } |
| 578 | |
| 579 | static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev) |
| 580 | { |
| 581 | gpio_set_value(dssdev->reset_gpio, 0); |
| 582 | } |
| 583 | |
| 584 | /* Using generic display panel */ |
| 585 | static struct panel_generic_dpi_data omap4_dvi_panel = { |
| 586 | .name = "generic", |
| 587 | .platform_enable = omap4_panda_enable_dvi, |
| 588 | .platform_disable = omap4_panda_disable_dvi, |
| 589 | }; |
| 590 | |
| 591 | struct omap_dss_device omap4_panda_dvi_device = { |
| 592 | .type = OMAP_DISPLAY_TYPE_DPI, |
| 593 | .name = "dvi", |
| 594 | .driver_name = "generic_dpi_panel", |
| 595 | .data = &omap4_dvi_panel, |
| 596 | .phy.dpi.data_lines = 24, |
| 597 | .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, |
| 598 | .channel = OMAP_DSS_CHANNEL_LCD2, |
| 599 | }; |
| 600 | |
| 601 | int __init omap4_panda_dvi_init(void) |
| 602 | { |
| 603 | int r; |
| 604 | |
| 605 | /* Requesting TFP410 DVI GPIO and disabling it, at bootup */ |
| 606 | r = gpio_request_one(omap4_panda_dvi_device.reset_gpio, |
| 607 | GPIOF_OUT_INIT_LOW, "DVI PD"); |
| 608 | if (r) |
| 609 | pr_err("Failed to get DVI powerdown GPIO\n"); |
| 610 | |
| 611 | return r; |
| 612 | } |
| 613 | |
| 614 | |
K, Mythri P | 17c84ef | 2011-03-14 23:57:42 -0500 | [diff] [blame] | 615 | static void omap4_panda_hdmi_mux_init(void) |
| 616 | { |
| 617 | /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */ |
| 618 | omap_mux_init_signal("hdmi_hpd", |
| 619 | OMAP_PIN_INPUT_PULLUP); |
| 620 | omap_mux_init_signal("hdmi_cec", |
| 621 | OMAP_PIN_INPUT_PULLUP); |
| 622 | /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */ |
| 623 | omap_mux_init_signal("hdmi_ddc_scl", |
| 624 | OMAP_PIN_INPUT_PULLUP); |
| 625 | omap_mux_init_signal("hdmi_ddc_sda", |
| 626 | OMAP_PIN_INPUT_PULLUP); |
| 627 | } |
| 628 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 629 | static struct gpio panda_hdmi_gpios[] = { |
| 630 | { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, |
| 631 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, |
| 632 | }; |
| 633 | |
K, Mythri P | 17c84ef | 2011-03-14 23:57:42 -0500 | [diff] [blame] | 634 | static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) |
| 635 | { |
| 636 | int status; |
| 637 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 638 | status = gpio_request_array(panda_hdmi_gpios, |
| 639 | ARRAY_SIZE(panda_hdmi_gpios)); |
| 640 | if (status) |
| 641 | pr_err("Cannot request HDMI GPIOs\n"); |
K, Mythri P | 17c84ef | 2011-03-14 23:57:42 -0500 | [diff] [blame] | 642 | |
| 643 | return status; |
| 644 | } |
| 645 | |
| 646 | static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev) |
| 647 | { |
| 648 | gpio_free(HDMI_GPIO_LS_OE); |
| 649 | gpio_free(HDMI_GPIO_HPD); |
| 650 | } |
| 651 | |
| 652 | static struct omap_dss_device omap4_panda_hdmi_device = { |
| 653 | .name = "hdmi", |
| 654 | .driver_name = "hdmi_panel", |
| 655 | .type = OMAP_DISPLAY_TYPE_HDMI, |
| 656 | .platform_enable = omap4_panda_panel_enable_hdmi, |
| 657 | .platform_disable = omap4_panda_panel_disable_hdmi, |
| 658 | .channel = OMAP_DSS_CHANNEL_DIGIT, |
| 659 | }; |
| 660 | |
| 661 | static struct omap_dss_device *omap4_panda_dss_devices[] = { |
Murthy, Raghuveer | b295d6e | 2011-03-14 07:52:25 -0500 | [diff] [blame] | 662 | &omap4_panda_dvi_device, |
K, Mythri P | 17c84ef | 2011-03-14 23:57:42 -0500 | [diff] [blame] | 663 | &omap4_panda_hdmi_device, |
| 664 | }; |
| 665 | |
| 666 | static struct omap_dss_board_info omap4_panda_dss_data = { |
| 667 | .num_devices = ARRAY_SIZE(omap4_panda_dss_devices), |
| 668 | .devices = omap4_panda_dss_devices, |
Murthy, Raghuveer | b295d6e | 2011-03-14 07:52:25 -0500 | [diff] [blame] | 669 | .default_device = &omap4_panda_dvi_device, |
K, Mythri P | 17c84ef | 2011-03-14 23:57:42 -0500 | [diff] [blame] | 670 | }; |
| 671 | |
| 672 | void omap4_panda_display_init(void) |
| 673 | { |
Murthy, Raghuveer | b295d6e | 2011-03-14 07:52:25 -0500 | [diff] [blame] | 674 | int r; |
| 675 | |
| 676 | r = omap4_panda_dvi_init(); |
| 677 | if (r) |
| 678 | pr_err("error initializing panda DVI\n"); |
| 679 | |
K, Mythri P | 17c84ef | 2011-03-14 23:57:42 -0500 | [diff] [blame] | 680 | omap4_panda_hdmi_mux_init(); |
| 681 | omap_display_init(&omap4_panda_dss_data); |
| 682 | } |
| 683 | |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 684 | static void __init omap4_panda_init(void) |
| 685 | { |
sricharan | fc63de82 | 2010-11-08 19:26:11 +0530 | [diff] [blame] | 686 | int package = OMAP_PACKAGE_CBS; |
| 687 | |
| 688 | if (omap_rev() == OMAP4430_REV_ES1_0) |
| 689 | package = OMAP_PACKAGE_CBL; |
| 690 | omap4_mux_init(board_mux, package); |
| 691 | |
Panduranga Mallireddy | b17e0979 | 2011-02-15 03:40:35 -0500 | [diff] [blame] | 692 | if (wl12xx_set_platform_data(&omap_panda_wlan_data)) |
| 693 | pr_err("error setting wl12xx data\n"); |
| 694 | |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 695 | omap4_panda_i2c_init(); |
Ricardo Salveti de Araujo | 3da434a | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 696 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); |
Panduranga Mallireddy | edc8406 | 2011-02-15 03:40:34 -0500 | [diff] [blame] | 697 | platform_device_register(&omap_vwlan_device); |
R Sricharan | 573efc2 | 2011-03-11 06:04:46 +0000 | [diff] [blame] | 698 | board_serial_init(); |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 699 | omap4_twl6030_hsmmc_init(mmc); |
David Anders | 4415beb | 2010-10-07 19:36:30 +0000 | [diff] [blame] | 700 | omap4_ehci_init(); |
Felipe Balbi | 1ea7f35 | 2010-12-01 13:48:54 +0200 | [diff] [blame] | 701 | usb_musb_init(&musb_board_data); |
K, Mythri P | 17c84ef | 2011-03-14 23:57:42 -0500 | [diff] [blame] | 702 | omap4_panda_display_init(); |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 703 | } |
| 704 | |
| 705 | static void __init omap4_panda_map_io(void) |
| 706 | { |
| 707 | omap2_set_globals_443x(); |
| 708 | omap44xx_map_common_io(); |
| 709 | } |
| 710 | |
| 711 | MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board") |
| 712 | /* Maintainer: David Anders - Texas Instruments Inc */ |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 713 | .boot_params = 0x80000100, |
Raghuveer Murthy | d920e52 | 2010-12-17 18:15:07 -0800 | [diff] [blame] | 714 | .reserve = omap_reserve, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 715 | .map_io = omap4_panda_map_io, |
Russell King - ARM Linux | 3dc3bad | 2011-02-14 15:40:20 -0800 | [diff] [blame] | 716 | .init_early = omap4_panda_init_early, |
| 717 | .init_irq = gic_init_irq, |
David Anders | b075f58 | 2010-08-02 13:18:05 +0300 | [diff] [blame] | 718 | .init_machine = omap4_panda_init, |
| 719 | .timer = &omap_timer, |
| 720 | MACHINE_END |