Path: blob/master/arch/arm/mach-omap2/board-3430sdp.c
10817 views
/*1* linux/arch/arm/mach-omap2/board-3430sdp.c2*3* Copyright (C) 2007 Texas Instruments4*5* Modified from mach-omap2/board-generic.c6*7* Initial code: Syed Mohammed Khasim8*9* This program is free software; you can redistribute it and/or modify10* it under the terms of the GNU General Public License version 2 as11* published by the Free Software Foundation.12*/1314#include <linux/kernel.h>15#include <linux/init.h>16#include <linux/platform_device.h>17#include <linux/delay.h>18#include <linux/input.h>19#include <linux/input/matrix_keypad.h>20#include <linux/spi/spi.h>21#include <linux/i2c/twl.h>22#include <linux/regulator/machine.h>23#include <linux/io.h>24#include <linux/gpio.h>25#include <linux/mmc/host.h>2627#include <mach/hardware.h>28#include <asm/mach-types.h>29#include <asm/mach/arch.h>30#include <asm/mach/map.h>3132#include <plat/mcspi.h>33#include <plat/board.h>34#include <plat/usb.h>35#include <plat/common.h>36#include <plat/dma.h>37#include <plat/gpmc.h>38#include <video/omapdss.h>39#include <video/omap-panel-generic-dpi.h>4041#include <plat/gpmc-smc91x.h>4243#include "board-flash.h"44#include "mux.h"45#include "sdram-qimonda-hyb18m512160af-6.h"46#include "hsmmc.h"47#include "pm.h"48#include "control.h"49#include "common-board-devices.h"5051#define CONFIG_DISABLE_HFCLK 15253#define SDP3430_TS_GPIO_IRQ_SDPV1 354#define SDP3430_TS_GPIO_IRQ_SDPV2 25556#define ENABLE_VAUX3_DEDICATED 0x0357#define ENABLE_VAUX3_DEV_GRP 0x205859#define TWL4030_MSECURE_GPIO 226061static uint32_t board_keymap[] = {62KEY(0, 0, KEY_LEFT),63KEY(0, 1, KEY_RIGHT),64KEY(0, 2, KEY_A),65KEY(0, 3, KEY_B),66KEY(0, 4, KEY_C),67KEY(1, 0, KEY_DOWN),68KEY(1, 1, KEY_UP),69KEY(1, 2, KEY_E),70KEY(1, 3, KEY_F),71KEY(1, 4, KEY_G),72KEY(2, 0, KEY_ENTER),73KEY(2, 1, KEY_I),74KEY(2, 2, KEY_J),75KEY(2, 3, KEY_K),76KEY(2, 4, KEY_3),77KEY(3, 0, KEY_M),78KEY(3, 1, KEY_N),79KEY(3, 2, KEY_O),80KEY(3, 3, KEY_P),81KEY(3, 4, KEY_Q),82KEY(4, 0, KEY_R),83KEY(4, 1, KEY_4),84KEY(4, 2, KEY_T),85KEY(4, 3, KEY_U),86KEY(4, 4, KEY_D),87KEY(5, 0, KEY_V),88KEY(5, 1, KEY_W),89KEY(5, 2, KEY_L),90KEY(5, 3, KEY_S),91KEY(5, 4, KEY_H),92093};9495static struct matrix_keymap_data board_map_data = {96.keymap = board_keymap,97.keymap_size = ARRAY_SIZE(board_keymap),98};99100static struct twl4030_keypad_data sdp3430_kp_data = {101.keymap_data = &board_map_data,102.rows = 5,103.cols = 6,104.rep = 1,105};106107#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 8108#define SDP3430_LCD_PANEL_ENABLE_GPIO 5109110static struct gpio sdp3430_dss_gpios[] __initdata = {111{SDP3430_LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, "LCD reset" },112{SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"},113};114115static int lcd_enabled;116static int dvi_enabled;117118static void __init sdp3430_display_init(void)119{120int r;121122r = gpio_request_array(sdp3430_dss_gpios,123ARRAY_SIZE(sdp3430_dss_gpios));124if (r)125printk(KERN_ERR "failed to get LCD control GPIOs\n");126127}128129static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev)130{131if (dvi_enabled) {132printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");133return -EINVAL;134}135136gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1);137gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1);138139lcd_enabled = 1;140141return 0;142}143144static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev)145{146lcd_enabled = 0;147148gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0);149gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0);150}151152static int sdp3430_panel_enable_dvi(struct omap_dss_device *dssdev)153{154if (lcd_enabled) {155printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");156return -EINVAL;157}158159dvi_enabled = 1;160161return 0;162}163164static void sdp3430_panel_disable_dvi(struct omap_dss_device *dssdev)165{166dvi_enabled = 0;167}168169static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev)170{171return 0;172}173174static void sdp3430_panel_disable_tv(struct omap_dss_device *dssdev)175{176}177178179static struct omap_dss_device sdp3430_lcd_device = {180.name = "lcd",181.driver_name = "sharp_ls_panel",182.type = OMAP_DISPLAY_TYPE_DPI,183.phy.dpi.data_lines = 16,184.platform_enable = sdp3430_panel_enable_lcd,185.platform_disable = sdp3430_panel_disable_lcd,186};187188static struct panel_generic_dpi_data dvi_panel = {189.name = "generic",190.platform_enable = sdp3430_panel_enable_dvi,191.platform_disable = sdp3430_panel_disable_dvi,192};193194static struct omap_dss_device sdp3430_dvi_device = {195.name = "dvi",196.type = OMAP_DISPLAY_TYPE_DPI,197.driver_name = "generic_dpi_panel",198.data = &dvi_panel,199.phy.dpi.data_lines = 24,200};201202static struct omap_dss_device sdp3430_tv_device = {203.name = "tv",204.driver_name = "venc",205.type = OMAP_DISPLAY_TYPE_VENC,206.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,207.platform_enable = sdp3430_panel_enable_tv,208.platform_disable = sdp3430_panel_disable_tv,209};210211212static struct omap_dss_device *sdp3430_dss_devices[] = {213&sdp3430_lcd_device,214&sdp3430_dvi_device,215&sdp3430_tv_device,216};217218static struct omap_dss_board_info sdp3430_dss_data = {219.num_devices = ARRAY_SIZE(sdp3430_dss_devices),220.devices = sdp3430_dss_devices,221.default_device = &sdp3430_lcd_device,222};223224static struct omap_board_config_kernel sdp3430_config[] __initdata = {225};226227static void __init omap_3430sdp_init_early(void)228{229omap2_init_common_infrastructure();230omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);231}232233static int sdp3430_batt_table[] = {234/* 0 C*/23530800, 29500, 28300, 27100,23626000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,23717200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,23811600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,2398020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,2405640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,2414040, 3910, 3790, 3670, 3550242};243244static struct twl4030_bci_platform_data sdp3430_bci_data = {245.battery_tmp_tbl = sdp3430_batt_table,246.tblsize = ARRAY_SIZE(sdp3430_batt_table),247};248249static struct omap2_hsmmc_info mmc[] = {250{251.mmc = 1,252/* 8 bits (default) requires S6.3 == ON,253* so the SIM card isn't used; else 4 bits.254*/255.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,256.gpio_wp = 4,257},258{259.mmc = 2,260.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,261.gpio_wp = 7,262},263{} /* Terminator */264};265266static int sdp3430_twl_gpio_setup(struct device *dev,267unsigned gpio, unsigned ngpio)268{269/* gpio + 0 is "mmc0_cd" (input/IRQ),270* gpio + 1 is "mmc1_cd" (input/IRQ)271*/272mmc[0].gpio_cd = gpio + 0;273mmc[1].gpio_cd = gpio + 1;274omap2_hsmmc_init(mmc);275276/* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */277gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "sub_lcd_en_bkl");278279/* gpio + 15 is "sub_lcd_nRST" (output) */280gpio_request_one(gpio + 15, GPIOF_OUT_INIT_LOW, "sub_lcd_nRST");281282return 0;283}284285static struct twl4030_gpio_platform_data sdp3430_gpio_data = {286.gpio_base = OMAP_MAX_GPIO_LINES,287.irq_base = TWL4030_GPIO_IRQ_BASE,288.irq_end = TWL4030_GPIO_IRQ_END,289.pulldowns = BIT(2) | BIT(6) | BIT(8) | BIT(13)290| BIT(16) | BIT(17),291.setup = sdp3430_twl_gpio_setup,292};293294static struct twl4030_usb_data sdp3430_usb_data = {295.usb_mode = T2_USB_MODE_ULPI,296};297298static struct twl4030_madc_platform_data sdp3430_madc_data = {299.irq_line = 1,300};301302/* regulator consumer mappings */303304/* ads7846 on SPI */305static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = {306REGULATOR_SUPPLY("vcc", "spi1.0"),307};308309static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = {310REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),311};312313/* VPLL2 for digital video outputs */314static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {315REGULATOR_SUPPLY("vdds_dsi", "omapdss"),316REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),317};318319static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {320REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),321};322323static struct regulator_consumer_supply sdp3430_vsim_supplies[] = {324REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),325};326327static struct regulator_consumer_supply sdp3430_vmmc2_supplies[] = {328REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),329};330331/*332* Apply all the fixed voltages since most versions of U-Boot333* don't bother with that initialization.334*/335336/* VAUX1 for mainboard (irda and sub-lcd) */337static struct regulator_init_data sdp3430_vaux1 = {338.constraints = {339.min_uV = 2800000,340.max_uV = 2800000,341.apply_uV = true,342.valid_modes_mask = REGULATOR_MODE_NORMAL343| REGULATOR_MODE_STANDBY,344.valid_ops_mask = REGULATOR_CHANGE_MODE345| REGULATOR_CHANGE_STATUS,346},347};348349/* VAUX2 for camera module */350static struct regulator_init_data sdp3430_vaux2 = {351.constraints = {352.min_uV = 2800000,353.max_uV = 2800000,354.apply_uV = true,355.valid_modes_mask = REGULATOR_MODE_NORMAL356| REGULATOR_MODE_STANDBY,357.valid_ops_mask = REGULATOR_CHANGE_MODE358| REGULATOR_CHANGE_STATUS,359},360};361362/* VAUX3 for LCD board */363static struct regulator_init_data sdp3430_vaux3 = {364.constraints = {365.min_uV = 2800000,366.max_uV = 2800000,367.apply_uV = true,368.valid_modes_mask = REGULATOR_MODE_NORMAL369| REGULATOR_MODE_STANDBY,370.valid_ops_mask = REGULATOR_CHANGE_MODE371| REGULATOR_CHANGE_STATUS,372},373.num_consumer_supplies = ARRAY_SIZE(sdp3430_vaux3_supplies),374.consumer_supplies = sdp3430_vaux3_supplies,375};376377/* VAUX4 for OMAP VDD_CSI2 (camera) */378static struct regulator_init_data sdp3430_vaux4 = {379.constraints = {380.min_uV = 1800000,381.max_uV = 1800000,382.apply_uV = true,383.valid_modes_mask = REGULATOR_MODE_NORMAL384| REGULATOR_MODE_STANDBY,385.valid_ops_mask = REGULATOR_CHANGE_MODE386| REGULATOR_CHANGE_STATUS,387},388};389390/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */391static struct regulator_init_data sdp3430_vmmc1 = {392.constraints = {393.min_uV = 1850000,394.max_uV = 3150000,395.valid_modes_mask = REGULATOR_MODE_NORMAL396| REGULATOR_MODE_STANDBY,397.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE398| REGULATOR_CHANGE_MODE399| REGULATOR_CHANGE_STATUS,400},401.num_consumer_supplies = ARRAY_SIZE(sdp3430_vmmc1_supplies),402.consumer_supplies = sdp3430_vmmc1_supplies,403};404405/* VMMC2 for MMC2 card */406static struct regulator_init_data sdp3430_vmmc2 = {407.constraints = {408.min_uV = 1850000,409.max_uV = 1850000,410.apply_uV = true,411.valid_modes_mask = REGULATOR_MODE_NORMAL412| REGULATOR_MODE_STANDBY,413.valid_ops_mask = REGULATOR_CHANGE_MODE414| REGULATOR_CHANGE_STATUS,415},416.num_consumer_supplies = ARRAY_SIZE(sdp3430_vmmc2_supplies),417.consumer_supplies = sdp3430_vmmc2_supplies,418};419420/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */421static struct regulator_init_data sdp3430_vsim = {422.constraints = {423.min_uV = 1800000,424.max_uV = 3000000,425.valid_modes_mask = REGULATOR_MODE_NORMAL426| REGULATOR_MODE_STANDBY,427.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE428| REGULATOR_CHANGE_MODE429| REGULATOR_CHANGE_STATUS,430},431.num_consumer_supplies = ARRAY_SIZE(sdp3430_vsim_supplies),432.consumer_supplies = sdp3430_vsim_supplies,433};434435/* VDAC for DSS driving S-Video */436static struct regulator_init_data sdp3430_vdac = {437.constraints = {438.min_uV = 1800000,439.max_uV = 1800000,440.apply_uV = true,441.valid_modes_mask = REGULATOR_MODE_NORMAL442| REGULATOR_MODE_STANDBY,443.valid_ops_mask = REGULATOR_CHANGE_MODE444| REGULATOR_CHANGE_STATUS,445},446.num_consumer_supplies = ARRAY_SIZE(sdp3430_vdda_dac_supplies),447.consumer_supplies = sdp3430_vdda_dac_supplies,448};449450static struct regulator_init_data sdp3430_vpll2 = {451.constraints = {452.name = "VDVI",453.min_uV = 1800000,454.max_uV = 1800000,455.apply_uV = true,456.valid_modes_mask = REGULATOR_MODE_NORMAL457| REGULATOR_MODE_STANDBY,458.valid_ops_mask = REGULATOR_CHANGE_MODE459| REGULATOR_CHANGE_STATUS,460},461.num_consumer_supplies = ARRAY_SIZE(sdp3430_vpll2_supplies),462.consumer_supplies = sdp3430_vpll2_supplies,463};464465static struct twl4030_codec_audio_data sdp3430_audio;466467static struct twl4030_codec_data sdp3430_codec = {468.audio_mclk = 26000000,469.audio = &sdp3430_audio,470};471472static struct twl4030_platform_data sdp3430_twldata = {473.irq_base = TWL4030_IRQ_BASE,474.irq_end = TWL4030_IRQ_END,475476/* platform_data for children goes here */477.bci = &sdp3430_bci_data,478.gpio = &sdp3430_gpio_data,479.madc = &sdp3430_madc_data,480.keypad = &sdp3430_kp_data,481.usb = &sdp3430_usb_data,482.codec = &sdp3430_codec,483484.vaux1 = &sdp3430_vaux1,485.vaux2 = &sdp3430_vaux2,486.vaux3 = &sdp3430_vaux3,487.vaux4 = &sdp3430_vaux4,488.vmmc1 = &sdp3430_vmmc1,489.vmmc2 = &sdp3430_vmmc2,490.vsim = &sdp3430_vsim,491.vdac = &sdp3430_vdac,492.vpll2 = &sdp3430_vpll2,493};494495static int __init omap3430_i2c_init(void)496{497/* i2c1 for PMIC only */498omap3_pmic_init("twl4030", &sdp3430_twldata);499/* i2c2 on camera connector (for sensor control) and optional isp1301 */500omap_register_i2c_bus(2, 400, NULL, 0);501/* i2c3 on display connector (for DVI, tfp410) */502omap_register_i2c_bus(3, 400, NULL, 0);503return 0;504}505506#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)507508static struct omap_smc91x_platform_data board_smc91x_data = {509.cs = 3,510.flags = GPMC_MUX_ADD_DATA | GPMC_TIMINGS_SMC91C96 |511IORESOURCE_IRQ_LOWLEVEL,512};513514static void __init board_smc91x_init(void)515{516if (omap_rev() > OMAP3430_REV_ES1_0)517board_smc91x_data.gpio_irq = 6;518else519board_smc91x_data.gpio_irq = 29;520521gpmc_smc91x_init(&board_smc91x_data);522}523524#else525526static inline void board_smc91x_init(void)527{528}529530#endif531532static void enable_board_wakeup_source(void)533{534/* T2 interrupt line (keypad) */535omap_mux_init_signal("sys_nirq",536OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);537}538539static const struct usbhs_omap_board_data usbhs_bdata __initconst = {540541.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,542.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,543.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,544545.phy_reset = true,546.reset_gpio_port[0] = 57,547.reset_gpio_port[1] = 61,548.reset_gpio_port[2] = -EINVAL549};550551#ifdef CONFIG_OMAP_MUX552static struct omap_board_mux board_mux[] __initdata = {553{ .reg_offset = OMAP_MUX_TERMINATOR },554};555556static struct omap_device_pad serial1_pads[] __initdata = {557/*558* Note that off output enable is an active low559* signal. So setting this means pin is a560* input enabled in off mode561*/562OMAP_MUX_STATIC("uart1_cts.uart1_cts",563OMAP_PIN_INPUT |564OMAP_PIN_OFF_INPUT_PULLDOWN |565OMAP_OFFOUT_EN |566OMAP_MUX_MODE0),567OMAP_MUX_STATIC("uart1_rts.uart1_rts",568OMAP_PIN_OUTPUT |569OMAP_OFF_EN |570OMAP_MUX_MODE0),571OMAP_MUX_STATIC("uart1_rx.uart1_rx",572OMAP_PIN_INPUT |573OMAP_PIN_OFF_INPUT_PULLDOWN |574OMAP_OFFOUT_EN |575OMAP_MUX_MODE0),576OMAP_MUX_STATIC("uart1_tx.uart1_tx",577OMAP_PIN_OUTPUT |578OMAP_OFF_EN |579OMAP_MUX_MODE0),580};581582static struct omap_device_pad serial2_pads[] __initdata = {583OMAP_MUX_STATIC("uart2_cts.uart2_cts",584OMAP_PIN_INPUT_PULLUP |585OMAP_PIN_OFF_INPUT_PULLDOWN |586OMAP_OFFOUT_EN |587OMAP_MUX_MODE0),588OMAP_MUX_STATIC("uart2_rts.uart2_rts",589OMAP_PIN_OUTPUT |590OMAP_OFF_EN |591OMAP_MUX_MODE0),592OMAP_MUX_STATIC("uart2_rx.uart2_rx",593OMAP_PIN_INPUT |594OMAP_PIN_OFF_INPUT_PULLDOWN |595OMAP_OFFOUT_EN |596OMAP_MUX_MODE0),597OMAP_MUX_STATIC("uart2_tx.uart2_tx",598OMAP_PIN_OUTPUT |599OMAP_OFF_EN |600OMAP_MUX_MODE0),601};602603static struct omap_device_pad serial3_pads[] __initdata = {604OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx",605OMAP_PIN_INPUT_PULLDOWN |606OMAP_PIN_OFF_INPUT_PULLDOWN |607OMAP_OFFOUT_EN |608OMAP_MUX_MODE0),609OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd",610OMAP_PIN_OUTPUT |611OMAP_OFF_EN |612OMAP_MUX_MODE0),613OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx",614OMAP_PIN_INPUT |615OMAP_PIN_OFF_INPUT_PULLDOWN |616OMAP_OFFOUT_EN |617OMAP_MUX_MODE0),618OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx",619OMAP_PIN_OUTPUT |620OMAP_OFF_EN |621OMAP_MUX_MODE0),622};623624static struct omap_board_data serial1_data __initdata = {625.id = 0,626.pads = serial1_pads,627.pads_cnt = ARRAY_SIZE(serial1_pads),628};629630static struct omap_board_data serial2_data __initdata = {631.id = 1,632.pads = serial2_pads,633.pads_cnt = ARRAY_SIZE(serial2_pads),634};635636static struct omap_board_data serial3_data __initdata = {637.id = 2,638.pads = serial3_pads,639.pads_cnt = ARRAY_SIZE(serial3_pads),640};641642static inline void board_serial_init(void)643{644omap_serial_init_port(&serial1_data);645omap_serial_init_port(&serial2_data);646omap_serial_init_port(&serial3_data);647}648#else649#define board_mux NULL650651static inline void board_serial_init(void)652{653omap_serial_init();654}655#endif656657/*658* SDP3430 V2 Board CS organization659* Different from SDP3430 V1. Now 4 switches used to specify CS660*661* See also the Switch S8 settings in the comments.662*/663static char chip_sel_3430[][GPMC_CS_NUM] = {664{PDC_NOR, PDC_NAND, PDC_ONENAND, DBG_MPDB, 0, 0, 0, 0}, /* S8:1111 */665{PDC_ONENAND, PDC_NAND, PDC_NOR, DBG_MPDB, 0, 0, 0, 0}, /* S8:1110 */666{PDC_NAND, PDC_ONENAND, PDC_NOR, DBG_MPDB, 0, 0, 0, 0}, /* S8:1101 */667};668669static struct mtd_partition sdp_nor_partitions[] = {670/* bootloader (U-Boot, etc) in first sector */671{672.name = "Bootloader-NOR",673.offset = 0,674.size = SZ_256K,675.mask_flags = MTD_WRITEABLE, /* force read-only */676},677/* bootloader params in the next sector */678{679.name = "Params-NOR",680.offset = MTDPART_OFS_APPEND,681.size = SZ_256K,682.mask_flags = 0,683},684/* kernel */685{686.name = "Kernel-NOR",687.offset = MTDPART_OFS_APPEND,688.size = SZ_2M,689.mask_flags = 0690},691/* file system */692{693.name = "Filesystem-NOR",694.offset = MTDPART_OFS_APPEND,695.size = MTDPART_SIZ_FULL,696.mask_flags = 0697}698};699700static struct mtd_partition sdp_onenand_partitions[] = {701{702.name = "X-Loader-OneNAND",703.offset = 0,704.size = 4 * (64 * 2048),705.mask_flags = MTD_WRITEABLE /* force read-only */706},707{708.name = "U-Boot-OneNAND",709.offset = MTDPART_OFS_APPEND,710.size = 2 * (64 * 2048),711.mask_flags = MTD_WRITEABLE /* force read-only */712},713{714.name = "U-Boot Environment-OneNAND",715.offset = MTDPART_OFS_APPEND,716.size = 1 * (64 * 2048),717},718{719.name = "Kernel-OneNAND",720.offset = MTDPART_OFS_APPEND,721.size = 16 * (64 * 2048),722},723{724.name = "File System-OneNAND",725.offset = MTDPART_OFS_APPEND,726.size = MTDPART_SIZ_FULL,727},728};729730static struct mtd_partition sdp_nand_partitions[] = {731/* All the partition sizes are listed in terms of NAND block size */732{733.name = "X-Loader-NAND",734.offset = 0,735.size = 4 * (64 * 2048),736.mask_flags = MTD_WRITEABLE, /* force read-only */737},738{739.name = "U-Boot-NAND",740.offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */741.size = 10 * (64 * 2048),742.mask_flags = MTD_WRITEABLE, /* force read-only */743},744{745.name = "Boot Env-NAND",746747.offset = MTDPART_OFS_APPEND, /* Offset = 0x1c0000 */748.size = 6 * (64 * 2048),749},750{751.name = "Kernel-NAND",752.offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */753.size = 40 * (64 * 2048),754},755{756.name = "File System - NAND",757.size = MTDPART_SIZ_FULL,758.offset = MTDPART_OFS_APPEND, /* Offset = 0x780000 */759},760};761762static struct flash_partitions sdp_flash_partitions[] = {763{764.parts = sdp_nor_partitions,765.nr_parts = ARRAY_SIZE(sdp_nor_partitions),766},767{768.parts = sdp_onenand_partitions,769.nr_parts = ARRAY_SIZE(sdp_onenand_partitions),770},771{772.parts = sdp_nand_partitions,773.nr_parts = ARRAY_SIZE(sdp_nand_partitions),774},775};776777static void __init omap_3430sdp_init(void)778{779int gpio_pendown;780781omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);782omap_board_config = sdp3430_config;783omap_board_config_size = ARRAY_SIZE(sdp3430_config);784omap3430_i2c_init();785omap_display_init(&sdp3430_dss_data);786if (omap_rev() > OMAP3430_REV_ES1_0)787gpio_pendown = SDP3430_TS_GPIO_IRQ_SDPV2;788else789gpio_pendown = SDP3430_TS_GPIO_IRQ_SDPV1;790omap_ads7846_init(1, gpio_pendown, 310, NULL);791board_serial_init();792usb_musb_init(NULL);793board_smc91x_init();794board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);795sdp3430_display_init();796enable_board_wakeup_source();797usbhs_init(&usbhs_bdata);798}799800MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")801/* Maintainer: Syed Khasim - Texas Instruments Inc */802.boot_params = 0x80000100,803.reserve = omap_reserve,804.map_io = omap3_map_io,805.init_early = omap_3430sdp_init_early,806.init_irq = omap_init_irq,807.init_machine = omap_3430sdp_init,808.timer = &omap_timer,809MACHINE_END810811812