diff --git a/arch/mips/include/asm/mach-jz4740/jz4740_fb.h b/arch/mips/include/asm/mach-jz4740/jz4740_fb.h index 6a50e6f..18af90e 100644 --- a/arch/mips/include/asm/mach-jz4740/jz4740_fb.h +++ b/arch/mips/include/asm/mach-jz4740/jz4740_fb.h @@ -30,8 +30,17 @@ enum jz4740_fb_lcd_type { JZ_LCD_TYPE_DUAL_COLOR_STN = 10, JZ_LCD_TYPE_DUAL_MONOCHROME_STN = 11, JZ_LCD_TYPE_8BIT_SERIAL = 12, + + JZ_SLCD_TYPE_PARALLEL_8_BIT = 1 | (1 << 5), + JZ_SLCD_TYPE_PARALLEL_16_BIT = 0 | (1 << 5), + JZ_SLCD_TYPE_PARALLEL_18_BIT = 2 | (1 << 5), + JZ_SLCD_TYPE_SERIAL_8_BIT = 1 | (3 << 5), + JZ_SLCD_TYPE_SERIAL_16_BIT = 0 | (3 << 5), + JZ_SLCD_TYPE_SERIAL_18_BIT = 2 | (3 << 5), }; +#define JZ4740_FB_IS_SLCD_TYPE(type) ((type) & (1 << 5)) +#define JZ4740_FB_IS_SLCD_SERIAL_TYPE(type) ((type) & (2 << 5)) #define JZ4740_FB_SPECIAL_TFT_CONFIG(start, stop) (((start) << 16) | (stop)) /* @@ -62,6 +71,20 @@ struct jz4740_fb_platform_data { unsigned pixclk_falling_edge:1; unsigned date_enable_active_low:1; + unsigned chip_select_active_low:1; + unsigned register_select_active_low:1; }; +struct platform_device; + +extern void jz4740_fb_slcd_disable_transfer(struct platform_device *pdev); +extern void jz4740_fb_slcd_enable_transfer(struct platform_device *pdev); +extern void jz4740_fb_slcd_send_cmd_data(struct platform_device *pdev, + unsigned int cmd, unsigned int data); +extern void jz4740_fb_slcd_send_cmd(struct platform_device *pdev, + unsigned int cmd); + #endif diff --git a/arch/mips/jz4740/Kconfig b/arch/mips/jz4740/Kconfig index 3e7141f..cc6f9f2 100644 --- a/arch/mips/jz4740/Kconfig +++ b/arch/mips/jz4740/Kconfig @@ -6,6 +6,9 @@ choice config JZ4740_QI_LB60 bool "Qi Hardware Ben NanoNote" +config JZ4740_ONDAVX747 + bool "Onda VX747" + endchoice config HAVE_PWM diff --git a/arch/mips/jz4740/Makefile b/arch/mips/jz4740/Makefile index a604eae..2d6512c 100644 --- a/arch/mips/jz4740/Makefile +++ b/arch/mips/jz4740/Makefile @@ -12,6 +12,7 @@ obj-$(CONFIG_DEBUG_FS) += clock-debugfs.o # board specific support obj-$(CONFIG_JZ4740_QI_LB60) += board-qi_lb60.o +obj-$(CONFIG_JZ4740_ONDAVX747) += board-ondavx747.o # PM support diff --git a/arch/mips/jz4740/board-ondavx747.c b/arch/mips/jz4740/board-ondavx747.c new file mode 100644 index 0000000..1baa931 --- /dev/null +++ b/arch/mips/jz4740/board-ondavx747.c @@ -0,0 +1,263 @@ +/* + * linux/arch/mips/jz4740/board-ondavx747.c + * + * Onda VX747 board support + * + * Copyright (c) 2010 Maurus Cuelenaere + * based on board-qi_lb60.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 or later + * as published by the Free Software Foundation. + */ + +#include +#include +#include + +#include