Skip to content

Commit

Permalink
FBDEV: JZ4740: Add framebuffer driver
Browse files Browse the repository at this point in the history
Add support for the LCD controller on JZ4740 SoCs.

Signed-off-by: Lars-Peter Clausen <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/1470/
Signed-off-by: Ralf Baechle <[email protected]>
  • Loading branch information
larsclausen authored and ralfbaechle committed Aug 5, 2010
1 parent 3bf0eea commit 7a92d54
Show file tree
Hide file tree
Showing 4 changed files with 924 additions and 0 deletions.
67 changes: 67 additions & 0 deletions arch/mips/include/asm/mach-jz4740/jz4740_fb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Copyright (C) 2009, Lars-Peter Clausen <[email protected]>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/

#ifndef __ASM_MACH_JZ4740_JZ4740_FB_H__
#define __ASM_MACH_JZ4740_JZ4740_FB_H__

#include <linux/fb.h>

enum jz4740_fb_lcd_type {
JZ_LCD_TYPE_GENERIC_16_BIT = 0,
JZ_LCD_TYPE_GENERIC_18_BIT = 0 | (1 << 4),
JZ_LCD_TYPE_SPECIAL_TFT_1 = 1,
JZ_LCD_TYPE_SPECIAL_TFT_2 = 2,
JZ_LCD_TYPE_SPECIAL_TFT_3 = 3,
JZ_LCD_TYPE_NON_INTERLACED_CCIR656 = 5,
JZ_LCD_TYPE_INTERLACED_CCIR656 = 7,
JZ_LCD_TYPE_SINGLE_COLOR_STN = 8,
JZ_LCD_TYPE_SINGLE_MONOCHROME_STN = 9,
JZ_LCD_TYPE_DUAL_COLOR_STN = 10,
JZ_LCD_TYPE_DUAL_MONOCHROME_STN = 11,
JZ_LCD_TYPE_8BIT_SERIAL = 12,
};

#define JZ4740_FB_SPECIAL_TFT_CONFIG(start, stop) (((start) << 16) | (stop))

/*
* width: width of the lcd display in mm
* height: height of the lcd display in mm
* num_modes: size of modes
* modes: list of valid video modes
* bpp: bits per pixel for the lcd
* lcd_type: lcd type
*/

struct jz4740_fb_platform_data {
unsigned int width;
unsigned int height;

size_t num_modes;
struct fb_videomode *modes;

unsigned int bpp;
enum jz4740_fb_lcd_type lcd_type;

struct {
uint32_t spl;
uint32_t cls;
uint32_t ps;
uint32_t rev;
} special_tft_config;

unsigned pixclk_falling_edge:1;
unsigned date_enable_active_low:1;
};

#endif
9 changes: 9 additions & 0 deletions drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2229,6 +2229,15 @@ config FB_BROADSHEET
and could also have been called by other names when coupled with
a bridge adapter.

config FB_JZ4740
tristate "JZ4740 LCD framebuffer support"
depends on FB && MACH_JZ4740
select FB_SYS_FILLRECT
select FB_SYS_COPYAREA
select FB_SYS_IMAGEBLIT
help
Framebuffer support for the JZ4740 SoC.

source "drivers/video/omap/Kconfig"
source "drivers/video/omap2/Kconfig"

Expand Down
1 change: 1 addition & 0 deletions drivers/video/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ obj-$(CONFIG_FB_CARMINE) += carminefb.o
obj-$(CONFIG_FB_MB862XX) += mb862xx/
obj-$(CONFIG_FB_MSM) += msm/
obj-$(CONFIG_FB_NUC900) += nuc900fb.o
obj-$(CONFIG_FB_JZ4740) += jz4740_fb.o

# Platform or fallback drivers go here
obj-$(CONFIG_FB_UVESA) += uvesafb.o
Expand Down
Loading

0 comments on commit 7a92d54

Please sign in to comment.