Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 1 | /* |
| 2 | * board-devkit8000.c - TimLL Devkit8000 |
| 3 | * |
| 4 | * Copyright (C) 2009 Kim Botherway |
| 5 | * Copyright (C) 2010 Thomas Weber |
| 6 | * |
| 7 | * Modified from mach-omap2/board-omap3beagle.c |
| 8 | * |
| 9 | * Initial code: Syed Mohammed Khasim |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License version 2 as |
| 13 | * published by the Free Software Foundation. |
| 14 | */ |
| 15 | |
| 16 | #include <linux/kernel.h> |
| 17 | #include <linux/init.h> |
| 18 | #include <linux/platform_device.h> |
| 19 | #include <linux/delay.h> |
| 20 | #include <linux/err.h> |
| 21 | #include <linux/clk.h> |
| 22 | #include <linux/io.h> |
| 23 | #include <linux/leds.h> |
| 24 | #include <linux/gpio.h> |
| 25 | #include <linux/input.h> |
| 26 | #include <linux/gpio_keys.h> |
| 27 | |
| 28 | #include <linux/mtd/mtd.h> |
| 29 | #include <linux/mtd/partitions.h> |
| 30 | #include <linux/mtd/nand.h> |
Sukumar Ghorai | 3a63833 | 2010-09-15 14:49:23 +0000 | [diff] [blame] | 31 | #include <linux/mmc/host.h> |
Kishon Vijay Abraham I | 51482be | 2013-02-06 18:58:50 +0530 | [diff] [blame] | 32 | #include <linux/usb/phy.h> |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 33 | |
| 34 | #include <linux/regulator/machine.h> |
| 35 | #include <linux/i2c/twl.h> |
Tony Lindgren | 4952af4 | 2012-09-19 10:33:40 -0700 | [diff] [blame] | 36 | #include "id.h" |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 37 | #include <asm/mach-types.h> |
| 38 | #include <asm/mach/arch.h> |
| 39 | #include <asm/mach/map.h> |
| 40 | #include <asm/mach/flash.h> |
| 41 | |
Tony Lindgren | 4e65331 | 2011-11-10 22:45:17 +0100 | [diff] [blame] | 42 | #include "common.h" |
Afzal Mohammed | 3ef5d00 | 2012-10-05 10:37:27 +0530 | [diff] [blame] | 43 | #include "gpmc.h" |
Arnd Bergmann | 2203747 | 2012-08-24 15:21:06 +0200 | [diff] [blame] | 44 | #include <linux/platform_data/mtd-nand-omap2.h> |
Tomi Valkeinen | a0b38cc | 2011-05-11 14:05:07 +0300 | [diff] [blame] | 45 | #include <video/omapdss.h> |
Archit Taneja | a0d8dde | 2013-02-12 16:46:46 +0530 | [diff] [blame] | 46 | #include <video/omap-panel-data.h> |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 47 | |
Arnd Bergmann | 2203747 | 2012-08-24 15:21:06 +0200 | [diff] [blame] | 48 | #include <linux/platform_data/spi-omap2-mcspi.h> |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 49 | #include <linux/input/matrix_keypad.h> |
| 50 | #include <linux/spi/spi.h> |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 51 | #include <linux/dm9000.h> |
| 52 | #include <linux/interrupt.h> |
| 53 | |
| 54 | #include "sdram-micron-mt46h32m32lf-6.h" |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 55 | #include "mux.h" |
| 56 | #include "hsmmc.h" |
Afzal Mohammed | 2e61826 | 2012-02-29 18:11:56 +0530 | [diff] [blame] | 57 | #include "board-flash.h" |
Mike Rapoport | 96974a2 | 2011-04-25 01:09:05 +0300 | [diff] [blame] | 58 | #include "common-board-devices.h" |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 59 | |
Afzal Mohammed | 2e61826 | 2012-02-29 18:11:56 +0530 | [diff] [blame] | 60 | #define NAND_CS 0 |
| 61 | |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 62 | #define OMAP_DM9000_GPIO_IRQ 25 |
| 63 | #define OMAP3_DEVKIT_TS_GPIO 27 |
| 64 | |
| 65 | static struct mtd_partition devkit8000_nand_partitions[] = { |
| 66 | /* All the partition sizes are listed in terms of NAND block size */ |
| 67 | { |
| 68 | .name = "X-Loader", |
| 69 | .offset = 0, |
| 70 | .size = 4 * NAND_BLOCK_SIZE, |
| 71 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
| 72 | }, |
| 73 | { |
| 74 | .name = "U-Boot", |
| 75 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ |
| 76 | .size = 15 * NAND_BLOCK_SIZE, |
| 77 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
| 78 | }, |
| 79 | { |
| 80 | .name = "U-Boot Env", |
| 81 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */ |
| 82 | .size = 1 * NAND_BLOCK_SIZE, |
| 83 | }, |
| 84 | { |
| 85 | .name = "Kernel", |
| 86 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ |
| 87 | .size = 32 * NAND_BLOCK_SIZE, |
| 88 | }, |
| 89 | { |
| 90 | .name = "File System", |
| 91 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */ |
| 92 | .size = MTDPART_SIZ_FULL, |
| 93 | }, |
| 94 | }; |
| 95 | |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 96 | static struct omap2_hsmmc_info mmc[] = { |
| 97 | { |
| 98 | .mmc = 1, |
Sukumar Ghorai | 3a63833 | 2010-09-15 14:49:23 +0000 | [diff] [blame] | 99 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 100 | .gpio_wp = 29, |
Tony Lindgren | 3b972bf | 2012-02-20 09:43:29 -0800 | [diff] [blame] | 101 | .deferred = true, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 102 | }, |
| 103 | {} /* Terminator */ |
| 104 | }; |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 105 | |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 106 | static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = { |
| 107 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
| 108 | }; |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 109 | |
Thomas Weber | 5fd58b5 | 2010-07-05 17:04:39 +0300 | [diff] [blame] | 110 | /* ads7846 on SPI */ |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 111 | static struct regulator_consumer_supply devkit8000_vio_supply[] = { |
| 112 | REGULATOR_SUPPLY("vcc", "spi2.0"), |
| 113 | }; |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 114 | |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 115 | static const struct display_timing devkit8000_lcd_videomode = { |
| 116 | .pixelclock = { 0, 40000000, 0 }, |
| 117 | |
| 118 | .hactive = { 0, 800, 0 }, |
| 119 | .hfront_porch = { 0, 1, 0 }, |
| 120 | .hback_porch = { 0, 1, 0 }, |
| 121 | .hsync_len = { 0, 48, 0 }, |
| 122 | |
| 123 | .vactive = { 0, 480, 0 }, |
| 124 | .vfront_porch = { 0, 12, 0 }, |
| 125 | .vback_porch = { 0, 25, 0 }, |
| 126 | .vsync_len = { 0, 3, 0 }, |
| 127 | |
| 128 | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | |
| 129 | DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 130 | }; |
Bryan Wu | 89747c9 | 2010-11-17 13:34:34 +0000 | [diff] [blame] | 131 | |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 132 | static struct panel_dpi_platform_data devkit8000_lcd_pdata = { |
Bryan Wu | 89747c9 | 2010-11-17 13:34:34 +0000 | [diff] [blame] | 133 | .name = "lcd", |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 134 | .source = "dpi.0", |
| 135 | |
| 136 | .data_lines = 24, |
| 137 | |
| 138 | .display_timing = &devkit8000_lcd_videomode, |
| 139 | |
| 140 | .enable_gpio = -1, /* filled in code */ |
| 141 | .backlight_gpio = -1, |
Bryan Wu | 89747c9 | 2010-11-17 13:34:34 +0000 | [diff] [blame] | 142 | }; |
| 143 | |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 144 | static struct platform_device devkit8000_lcd_device = { |
| 145 | .name = "panel-dpi", |
| 146 | .id = 0, |
| 147 | .dev.platform_data = &devkit8000_lcd_pdata, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 148 | }; |
| 149 | |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 150 | static struct connector_dvi_platform_data devkit8000_dvi_connector_pdata = { |
Bryan Wu | 89747c9 | 2010-11-17 13:34:34 +0000 | [diff] [blame] | 151 | .name = "dvi", |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 152 | .source = "tfp410.0", |
| 153 | .i2c_bus_num = 1, |
Bryan Wu | 89747c9 | 2010-11-17 13:34:34 +0000 | [diff] [blame] | 154 | }; |
| 155 | |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 156 | static struct platform_device devkit8000_dvi_connector_device = { |
| 157 | .name = "connector-dvi", |
| 158 | .id = 0, |
| 159 | .dev.platform_data = &devkit8000_dvi_connector_pdata, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 160 | }; |
| 161 | |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 162 | static struct encoder_tfp410_platform_data devkit8000_tfp410_pdata = { |
| 163 | .name = "tfp410.0", |
| 164 | .source = "dpi.0", |
| 165 | .data_lines = 24, |
| 166 | .power_down_gpio = -1, /* filled in code */ |
| 167 | }; |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 168 | |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 169 | static struct platform_device devkit8000_tfp410_device = { |
| 170 | .name = "tfp410", |
| 171 | .id = 0, |
| 172 | .dev.platform_data = &devkit8000_tfp410_pdata, |
| 173 | }; |
| 174 | |
| 175 | static struct connector_atv_platform_data devkit8000_tv_pdata = { |
| 176 | .name = "tv", |
| 177 | .source = "venc.0", |
| 178 | .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO, |
| 179 | .invert_polarity = false, |
| 180 | }; |
| 181 | |
| 182 | static struct platform_device devkit8000_tv_connector_device = { |
| 183 | .name = "connector-analog-tv", |
| 184 | .id = 0, |
| 185 | .dev.platform_data = &devkit8000_tv_pdata, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 186 | }; |
| 187 | |
| 188 | static struct omap_dss_board_info devkit8000_dss_data = { |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 189 | .default_display_name = "lcd", |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 190 | }; |
| 191 | |
Manjunath Kondaiah G | bead437 | 2010-10-08 10:01:13 -0700 | [diff] [blame] | 192 | static uint32_t board_keymap[] = { |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 193 | KEY(0, 0, KEY_1), |
| 194 | KEY(1, 0, KEY_2), |
| 195 | KEY(2, 0, KEY_3), |
| 196 | KEY(0, 1, KEY_4), |
| 197 | KEY(1, 1, KEY_5), |
| 198 | KEY(2, 1, KEY_6), |
| 199 | KEY(3, 1, KEY_F5), |
| 200 | KEY(0, 2, KEY_7), |
| 201 | KEY(1, 2, KEY_8), |
| 202 | KEY(2, 2, KEY_9), |
| 203 | KEY(3, 2, KEY_F6), |
| 204 | KEY(0, 3, KEY_F7), |
| 205 | KEY(1, 3, KEY_0), |
| 206 | KEY(2, 3, KEY_F8), |
| 207 | PERSISTENT_KEY(4, 5), |
| 208 | KEY(4, 4, KEY_VOLUMEUP), |
| 209 | KEY(5, 5, KEY_VOLUMEDOWN), |
| 210 | 0 |
| 211 | }; |
| 212 | |
| 213 | static struct matrix_keymap_data board_map_data = { |
| 214 | .keymap = board_keymap, |
| 215 | .keymap_size = ARRAY_SIZE(board_keymap), |
| 216 | }; |
| 217 | |
| 218 | static struct twl4030_keypad_data devkit8000_kp_data = { |
| 219 | .keymap_data = &board_map_data, |
| 220 | .rows = 6, |
| 221 | .cols = 6, |
| 222 | .rep = 1, |
| 223 | }; |
| 224 | |
| 225 | static struct gpio_led gpio_leds[]; |
| 226 | |
| 227 | static int devkit8000_twl_gpio_setup(struct device *dev, |
| 228 | unsigned gpio, unsigned ngpio) |
| 229 | { |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 230 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
| 231 | mmc[0].gpio_cd = gpio + 0; |
Tony Lindgren | 3b972bf | 2012-02-20 09:43:29 -0800 | [diff] [blame] | 232 | omap_hsmmc_late_init(mmc); |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 233 | |
Kan-Ru Chen | 31c73f7 | 2010-07-05 17:04:40 +0300 | [diff] [blame] | 234 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ |
| 235 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; |
| 236 | |
Thomas Weber | daf7aab | 2011-01-20 15:41:48 +0000 | [diff] [blame] | 237 | /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */ |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 238 | devkit8000_lcd_pdata.enable_gpio = gpio + TWL4030_GPIO_MAX + 0; |
Kan-Ru Chen | 4098609 | 2010-07-05 17:04:40 +0300 | [diff] [blame] | 239 | |
Kan-Ru Chen | 31c73f7 | 2010-07-05 17:04:40 +0300 | [diff] [blame] | 240 | /* gpio + 7 is "DVI_PD" (out, active low) */ |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 241 | devkit8000_tfp410_pdata.power_down_gpio = gpio + 7; |
Kan-Ru Chen | 31c73f7 | 2010-07-05 17:04:40 +0300 | [diff] [blame] | 242 | |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 243 | return 0; |
| 244 | } |
| 245 | |
| 246 | static struct twl4030_gpio_platform_data devkit8000_gpio_data = { |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 247 | .use_leds = true, |
Daniel Morsing | 35a78fa | 2011-01-19 08:19:24 +0000 | [diff] [blame] | 248 | .pulldowns = BIT(1) | BIT(2) | BIT(6) | BIT(8) | BIT(13) |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 249 | | BIT(15) | BIT(16) | BIT(17), |
| 250 | .setup = devkit8000_twl_gpio_setup, |
| 251 | }; |
| 252 | |
Senthilvadivu Guruswamy | c8aac01 | 2011-01-24 06:22:02 +0000 | [diff] [blame] | 253 | static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = { |
| 254 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), |
Tomi Valkeinen | 1f92a1a | 2013-05-31 10:37:53 +0300 | [diff] [blame] | 255 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"), |
Tomi Valkeinen | 7c68dd9 | 2011-08-03 14:00:57 +0300 | [diff] [blame] | 256 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), |
Senthilvadivu Guruswamy | c8aac01 | 2011-01-24 06:22:02 +0000 | [diff] [blame] | 257 | }; |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 258 | |
| 259 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
| 260 | static struct regulator_init_data devkit8000_vmmc1 = { |
| 261 | .constraints = { |
| 262 | .min_uV = 1850000, |
| 263 | .max_uV = 3150000, |
| 264 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 265 | | REGULATOR_MODE_STANDBY, |
| 266 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 267 | | REGULATOR_CHANGE_MODE |
| 268 | | REGULATOR_CHANGE_STATUS, |
| 269 | }, |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 270 | .num_consumer_supplies = ARRAY_SIZE(devkit8000_vmmc1_supply), |
| 271 | .consumer_supplies = devkit8000_vmmc1_supply, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 272 | }; |
| 273 | |
Thomas Weber | 5fd58b5 | 2010-07-05 17:04:39 +0300 | [diff] [blame] | 274 | /* VPLL1 for digital video outputs */ |
| 275 | static struct regulator_init_data devkit8000_vpll1 = { |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 276 | .constraints = { |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 277 | .min_uV = 1800000, |
| 278 | .max_uV = 1800000, |
| 279 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 280 | | REGULATOR_MODE_STANDBY, |
| 281 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 282 | | REGULATOR_CHANGE_STATUS, |
| 283 | }, |
Senthilvadivu Guruswamy | c8aac01 | 2011-01-24 06:22:02 +0000 | [diff] [blame] | 284 | .num_consumer_supplies = ARRAY_SIZE(devkit8000_vpll1_supplies), |
| 285 | .consumer_supplies = devkit8000_vpll1_supplies, |
Thomas Weber | 5fd58b5 | 2010-07-05 17:04:39 +0300 | [diff] [blame] | 286 | }; |
| 287 | |
| 288 | /* VAUX4 for ads7846 and nubs */ |
| 289 | static struct regulator_init_data devkit8000_vio = { |
| 290 | .constraints = { |
| 291 | .min_uV = 1800000, |
| 292 | .max_uV = 1800000, |
| 293 | .apply_uV = true, |
| 294 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 295 | | REGULATOR_MODE_STANDBY, |
| 296 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 297 | | REGULATOR_CHANGE_STATUS, |
| 298 | }, |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 299 | .num_consumer_supplies = ARRAY_SIZE(devkit8000_vio_supply), |
| 300 | .consumer_supplies = devkit8000_vio_supply, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 301 | }; |
| 302 | |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 303 | static struct twl4030_platform_data devkit8000_twldata = { |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 304 | /* platform_data for children goes here */ |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 305 | .gpio = &devkit8000_gpio_data, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 306 | .vmmc1 = &devkit8000_vmmc1, |
Thomas Weber | 5fd58b5 | 2010-07-05 17:04:39 +0300 | [diff] [blame] | 307 | .vpll1 = &devkit8000_vpll1, |
| 308 | .vio = &devkit8000_vio, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 309 | .keypad = &devkit8000_kp_data, |
| 310 | }; |
| 311 | |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 312 | static int __init devkit8000_i2c_init(void) |
| 313 | { |
Peter Ujfalusi | 827ed9a | 2011-06-07 10:28:54 +0300 | [diff] [blame] | 314 | omap3_pmic_get_config(&devkit8000_twldata, |
Peter Ujfalusi | b252b0e | 2011-06-07 11:38:24 +0300 | [diff] [blame] | 315 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, |
| 316 | TWL_COMMON_REGULATOR_VDAC); |
Mike Rapoport | fbd8071 | 2011-04-25 01:09:06 +0300 | [diff] [blame] | 317 | omap3_pmic_init("tps65930", &devkit8000_twldata); |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 318 | /* Bus 3 is attached to the DVI port where devices like the pico DLP |
| 319 | * projector don't work reliably with 400kHz */ |
| 320 | omap_register_i2c_bus(3, 400, NULL, 0); |
| 321 | return 0; |
| 322 | } |
| 323 | |
| 324 | static struct gpio_led gpio_leds[] = { |
| 325 | { |
| 326 | .name = "led1", |
| 327 | .default_trigger = "heartbeat", |
| 328 | .gpio = 186, |
| 329 | .active_low = true, |
| 330 | }, |
| 331 | { |
| 332 | .name = "led2", |
| 333 | .default_trigger = "mmc0", |
| 334 | .gpio = 163, |
| 335 | .active_low = true, |
| 336 | }, |
| 337 | { |
| 338 | .name = "ledB", |
| 339 | .default_trigger = "none", |
| 340 | .gpio = 153, |
| 341 | .active_low = true, |
| 342 | }, |
| 343 | { |
| 344 | .name = "led3", |
| 345 | .default_trigger = "none", |
| 346 | .gpio = 164, |
| 347 | .active_low = true, |
| 348 | }, |
| 349 | }; |
| 350 | |
| 351 | static struct gpio_led_platform_data gpio_led_info = { |
| 352 | .leds = gpio_leds, |
| 353 | .num_leds = ARRAY_SIZE(gpio_leds), |
| 354 | }; |
| 355 | |
| 356 | static struct platform_device leds_gpio = { |
| 357 | .name = "leds-gpio", |
| 358 | .id = -1, |
| 359 | .dev = { |
| 360 | .platform_data = &gpio_led_info, |
| 361 | }, |
| 362 | }; |
| 363 | |
| 364 | static struct gpio_keys_button gpio_buttons[] = { |
| 365 | { |
| 366 | .code = BTN_EXTRA, |
| 367 | .gpio = 26, |
| 368 | .desc = "user", |
| 369 | .wakeup = 1, |
| 370 | }, |
| 371 | }; |
| 372 | |
| 373 | static struct gpio_keys_platform_data gpio_key_info = { |
| 374 | .buttons = gpio_buttons, |
| 375 | .nbuttons = ARRAY_SIZE(gpio_buttons), |
| 376 | }; |
| 377 | |
| 378 | static struct platform_device keys_gpio = { |
| 379 | .name = "gpio-keys", |
| 380 | .id = -1, |
| 381 | .dev = { |
| 382 | .platform_data = &gpio_key_info, |
| 383 | }, |
| 384 | }; |
| 385 | |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 386 | #define OMAP_DM9000_BASE 0x2c000000 |
| 387 | |
| 388 | static struct resource omap_dm9000_resources[] = { |
| 389 | [0] = { |
| 390 | .start = OMAP_DM9000_BASE, |
| 391 | .end = (OMAP_DM9000_BASE + 0x4 - 1), |
| 392 | .flags = IORESOURCE_MEM, |
| 393 | }, |
| 394 | [1] = { |
| 395 | .start = (OMAP_DM9000_BASE + 0x400), |
| 396 | .end = (OMAP_DM9000_BASE + 0x400 + 0x4 - 1), |
| 397 | .flags = IORESOURCE_MEM, |
| 398 | }, |
| 399 | [2] = { |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 400 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, |
| 401 | }, |
| 402 | }; |
| 403 | |
| 404 | static struct dm9000_plat_data omap_dm9000_platdata = { |
| 405 | .flags = DM9000_PLATF_16BITONLY, |
| 406 | }; |
| 407 | |
| 408 | static struct platform_device omap_dm9000_dev = { |
| 409 | .name = "dm9000", |
| 410 | .id = -1, |
| 411 | .num_resources = ARRAY_SIZE(omap_dm9000_resources), |
| 412 | .resource = omap_dm9000_resources, |
| 413 | .dev = { |
| 414 | .platform_data = &omap_dm9000_platdata, |
| 415 | }, |
| 416 | }; |
| 417 | |
| 418 | static void __init omap_dm9000_init(void) |
| 419 | { |
Kan-Ru Chen | f535dae | 2010-08-02 14:21:41 +0300 | [diff] [blame] | 420 | unsigned char *eth_addr = omap_dm9000_platdata.dev_addr; |
| 421 | struct omap_die_id odi; |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 422 | int ret; |
Kan-Ru Chen | f535dae | 2010-08-02 14:21:41 +0300 | [diff] [blame] | 423 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 424 | ret = gpio_request_one(OMAP_DM9000_GPIO_IRQ, GPIOF_IN, "dm9000 irq"); |
| 425 | if (ret < 0) { |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 426 | printk(KERN_ERR "Failed to request GPIO%d for dm9000 IRQ\n", |
| 427 | OMAP_DM9000_GPIO_IRQ); |
| 428 | return; |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 429 | } |
Kan-Ru Chen | f535dae | 2010-08-02 14:21:41 +0300 | [diff] [blame] | 430 | |
| 431 | /* init the mac address using DIE id */ |
| 432 | omap_get_die_id(&odi); |
| 433 | |
| 434 | eth_addr[0] = 0x02; /* locally administered */ |
| 435 | eth_addr[1] = odi.id_1 & 0xff; |
| 436 | eth_addr[2] = (odi.id_0 & 0xff000000) >> 24; |
| 437 | eth_addr[3] = (odi.id_0 & 0x00ff0000) >> 16; |
| 438 | eth_addr[4] = (odi.id_0 & 0x0000ff00) >> 8; |
| 439 | eth_addr[5] = (odi.id_0 & 0x000000ff); |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 440 | } |
| 441 | |
| 442 | static struct platform_device *devkit8000_devices[] __initdata = { |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 443 | &leds_gpio, |
| 444 | &keys_gpio, |
| 445 | &omap_dm9000_dev, |
Tomi Valkeinen | c78fb21 | 2013-05-31 11:02:48 +0300 | [diff] [blame] | 446 | &devkit8000_lcd_device, |
| 447 | &devkit8000_tfp410_device, |
| 448 | &devkit8000_dvi_connector_device, |
| 449 | &devkit8000_tv_connector_device, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 450 | }; |
| 451 | |
Roger Quadros | 4297315 | 2013-02-14 10:13:48 +0200 | [diff] [blame] | 452 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
Keshava Munegowda | 181b250 | 2011-03-01 20:08:16 +0530 | [diff] [blame] | 453 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 454 | }; |
| 455 | |
Tony Lindgren | c7ecea2 | 2011-03-11 11:39:51 -0800 | [diff] [blame] | 456 | #ifdef CONFIG_OMAP_MUX |
Thomas Weber | 018e075 | 2010-05-10 14:29:16 -0700 | [diff] [blame] | 457 | static struct omap_board_mux board_mux[] __initdata = { |
| 458 | /* nCS and IRQ for Devkit8000 ethernet */ |
| 459 | OMAP3_MUX(GPMC_NCS6, OMAP_MUX_MODE0), |
| 460 | OMAP3_MUX(ETK_D11, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP), |
| 461 | |
| 462 | /* McSPI 2*/ |
| 463 | OMAP3_MUX(MCSPI2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 464 | OMAP3_MUX(MCSPI2_SIMO, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 465 | OMAP3_MUX(MCSPI2_SOMI, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 466 | OMAP3_MUX(MCSPI2_CS0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 467 | OMAP3_MUX(MCSPI2_CS1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 468 | |
| 469 | /* PENDOWN GPIO */ |
| 470 | OMAP3_MUX(ETK_D13, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), |
| 471 | |
| 472 | /* mUSB */ |
| 473 | OMAP3_MUX(HSUSB0_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 474 | OMAP3_MUX(HSUSB0_STP, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 475 | OMAP3_MUX(HSUSB0_DIR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 476 | OMAP3_MUX(HSUSB0_NXT, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 477 | OMAP3_MUX(HSUSB0_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 478 | OMAP3_MUX(HSUSB0_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 479 | OMAP3_MUX(HSUSB0_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 480 | OMAP3_MUX(HSUSB0_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 481 | OMAP3_MUX(HSUSB0_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 482 | OMAP3_MUX(HSUSB0_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 483 | OMAP3_MUX(HSUSB0_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 484 | OMAP3_MUX(HSUSB0_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 485 | |
| 486 | /* USB 1 */ |
| 487 | OMAP3_MUX(ETK_CTL, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), |
| 488 | OMAP3_MUX(ETK_CLK, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT), |
| 489 | OMAP3_MUX(ETK_D8, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), |
| 490 | OMAP3_MUX(ETK_D9, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), |
| 491 | OMAP3_MUX(ETK_D0, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), |
| 492 | OMAP3_MUX(ETK_D1, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), |
| 493 | OMAP3_MUX(ETK_D2, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), |
| 494 | OMAP3_MUX(ETK_D3, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), |
| 495 | OMAP3_MUX(ETK_D4, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), |
| 496 | OMAP3_MUX(ETK_D5, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), |
| 497 | OMAP3_MUX(ETK_D6, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), |
| 498 | OMAP3_MUX(ETK_D7, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), |
| 499 | |
| 500 | /* MMC 1 */ |
| 501 | OMAP3_MUX(SDMMC1_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 502 | OMAP3_MUX(SDMMC1_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 503 | OMAP3_MUX(SDMMC1_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 504 | OMAP3_MUX(SDMMC1_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 505 | OMAP3_MUX(SDMMC1_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 506 | OMAP3_MUX(SDMMC1_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 507 | OMAP3_MUX(SDMMC1_DAT4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 508 | OMAP3_MUX(SDMMC1_DAT5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 509 | OMAP3_MUX(SDMMC1_DAT6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 510 | OMAP3_MUX(SDMMC1_DAT7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 511 | |
| 512 | /* McBSP 2 */ |
| 513 | OMAP3_MUX(MCBSP2_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 514 | OMAP3_MUX(MCBSP2_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 515 | OMAP3_MUX(MCBSP2_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 516 | OMAP3_MUX(MCBSP2_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 517 | |
| 518 | /* I2C 1 */ |
| 519 | OMAP3_MUX(I2C1_SCL, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 520 | OMAP3_MUX(I2C1_SDA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 521 | |
| 522 | /* I2C 2 */ |
| 523 | OMAP3_MUX(I2C2_SCL, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 524 | OMAP3_MUX(I2C2_SDA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 525 | |
| 526 | /* I2C 3 */ |
| 527 | OMAP3_MUX(I2C3_SCL, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 528 | OMAP3_MUX(I2C3_SDA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 529 | |
| 530 | /* I2C 4 */ |
| 531 | OMAP3_MUX(I2C4_SCL, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 532 | OMAP3_MUX(I2C4_SDA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 533 | |
| 534 | /* serial ports */ |
| 535 | OMAP3_MUX(MCBSP3_CLKX, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT), |
| 536 | OMAP3_MUX(MCBSP3_FSX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), |
| 537 | OMAP3_MUX(UART1_TX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 538 | OMAP3_MUX(UART1_RX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 539 | |
| 540 | /* DSS */ |
| 541 | OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 542 | OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 543 | OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 544 | OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 545 | OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 546 | OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 547 | OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 548 | OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 549 | OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 550 | OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 551 | OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 552 | OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 553 | OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 554 | OMAP3_MUX(DSS_DATA9, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 555 | OMAP3_MUX(DSS_DATA10, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 556 | OMAP3_MUX(DSS_DATA11, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 557 | OMAP3_MUX(DSS_DATA12, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 558 | OMAP3_MUX(DSS_DATA13, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 559 | OMAP3_MUX(DSS_DATA14, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 560 | OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 561 | OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 562 | OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 563 | OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 564 | OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 565 | OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 566 | OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 567 | OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 568 | OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 569 | |
| 570 | /* expansion port */ |
| 571 | /* McSPI 1 */ |
| 572 | OMAP3_MUX(MCSPI1_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 573 | OMAP3_MUX(MCSPI1_SIMO, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 574 | OMAP3_MUX(MCSPI1_SOMI, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 575 | OMAP3_MUX(MCSPI1_CS0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), |
| 576 | OMAP3_MUX(MCSPI1_CS3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), |
| 577 | |
| 578 | /* HDQ */ |
| 579 | OMAP3_MUX(HDQ_SIO, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 580 | |
| 581 | /* McSPI4 */ |
| 582 | OMAP3_MUX(MCBSP1_CLKR, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), |
| 583 | OMAP3_MUX(MCBSP1_DX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), |
| 584 | OMAP3_MUX(MCBSP1_DR, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), |
| 585 | OMAP3_MUX(MCBSP1_FSX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT_PULLUP), |
| 586 | |
| 587 | /* MMC 2 */ |
| 588 | OMAP3_MUX(SDMMC2_DAT4, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT), |
| 589 | OMAP3_MUX(SDMMC2_DAT5, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT), |
| 590 | OMAP3_MUX(SDMMC2_DAT6, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT), |
| 591 | OMAP3_MUX(SDMMC2_DAT7, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), |
| 592 | |
| 593 | /* I2C3 */ |
| 594 | OMAP3_MUX(I2C3_SCL, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 595 | OMAP3_MUX(I2C3_SDA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 596 | |
| 597 | OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
| 598 | OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
| 599 | OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
| 600 | |
| 601 | OMAP3_MUX(GPMC_NCS7, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
| 602 | OMAP3_MUX(GPMC_NCS3, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
| 603 | |
| 604 | /* TPS IRQ */ |
| 605 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_WAKEUP_EN | \ |
| 606 | OMAP_PIN_INPUT_PULLUP), |
| 607 | |
| 608 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
| 609 | }; |
Tony Lindgren | c7ecea2 | 2011-03-11 11:39:51 -0800 | [diff] [blame] | 610 | #endif |
Thomas Weber | 018e075 | 2010-05-10 14:29:16 -0700 | [diff] [blame] | 611 | |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 612 | static void __init devkit8000_init(void) |
| 613 | { |
Thomas Weber | 018e075 | 2010-05-10 14:29:16 -0700 | [diff] [blame] | 614 | omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); |
Thomas Weber | faec32e | 2010-03-24 12:52:14 +0000 | [diff] [blame] | 615 | omap_serial_init(); |
Tony Lindgren | a4ca9db | 2011-08-22 23:57:23 -0700 | [diff] [blame] | 616 | omap_sdrc_init(mt46h32m32lf6_sdrc_params, |
| 617 | mt46h32m32lf6_sdrc_params); |
Thomas Weber | faec32e | 2010-03-24 12:52:14 +0000 | [diff] [blame] | 618 | |
| 619 | omap_dm9000_init(); |
| 620 | |
Tony Lindgren | 3b972bf | 2012-02-20 09:43:29 -0800 | [diff] [blame] | 621 | omap_hsmmc_init(mmc); |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 622 | devkit8000_i2c_init(); |
Tarun Kanti DebBarma | 46a0a54 | 2012-03-29 08:41:01 -0700 | [diff] [blame] | 623 | omap_dm9000_resources[2].start = gpio_to_irq(OMAP_DM9000_GPIO_IRQ); |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 624 | platform_add_devices(devkit8000_devices, |
| 625 | ARRAY_SIZE(devkit8000_devices)); |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 626 | |
Senthilvadivu Guruswamy | d5e1322 | 2011-02-22 11:24:50 +0200 | [diff] [blame] | 627 | omap_display_init(&devkit8000_dss_data); |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 628 | |
Mike Rapoport | 96974a2 | 2011-04-25 01:09:05 +0300 | [diff] [blame] | 629 | omap_ads7846_init(2, OMAP3_DEVKIT_TS_GPIO, 0, NULL); |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 630 | |
Kishon Vijay Abraham I | 51482be | 2013-02-06 18:58:50 +0530 | [diff] [blame] | 631 | usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); |
Mike Rapoport | 9e18630 | 2011-04-27 11:56:12 +0300 | [diff] [blame] | 632 | usb_musb_init(NULL); |
Keshava Munegowda | 9e64bb1 | 2011-03-01 20:08:19 +0530 | [diff] [blame] | 633 | usbhs_init(&usbhs_bdata); |
Afzal Mohammed | 2e61826 | 2012-02-29 18:11:56 +0530 | [diff] [blame] | 634 | board_nand_init(devkit8000_nand_partitions, |
| 635 | ARRAY_SIZE(devkit8000_nand_partitions), NAND_CS, |
| 636 | NAND_BUSWIDTH_16, NULL); |
Peter Ujfalusi | 40234bf | 2012-12-05 14:45:23 +0100 | [diff] [blame] | 637 | omap_twl4030_audio_init("omap3beagle", NULL); |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 638 | |
| 639 | /* Ensure SDRC pins are mux'd for self-refresh */ |
Thomas Weber | 3cdc6ee | 2010-03-24 12:52:12 +0000 | [diff] [blame] | 640 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
| 641 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 642 | } |
| 643 | |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 644 | MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000") |
Nicolas Pitre | 5e52b43 | 2011-07-05 22:38:15 -0400 | [diff] [blame] | 645 | .atag_offset = 0x100, |
Russell King | 71ee7da | 2010-05-23 10:18:16 +0100 | [diff] [blame] | 646 | .reserve = omap_reserve, |
Russell King - ARM Linux | 3dc3bad | 2011-02-14 15:40:20 -0800 | [diff] [blame] | 647 | .map_io = omap3_map_io, |
Tony Lindgren | 8f5b5a4 | 2011-08-22 23:57:24 -0700 | [diff] [blame] | 648 | .init_early = omap35xx_init_early, |
Tony Lindgren | be73246 | 2011-09-26 15:25:22 -0700 | [diff] [blame] | 649 | .init_irq = omap3_init_irq, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 650 | .init_machine = devkit8000_init, |
Shawn Guo | bbd707a | 2012-04-26 16:06:50 +0800 | [diff] [blame] | 651 | .init_late = omap35xx_init_late, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 652 | .init_time = omap3_secure_sync32k_timer_init, |
Paul Walmsley | 187e3e0 | 2012-10-29 20:56:12 -0600 | [diff] [blame] | 653 | .restart = omap3xxx_restart, |
Thomas Weber | 476544c | 2010-02-17 14:09:28 -0800 | [diff] [blame] | 654 | MACHINE_END |