mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge branch 'for-paul' of git://gitorious.org/linux-omap-dss2/linux
Conflicts: arch/arm/mach-omap2/board-overo.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
commit
da49252fb0
51 files changed
+5332
-1371
No files matched your search
+2
-2
@@ -4542,14 +4542,14 @@ S: Maintained
|
||||
F: sound/soc/omap/
|
||||
|
||||
OMAP FRAMEBUFFER SUPPORT
|
||||
M: Tomi Valkeinen <tomi.valkeinen@nokia.com>
|
||||
M: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
||||
L: linux-fbdev@vger.kernel.org
|
||||
L: linux-omap@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/video/omap/
|
||||
|
||||
OMAP DISPLAY SUBSYSTEM and FRAMEBUFFER SUPPORT (DSS2)
|
||||
M: Tomi Valkeinen <tomi.valkeinen@nokia.com>
|
||||
M: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
||||
L: linux-omap@vger.kernel.org
|
||||
L: linux-fbdev@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
@@ -193,6 +193,17 @@ CONFIG_FIRMWARE_EDID=y
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
CONFIG_FB_TILEBLITTING=y
|
||||
CONFIG_FB_OMAP_LCD_VGA=y
|
||||
CONFIG_OMAP2_DSS=m
|
||||
CONFIG_OMAP2_DSS_RFBI=y
|
||||
CONFIG_OMAP2_DSS_SDI=y
|
||||
CONFIG_OMAP2_DSS_DSI=y
|
||||
CONFIG_FB_OMAP2=m
|
||||
CONFIG_PANEL_GENERIC_DPI=m
|
||||
CONFIG_PANEL_SHARP_LS037V7DW01=m
|
||||
CONFIG_PANEL_NEC_NL8048HL11_01B=m
|
||||
CONFIG_PANEL_TAAL=m
|
||||
CONFIG_PANEL_TPO_TD043MTEA1=m
|
||||
CONFIG_PANEL_ACX565AKM=m
|
||||
CONFIG_BACKLIGHT_LCD_SUPPORT=y
|
||||
CONFIG_LCD_CLASS_DEVICE=y
|
||||
CONFIG_LCD_PLATFORM=y
|
||||
|
||||
@@ -307,9 +307,6 @@ static struct omap_dss_board_info sdp3430_dss_data = {
|
||||
.default_device = &sdp3430_lcd_device,
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply sdp3430_vdda_dac_supply =
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss");
|
||||
|
||||
static struct omap_board_config_kernel sdp3430_config[] __initdata = {
|
||||
};
|
||||
|
||||
@@ -398,12 +395,13 @@ static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = {
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = {
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
};
|
||||
|
||||
/* VPLL2 for digital video outputs */
|
||||
static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <plat/usb.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <plat/omap4-keypad.h>
|
||||
#include <plat/display.h>
|
||||
|
||||
#include "mux.h"
|
||||
#include "hsmmc.h"
|
||||
@@ -47,6 +48,8 @@
|
||||
#define ETH_KS8851_QUART 138
|
||||
#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
|
||||
#define OMAP4_SFH7741_ENABLE_GPIO 188
|
||||
#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
|
||||
#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
|
||||
|
||||
static const int sdp4430_keymap[] = {
|
||||
KEY(0, 0, KEY_E),
|
||||
@@ -621,6 +624,76 @@ static void __init omap_sfh7741prox_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void sdp4430_hdmi_mux_init(void)
|
||||
{
|
||||
/* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
|
||||
omap_mux_init_signal("hdmi_hpd",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("hdmi_cec",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
/* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
|
||||
omap_mux_init_signal("hdmi_ddc_scl",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("hdmi_ddc_sda",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
|
||||
static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev)
|
||||
{
|
||||
int status;
|
||||
|
||||
status = gpio_request_one(HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH,
|
||||
"hdmi_gpio_hpd");
|
||||
if (status) {
|
||||
pr_err("Cannot request GPIO %d\n", HDMI_GPIO_HPD);
|
||||
return status;
|
||||
}
|
||||
status = gpio_request_one(HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH,
|
||||
"hdmi_gpio_ls_oe");
|
||||
if (status) {
|
||||
pr_err("Cannot request GPIO %d\n", HDMI_GPIO_LS_OE);
|
||||
goto error1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
error1:
|
||||
gpio_free(HDMI_GPIO_HPD);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_free(HDMI_GPIO_LS_OE);
|
||||
gpio_free(HDMI_GPIO_HPD);
|
||||
}
|
||||
|
||||
static struct omap_dss_device sdp4430_hdmi_device = {
|
||||
.name = "hdmi",
|
||||
.driver_name = "hdmi_panel",
|
||||
.type = OMAP_DISPLAY_TYPE_HDMI,
|
||||
.platform_enable = sdp4430_panel_enable_hdmi,
|
||||
.platform_disable = sdp4430_panel_disable_hdmi,
|
||||
.channel = OMAP_DSS_CHANNEL_DIGIT,
|
||||
};
|
||||
|
||||
static struct omap_dss_device *sdp4430_dss_devices[] = {
|
||||
&sdp4430_hdmi_device,
|
||||
};
|
||||
|
||||
static struct omap_dss_board_info sdp4430_dss_data = {
|
||||
.num_devices = ARRAY_SIZE(sdp4430_dss_devices),
|
||||
.devices = sdp4430_dss_devices,
|
||||
.default_device = &sdp4430_hdmi_device,
|
||||
};
|
||||
|
||||
void omap_4430sdp_display_init(void)
|
||||
{
|
||||
sdp4430_hdmi_mux_init();
|
||||
omap_display_init(&sdp4430_dss_data);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OMAP_MUX
|
||||
static struct omap_board_mux board_mux[] __initdata = {
|
||||
OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
|
||||
@@ -729,6 +802,8 @@ static void __init omap_4430sdp_init(void)
|
||||
status = omap4_keyboard_init(&sdp4430_keypad_data);
|
||||
if (status)
|
||||
pr_err("Keypad initialization failed: %d\n", status);
|
||||
|
||||
omap_4430sdp_display_init();
|
||||
}
|
||||
|
||||
static void __init omap_4430sdp_map_io(void)
|
||||
|
||||
@@ -488,7 +488,7 @@ static struct regulator_consumer_supply cm_t35_vsim_supply = {
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply cm_t35_vdac_supply =
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss");
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
|
||||
|
||||
static struct regulator_consumer_supply cm_t35_vdvi_supply =
|
||||
REGULATOR_SUPPLY("vdvi", "omapdss");
|
||||
|
||||
@@ -196,7 +196,7 @@ static struct omap_dss_board_info devkit8000_dss_data = {
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply devkit8000_vdda_dac_supply =
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss");
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
|
||||
|
||||
static uint32_t board_keymap[] = {
|
||||
KEY(0, 0, KEY_1),
|
||||
@@ -277,8 +277,10 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
|
||||
.setup = devkit8000_twl_gpio_setup,
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply devkit8000_vpll1_supply =
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss");
|
||||
static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = {
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
};
|
||||
|
||||
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
|
||||
static struct regulator_init_data devkit8000_vmmc1 = {
|
||||
@@ -319,8 +321,8 @@ static struct regulator_init_data devkit8000_vpll1 = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &devkit8000_vpll1_supply,
|
||||
.num_consumer_supplies = ARRAY_SIZE(devkit8000_vpll1_supplies),
|
||||
.consumer_supplies = devkit8000_vpll1_supplies,
|
||||
};
|
||||
|
||||
/* VAUX4 for ads7846 and nubs */
|
||||
|
||||
@@ -485,8 +485,10 @@ static struct omap_dss_board_info igep2_dss_data = {
|
||||
.default_device = &igep2_dvi_device,
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply igep2_vpll2_supply =
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss");
|
||||
static struct regulator_consumer_supply igep2_vpll2_supplies[] = {
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
};
|
||||
|
||||
static struct regulator_init_data igep2_vpll2 = {
|
||||
.constraints = {
|
||||
@@ -499,8 +501,8 @@ static struct regulator_init_data igep2_vpll2 = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &igep2_vpll2_supply,
|
||||
.num_consumer_supplies = ARRAY_SIZE(igep2_vpll2_supplies),
|
||||
.consumer_supplies = igep2_vpll2_supplies,
|
||||
};
|
||||
|
||||
static void __init igep2_display_init(void)
|
||||
|
||||
@@ -232,10 +232,12 @@ static struct omap_dss_board_info beagle_dss_data = {
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply beagle_vdac_supply =
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss");
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
|
||||
|
||||
static struct regulator_consumer_supply beagle_vdvi_supply =
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss");
|
||||
static struct regulator_consumer_supply beagle_vdvi_supplies[] = {
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
};
|
||||
|
||||
static void __init beagle_display_init(void)
|
||||
{
|
||||
@@ -422,8 +424,8 @@ static struct regulator_init_data beagle_vpll2 = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &beagle_vdvi_supply,
|
||||
.num_consumer_supplies = ARRAY_SIZE(beagle_vdvi_supplies),
|
||||
.consumer_supplies = beagle_vdvi_supplies,
|
||||
};
|
||||
|
||||
static struct twl4030_usb_data beagle_usb_data = {
|
||||
|
||||
@@ -542,7 +542,7 @@ static struct twl4030_codec_data omap3evm_codec_data = {
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply omap3_evm_vdda_dac_supply =
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss");
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
|
||||
|
||||
/* VDAC for DSS driving S-Video */
|
||||
static struct regulator_init_data omap3_evm_vdac = {
|
||||
@@ -560,8 +560,10 @@ static struct regulator_init_data omap3_evm_vdac = {
|
||||
};
|
||||
|
||||
/* VPLL2 for digital video outputs */
|
||||
static struct regulator_consumer_supply omap3_evm_vpll2_supply =
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss");
|
||||
static struct regulator_consumer_supply omap3_evm_vpll2_supplies[] = {
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
};
|
||||
|
||||
static struct regulator_init_data omap3_evm_vpll2 = {
|
||||
.constraints = {
|
||||
@@ -573,8 +575,8 @@ static struct regulator_init_data omap3_evm_vpll2 = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &omap3_evm_vpll2_supply,
|
||||
.num_consumer_supplies = ARRAY_SIZE(omap3_evm_vpll2_supplies),
|
||||
.consumer_supplies = omap3_evm_vpll2_supplies,
|
||||
};
|
||||
|
||||
/* ads7846 on SPI */
|
||||
|
||||
@@ -342,11 +342,12 @@ static struct regulator_consumer_supply pandora_vmmc3_supply =
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2");
|
||||
|
||||
static struct regulator_consumer_supply pandora_vdda_dac_supply =
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss");
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
|
||||
|
||||
static struct regulator_consumer_supply pandora_vdds_supplies[] = {
|
||||
REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply pandora_vcc_lcd_supply =
|
||||
|
||||
@@ -439,7 +439,7 @@ static struct twl4030_codec_data omap3stalker_codec_data = {
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply =
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss");
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
|
||||
|
||||
/* VDAC for DSS driving S-Video */
|
||||
static struct regulator_init_data omap3_stalker_vdac = {
|
||||
@@ -457,8 +457,10 @@ static struct regulator_init_data omap3_stalker_vdac = {
|
||||
};
|
||||
|
||||
/* VPLL2 for digital video outputs */
|
||||
static struct regulator_consumer_supply omap3_stalker_vpll2_supply =
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss");
|
||||
static struct regulator_consumer_supply omap3_stalker_vpll2_supplies[] = {
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
};
|
||||
|
||||
static struct regulator_init_data omap3_stalker_vpll2 = {
|
||||
.constraints = {
|
||||
@@ -471,8 +473,8 @@ static struct regulator_init_data omap3_stalker_vpll2 = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &omap3_stalker_vpll2_supply,
|
||||
.num_consumer_supplies = ARRAY_SIZE(omap3_stalker_vpll2_supplies),
|
||||
.consumer_supplies = omap3_stalker_vpll2_supplies,
|
||||
};
|
||||
|
||||
static struct twl4030_platform_data omap3stalker_twldata = {
|
||||
|
||||
@@ -34,11 +34,13 @@
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <plat/display.h>
|
||||
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <plat/panel-generic-dpi.h>
|
||||
#include "timer-gp.h"
|
||||
|
||||
#include "hsmmc.h"
|
||||
@@ -49,6 +51,8 @@
|
||||
#define GPIO_HUB_NRESET 62
|
||||
#define GPIO_WIFI_PMENA 43
|
||||
#define GPIO_WIFI_IRQ 53
|
||||
#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
|
||||
#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
|
||||
|
||||
/* wl127x BT, FM, GPS connectivity chip */
|
||||
static int wl1271_gpios[] = {46, -1, -1};
|
||||
@@ -433,6 +437,17 @@ static struct i2c_board_info __initdata omap4_panda_i2c_boardinfo[] = {
|
||||
.platform_data = &omap4_panda_twldata,
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* Display monitor features are burnt in their EEPROM as EDID data. The EEPROM
|
||||
* is connected as I2C slave device, and can be accessed at address 0x50
|
||||
*/
|
||||
static struct i2c_board_info __initdata panda_i2c_eeprom[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("eeprom", 0x50),
|
||||
},
|
||||
};
|
||||
|
||||
static int __init omap4_panda_i2c_init(void)
|
||||
{
|
||||
/*
|
||||
@@ -442,7 +457,12 @@ static int __init omap4_panda_i2c_init(void)
|
||||
omap_register_i2c_bus(1, 400, omap4_panda_i2c_boardinfo,
|
||||
ARRAY_SIZE(omap4_panda_i2c_boardinfo));
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
omap_register_i2c_bus(3, 400, NULL, 0);
|
||||
/*
|
||||
* Bus 3 is attached to the DVI port where devices like the pico DLP
|
||||
* projector don't work reliably with 400kHz
|
||||
*/
|
||||
omap_register_i2c_bus(3, 100, panda_i2c_eeprom,
|
||||
ARRAY_SIZE(panda_i2c_eeprom));
|
||||
omap_register_i2c_bus(4, 400, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
@@ -462,6 +482,64 @@ static struct omap_board_mux board_mux[] __initdata = {
|
||||
OMAP4_MUX(SDMMC5_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
|
||||
OMAP4_MUX(SDMMC5_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
|
||||
OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
|
||||
/* gpio 0 - TFP410 PD */
|
||||
OMAP4_MUX(KPD_COL1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
|
||||
/* dispc2_data23 */
|
||||
OMAP4_MUX(USBB2_ULPITLL_STP, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data22 */
|
||||
OMAP4_MUX(USBB2_ULPITLL_DIR, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data21 */
|
||||
OMAP4_MUX(USBB2_ULPITLL_NXT, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data20 */
|
||||
OMAP4_MUX(USBB2_ULPITLL_DAT0, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data19 */
|
||||
OMAP4_MUX(USBB2_ULPITLL_DAT1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data18 */
|
||||
OMAP4_MUX(USBB2_ULPITLL_DAT2, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data15 */
|
||||
OMAP4_MUX(USBB2_ULPITLL_DAT3, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data14 */
|
||||
OMAP4_MUX(USBB2_ULPITLL_DAT4, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data13 */
|
||||
OMAP4_MUX(USBB2_ULPITLL_DAT5, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data12 */
|
||||
OMAP4_MUX(USBB2_ULPITLL_DAT6, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data11 */
|
||||
OMAP4_MUX(USBB2_ULPITLL_DAT7, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data10 */
|
||||
OMAP4_MUX(DPM_EMU3, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data9 */
|
||||
OMAP4_MUX(DPM_EMU4, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data16 */
|
||||
OMAP4_MUX(DPM_EMU5, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data17 */
|
||||
OMAP4_MUX(DPM_EMU6, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_hsync */
|
||||
OMAP4_MUX(DPM_EMU7, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_pclk */
|
||||
OMAP4_MUX(DPM_EMU8, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_vsync */
|
||||
OMAP4_MUX(DPM_EMU9, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_de */
|
||||
OMAP4_MUX(DPM_EMU10, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data8 */
|
||||
OMAP4_MUX(DPM_EMU11, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data7 */
|
||||
OMAP4_MUX(DPM_EMU12, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data6 */
|
||||
OMAP4_MUX(DPM_EMU13, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data5 */
|
||||
OMAP4_MUX(DPM_EMU14, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data4 */
|
||||
OMAP4_MUX(DPM_EMU15, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data3 */
|
||||
OMAP4_MUX(DPM_EMU16, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data2 */
|
||||
OMAP4_MUX(DPM_EMU17, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data1 */
|
||||
OMAP4_MUX(DPM_EMU18, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
/* dispc2_data0 */
|
||||
OMAP4_MUX(DPM_EMU19, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
|
||||
{ .reg_offset = OMAP_MUX_TERMINATOR },
|
||||
};
|
||||
|
||||
@@ -535,6 +613,128 @@ static inline void board_serial_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Display DVI */
|
||||
#define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0
|
||||
|
||||
static int omap4_panda_enable_dvi(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_set_value(dssdev->reset_gpio, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_set_value(dssdev->reset_gpio, 0);
|
||||
}
|
||||
|
||||
/* Using generic display panel */
|
||||
static struct panel_generic_dpi_data omap4_dvi_panel = {
|
||||
.name = "generic",
|
||||
.platform_enable = omap4_panda_enable_dvi,
|
||||
.platform_disable = omap4_panda_disable_dvi,
|
||||
};
|
||||
|
||||
struct omap_dss_device omap4_panda_dvi_device = {
|
||||
.type = OMAP_DISPLAY_TYPE_DPI,
|
||||
.name = "dvi",
|
||||
.driver_name = "generic_dpi_panel",
|
||||
.data = &omap4_dvi_panel,
|
||||
.phy.dpi.data_lines = 24,
|
||||
.reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
|
||||
.channel = OMAP_DSS_CHANNEL_LCD2,
|
||||
};
|
||||
|
||||
int __init omap4_panda_dvi_init(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
/* Requesting TFP410 DVI GPIO and disabling it, at bootup */
|
||||
r = gpio_request_one(omap4_panda_dvi_device.reset_gpio,
|
||||
GPIOF_OUT_INIT_LOW, "DVI PD");
|
||||
if (r)
|
||||
pr_err("Failed to get DVI powerdown GPIO\n");
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
static void omap4_panda_hdmi_mux_init(void)
|
||||
{
|
||||
/* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
|
||||
omap_mux_init_signal("hdmi_hpd",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("hdmi_cec",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
/* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
|
||||
omap_mux_init_signal("hdmi_ddc_scl",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("hdmi_ddc_sda",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
|
||||
static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev)
|
||||
{
|
||||
int status;
|
||||
|
||||
status = gpio_request_one(HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH,
|
||||
"hdmi_gpio_hpd");
|
||||
if (status) {
|
||||
pr_err("Cannot request GPIO %d\n", HDMI_GPIO_HPD);
|
||||
return status;
|
||||
}
|
||||
status = gpio_request_one(HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH,
|
||||
"hdmi_gpio_ls_oe");
|
||||
if (status) {
|
||||
pr_err("Cannot request GPIO %d\n", HDMI_GPIO_LS_OE);
|
||||
goto error1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
error1:
|
||||
gpio_free(HDMI_GPIO_HPD);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_free(HDMI_GPIO_LS_OE);
|
||||
gpio_free(HDMI_GPIO_HPD);
|
||||
}
|
||||
|
||||
static struct omap_dss_device omap4_panda_hdmi_device = {
|
||||
.name = "hdmi",
|
||||
.driver_name = "hdmi_panel",
|
||||
.type = OMAP_DISPLAY_TYPE_HDMI,
|
||||
.platform_enable = omap4_panda_panel_enable_hdmi,
|
||||
.platform_disable = omap4_panda_panel_disable_hdmi,
|
||||
.channel = OMAP_DSS_CHANNEL_DIGIT,
|
||||
};
|
||||
|
||||
static struct omap_dss_device *omap4_panda_dss_devices[] = {
|
||||
&omap4_panda_dvi_device,
|
||||
&omap4_panda_hdmi_device,
|
||||
};
|
||||
|
||||
static struct omap_dss_board_info omap4_panda_dss_data = {
|
||||
.num_devices = ARRAY_SIZE(omap4_panda_dss_devices),
|
||||
.devices = omap4_panda_dss_devices,
|
||||
.default_device = &omap4_panda_dvi_device,
|
||||
};
|
||||
|
||||
void omap4_panda_display_init(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = omap4_panda_dvi_init();
|
||||
if (r)
|
||||
pr_err("error initializing panda DVI\n");
|
||||
|
||||
omap4_panda_hdmi_mux_init();
|
||||
omap_display_init(&omap4_panda_dss_data);
|
||||
}
|
||||
|
||||
static void __init omap4_panda_init(void)
|
||||
{
|
||||
int package = OMAP_PACKAGE_CBS;
|
||||
@@ -553,6 +753,7 @@ static void __init omap4_panda_init(void)
|
||||
omap4_twl6030_hsmmc_init(mmc);
|
||||
omap4_ehci_init();
|
||||
usb_musb_init(&musb_board_data);
|
||||
omap4_panda_display_init();
|
||||
}
|
||||
|
||||
static void __init omap4_panda_map_io(void)
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/i2c/twl.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/regulator/fixed.h>
|
||||
#include <linux/spi/spi.h>
|
||||
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/nand.h>
|
||||
@@ -41,10 +43,14 @@
|
||||
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/display.h>
|
||||
#include <plat/panel-generic-dpi.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <plat/gpmc.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <plat/nand.h>
|
||||
#include <plat/mcspi.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
|
||||
#include "mux.h"
|
||||
@@ -68,8 +74,6 @@
|
||||
#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
|
||||
defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
|
||||
|
||||
#include <plat/mcspi.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.h>
|
||||
|
||||
static struct omap2_mcspi_device_config ads7846_mcspi_config = {
|
||||
@@ -94,16 +98,32 @@ static struct ads7846_platform_data ads7846_config = {
|
||||
.keep_vref_on = 1,
|
||||
};
|
||||
|
||||
static struct spi_board_info overo_spi_board_info[] __initdata = {
|
||||
{
|
||||
.modalias = "ads7846",
|
||||
.bus_num = 1,
|
||||
.chip_select = 0,
|
||||
.max_speed_hz = 1500000,
|
||||
.controller_data = &ads7846_mcspi_config,
|
||||
.irq = OMAP_GPIO_IRQ(OVERO_GPIO_PENDOWN),
|
||||
.platform_data = &ads7846_config,
|
||||
}
|
||||
/* fixed regulator for ads7846 */
|
||||
static struct regulator_consumer_supply ads7846_supply =
|
||||
REGULATOR_SUPPLY("vcc", "spi1.0");
|
||||
|
||||
static struct regulator_init_data vads7846_regulator = {
|
||||
.constraints = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &ads7846_supply,
|
||||
};
|
||||
|
||||
static struct fixed_voltage_config vads7846 = {
|
||||
.supply_name = "vads7846",
|
||||
.microvolts = 3300000, /* 3.3V */
|
||||
.gpio = -EINVAL,
|
||||
.startup_delay = 0,
|
||||
.init_data = &vads7846_regulator,
|
||||
};
|
||||
|
||||
static struct platform_device vads7846_device = {
|
||||
.name = "reg-fixed-voltage",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &vads7846,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init overo_ads7846_init(void)
|
||||
@@ -116,8 +136,7 @@ static void __init overo_ads7846_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
spi_register_board_info(overo_spi_board_info,
|
||||
ARRAY_SIZE(overo_spi_board_info));
|
||||
platform_device_register(&vads7846_device);
|
||||
}
|
||||
|
||||
#else
|
||||
@@ -233,6 +252,137 @@ static inline void __init overo_init_smsc911x(void)
|
||||
static inline void __init overo_init_smsc911x(void) { return; }
|
||||
#endif
|
||||
|
||||
/* DSS */
|
||||
static int lcd_enabled;
|
||||
static int dvi_enabled;
|
||||
|
||||
#define OVERO_GPIO_LCD_EN 144
|
||||
#define OVERO_GPIO_LCD_BL 145
|
||||
|
||||
static void __init overo_display_init(void)
|
||||
{
|
||||
if ((gpio_request(OVERO_GPIO_LCD_EN, "OVERO_GPIO_LCD_EN") == 0) &&
|
||||
(gpio_direction_output(OVERO_GPIO_LCD_EN, 1) == 0))
|
||||
gpio_export(OVERO_GPIO_LCD_EN, 0);
|
||||
else
|
||||
printk(KERN_ERR "could not obtain gpio for "
|
||||
"OVERO_GPIO_LCD_EN\n");
|
||||
|
||||
if ((gpio_request(OVERO_GPIO_LCD_BL, "OVERO_GPIO_LCD_BL") == 0) &&
|
||||
(gpio_direction_output(OVERO_GPIO_LCD_BL, 1) == 0))
|
||||
gpio_export(OVERO_GPIO_LCD_BL, 0);
|
||||
else
|
||||
printk(KERN_ERR "could not obtain gpio for "
|
||||
"OVERO_GPIO_LCD_BL\n");
|
||||
}
|
||||
|
||||
static int overo_panel_enable_dvi(struct omap_dss_device *dssdev)
|
||||
{
|
||||
if (lcd_enabled) {
|
||||
printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
dvi_enabled = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void overo_panel_disable_dvi(struct omap_dss_device *dssdev)
|
||||
{
|
||||
dvi_enabled = 0;
|
||||
}
|
||||
|
||||
static struct panel_generic_dpi_data dvi_panel = {
|
||||
.name = "generic",
|
||||
.platform_enable = overo_panel_enable_dvi,
|
||||
.platform_disable = overo_panel_disable_dvi,
|
||||
};
|
||||
|
||||
static struct omap_dss_device overo_dvi_device = {
|
||||
.name = "dvi",
|
||||
.type = OMAP_DISPLAY_TYPE_DPI,
|
||||
.driver_name = "generic_dpi_panel",
|
||||
.data = &dvi_panel,
|
||||
.phy.dpi.data_lines = 24,
|
||||
};
|
||||
|
||||
static struct omap_dss_device overo_tv_device = {
|
||||
.name = "tv",
|
||||
.driver_name = "venc",
|
||||
.type = OMAP_DISPLAY_TYPE_VENC,
|
||||
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
|
||||
};
|
||||
|
||||
static int overo_panel_enable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
if (dvi_enabled) {
|
||||
printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
gpio_set_value(OVERO_GPIO_LCD_EN, 1);
|
||||
gpio_set_value(OVERO_GPIO_LCD_BL, 1);
|
||||
lcd_enabled = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void overo_panel_disable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_set_value(OVERO_GPIO_LCD_EN, 0);
|
||||
gpio_set_value(OVERO_GPIO_LCD_BL, 0);
|
||||
lcd_enabled = 0;
|
||||
}
|
||||
|
||||
static struct panel_generic_dpi_data lcd43_panel = {
|
||||
.name = "samsung_lte430wq_f0c",
|
||||
.platform_enable = overo_panel_enable_lcd,
|
||||
.platform_disable = overo_panel_disable_lcd,
|
||||
};
|
||||
|
||||
static struct omap_dss_device overo_lcd43_device = {
|
||||
.name = "lcd43",
|
||||
.type = OMAP_DISPLAY_TYPE_DPI,
|
||||
.driver_name = "generic_dpi_panel",
|
||||
.data = &lcd43_panel,
|
||||
.phy.dpi.data_lines = 24,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
|
||||
defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
|
||||
static struct omap_dss_device overo_lcd35_device = {
|
||||
.type = OMAP_DISPLAY_TYPE_DPI,
|
||||
.name = "lcd35",
|
||||
.driver_name = "lgphilips_lb035q02_panel",
|
||||
.phy.dpi.data_lines = 24,
|
||||
.platform_enable = overo_panel_enable_lcd,
|
||||
.platform_disable = overo_panel_disable_lcd,
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct omap_dss_device *overo_dss_devices[] = {
|
||||
&overo_dvi_device,
|
||||
&overo_tv_device,
|
||||
#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
|
||||
defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
|
||||
&overo_lcd35_device,
|
||||
#endif
|
||||
&overo_lcd43_device,
|
||||
};
|
||||
|
||||
static struct omap_dss_board_info overo_dss_data = {
|
||||
.num_devices = ARRAY_SIZE(overo_dss_devices),
|
||||
.devices = overo_dss_devices,
|
||||
.default_device = &overo_dvi_device,
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply overo_vdda_dac_supply =
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
|
||||
|
||||
static struct regulator_consumer_supply overo_vdds_dsi_supply[] = {
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
};
|
||||
|
||||
static struct mtd_partition overo_nand_partitions[] = {
|
||||
{
|
||||
.name = "xloader",
|
||||
@@ -323,6 +473,93 @@ static struct regulator_consumer_supply overo_vmmc1_supply = {
|
||||
.supply = "vmmc",
|
||||
};
|
||||
|
||||
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
|
||||
#include <linux/leds.h>
|
||||
|
||||
static struct gpio_led gpio_leds[] = {
|
||||
{
|
||||
.name = "overo:red:gpio21",
|
||||
.default_trigger = "heartbeat",
|
||||
.gpio = 21,
|
||||
.active_low = true,
|
||||
},
|
||||
{
|
||||
.name = "overo:blue:gpio22",
|
||||
.default_trigger = "none",
|
||||
.gpio = 22,
|
||||
.active_low = true,
|
||||
},
|
||||
{
|
||||
.name = "overo:blue:COM",
|
||||
.default_trigger = "mmc0",
|
||||
.gpio = -EINVAL, /* gets replaced */
|
||||
.active_low = true,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_led_platform_data gpio_leds_pdata = {
|
||||
.leds = gpio_leds,
|
||||
.num_leds = ARRAY_SIZE(gpio_leds),
|
||||
};
|
||||
|
||||
static struct platform_device gpio_leds_device = {
|
||||
.name = "leds-gpio",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &gpio_leds_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init overo_init_led(void)
|
||||
{
|
||||
platform_device_register(&gpio_leds_device);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void __init overo_init_led(void) { return; }
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
|
||||
static struct gpio_keys_button gpio_buttons[] = {
|
||||
{
|
||||
.code = BTN_0,
|
||||
.gpio = 23,
|
||||
.desc = "button0",
|
||||
.wakeup = 1,
|
||||
},
|
||||
{
|
||||
.code = BTN_1,
|
||||
.gpio = 14,
|
||||
.desc = "button1",
|
||||
.wakeup = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_keys_platform_data gpio_keys_pdata = {
|
||||
.buttons = gpio_buttons,
|
||||
.nbuttons = ARRAY_SIZE(gpio_buttons),
|
||||
};
|
||||
|
||||
static struct platform_device gpio_keys_device = {
|
||||
.name = "gpio-keys",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &gpio_keys_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init overo_init_keys(void)
|
||||
{
|
||||
platform_device_register(&gpio_keys_device);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void __init overo_init_keys(void) { return; }
|
||||
#endif
|
||||
|
||||
static int overo_twl_gpio_setup(struct device *dev,
|
||||
unsigned gpio, unsigned ngpio)
|
||||
{
|
||||
@@ -330,6 +567,11 @@ static int overo_twl_gpio_setup(struct device *dev,
|
||||
|
||||
overo_vmmc1_supply.dev = mmc[0].dev;
|
||||
|
||||
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
|
||||
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
|
||||
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -337,6 +579,7 @@ static struct twl4030_gpio_platform_data overo_gpio_data = {
|
||||
.gpio_base = OMAP_MAX_GPIO_LINES,
|
||||
.irq_base = TWL4030_GPIO_IRQ_BASE,
|
||||
.irq_end = TWL4030_GPIO_IRQ_END,
|
||||
.use_leds = true,
|
||||
.setup = overo_twl_gpio_setup,
|
||||
};
|
||||
|
||||
@@ -358,6 +601,35 @@ static struct regulator_init_data overo_vmmc1 = {
|
||||
.consumer_supplies = &overo_vmmc1_supply,
|
||||
};
|
||||
|
||||
/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
|
||||
static struct regulator_init_data overo_vdac = {
|
||||
.constraints = {
|
||||
.min_uV = 1800000,
|
||||
.max_uV = 1800000,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &overo_vdda_dac_supply,
|
||||
};
|
||||
|
||||
/* VPLL2 for digital video outputs */
|
||||
static struct regulator_init_data overo_vpll2 = {
|
||||
.constraints = {
|
||||
.name = "VDVI",
|
||||
.min_uV = 1800000,
|
||||
.max_uV = 1800000,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(overo_vdds_dsi_supply),
|
||||
.consumer_supplies = overo_vdds_dsi_supply,
|
||||
};
|
||||
|
||||
static struct twl4030_codec_audio_data overo_audio_data;
|
||||
|
||||
static struct twl4030_codec_data overo_codec_data = {
|
||||
@@ -365,8 +637,6 @@ static struct twl4030_codec_data overo_codec_data = {
|
||||
.audio = &overo_audio_data,
|
||||
};
|
||||
|
||||
/* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */
|
||||
|
||||
static struct twl4030_platform_data overo_twldata = {
|
||||
.irq_base = TWL4030_IRQ_BASE,
|
||||
.irq_end = TWL4030_IRQ_END,
|
||||
@@ -374,6 +644,8 @@ static struct twl4030_platform_data overo_twldata = {
|
||||
.usb = &overo_usb_data,
|
||||
.codec = &overo_codec_data,
|
||||
.vmmc1 = &overo_vmmc1,
|
||||
.vdac = &overo_vdac,
|
||||
.vpll2 = &overo_vpll2,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata overo_i2c_boardinfo[] = {
|
||||
@@ -394,18 +666,38 @@ static int __init overo_i2c_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_device overo_lcd_device = {
|
||||
.name = "overo_lcd",
|
||||
.id = -1,
|
||||
static struct spi_board_info overo_spi_board_info[] __initdata = {
|
||||
#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
|
||||
defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
|
||||
{
|
||||
.modalias = "ads7846",
|
||||
.bus_num = 1,
|
||||
.chip_select = 0,
|
||||
.max_speed_hz = 1500000,
|
||||
.controller_data = &ads7846_mcspi_config,
|
||||
.irq = OMAP_GPIO_IRQ(OVERO_GPIO_PENDOWN),
|
||||
.platform_data = &ads7846_config,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
|
||||
defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
|
||||
{
|
||||
.modalias = "lgphilips_lb035q02_panel-spi",
|
||||
.bus_num = 1,
|
||||
.chip_select = 1,
|
||||
.max_speed_hz = 500000,
|
||||
.mode = SPI_MODE_3,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct omap_lcd_config overo_lcd_config __initdata = {
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel overo_config[] __initdata = {
|
||||
{ OMAP_TAG_LCD, &overo_lcd_config },
|
||||
};
|
||||
static int __init overo_spi_init(void)
|
||||
{
|
||||
overo_ads7846_init();
|
||||
spi_register_board_info(overo_spi_board_info,
|
||||
ARRAY_SIZE(overo_spi_board_info));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __init overo_init_early(void)
|
||||
{
|
||||
@@ -414,15 +706,10 @@ static void __init overo_init_early(void)
|
||||
mt46h32m32lf6_sdrc_params);
|
||||
}
|
||||
|
||||
static struct platform_device *overo_devices[] __initdata = {
|
||||
&overo_lcd_device,
|
||||
};
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
.port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
|
||||
.phy_reset = true,
|
||||
.reset_gpio_port[0] = -EINVAL,
|
||||
.reset_gpio_port[1] = OVERO_GPIO_USBH_NRESET,
|
||||
@@ -444,16 +731,18 @@ static struct omap_musb_board_data musb_board_data = {
|
||||
static void __init overo_init(void)
|
||||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
omap_board_config = overo_config;
|
||||
omap_board_config_size = ARRAY_SIZE(overo_config);
|
||||
overo_i2c_init();
|
||||
platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
|
||||
omap_display_init(&overo_dss_data);
|
||||
omap_serial_init();
|
||||
overo_flash_init();
|
||||
usb_musb_init(&musb_board_data);
|
||||
usbhs_init(&usbhs_bdata);
|
||||
overo_spi_init();
|
||||
overo_ads7846_init();
|
||||
overo_init_smsc911x();
|
||||
overo_display_init();
|
||||
overo_init_led();
|
||||
overo_init_keys();
|
||||
|
||||
/* Ensure SDRC pins are mux'd for self-refresh */
|
||||
omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
|
||||
|
||||
@@ -372,7 +372,7 @@ static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply rx51_vdac_supply[] = {
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
};
|
||||
|
||||
static struct regulator_init_data rx51_vaux1 = {
|
||||
|
||||
@@ -226,11 +226,13 @@ static struct omap2_hsmmc_info mmc[] = {
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply zoom_vpll2_supply =
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss");
|
||||
static struct regulator_consumer_supply zoom_vpll2_supplies[] = {
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply zoom_vdda_dac_supply =
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss");
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
|
||||
|
||||
static struct regulator_init_data zoom_vpll2 = {
|
||||
.constraints = {
|
||||
@@ -241,8 +243,8 @@ static struct regulator_init_data zoom_vpll2 = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &zoom_vpll2_supply,
|
||||
.num_consumer_supplies = ARRAY_SIZE(zoom_vpll2_supplies),
|
||||
.consumer_supplies = zoom_vpll2_supplies,
|
||||
};
|
||||
|
||||
static struct regulator_init_data zoom_vdac = {
|
||||
|
||||
@@ -1804,10 +1804,10 @@ static struct omap_clk omap2420_clks[] = {
|
||||
CLK(NULL, "gfx_2d_fck", &gfx_2d_fck, CK_242X),
|
||||
CLK(NULL, "gfx_ick", &gfx_ick, CK_242X),
|
||||
/* DSS domain clocks */
|
||||
CLK("omapdss", "ick", &dss_ick, CK_242X),
|
||||
CLK("omapdss", "dss1_fck", &dss1_fck, CK_242X),
|
||||
CLK("omapdss", "dss2_fck", &dss2_fck, CK_242X),
|
||||
CLK("omapdss", "tv_fck", &dss_54m_fck, CK_242X),
|
||||
CLK("omapdss_dss", "ick", &dss_ick, CK_242X),
|
||||
CLK("omapdss_dss", "fck", &dss1_fck, CK_242X),
|
||||
CLK("omapdss_dss", "sys_clk", &dss2_fck, CK_242X),
|
||||
CLK("omapdss_dss", "tv_clk", &dss_54m_fck, CK_242X),
|
||||
/* L3 domain clocks */
|
||||
CLK(NULL, "core_l3_ck", &core_l3_ck, CK_242X),
|
||||
CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_242X),
|
||||
|
||||
@@ -1894,10 +1894,10 @@ static struct omap_clk omap2430_clks[] = {
|
||||
CLK(NULL, "mdm_ick", &mdm_ick, CK_243X),
|
||||
CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X),
|
||||
/* DSS domain clocks */
|
||||
CLK("omapdss", "ick", &dss_ick, CK_243X),
|
||||
CLK("omapdss", "dss1_fck", &dss1_fck, CK_243X),
|
||||
CLK("omapdss", "dss2_fck", &dss2_fck, CK_243X),
|
||||
CLK("omapdss", "tv_fck", &dss_54m_fck, CK_243X),
|
||||
CLK("omapdss_dss", "ick", &dss_ick, CK_243X),
|
||||
CLK("omapdss_dss", "fck", &dss1_fck, CK_243X),
|
||||
CLK("omapdss_dss", "sys_clk", &dss2_fck, CK_243X),
|
||||
CLK("omapdss_dss", "tv_clk", &dss_54m_fck, CK_243X),
|
||||
/* L3 domain clocks */
|
||||
CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X),
|
||||
CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X),
|
||||
|
||||
@@ -3356,13 +3356,13 @@ static struct omap_clk omap3xxx_clks[] = {
|
||||
CLK("omap_rng", "ick", &rng_ick, CK_34XX | CK_36XX),
|
||||
CLK(NULL, "sha11_ick", &sha11_ick, CK_34XX | CK_36XX),
|
||||
CLK(NULL, "des1_ick", &des1_ick, CK_34XX | CK_36XX),
|
||||
CLK("omapdss", "dss1_fck", &dss1_alwon_fck_3430es1, CK_3430ES1),
|
||||
CLK("omapdss", "dss1_fck", &dss1_alwon_fck_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
|
||||
CLK("omapdss", "tv_fck", &dss_tv_fck, CK_3XXX),
|
||||
CLK("omapdss", "video_fck", &dss_96m_fck, CK_3XXX),
|
||||
CLK("omapdss", "dss2_fck", &dss2_alwon_fck, CK_3XXX),
|
||||
CLK("omapdss", "ick", &dss_ick_3430es1, CK_3430ES1),
|
||||
CLK("omapdss", "ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
|
||||
CLK("omapdss_dss", "fck", &dss1_alwon_fck_3430es1, CK_3430ES1),
|
||||
CLK("omapdss_dss", "fck", &dss1_alwon_fck_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
|
||||
CLK("omapdss_dss", "tv_clk", &dss_tv_fck, CK_3XXX),
|
||||
CLK("omapdss_dss", "video_clk", &dss_96m_fck, CK_3XXX),
|
||||
CLK("omapdss_dss", "sys_clk", &dss2_alwon_fck, CK_3XXX),
|
||||
CLK("omapdss_dss", "ick", &dss_ick_3430es1, CK_3430ES1),
|
||||
CLK("omapdss_dss", "ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
|
||||
CLK(NULL, "cam_mclk", &cam_mclk, CK_34XX | CK_36XX),
|
||||
CLK(NULL, "cam_ick", &cam_ick, CK_34XX | CK_36XX),
|
||||
CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_34XX | CK_36XX),
|
||||
|
||||
@@ -3114,11 +3114,16 @@ static struct omap_clk omap44xx_clks[] = {
|
||||
CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X),
|
||||
CLK(NULL, "dmic_fck", &dmic_fck, CK_443X),
|
||||
CLK(NULL, "dsp_fck", &dsp_fck, CK_443X),
|
||||
CLK(NULL, "dss_sys_clk", &dss_sys_clk, CK_443X),
|
||||
CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X),
|
||||
CLK(NULL, "dss_dss_clk", &dss_dss_clk, CK_443X),
|
||||
CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X),
|
||||
CLK(NULL, "dss_fck", &dss_fck, CK_443X),
|
||||
CLK("omapdss_dss", "sys_clk", &dss_sys_clk, CK_443X),
|
||||
CLK("omapdss_dss", "tv_clk", &dss_tv_clk, CK_443X),
|
||||
CLK("omapdss_dss", "dss_clk", &dss_dss_clk, CK_443X),
|
||||
CLK("omapdss_dss", "video_clk", &dss_48mhz_clk, CK_443X),
|
||||
CLK("omapdss_dss", "fck", &dss_fck, CK_443X),
|
||||
/*
|
||||
* On OMAP4, DSS ick is a dummy clock; this is needed for compatibility
|
||||
* with OMAP2/3.
|
||||
*/
|
||||
CLK("omapdss_dss", "ick", &dummy_ck, CK_443X),
|
||||
CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X),
|
||||
CLK(NULL, "emif1_fck", &emif1_fck, CK_443X),
|
||||
CLK(NULL, "emif2_fck", &emif2_fck, CK_443X),
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <linux/err.h>
|
||||
|
||||
#include <plat/display.h>
|
||||
#include <plat/omap_hwmod.h>
|
||||
#include <plat/omap_device.h>
|
||||
|
||||
static struct platform_device omap_display_device = {
|
||||
.name = "omapdss",
|
||||
@@ -32,9 +34,87 @@ static struct platform_device omap_display_device = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_device_pm_latency omap_dss_latency[] = {
|
||||
[0] = {
|
||||
.deactivate_func = omap_device_idle_hwmods,
|
||||
.activate_func = omap_device_enable_hwmods,
|
||||
.flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
|
||||
},
|
||||
};
|
||||
|
||||
/* oh_core is used for getting opt-clocks */
|
||||
static struct omap_hwmod *oh_core;
|
||||
|
||||
static bool opt_clock_available(const char *clk_role)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < oh_core->opt_clks_cnt; i++) {
|
||||
if (!strcmp(oh_core->opt_clks[i].role, clk_role))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int __init omap_display_init(struct omap_dss_board_info *board_data)
|
||||
{
|
||||
int r = 0;
|
||||
struct omap_hwmod *oh;
|
||||
struct omap_device *od;
|
||||
int i;
|
||||
struct omap_display_platform_data pdata;
|
||||
|
||||
/*
|
||||
* omap: valid DSS hwmod names
|
||||
* omap2,3,4: dss_core, dss_dispc, dss_rfbi, dss_venc
|
||||
* omap3,4: dss_dsi1
|
||||
* omap4: dss_dsi2, dss_hdmi
|
||||
*/
|
||||
char *oh_name[] = { "dss_core", "dss_dispc", "dss_rfbi", "dss_venc",
|
||||
"dss_dsi1", "dss_dsi2", "dss_hdmi" };
|
||||
char *dev_name[] = { "omapdss_dss", "omapdss_dispc", "omapdss_rfbi",
|
||||
"omapdss_venc", "omapdss_dsi1", "omapdss_dsi2",
|
||||
"omapdss_hdmi" };
|
||||
int oh_count;
|
||||
|
||||
memset(&pdata, 0, sizeof(pdata));
|
||||
|
||||
if (cpu_is_omap24xx())
|
||||
oh_count = ARRAY_SIZE(oh_name) - 3;
|
||||
/* last 3 hwmod dev in oh_name are not available for omap2 */
|
||||
else if (cpu_is_omap44xx())
|
||||
oh_count = ARRAY_SIZE(oh_name);
|
||||
else
|
||||
oh_count = ARRAY_SIZE(oh_name) - 2;
|
||||
/* last 2 hwmod dev in oh_name are not available for omap3 */
|
||||
|
||||
/* opt_clks are always associated with dss hwmod */
|
||||
oh_core = omap_hwmod_lookup("dss_core");
|
||||
if (!oh_core) {
|
||||
pr_err("Could not look up dss_core.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pdata.board_data = board_data;
|
||||
pdata.board_data->get_last_off_on_transaction_id = NULL;
|
||||
pdata.opt_clock_available = opt_clock_available;
|
||||
|
||||
for (i = 0; i < oh_count; i++) {
|
||||
oh = omap_hwmod_lookup(oh_name[i]);
|
||||
if (!oh) {
|
||||
pr_err("Could not look up %s\n", oh_name[i]);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
od = omap_device_build(dev_name[i], -1, oh, &pdata,
|
||||
sizeof(struct omap_display_platform_data),
|
||||
omap_dss_latency,
|
||||
ARRAY_SIZE(omap_dss_latency), 0);
|
||||
|
||||
if (WARN((IS_ERR(od)), "Could not build omap_device for %s\n",
|
||||
oh_name[i]))
|
||||
return -ENODEV;
|
||||
}
|
||||
omap_display_device.dev.platform_data = board_data;
|
||||
|
||||
r = platform_device_register(&omap_display_device);
|
||||
|
||||
Loaded 20 of 51 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user