From 809c03fe4c0f90c640b26e6a2792553b592c68f2 Mon Sep 17 00:00:00 2001 From: lars Date: Mon, 11 Jan 2010 04:44:45 +0000 Subject: Merge xburst target. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19098 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../xburst/files-2.6.32/include/linux/jz4740-adc.h | 25 +++++++++++ .../xburst/files-2.6.32/include/linux/jz4740_fb.h | 52 ++++++++++++++++++++++ .../files-2.6.32/include/linux/mmc/jz4740_mmc.h | 15 +++++++ .../files-2.6.32/include/linux/mtd/jz4740_nand.h | 34 ++++++++++++++ .../include/linux/power/jz4740-battery.h | 28 ++++++++++++ 5 files changed, 154 insertions(+) create mode 100644 target/linux/xburst/files-2.6.32/include/linux/jz4740-adc.h create mode 100644 target/linux/xburst/files-2.6.32/include/linux/jz4740_fb.h create mode 100644 target/linux/xburst/files-2.6.32/include/linux/mmc/jz4740_mmc.h create mode 100644 target/linux/xburst/files-2.6.32/include/linux/mtd/jz4740_nand.h create mode 100644 target/linux/xburst/files-2.6.32/include/linux/power/jz4740-battery.h (limited to 'target/linux/xburst/files-2.6.32/include') diff --git a/target/linux/xburst/files-2.6.32/include/linux/jz4740-adc.h b/target/linux/xburst/files-2.6.32/include/linux/jz4740-adc.h new file mode 100644 index 000000000..59cfe634f --- /dev/null +++ b/target/linux/xburst/files-2.6.32/include/linux/jz4740-adc.h @@ -0,0 +1,25 @@ + +#ifndef __LINUX_JZ4740_ADC +#define __LINUX_JZ4740_ADC + +#include + +enum jz_adc_battery_scale { + JZ_ADC_BATTERY_SCALE_2V5, /* Mesures voltages up to 2.5V */ + JZ_ADC_BATTERY_SCALE_7V5, /* Mesures voltages up to 7.5V */ +}; + +/* + * jz4740_adc_read_battery_voltage - Read battery voltage from the ADC PBAT pin + * @dev: Pointer to a jz4740-adc device + * @scale: Whether to use 2.5V or 7.5V scale + * + * Returns: Battery voltage in mircovolts + * + * Context: Process +*/ +long jz4740_adc_read_battery_voltage(struct device *dev, + enum jz_adc_battery_scale scale); + + +#endif diff --git a/target/linux/xburst/files-2.6.32/include/linux/jz4740_fb.h b/target/linux/xburst/files-2.6.32/include/linux/jz4740_fb.h new file mode 100644 index 000000000..b3aafdfab --- /dev/null +++ b/target/linux/xburst/files-2.6.32/include/linux/jz4740_fb.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2009, Lars-Peter Clausen + * + * 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 __LINUX_JZ4740_FB_H +#define __LINUX_JZ4740_FB_H + +#include + +enum jz4740_fb_lcd_type { + JZ_LCD_TYPE_GENERIC_16_18_BIT = 0, + 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_8BIT_SERIAL = 11, +}; + +/* +* 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; + int bpp; + enum jz4740_fb_lcd_type lcd_type; +}; + +#endif diff --git a/target/linux/xburst/files-2.6.32/include/linux/mmc/jz4740_mmc.h b/target/linux/xburst/files-2.6.32/include/linux/mmc/jz4740_mmc.h new file mode 100644 index 000000000..8543f432b --- /dev/null +++ b/target/linux/xburst/files-2.6.32/include/linux/mmc/jz4740_mmc.h @@ -0,0 +1,15 @@ +#ifndef __LINUX_MMC_JZ4740_MMC +#define __LINUX_MMC_JZ4740_MMC + +struct jz4740_mmc_platform_data { + int gpio_power; + int gpio_card_detect; + int gpio_read_only; + unsigned card_detect_active_low:1; + unsigned read_only_active_low:1; + unsigned power_active_low:1; + + unsigned data_1bit:1; +}; + +#endif diff --git a/target/linux/xburst/files-2.6.32/include/linux/mtd/jz4740_nand.h b/target/linux/xburst/files-2.6.32/include/linux/mtd/jz4740_nand.h new file mode 100644 index 000000000..d8cfabe0e --- /dev/null +++ b/target/linux/xburst/files-2.6.32/include/linux/mtd/jz4740_nand.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2009, Lars-Peter Clausen + * JZ4720/JZ4740 SoC NAND controller driver + * + * 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 __JZ_NAND_H__ +#define __JZ_NAND_H__ + +#include +#include + +struct jz_nand_platform_data { + int num_partitions; + struct mtd_partition *partitions; + + struct nand_ecclayout *ecc_layout; + + unsigned int busy_gpio; + + void (*ident_callback)(struct platform_device *, struct nand_chip *, + struct mtd_partition **, int *num_partitions); +}; + +#endif diff --git a/target/linux/xburst/files-2.6.32/include/linux/power/jz4740-battery.h b/target/linux/xburst/files-2.6.32/include/linux/power/jz4740-battery.h new file mode 100644 index 000000000..2bcd77283 --- /dev/null +++ b/target/linux/xburst/files-2.6.32/include/linux/power/jz4740-battery.h @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2009, Jiejing Zhang + * + * 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 __JZ4740_BATTERY_H +#define __JZ4740_BATTERY_H + +struct jz_batt_info { + int dc_dect_gpio; /* GPIO port of DC charger detection */ + int usb_dect_gpio; /* GPIO port of USB charger detection */ + int charg_stat_gpio; /* GPIO port of Charger state */ + + int min_voltag; /* Mininal battery voltage in uV */ + int max_voltag; /* Maximum battery voltage in uV */ + int batt_tech; /* Battery technology */ +}; + +#endif -- cgit v1.2.3