omap3: cm-t35: enable display subsystem
Subsystems (4)
cover omap3: cm-t35: enable display subsystem
This patchset adds display support for CM-T35 board.
The following changes since commit 82f1d8f22f2c65e70206e40a6f17688bf64a892c:
Tony Lindgren (1):
Merge branch 'for-next' of git://gitorious.org/linux-omap-dss2/linux
Mike Rapoport (3):
OMAP: DSS2: add Toppoly TDO35S panel
omap3: cm-t35: add DSS2 display support
omap3: cm-t35: update defconfig for DSS2
arch/arm/configs/cm_t35_defconfig | 82 +++++++- arch/arm/mach-omap2/board-cm-t35.c | 234 +++++++++++++++++++- drivers/video/omap2/displays/Kconfig | 6 + drivers/video/omap2/displays/Makefile | 1 + .../video/omap2/displays/panel-toppoly-tdo35s.c | 112 ++++++++++ 5 files changed, 430 insertions(+), 5 deletions(-) create mode 100644 drivers/video/omap2/displays/panel-toppoly-tdo35s.c
PATCH 1/3 OMAP: DSS2: add Toppoly TDO35S panel
--- drivers/video/omap2/displays/Kconfig | 6 + drivers/video/omap2/displays/Makefile | 1 + .../video/omap2/displays/panel-toppoly-tdo35s.c | 112 ++++++++++++++++++++ 3 files changed, 119 insertions(+), 0 deletions(-) create mode 100644 drivers/video/omap2/displays/panel-toppoly-tdo35s.c
drivers/video/omap2/displays/Kconfig +6 -0
@@ -25,4 +25,10 @@ config PANEL_TAAL help Taal DSI command mode panel from TPO. +config PANEL_TOPPOLY_TDO35S + tristate "Toppoly TDO35S LCD Panel support" + depends on OMAP2_DSS + help + LCD Panel used in CM-T35 + endmenu
drivers/video/omap2/displays/Makefile +1 -0
@@ -3,3 +3,4 @@ obj-$(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) += panel-samsung-lte430wq-f0c.o obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o obj-$(CONFIG_PANEL_TAAL) += panel-taal.o +obj-$(CONFIG_PANEL_TOPPOLY_TDO35S) += panel-toppoly-tdo35s.o
drivers/video/omap2/displays/panel-toppoly-tdo35s.c new file +112 -0
112 lines not on this page · raw message
Signature · 1 line
1.6.4.4
PATCH 2/3 omap3: cm-t35: add DSS2 display support
In reply to Mike Rapoport--- arch/arm/mach-omap2/board-cm-t35.c | 234 +++++++++++++++++++++++++++++++++++- 1 files changed, 233 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-cm-t35.c +233 -1
@@ -32,6 +32,9 @@#include <linux/i2c/twl4030.h> #include <linux/regulator/machine.h> +#include <linux/spi/spi.h> +#include <linux/spi/tdo24m.h> +#include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h>
@@ -42,6 +45,7 @@#include <plat/nand.h> #include <plat/gpmc.h> #include <plat/usb.h> +#include <plat/display.h> #include <mach/hardware.h>
@@ -248,7 +252,6 @@ static inline void cm_t35_init_nand(void) {}#if defined(CONFIG_TOUCHSCREEN_ADS7846 ) || \ defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE ) -#include <linux/spi/spi.h> #include <linux/spi/ads7846.h> #include <plat/mcspi.h>
@@ -304,6 +307,193 @@ static void __init cm_t35_init_ads7846(void)static inline void cm_t35_init_ads7846 (void ) {}#endif +#define CM_T35_LCD_EN_GPIO 157 +#define CM_T35_LCD_BL_GPIO 58 +#define CM_T35_DVI_EN_GPIO 54 + +static int lcd_bl_gpio; +static int lcd_en_gpio; +static int dvi_en_gpio; + +static int lcd_enabled; +static int dvi_enabled; + +static int cm_t35_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 (lcd_en_gpio,1 ); +gpio_set_value (lcd_bl_gpio,1 ); + + lcd_enabled =1 ; + +return 0 ; +} + +static void cm_t35_panel_disable_lcd (struct omap_dss_device *dssdev) +{ + lcd_enabled =0 ; + +gpio_set_value (lcd_bl_gpio,0 ); +gpio_set_value (lcd_en_gpio,0 ); +} + +static int cm_t35_panel_enable_dvi (struct omap_dss_device *dssdev) +{ +if (lcd_enabled) { +printk (KERN_ERR "cannot enable DVI, LCD is enabled\n" ); +return -EINVAL ; + } + +gpio_set_value (dvi_en_gpio,0 ); + dvi_enabled =1 ; + +return 0 ; +} + +static void cm_t35_panel_disable_dvi (struct omap_dss_device *dssdev) +{ +gpio_set_value (dvi_en_gpio,1 ); + dvi_enabled =0 ; +} + +static int cm_t35_panel_enable_tv (struct omap_dss_device *dssdev) +{ +return 0 ; +} + +static void cm_t35_panel_disable_tv (struct omap_dss_device *dssdev) +{ +} + +static struct omap_dss_device cm_t35_lcd_device = { + .name ="lcd" , + .driver_name ="toppoly_tdo35s_panel" , + .type =OMAP_DISPLAY_TYPE_DPI , + .phy.dpi.data_lines =18 , + .platform_enable = cm_t35_panel_enable_lcd, + .platform_disable = cm_t35_panel_disable_lcd, +}; + +static struct omap_dss_device cm_t35_dvi_device = { + .name ="dvi" , + .driver_name ="generic_panel" , + .type =OMAP_DISPLAY_TYPE_DPI , + .phy.dpi.data_lines =24 , + .platform_enable = cm_t35_panel_enable_dvi, + .platform_disable = cm_t35_panel_disable_dvi, +}; + +static struct omap_dss_device cm_t35_tv_device = { + .name ="tv" , + .driver_name ="venc" , + .type =OMAP_DISPLAY_TYPE_VENC , + .phy.venc.type =OMAP_DSS_VENC_TYPE_SVIDEO , + .platform_enable = cm_t35_panel_enable_tv, + .platform_disable = cm_t35_panel_disable_tv, +}; + +static struct omap_dss_device *cm_t35_dss_devices[] = { + &cm_t35_lcd_device, + &cm_t35_dvi_device, + &cm_t35_tv_device, +}; + +static struct omap_dss_board_info cm_t35_dss_data = { + .num_devices =ARRAY_SIZE (cm_t35_dss_devices), + .devices = cm_t35_dss_devices, + .default_device = &cm_t35_dvi_device, +}; + +static struct platform_device cm_t35_dss_device = { + .name ="omapdss" , + .id =-1 , + .dev = { + .platform_data = &cm_t35_dss_data, + }, +}; + +static struct omap2_mcspi_device_config tdo24m_mcspi_config = { + .turbo_mode =0 , + .single_channel =1 ,/* 0: slave, 1: master */ +}; + +static struct tdo24m_platform_data tdo24m_config = { + .model =TDO35S , +}; + +static struct spi_board_info cm_t35_lcd_spi_board_info[]__initdata = { + { + .modalias ="tdo24m" , + .bus_num =4 , + .chip_select =0 , + .max_speed_hz =1000000 , + .controller_data = &tdo24m_mcspi_config, + .platform_data = &tdo24m_config, + }, +}; + +static void __init cm_t35_display_init (void ) +{ +int err; + + lcd_en_gpio =CM_T35_LCD_EN_GPIO ; + lcd_bl_gpio =CM_T35_LCD_BL_GPIO ; + dvi_en_gpio =CM_T35_DVI_EN_GPIO ; + +spi_register_board_info (cm_t35_lcd_spi_board_info, +ARRAY_SIZE (cm_t35_lcd_spi_board_info)); + + err =gpio_request (lcd_en_gpio,"LCD RST" ); +if (err) { +pr_err ("CM-T35: failed to get LCD reset GPIO\n" ); + goto out; + } + + err =gpio_request (lcd_bl_gpio,"LCD BL" ); +if (err) { +pr_err ("CM-T35: failed to get LCD backlight control GPIO\n" ); + goto err_lcd_bl; + } + + err =gpio_request (dvi_en_gpio,"DVI EN" ); +if (err) { +pr_err ("CM-T35: failed to get DVI reset GPIO\n" ); + goto err_dvi_en; + } + +gpio_export (lcd_en_gpio,0 ); +gpio_export (lcd_bl_gpio,0 ); +gpio_export (dvi_en_gpio,0 ); +gpio_direction_output (lcd_en_gpio,0 ); +gpio_direction_output (lcd_bl_gpio,0 ); +gpio_direction_output (dvi_en_gpio,1 ); + +msleep (50 ); +gpio_set_value (lcd_en_gpio,1 ); + + err =platform_device_register (&cm_t35_dss_device); +if (err) { +pr_err ("CM-T35: failed to register DSS device\n" ); + goto err_dev_reg; + } + +return ; + +err_dev_reg: +gpio_free (dvi_en_gpio); +err_dvi_en: +gpio_free (lcd_bl_gpio); +err_lcd_bl: +gpio_free (lcd_en_gpio); +out: + +return ; +} +static struct regulator_consumer_supply cm_t35_vmmc1_supply = { .supply ="vmmc" , };
@@ -312,6 +502,16 @@ static struct regulator_consumer_supply cm_t35_vsim_supply = { .supply = "vmmc_aux", }; +static struct regulator_consumer_supply cm_t35_vdac_supply = { + .supply ="vdda_dac" , + .dev = &cm_t35_dss_device.dev, +}; + +static struct regulator_consumer_supply cm_t35_vdvi_supply = { + .supply ="vdvi" , + .dev = &cm_t35_dss_device.dev, +}; +/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ static struct regulator_init_data cm_t35_vmmc1 = { .constraints = {
@@ -342,6 +542,35 @@ static struct regulator_init_data cm_t35_vsim = { .consumer_supplies = &cm_t35_vsim_supply, }; +/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ +static struct regulator_init_data cm_t35_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 = &cm_t35_vdac_supply, +}; + +/* VPLL2 for digital video outputs */ +static struct regulator_init_data cm_t35_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 =1 , + .consumer_supplies = &cm_t35_vdvi_supply, +}; +static struct twl4030_usb_data cm_t35_usb_data = { .usb_mode =T2_USB_MODE_ULPI , };
@@ -445,6 +674,8 @@ static struct twl4030_platform_data cm_t35_twldata = { .gpio = &cm_t35_gpio_data, .vmmc1 = &cm_t35_vmmc1, .vsim = &cm_t35_vsim, + .vdac = &cm_t35_vdac, + .vpll2 = &cm_t35_vpll2, };static struct i2c_board_info __initdata cm_t35_i2c_boardinfo[] = {
@@ -490,6 +721,7 @@ static void __init cm_t35_init(void)cm_t35_init_ads7846 ();cm_t35_init_ethernet ();cm_t35_init_led (); +cm_t35_display_init ();usb_musb_init ();
Signature · 1 line
1.6.4.4
PATCH 3/3 omap3: cm-t35: update defconfig for DSS2
In reply to Mike Rapoport--- arch/arm/configs/cm_t35_defconfig | 82 +++++++++++++++++++++++++++++++++++-- 1 files changed, 78 insertions(+), 4 deletions(-)
arch/arm/configs/cm_t35_defconfig +78 -4
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.32-rc4 -# Tue Oct 13 17:10:40 2009 +# Linux kernel version: 2.6.32-rc8 +# Tue Dec 1 12:08:44 2009 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -215,6 +215,7 @@ CONFIG_OMAP_DM_TIMER=y # CONFIG_OMAP_LL_DEBUG_UART1 is not set # CONFIG_OMAP_LL_DEBUG_UART2 is not set CONFIG_OMAP_LL_DEBUG_UART3=y +# CONFIG_OMAP_LL_DEBUG_NONE is not set # CONFIG_OMAP_PM_NONE is not set CONFIG_OMAP_PM_NOOP=y CONFIG_ARCH_OMAP34XX=y
@@ -227,11 +228,15 @@ CONFIG_ARCH_OMAP3430=y # CONFIG_MACH_OMAP_LDP is not set # CONFIG_MACH_OVERO is not set # CONFIG_MACH_OMAP3EVM is not set +# CONFIG_MACH_OMAP3517EVM is not set # CONFIG_MACH_OMAP3_PANDORA is not set # CONFIG_MACH_OMAP_3430SDP is not set # CONFIG_MACH_NOKIA_RX51 is not set # CONFIG_MACH_OMAP_ZOOM2 is not set +# CONFIG_MACH_OMAP_ZOOM3 is not set CONFIG_MACH_CM_T35=y +# CONFIG_MACH_IGEP0020 is not set +# CONFIG_MACH_OMAP_3630SDP is not set # # Processor Type
@@ -963,6 +968,7 @@ CONFIG_SSB_POSSIBLE=y # CONFIG_TPS65010 is not set CONFIG_TWL4030_CORE=y # CONFIG_TWL4030_POWER is not set +# CONFIG_TWL4030_CODEC is not set # CONFIG_MFD_TMIO is not set # CONFIG_MFD_T7L66XB is not set # CONFIG_MFD_TC6387XB is not set
@@ -993,8 +999,66 @@ CONFIG_REGULATOR_TWL4030=y # # CONFIG_VGASTATE is not set # CONFIG_VIDEO_OUTPUT_CONTROL is not set -# CONFIG_FB is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set +CONFIG_OMAP2_VRAM=y +CONFIG_OMAP2_VRFB=y +CONFIG_OMAP2_DSS=y +CONFIG_OMAP2_VRAM_SIZE=4 +CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y +# CONFIG_OMAP2_DSS_RFBI is not set +CONFIG_OMAP2_DSS_VENC=y +# CONFIG_OMAP2_DSS_SDI is not set +# CONFIG_OMAP2_DSS_DSI is not set +# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set +CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 +CONFIG_FB_OMAP2=y +CONFIG_FB_OMAP2_DEBUG_SUPPORT=y +# CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set +CONFIG_FB_OMAP2_NUM_FBS=3 + +# +# OMAP2/3 Display Device Drivers +# +CONFIG_PANEL_GENERIC=y +# CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C is not set +# CONFIG_PANEL_SHARP_LS037V7DW01 is not set +CONFIG_PANEL_TOPPOLY_TDO35S=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=y +# CONFIG_LCD_LMS283GF05 is not set +# CONFIG_LCD_LTV350QV is not set +# CONFIG_LCD_ILI9320 is not set +CONFIG_LCD_TDO24M=y +# CONFIG_LCD_VGG2432A4 is not set +# CONFIG_LCD_PLATFORM is not set +# CONFIG_BACKLIGHT_CLASS_DEVICE is not set # # Display device support
@@ -1006,6 +1070,16 @@ CONFIG_REGULATOR_TWL4030=y # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y # CONFIG_SOUND is not set CONFIG_HID_SUPPORT=y CONFIG_HID=y
Signature · 1 line
1.6.4.4
Tony,
Any chance this can go to 2.6.33?
Quoted 20 lines · Mike Rapoport
This patchset adds display support for CM-T35 board.
The following changes since commit
82f1d8f22f2c65e70206e40a6f17688bf64a892c:
Tony Lindgren (1):
Merge branch 'for-next' ofgit://gitorious.org/linux-omap-dss2/linuxMike Rapoport (3):
OMAP: DSS2: add Toppoly TDO35S panel
omap3: cm-t35: add DSS2 display support
omap3: cm-t35: update defconfig for DSS2arch/arm/configs/cm_t35_defconfig | 82 +++++++- arch/arm/mach-omap2/board-cm-t35.c | 234 +++++++++++++++++++- drivers/video/omap2/displays/Kconfig | 6 + drivers/video/omap2/displays/Makefile | 1 + .../video/omap2/displays/panel-toppoly-tdo35s.c | 112 ++++++++++ 5 files changed, 430 insertions(+), 5 deletions(-) create mode 100644 drivers/video/omap2/displays/panel-toppoly-tdo35s.c
Signature · 2 lines
Sincerely yours, Mike.