|
@@ -0,0 +1,163 @@
|
|
|
+/*
|
|
|
+ * linux/arch/arm/mach-omap2/board-omap3evm.c
|
|
|
+ *
|
|
|
+ * Copyright (C) 2008 Guangzhou EMA-Tech
|
|
|
+ *
|
|
|
+ * Modified from mach-omap2/board-omap3evm.c
|
|
|
+ *
|
|
|
+ * Initial code: Syed Mohammed Khasim
|
|
|
+ *
|
|
|
+ * This program is free software; you can redistribute it and/or modify
|
|
|
+ * it under the terms of the GNU General Public License version 2 as
|
|
|
+ * published by the Free Software Foundation.
|
|
|
+ */
|
|
|
+
|
|
|
+#include <linux/kernel.h>
|
|
|
+#include <linux/init.h>
|
|
|
+#include <linux/platform_device.h>
|
|
|
+#include <linux/delay.h>
|
|
|
+#include <linux/err.h>
|
|
|
+#include <linux/clk.h>
|
|
|
+#include <linux/io.h>
|
|
|
+#include <linux/leds.h>
|
|
|
+#include <linux/gpio.h>
|
|
|
+#include <linux/input.h>
|
|
|
+#include <linux/gpio_keys.h>
|
|
|
+
|
|
|
+#include <linux/regulator/fixed.h>
|
|
|
+#include <linux/regulator/machine.h>
|
|
|
+#include <linux/i2c/twl.h>
|
|
|
+#include <linux/mmc/host.h>
|
|
|
+#include <linux/input/matrix_keypad.h>
|
|
|
+#include <linux/spi/spi.h>
|
|
|
+#include <linux/interrupt.h>
|
|
|
+#include <linux/smsc911x.h>
|
|
|
+#include <linux/i2c/at24.h>
|
|
|
+
|
|
|
+#include <asm/mach-types.h>
|
|
|
+#include <asm/mach/arch.h>
|
|
|
+#include <asm/mach/map.h>
|
|
|
+#include <asm/mach/flash.h>
|
|
|
+
|
|
|
+#include "common.h"
|
|
|
+#include "gpmc.h"
|
|
|
+#include <linux/platform_data/mtd-nand-omap2.h>
|
|
|
+#include <video/omapdss.h>
|
|
|
+#include <video/omap-panel-generic-dpi.h>
|
|
|
+#include <video/omap-panel-tfp410.h>
|
|
|
+
|
|
|
+#include <linux/platform_data/spi-omap2-mcspi.h>
|
|
|
+
|
|
|
+#include "sdram-micron-mt46h32m32lf-6.h"
|
|
|
+#include "mux.h"
|
|
|
+#include "hsmmc.h"
|
|
|
+#include "common-board-devices.h"
|
|
|
+
|
|
|
+#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
|
|
|
+#include "gpmc-smsc911x.h"
|
|
|
+
|
|
|
+#define OMAP3STALKER_ETHR_START 0x2c000000
|
|
|
+#define OMAP3STALKER_ETHR_SIZE 1024
|
|
|
+#define OMAP3STALKER_ETHR_GPIO_IRQ 19
|
|
|
+#define OMAP3STALKER_SMC911X_CS 5
|
|
|
+
|
|
|
+static struct omap_smsc911x_platform_data smsc911x_cfg = {
|
|
|
+ .cs = OMAP3STALKER_SMC911X_CS,
|
|
|
+ .gpio_irq = OMAP3STALKER_ETHR_GPIO_IRQ,
|
|
|
+ .gpio_reset = -EINVAL,
|
|
|
+ .flags = (SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS),
|
|
|
+};
|
|
|
+
|
|
|
+static inline void __init omap3stalker_init_eth(void)
|
|
|
+{
|
|
|
+ omap_mux_init_gpio(19, OMAP_PIN_INPUT_PULLUP);
|
|
|
+ gpmc_smsc911x_init(&smsc911x_cfg);
|
|
|
+}
|
|
|
+
|
|
|
+#else
|
|
|
+static inline void __init omap3stalker_init_eth(void)
|
|
|
+{
|
|
|
+ return;
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+/*
|
|
|
+ * OMAP3 DSS control signals
|
|
|
+ */
|
|
|
+
|
|
|
+#define DSS_ENABLE_GPIO 199
|
|
|
+#define LCD_PANEL_BKLIGHT_GPIO 210
|
|
|
+#define ENABLE_VPLL2_DEV_GRP 0xE0
|
|
|
+
|
|
|
+static void __init omap3_stalker_display_init(void)
|
|
|
+{
|
|
|
+ return;
|
|
|
+}
|
|
|
+
|
|
|
+static int omap3_stalker_enable_tv(struct omap_dss_device *dssdev)
|
|
|
+{
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static void omap3_stalker_disable_tv(struct omap_dss_device *dssdev)
|
|
|
+{
|
|
|
+}
|
|
|
+
|
|
|
+static struct omap_dss_device omap3_stalker_tv_device = {
|
|
|
+ .name = "tv",
|
|
|
+ .driver_name = "venc",
|
|
|
+ .type = OMAP_DISPLAY_TYPE_VENC,
|
|
|
+#if defined(CONFIG_OMAP2_VENC_OUT_TYPE_SVIDEO)
|
|
|
+ .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
|
|
|
+#elif defined(CONFIG_OMAP2_VENC_OUT_TYPE_COMPOSITE)
|
|
|
+ .u.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE,
|
|
|
+#endif
|
|
|
+ .platform_enable = omap3_stalker_enable_tv,
|
|
|
+ .platform_disable = omap3_stalker_disable_tv,
|
|
|
+};
|
|
|
+
|
|
|
+static struct tfp410_platform_data dvi_panel = {
|
|
|
+ .power_down_gpio = DSS_ENABLE_GPIO,
|
|
|
+ .i2c_bus_num = -1,
|
|
|
+};
|
|
|
+
|
|
|
+static struct omap_dss_device omap3_stalker_dvi_device = {
|
|
|
+ .name = "dvi",
|
|
|
+ .type = OMAP_DISPLAY_TYPE_DPI,
|
|
|
+ .driver_name = "tfp410",
|
|
|
+ .data = &dvi_panel,
|
|
|
+ .phy.dpi.data_lines = 24,
|
|
|
+};
|
|
|
+
|
|
|
+static struct omap_dss_device *omap3_stalker_dss_devices[] = {
|
|
|
+ &omap3_stalker_tv_device,
|
|
|
+ &omap3_stalker_dvi_device,
|
|
|
+};
|
|
|
+
|
|
|
+static struct omap_dss_board_info omap3_stalker_dss_data = {
|
|
|
+ .num_devices = ARRAY_SIZE(omap3_stalker_dss_devices),
|
|
|
+ .devices = omap3_stalker_dss_devices,
|
|
|
+ .default_device = &omap3_stalker_dvi_device,
|
|
|
+};
|
|
|
+
|
|
|
+static struct regulator_consumer_supply omap3stalker_vmmc1_supply[] = {
|
|
|
+ REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
|
|
|
+};
|
|
|
+
|
|
|
+static struct regulator_consumer_supply omap3stalker_vsim_supply[] = {
|
|
|
+ REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
|
|
|
+};
|
|
|
+
|
|
|
+/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
|
|
|
+static struct regulator_init_data omap3stalker_vmmc1 = {
|
|
|
+ .constraints = {
|
|
|
+ .min_uV = 1850000,
|
|
|
+ .max_uV = 3150000,
|
|
|
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
|
|
+ | REGULATOR_MODE_STANDBY,
|
|
|
+ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
|
|
+ | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
|
|
|
+ },
|
|
|
+ .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vmmc1_supply),
|
|
|
+ .consumer_supplies = omap3stalker_vmmc1_supply,
|
|
|
+};
|