Commit cfb4f5d1 authored by Magnus Damm's avatar Magnus Damm Committed by Linus Torvalds

fbdev: SuperH Mobile LCDC Driver

This is the SuperH Mobile LCDC frame buffer driver V2, adding support for
the LCDC block found in SuperH Mobile processors.  The hardware supports
up to two LCD panels per LCDC block, and both RGB and SYS interfaces can
be used to hook up LCD panels/modules.

The device driver is a regular platform driver, so LCD configuration and
board specific hooks are passed to the driver using platform data.  LCD
modules using SYS interface often require special configuration using the
SYS bus, and to solve this cleanly the driver provides SYS interface
operations to the board code.

Tested on sh7723 and sh7722 processors with a SYS16A QVGA panel and WVGA
panels using RGB16 and RGB18 interfaces.
Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
Acked-by: default avatarPaul Mundt <lethal@linux-sh.org>
Reviewed-by: default avatarKrzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c2c12155
......@@ -1866,6 +1866,16 @@ config FB_W100
If unsure, say N.
config FB_SH_MOBILE_LCDC
tristate "SuperH Mobile LCDC framebuffer support"
depends on FB && SUPERH
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
default m
---help---
Frame buffer driver for the on-chip SH-Mobile LCD controller.
config FB_S3C2410
tristate "S3C2410 LCD framebuffer support"
depends on FB && ARCH_S3C2410
......
......@@ -115,6 +115,8 @@ obj-$(CONFIG_FB_IBM_GXT4500) += gxt4500.o
obj-$(CONFIG_FB_PS3) += ps3fb.o
obj-$(CONFIG_FB_SM501) += sm501fb.o
obj-$(CONFIG_FB_XILINX) += xilinxfb.o
obj-$(CONFIG_FB_SH_MOBILE_LCDC) += sh_mobile_lcdcfb.o
obj-$(CONFIG_FB_SH7343VOU) += sh7343_voufb.o
obj-$(CONFIG_FB_OMAP) += omap/
obj-$(CONFIG_XEN_FBDEV_FRONTEND) += xen-fbfront.o
obj-$(CONFIG_FB_CARMINE) += carminefb.o
......
This diff is collapsed.
#ifndef __ASM_SH_MOBILE_LCDC_H__
#define __ASM_SH_MOBILE_LCDC_H__
#include <linux/fb.h>
enum { RGB8, /* 24bpp, 8:8:8 */
RGB9, /* 18bpp, 9:9 */
RGB12A, /* 24bpp, 12:12 */
RGB12B, /* 12bpp */
RGB16, /* 16bpp */
RGB18, /* 18bpp */
RGB24, /* 24bpp */
SYS8A, /* 24bpp, 8:8:8 */
SYS8B, /* 18bpp, 8:8:2 */
SYS8C, /* 18bpp, 2:8:8 */
SYS8D, /* 16bpp, 8:8 */
SYS9, /* 18bpp, 9:9 */
SYS12, /* 24bpp, 12:12 */
SYS16A, /* 16bpp */
SYS16B, /* 18bpp, 16:2 */
SYS16C, /* 18bpp, 2:16 */
SYS18, /* 18bpp */
SYS24 };/* 24bpp */
enum { LCDC_CHAN_DISABLED = 0,
LCDC_CHAN_MAINLCD,
LCDC_CHAN_SUBLCD };
enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL };
struct sh_mobile_lcdc_sys_bus_cfg {
unsigned long ldmt2r;
unsigned long ldmt3r;
};
struct sh_mobile_lcdc_sys_bus_ops {
void (*write_index)(void *handle, unsigned long data);
void (*write_data)(void *handle, unsigned long data);
unsigned long (*read_data)(void *handle);
};
struct sh_mobile_lcdc_board_cfg {
void *board_data;
int (*setup_sys)(void *board_data, void *sys_ops_handle,
struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
void (*display_on)(void *board_data);
void (*display_off)(void *board_data);
};
struct sh_mobile_lcdc_chan_cfg {
int chan;
int bpp;
int interface_type; /* selects RGBn or SYSn I/F, see above */
int clock_divider;
struct fb_videomode lcd_cfg;
struct sh_mobile_lcdc_board_cfg board_cfg;
struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */
};
struct sh_mobile_lcdc_info {
unsigned long lddckr;
int clock_source;
struct sh_mobile_lcdc_chan_cfg ch[2];
};
#endif /* __ASM_SH_MOBILE_LCDC_H__ */
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