From 01ed21fc16e8068c7d230945983a38a43570e6c3 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Fri, 5 Mar 2010 04:21:41 +0000 Subject: [PATCH] Add support for the n516 SVN-Revision: 19987 --- .../mips/include/asm/mach-jz4740/board-n516.h | 39 + .../files-2.6.32/arch/mips/jz4740/Kconfig | 5 + .../files-2.6.32/arch/mips/jz4740/Makefile | 3 +- .../arch/mips/jz4740/board-n516-display.c | 395 ++++++ .../arch/mips/jz4740/board-n516.c | 201 +++ .../files-2.6.32/drivers/i2c/chips/n516-lpc.c | 491 +++++++ .../files-2.6.32/drivers/video/metronomefb.c | 1229 +++++++++++++++++ .../files-2.6.32/include/video/metronomefb.h | 67 + target/linux/xburst/n516/config-2.6.32 | 25 + target/linux/xburst/n516/target.mk | 2 + ...{800-n526-lpc.patch => 800-n5x6-lpc.patch} | 13 +- 11 files changed, 2467 insertions(+), 3 deletions(-) create mode 100644 target/linux/xburst/files-2.6.32/arch/mips/include/asm/mach-jz4740/board-n516.h create mode 100644 target/linux/xburst/files-2.6.32/arch/mips/jz4740/board-n516-display.c create mode 100644 target/linux/xburst/files-2.6.32/arch/mips/jz4740/board-n516.c create mode 100644 target/linux/xburst/files-2.6.32/drivers/i2c/chips/n516-lpc.c create mode 100644 target/linux/xburst/files-2.6.32/drivers/video/metronomefb.c create mode 100644 target/linux/xburst/files-2.6.32/include/video/metronomefb.h create mode 100644 target/linux/xburst/n516/config-2.6.32 create mode 100644 target/linux/xburst/n516/target.mk rename target/linux/xburst/patches-2.6.32/{800-n526-lpc.patch => 800-n5x6-lpc.patch} (79%) diff --git a/target/linux/xburst/files-2.6.32/arch/mips/include/asm/mach-jz4740/board-n516.h b/target/linux/xburst/files-2.6.32/arch/mips/include/asm/mach-jz4740/board-n516.h new file mode 100644 index 0000000000..cbe6544778 --- /dev/null +++ b/target/linux/xburst/files-2.6.32/arch/mips/include/asm/mach-jz4740/board-n516.h @@ -0,0 +1,39 @@ +/* + * linux/include/asm-mips/mach-jz4740/board-n516.h + * + * JZ4730-based N516 board definition. + * + * Copyright (C) 2009, Yauhen Kharuzhy + * + * 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. + */ + +#ifndef __ASM_JZ4740_N516_H__ +#define __ASM_JZ4740_N516_H__ + +#include + +/* + * GPIO + */ +#define GPIO_SD_VCC_EN_N JZ_GPIO_PORTD(17) +#define GPIO_SD_CD_N JZ_GPIO_PORTD(7) +#define GPIO_SD_WP JZ_GPIO_PORTD(15) +#define GPIO_USB_DETECT JZ_GPIO_PORTD(19) +#define GPIO_CHARG_STAT_N JZ_GPIO_PORTD(16) +#define GPIO_LED_ENABLE JZ_GPIO_PORTD(28) +#define GPIO_LPC_INT JZ_GPIO_PORTD(14) +#define GPIO_HPHONE_DETECT JZ_GPIO_PORTD(20) +#define GPIO_SPEAKER_ENABLE JZ_GPIO_PORTD(21) + +/* Display */ +#define GPIO_DISPLAY_RST_L JZ_GPIO_PORTB(18) +#define GPIO_DISPLAY_RDY JZ_GPIO_PORTB(17) +#define GPIO_DISPLAY_STBY JZ_GPIO_PORTC(22) +#define GPIO_DISPLAY_ERR JZ_GPIO_PORTC(23) +#define GPIO_DISPLAY_OFF_N JZ_GPIO_PORTD(1) + +#endif /* __ASM_JZ4740_N516_H__ */ diff --git a/target/linux/xburst/files-2.6.32/arch/mips/jz4740/Kconfig b/target/linux/xburst/files-2.6.32/arch/mips/jz4740/Kconfig index 015e0560d5..71d35f7a09 100644 --- a/target/linux/xburst/files-2.6.32/arch/mips/jz4740/Kconfig +++ b/target/linux/xburst/files-2.6.32/arch/mips/jz4740/Kconfig @@ -8,6 +8,11 @@ config JZ4740_QI_LB60 select DMA_NONCOHERENT select SOC_JZ4740 +config JZ4740_N516 + bool "Hanvon n516 eBook reader" + select DMA_NONCOHERENT + select SOC_JZ4740 + config JZ4740_N526 bool "Hanvon n526 eBook reader" select DMA_NONCOHERENT diff --git a/target/linux/xburst/files-2.6.32/arch/mips/jz4740/Makefile b/target/linux/xburst/files-2.6.32/arch/mips/jz4740/Makefile index b61f5cf8cc..f298174e5a 100644 --- a/target/linux/xburst/files-2.6.32/arch/mips/jz4740/Makefile +++ b/target/linux/xburst/files-2.6.32/arch/mips/jz4740/Makefile @@ -12,9 +12,10 @@ obj-$(CONFIG_DEBUG_FS) += clock-debugfs.o # board specific support obj-$(CONFIG_JZ4740_QI_LB60) += board-qi_lb60.o +obj-$(CONFIG_JZ4740_N516) += board-n516.o board-n516-display.o obj-$(CONFIG_JZ4740_N526) += board-n526.o # PM support -obj-$(CONFIG_PM) +=pm.o +obj-$(CONFIG_PM) += pm.o diff --git a/target/linux/xburst/files-2.6.32/arch/mips/jz4740/board-n516-display.c b/target/linux/xburst/files-2.6.32/arch/mips/jz4740/board-n516-display.c new file mode 100644 index 0000000000..a0485da204 --- /dev/null +++ b/target/linux/xburst/files-2.6.32/arch/mips/jz4740/board-n516-display.c @@ -0,0 +1,395 @@ +/* + * board-n516-display.c -- Platform device for N516 display + * + * Copyright (C) 2009, Yauhen Kharuzhy + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive for + * more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include