1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-28 10:52:25 +02:00

n810: omapfb and keyboard fixes

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23898 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
mb 2010-11-06 16:51:27 +00:00
parent 232ec2e0d2
commit e3cd71ceb2
2 changed files with 114 additions and 107 deletions

View File

@ -12,7 +12,7 @@
Index: linux-2.6.37-rc1/arch/arm/mach-omap1/board-nokia770.c
===================================================================
--- linux-2.6.37-rc1.orig/arch/arm/mach-omap1/board-nokia770.c 2010-11-01 12:54:12.000000000 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap1/board-nokia770.c 2010-11-05 17:36:26.186000001 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap1/board-nokia770.c 2010-11-06 17:20:54.534000001 +0100
@@ -36,6 +36,7 @@
#include <plat/lcd_mipid.h>
#include <plat/mmc.h>
@ -48,7 +48,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap1/board-nokia770.c
Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
===================================================================
--- linux-2.6.37-rc1.orig/arch/arm/mach-omap2/board-n8x0.c 2010-11-01 12:54:12.000000000 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c 2010-11-05 17:37:40.169999973 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c 2010-11-06 17:26:56.824022830 +0100
@@ -18,9 +18,13 @@
#include <linux/io.h>
#include <linux/stddef.h>
@ -72,7 +72,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
#include "mux.h"
@@ -40,109 +46,156 @@
@@ -40,109 +46,154 @@
static int slot2_cover_open;
static struct device *mmc_device;
@ -92,11 +92,32 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
-static int tusb_set_power(int state)
-{
- int i, retval = 0;
-
- if (state) {
- gpio_set_value(TUSB6010_GPIO_ENABLE, 1);
- msleep(1);
-
- /* Wait until TUSB6010 pulls INT pin down */
- i = 100;
- while (i && gpio_get_value(TUSB6010_GPIO_INT)) {
- msleep(1);
- i--;
- }
-
- if (!i) {
- printk(KERN_ERR "tusb: powerup failed\n");
- retval = -ENODEV;
- }
- } else {
- gpio_set_value(TUSB6010_GPIO_ENABLE, 0);
- msleep(10);
- }
-
- return retval;
+#define RX51_TSC2005_RESET_GPIO 94
+#define RX51_TSC2005_IRQ_GPIO 106
+#define OMAP_TAG_NOKIA_BT 0x4e01
+
+#if 0
+static s16 rx44_keymap[LM8323_KEYMAP_SIZE] = {
+ [0x01] = KEY_Q,
+ [0x02] = KEY_K,
@ -170,11 +191,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
+ //.pwm1_name = "n810::keyboard",
+ //.pwm2_name = "n810::cover",
+};
+#endif
- if (state) {
- gpio_set_value(TUSB6010_GPIO_ENABLE, 1);
- msleep(1);
+
+struct omap_bluetooth_config {
+ u8 chip_type;
+ u8 bt_wakeup_gpio;
@ -200,42 +217,16 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
+ n8x0_bt_device.dev.platform_data = (void *) bt_config;
+ if (platform_device_register(&n8x0_bt_device) < 0)
+ BUG();
+}
- /* Wait until TUSB6010 pulls INT pin down */
- i = 100;
- while (i && gpio_get_value(TUSB6010_GPIO_INT)) {
- msleep(1);
- i--;
- }
+static struct omap2_mcspi_device_config mipid_mcspi_config = {
+ .turbo_mode = 0,
+ .single_channel = 1,
+};
- if (!i) {
- printk(KERN_ERR "tusb: powerup failed\n");
- retval = -ENODEV;
- }
- } else {
- gpio_set_value(TUSB6010_GPIO_ENABLE, 0);
- msleep(10);
- }
+static int slot1_cover_open;
+static int slot2_cover_open;
+static struct device *mmc_device;
- return retval;
-}
}
-static struct musb_hdrc_config musb_config = {
- .multipoint = 1,
- .dyn_fifo = 1,
- .num_eps = 16,
- .ram_bits = 12,
+static struct omap2_mcspi_device_config p54spi_mcspi_config = {
+static struct omap2_mcspi_device_config mipid_mcspi_config = {
+ .turbo_mode = 0,
+ .single_channel = 1,
+ .single_channel = 1,
};
-static struct musb_hdrc_platform_data tusb_data = {
@ -245,20 +236,15 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
- .mode = MUSB_PERIPHERAL,
-#else /* defined(CONFIG_USB_MUSB_HOST) */
- .mode = MUSB_HOST,
+#ifdef CONFIG_MACH_NOKIA_N8X0_LCD
+extern struct mipid_platform_data n8x0_mipid_platform_data;
#endif
-#endif
- .set_power = tusb_set_power,
- .min_power = 25, /* x2 = 50 mA drawn from VBUS as peripheral */
- .power = 100, /* Max 100 mA VBUS for host mode */
- .config = &musb_config,
-};
-
-static void __init n8x0_usb_init(void)
+#ifdef CONFIG_TOUCHSCREEN_TSC2005
+static struct tsc2005_platform_data tsc2005_config;
+static void rx51_tsc2005_set_reset(bool enable)
{
-{
- int ret = 0;
- static char announce[] __initdata = KERN_INFO "TUSB 6010\n";
-
@ -272,25 +258,39 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
- gpio_direction_output(TUSB6010_GPIO_ENABLE, 0);
-
- tusb_set_power(0);
-
+static int slot1_cover_open;
+static int slot2_cover_open;
+static struct device *mmc_device;
- ret = tusb6010_setup_interface(&tusb_data, TUSB6010_REFCLK_19, 2,
- TUSB6010_ASYNC_CS, TUSB6010_SYNC_CS,
- TUSB6010_GPIO_INT, TUSB6010_DMACHAN);
- if (ret != 0)
- goto err;
-
- printk(announce);
-
+static struct omap2_mcspi_device_config p54spi_mcspi_config = {
+ .turbo_mode = 0,
+ .single_channel = 1,
+};
- return;
-
+#ifdef CONFIG_MACH_NOKIA_N8X0_LCD
+extern struct mipid_platform_data n8x0_mipid_platform_data;
+#endif
-err:
- gpio_free(TUSB6010_GPIO_ENABLE);
+#ifdef CONFIG_TOUCHSCREEN_TSC2005
+static struct tsc2005_platform_data tsc2005_config;
+static void rx51_tsc2005_set_reset(bool enable)
+{
+ gpio_set_value(RX51_TSC2005_RESET_GPIO, enable);
}
-#else
-static void __init n8x0_usb_init(void) {}
-
-static void __init n8x0_usb_init(void) {}
-#endif /*CONFIG_USB_TUSB6010 */
-
-
@ -315,7 +315,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
{
.modalias = "p54spi",
.bus_num = 2,
@@ -150,7 +203,71 @@
@@ -150,8 +201,60 @@
.max_speed_hz = 48000000,
.controller_data = &p54spi_mcspi_config,
},
@ -328,8 +328,8 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
+ .controller_data = &tsc2005_mcspi_config,
+ .platform_data = &tsc2005_config,
+ },
+};
+
};
+static void __init tsc2005_set_config(void)
+{
+ const struct omap_lcd_config *conf;
@ -373,21 +373,10 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
+ }
+}
+
+#if 0
+static struct i2c_board_info __initdata_or_module n8x0_i2c_board_info_2[] = {};
+
+static struct i2c_board_info __initdata_or_module n810_i2c_board_info_2[] = {
+ {
+ I2C_BOARD_INFO("lm8323", 0x45),
+ .irq = OMAP_GPIO_IRQ(109),
+ .platform_data = &lm8323_pdata,
+ },
};
+#endif
#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
@@ -184,6 +301,20 @@
@@ -184,6 +287,20 @@
},
};
@ -408,7 +397,19 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
static struct omap_onenand_platform_data board_onenand_data = {
.cs = 0,
.gpio_irq = 26,
@@ -657,10 +788,62 @@
@@ -626,6 +743,11 @@
static struct i2c_board_info n810_i2c_board_info_2[] __initdata = {
{
+ I2C_BOARD_INFO("lm8323", 0x45),
+ .irq = OMAP_GPIO_IRQ(109),
+ .platform_data = &lm8323_pdata,
+ },
+ {
I2C_BOARD_INFO("tlv320aic3x", 0x18),
.platform_data = &n810_aic33_data,
},
@@ -657,10 +779,62 @@
#define board_mux NULL
#endif
@ -471,10 +472,21 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
spi_register_board_info(n800_spi_board_info,
ARRAY_SIZE(n800_spi_board_info));
omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1,
@@ -671,6 +845,10 @@
ARRAY_SIZE(n810_i2c_board_info_2));
omap_serial_init();
+
+ n8x0_mipid_init();
+ n8x0_blizzard_init();
+
n8x0_onenand_init();
n8x0_mmc_init();
n8x0_usb_init();
Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-lcd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-lcd.c 2010-11-05 17:36:45.209000001 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-lcd.c 2010-11-06 17:26:25.503999974 +0100
@@ -0,0 +1,127 @@
+/*
+ * linux/arch/arm/mach-omap2/board-n8x0.c
@ -606,7 +618,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-lcd.c
Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-usb.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-usb.c 2010-11-05 17:36:26.187000001 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-usb.c 2010-11-06 17:20:54.534000001 +0100
@@ -0,0 +1,175 @@
+/*
+ * linux/arch/arm/mach-omap2/board-n8x0-usb.c
@ -786,7 +798,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-usb.c
Index: linux-2.6.37-rc1/arch/arm/mach-omap2/control.c
===================================================================
--- linux-2.6.37-rc1.orig/arch/arm/mach-omap2/control.c 2010-11-01 12:54:12.000000000 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/control.c 2010-11-05 17:36:26.187000001 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/control.c 2010-11-06 17:20:54.534000001 +0100
@@ -172,6 +172,7 @@
return __raw_readw(OMAP_CTRL_REGADDR(offset));
}
@ -806,7 +818,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/control.c
Index: linux-2.6.37-rc1/arch/arm/mach-omap2/Kconfig
===================================================================
--- linux-2.6.37-rc1.orig/arch/arm/mach-omap2/Kconfig 2010-11-01 12:54:12.000000000 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/Kconfig 2010-11-05 17:36:26.187000001 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/Kconfig 2010-11-06 17:20:54.534000001 +0100
@@ -210,6 +210,16 @@
select MACH_NOKIA_N810
select MACH_NOKIA_N810_WIMAX
@ -827,7 +839,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/Kconfig
Index: linux-2.6.37-rc1/arch/arm/mach-omap2/Makefile
===================================================================
--- linux-2.6.37-rc1.orig/arch/arm/mach-omap2/Makefile 2010-11-01 12:54:12.000000000 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/Makefile 2010-11-05 17:36:26.187000001 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/Makefile 2010-11-06 17:20:54.534000001 +0100
@@ -139,6 +139,8 @@
hsmmc.o \
board-flash.o
@ -840,35 +852,30 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/Makefile
Index: linux-2.6.37-rc1/arch/arm/mach-omap2/serial.c
===================================================================
--- linux-2.6.37-rc1.orig/arch/arm/mach-omap2/serial.c 2010-11-01 12:54:12.000000000 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/serial.c 2010-11-05 17:36:26.187000001 +0100
@@ -545,10 +545,10 @@
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/serial.c 2010-11-06 17:20:54.535000001 +0100
@@ -545,14 +545,17 @@
uart->padconf = 0;
}
- uart->irqflags |= IRQF_SHARED;
+/* uart->irqflags |= IRQF_SHARED;
+#if 1
uart->irqflags |= IRQF_SHARED;
ret = request_threaded_irq(uart->irq, NULL, omap_uart_interrupt,
IRQF_SHARED, "serial idle", (void *)uart);
- WARN_ON(ret);
+ WARN_ON(ret); */
WARN_ON(ret);
+#endif
}
void omap_uart_enable_irqs(int enable)
@@ -556,7 +556,7 @@
{
+#if 1
int ret;
struct omap_uart_state *uart;
- list_for_each_entry(uart, &uart_list, node) {
+/* list_for_each_entry(uart, &uart_list, node) {
if (enable) {
pm_runtime_put_sync(&uart->pdev->dev);
ret = request_threaded_irq(uart->irq, NULL,
@@ -568,7 +568,7 @@
pm_runtime_get_noresume(&uart->pdev->dev);
@@ -569,6 +572,7 @@
free_irq(uart->irq, (void *)uart);
}
- }
+ } */
}
+#endif
}
static ssize_t sleep_timeout_show(struct device *dev,

View File

@ -12,8 +12,8 @@
Index: linux-2.6.37-rc1/drivers/cbus/Kconfig
===================================================================
--- linux-2.6.37-rc1.orig/drivers/cbus/Kconfig 2010-11-05 17:38:14.843000000 +0100
+++ linux-2.6.37-rc1/drivers/cbus/Kconfig 2010-11-05 17:38:14.894000001 +0100
--- linux-2.6.37-rc1.orig/drivers/cbus/Kconfig 2010-11-06 17:28:21.821000000 +0100
+++ linux-2.6.37-rc1/drivers/cbus/Kconfig 2010-11-06 17:28:21.872000001 +0100
@@ -94,4 +94,16 @@
to Retu/Vilma. Detection state and events are exposed through
sysfs.
@ -33,8 +33,8 @@ Index: linux-2.6.37-rc1/drivers/cbus/Kconfig
endmenu
Index: linux-2.6.37-rc1/drivers/cbus/Makefile
===================================================================
--- linux-2.6.37-rc1.orig/drivers/cbus/Makefile 2010-11-05 17:38:14.834000050 +0100
+++ linux-2.6.37-rc1/drivers/cbus/Makefile 2010-11-05 17:38:14.894000001 +0100
--- linux-2.6.37-rc1.orig/drivers/cbus/Makefile 2010-11-06 17:28:21.812000054 +0100
+++ linux-2.6.37-rc1/drivers/cbus/Makefile 2010-11-06 17:28:21.872000001 +0100
@@ -12,3 +12,6 @@
obj-$(CONFIG_CBUS_TAHVO_USER) += tahvo-user.o
obj-$(CONFIG_CBUS_RETU_USER) += retu-user.o
@ -45,7 +45,7 @@ Index: linux-2.6.37-rc1/drivers/cbus/Makefile
Index: linux-2.6.37-rc1/drivers/cbus/n810bm_main.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.37-rc1/drivers/cbus/n810bm_main.c 2010-11-05 17:38:14.894000001 +0100
+++ linux-2.6.37-rc1/drivers/cbus/n810bm_main.c 2010-11-06 17:28:21.872000001 +0100
@@ -0,0 +1,397 @@
+/*
+ * Nokia n810 battery management
@ -446,8 +446,8 @@ Index: linux-2.6.37-rc1/drivers/cbus/n810bm_main.c
+MODULE_AUTHOR("Michael Buesch");
Index: linux-2.6.37-rc1/drivers/cbus/retu.c
===================================================================
--- linux-2.6.37-rc1.orig/drivers/cbus/retu.c 2010-11-05 17:38:14.834000050 +0100
+++ linux-2.6.37-rc1/drivers/cbus/retu.c 2010-11-05 17:38:14.895000001 +0100
--- linux-2.6.37-rc1.orig/drivers/cbus/retu.c 2010-11-06 17:28:21.812000054 +0100
+++ linux-2.6.37-rc1/drivers/cbus/retu.c 2010-11-06 17:28:21.872000001 +0100
@@ -85,10 +85,10 @@
*
* This function writes a value to the specified register
@ -463,8 +463,8 @@ Index: linux-2.6.37-rc1/drivers/cbus/retu.c
void retu_set_clear_reg_bits(int reg, u16 set, u16 clear)
Index: linux-2.6.37-rc1/drivers/cbus/retu.h
===================================================================
--- linux-2.6.37-rc1.orig/drivers/cbus/retu.h 2010-11-05 17:38:14.834000050 +0100
+++ linux-2.6.37-rc1/drivers/cbus/retu.h 2010-11-05 17:38:14.895000001 +0100
--- linux-2.6.37-rc1.orig/drivers/cbus/retu.h 2010-11-06 17:28:21.812000054 +0100
+++ linux-2.6.37-rc1/drivers/cbus/retu.h 2010-11-06 17:28:21.872000001 +0100
@@ -39,6 +39,7 @@
#define RETU_REG_CC2 0x0e /* Common control register 2 */
#define RETU_REG_CTRL_CLR 0x0f /* Regulator clear register */
@ -484,9 +484,9 @@ Index: linux-2.6.37-rc1/drivers/cbus/retu.h
int retu_request_irq(int id, void *irq_handler, unsigned long arg, char *name);
Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
===================================================================
--- linux-2.6.37-rc1.orig/arch/arm/mach-omap2/board-n8x0.c 2010-11-05 17:38:14.819000329 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c 2010-11-05 17:38:14.895000001 +0100
@@ -908,6 +908,17 @@
--- linux-2.6.37-rc1.orig/arch/arm/mach-omap2/board-n8x0.c 2010-11-06 17:28:21.796000362 +0100
+++ linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c 2010-11-06 17:28:21.873000001 +0100
@@ -899,6 +899,17 @@
ARRAY_SIZE(n8x0_gpio_switches));
}
@ -504,7 +504,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
static void __init n8x0_init_machine(void)
{
omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
@@ -930,6 +941,8 @@
@@ -925,6 +936,8 @@
n8x0_onenand_init();
n8x0_mmc_init();
n8x0_usb_init();
@ -516,7 +516,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c
Index: linux-2.6.37-rc1/drivers/cbus/lipocharge.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.37-rc1/drivers/cbus/lipocharge.c 2010-11-05 17:38:14.895000001 +0100
+++ linux-2.6.37-rc1/drivers/cbus/lipocharge.c 2010-11-06 17:28:21.873000001 +0100
@@ -0,0 +1,63 @@
+/*
+ * Generic LIPO battery charger
@ -584,7 +584,7 @@ Index: linux-2.6.37-rc1/drivers/cbus/lipocharge.c
Index: linux-2.6.37-rc1/drivers/cbus/lipocharge.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.37-rc1/drivers/cbus/lipocharge.h 2010-11-05 17:38:14.895000001 +0100
+++ linux-2.6.37-rc1/drivers/cbus/lipocharge.h 2010-11-06 17:28:21.873000001 +0100
@@ -0,0 +1,50 @@
+#ifndef LIPOCHARGE_H_
+#define LIPOCHARGE_H_
@ -638,8 +638,8 @@ Index: linux-2.6.37-rc1/drivers/cbus/lipocharge.h
+#endif /* LIPOCHARGE_H_ */
Index: linux-2.6.37-rc1/drivers/cbus/tahvo.h
===================================================================
--- linux-2.6.37-rc1.orig/drivers/cbus/tahvo.h 2010-11-05 17:38:14.835000037 +0100
+++ linux-2.6.37-rc1/drivers/cbus/tahvo.h 2010-11-05 17:38:14.895000001 +0100
--- linux-2.6.37-rc1.orig/drivers/cbus/tahvo.h 2010-11-06 17:28:21.813000041 +0100
+++ linux-2.6.37-rc1/drivers/cbus/tahvo.h 2010-11-06 17:28:21.873000001 +0100
@@ -30,8 +30,14 @@
#define TAHVO_REG_IDR 0x01 /* Interrupt ID */
#define TAHVO_REG_IDSR 0x02 /* Interrupt status */