Commit fc7b6e9e authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King

[ARM PATCH] 1942/1: basic LCD support for the PXA270/Mainstone board

Patch from Nicolas Pitre

This is only basic support so the LCD pannel becomes usable
on Mainstone. No PXA270 specific capabilities were added.
The Mainstone defconfig also updated to enable LCD by default.
parent 54567d5d
...@@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y ...@@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y
# CONFIG_IKCONFIG is not set # CONFIG_IKCONFIG is not set
# CONFIG_EMBEDDED is not set # CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
CONFIG_FUTEX=y CONFIG_FUTEX=y
CONFIG_EPOLL=y CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_NOOP=y
...@@ -52,43 +53,22 @@ CONFIG_OBSOLETE_MODPARM=y ...@@ -52,43 +53,22 @@ CONFIG_OBSOLETE_MODPARM=y
# CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_CO285 is not set
CONFIG_ARCH_PXA=y
# CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_CAMELOT is not set
# CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IOP3XX is not set
# CONFIG_ARCH_IXP4XX is not set
# CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_L7200 is not set
CONFIG_ARCH_PXA=y
# CONFIG_ARCH_RPC is not set # CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set # CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_SHARK is not set
# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_S3C2410 is not set
# CONFIG_ARCH_OMAP is not set # CONFIG_ARCH_SHARK is not set
# CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_LH7A40X is not set
# CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_VERSATILE_PB is not set # CONFIG_ARCH_VERSATILE_PB is not set
#
# CLPS711X/EP721X Implementations
#
#
# Epxa10db
#
#
# Footbridge Implementations
#
#
# IOP3xx Implementation Options
#
# CONFIG_ARCH_IOP310 is not set
# CONFIG_ARCH_IOP321 is not set
#
# IOP3xx Chipset Features
#
# #
# Intel PXA2xx Implementations # Intel PXA2xx Implementations
# #
...@@ -98,34 +78,6 @@ CONFIG_MACH_MAINSTONE=y ...@@ -98,34 +78,6 @@ CONFIG_MACH_MAINSTONE=y
CONFIG_PXA27x=y CONFIG_PXA27x=y
CONFIG_IWMMXT=y CONFIG_IWMMXT=y
#
# SA11x0 Implementations
#
#
# TI OMAP Implementations
#
#
# OMAP Core Type
#
#
# OMAP Board Type
#
#
# OMAP Feature Selections
#
#
# S3C2410 Implementations
#
#
# LH7A40X Implementations
#
# #
# Processor Type # Processor Type
# #
...@@ -163,6 +115,7 @@ CONFIG_PCMCIA_PXA2XX=y ...@@ -163,6 +115,7 @@ CONFIG_PCMCIA_PXA2XX=y
CONFIG_FPE_NWFPE=y CONFIG_FPE_NWFPE=y
# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_NWFPE_XP is not set
# CONFIG_FPE_FASTFPE is not set # CONFIG_FPE_FASTFPE is not set
# CONFIG_VFP is not set
CONFIG_BINFMT_ELF=y CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_AOUT is not set
# CONFIG_BINFMT_MISC is not set # CONFIG_BINFMT_MISC is not set
...@@ -170,6 +123,7 @@ CONFIG_BINFMT_ELF=y ...@@ -170,6 +123,7 @@ CONFIG_BINFMT_ELF=y
# #
# Generic Driver Options # Generic Driver Options
# #
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set # CONFIG_FW_LOADER is not set
# CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DRIVER is not set
# CONFIG_PM is not set # CONFIG_PM is not set
...@@ -394,7 +348,6 @@ CONFIG_BLK_DEV_IDE=y ...@@ -394,7 +348,6 @@ CONFIG_BLK_DEV_IDE=y
# #
CONFIG_BLK_DEV_IDEDISK=y CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_IDEDISK_MULTI_MODE is not set
# CONFIG_IDEDISK_STROKE is not set
CONFIG_BLK_DEV_IDECS=y CONFIG_BLK_DEV_IDECS=y
# CONFIG_BLK_DEV_IDECD is not set # CONFIG_BLK_DEV_IDECD is not set
# CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDETAPE is not set
...@@ -406,6 +359,7 @@ CONFIG_BLK_DEV_IDECS=y ...@@ -406,6 +359,7 @@ CONFIG_BLK_DEV_IDECS=y
# IDE chipset support/bugfixes # IDE chipset support/bugfixes
# #
# CONFIG_IDE_GENERIC is not set # CONFIG_IDE_GENERIC is not set
# CONFIG_IDE_ARM is not set
# CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_BLK_DEV_IDEDMA is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_BLK_DEV_HD is not set # CONFIG_BLK_DEV_HD is not set
...@@ -571,6 +525,7 @@ CONFIG_EXT2_FS=y ...@@ -571,6 +525,7 @@ CONFIG_EXT2_FS=y
CONFIG_FAT_FS=y CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y CONFIG_MSDOS_FS=y
# CONFIG_VFAT_FS is not set # CONFIG_VFAT_FS is not set
CONFIG_FAT_DEFAULT_CODEPAGE=437
# CONFIG_NTFS_FS is not set # CONFIG_NTFS_FS is not set
# #
...@@ -622,7 +577,6 @@ CONFIG_SUNRPC=y ...@@ -622,7 +577,6 @@ CONFIG_SUNRPC=y
# CONFIG_CIFS is not set # CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set # CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set # CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_AFS_FS is not set # CONFIG_AFS_FS is not set
# #
...@@ -658,6 +612,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" ...@@ -658,6 +612,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set # CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_3 is not set
...@@ -681,7 +636,10 @@ CONFIG_NLS_ISO8859_1=y ...@@ -681,7 +636,10 @@ CONFIG_NLS_ISO8859_1=y
# #
# Graphics support # Graphics support
# #
# CONFIG_FB is not set CONFIG_FB=y
CONFIG_FB_PXA=y
# CONFIG_FB_PXA_PARAMETERS is not set
# CONFIG_FB_VIRTUAL is not set
# #
# Console display driver support # Console display driver support
...@@ -689,6 +647,19 @@ CONFIG_NLS_ISO8859_1=y ...@@ -689,6 +647,19 @@ CONFIG_NLS_ISO8859_1=y
# CONFIG_VGA_CONSOLE is not set # CONFIG_VGA_CONSOLE is not set
# CONFIG_MDA_CONSOLE is not set # CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_PCI_CONSOLE=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
#
# Logo configuration
#
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
# #
# Sound # Sound
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/fb.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/setup.h> #include <asm/setup.h>
...@@ -31,6 +32,7 @@ ...@@ -31,6 +32,7 @@
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <asm/arch/mainstone.h> #include <asm/arch/mainstone.h>
#include <asm/arch/pxafb.h>
#include "generic.h" #include "generic.h"
...@@ -116,9 +118,66 @@ static struct platform_device smc91x_device = { ...@@ -116,9 +118,66 @@ static struct platform_device smc91x_device = {
.resource = smc91x_resources, .resource = smc91x_resources,
}; };
static void mainstone_backlight_power(int on)
{
if (on) {
pxa_gpio_mode(GPIO16_PWM0_MD);
pxa_set_cken(CKEN0_PWM0, 1);
PWM_CTRL0 = 0;
PWM_PWDUTY0 = 0x3ff;
PWM_PERVAL0 = 0x3ff;
} else {
PWM_CTRL0 = 0;
PWM_PWDUTY0 = 0x0;
PWM_PERVAL0 = 0x3FF;
pxa_set_cken(CKEN0_PWM0, 0);
}
}
static struct pxafb_mach_info toshiba_ltm04c380k __initdata = {
.pixclock = 50000,
.xres = 640,
.yres = 480,
.bpp = 16,
.hsync_len = 1,
.left_margin = 0x9f,
.right_margin = 1,
.vsync_len = 44,
.upper_margin = 0,
.lower_margin = 0,
.sync = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT,
.lccr0 = LCCR0_Act,
.lccr3 = LCCR3_PCP,
.pxafb_backlight_power = mainstone_backlight_power,
};
static struct pxafb_mach_info toshiba_ltm035a776c __initdata = {
.pixclock = 110000,
.xres = 240,
.yres = 320,
.bpp = 16,
.hsync_len = 4,
.left_margin = 8,
.right_margin = 20,
.vsync_len = 3,
.upper_margin = 1,
.lower_margin = 10,
.sync = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT,
.lccr0 = LCCR0_Act,
.lccr3 = LCCR3_PCP,
.pxafb_backlight_power = mainstone_backlight_power,
};
static void __init mainstone_init(void) static void __init mainstone_init(void)
{ {
platform_add_device(&smc91x_device); platform_add_device(&smc91x_device);
/* reading the BSR might be handy to select LCD type here */
if (0)
set_pxa_fb_info(&toshiba_ltm04c380k);
else
set_pxa_fb_info(&toshiba_ltm035a776c);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment