Palm TE Touchscreen and fixes
Subsystems (9)
PATCH 1/1 Palm TE Touchscreen and fixes
Hello,
I own a Palm Tungsten E PDA that is based on an OMAP310 motherboard. There has already been some interest in running Linux on this device, in particular Romain Goyet submitted a patch that made basic fixes which were required for the kernel to boot and additionally included a working driver for the LCD of OMAP310. This patch was applied around Linux 2.6.13 and since then many changes broke the compatibility with OMAP311 and even introduced compilation errors. I'm attaching three patches against the todays GIT snapshot:
- The first one fixes the compilation errors and some clock issues
that made the kernel hang on boot on Palm Tungsten E. While these
changes make the kernel boot and work well with the device, and
hopefully don't affect other devices, I don't know how correct are my
ways of fixing it, as I'm completely inexperienced in kernel insides.
Note that the last hunk is for a compilation error introduced two days
ago here: http://www.kernel.org/git/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=89ac1ab633637032c80a5d3424120d153ff7d754
and I think today someone already proposed a different idea for
dealing with this error.
- The second patch adds support for the Touchscreen device found in OMAP310. Again I don't know how proper is the driver, but it works and it was written according to the documentation from Texas Instruments. Because the DSP chipset of the OMAP310 board (called TSC2301) carries out a big part of the task of controlling the touchscreen, in hardware, the driver mechanism for this touchscreen is much simpler than other OMAP touchscreens and I had to make small changes in "omap_ts.c" which is generic for all OMAP touchscreens.
- The last patch only corrects some typos I found while browsing the sources.
I think the second and the third patch are 100% safe to apply, and the first one needs to be reviewed by someone more experienced than myself. I will appreciate any kind of critics.
Here's one detail I noticed: input from the touchscreen, with both "tsdev" and "evdev" compiled in, doesn't stop the kernel srceensaver from kicking in after five minutes from the bootup. Does someone know what part of the system should notify the kernel to reset the timer? Does it come from userspace or the device drivers?
Regards,
Andrzej Zaborowski
--
balrog 2oo6
Dear Outlook users: Please remove me from your address books
http://www.newsforge.com/article.pl?sid=03/08/21/143258
arch/arm/mach-omap1/board-generic.c +1 -1
@@ -88,7 +88,7 @@static void __init omap_generic_init (void ) {#ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) { generic_config[0 ].data = &generic1510_usb_config; }#endif
arch/arm/mach-omap1/clock.c +2 -2
@@ -673,7 +673,7 @@ arm_idlect1_mask = ~0 ;for (clkp = onchip_clks; clkp < onchip_clks+ARRAY_SIZE (onchip_clks); clkp++) { -if (((*clkp)->flags &CLOCK_IN_OMAP1510 ) &&cpu_is_omap1510 ()) { +if (((*clkp)->flags &CLOCK_IN_OMAP15XX ) &&cpu_is_omap15xx ()) {clk_register (*clkp);continue ; }
@@ -784,7 +784,7 @@clk_enable (&armxor_ck.clk);clk_enable (&armtim_ck.clk);/* This should be done by timer code */ -if (cpu_is_omap1510 ()) +if (cpu_is_omap15xx ())clk_enable (&arm_gpio_ck);return 0 ;
arch/arm/mach-omap1/clock.h +31 -29
234 lines not on this page · raw message
arch/arm/mach-omap1/io.c +1 -1
@@ -110,7 +110,7 @@ }#endif #ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) {iotable_init (omap1510_io_desc,ARRAY_SIZE (omap1510_io_desc)); }#endif
arch/arm/mach-omap1/pm.c +11 -11
@@ -165,7 +165,7 @@if ((use_idlect1 != ~0 ) || !do_sleep) {__u32 saved_idlect1 =omap_readl (ARM_IDLECT1 ); -if (cpu_is_omap1510 ()) +if (cpu_is_omap15xx ()) use_idlect1 &=OMAP1510_BIG_SLEEP_REQUEST ;else use_idlect1 &=OMAP1610_IDLECT1_SLEEP_VAL ;
@@ -204,7 +204,7 @@if (cpu_is_omap730 ()) level1_wake =OMAP_IRQ_BIT (INT_730_GPIO_BANK1 ) |OMAP_IRQ_BIT (INT_730_IH2_IRQ ); -else if (cpu_is_omap1510 ()) +else if (cpu_is_omap15xx ()) level1_wake =OMAP_IRQ_BIT (INT_GPIO_BANK1 ) |OMAP_IRQ_BIT (INT_1510_IH2_IRQ );else if (cpu_is_omap16xx ())
@@ -218,7 +218,7 @@omap_writel (~(OMAP_IRQ_BIT (INT_730_WAKE_UP_REQ ) |OMAP_IRQ_BIT (INT_730_MPUIO_KEYPAD )),OMAP_IH2_1_MIR ); - }else if (cpu_is_omap1510 ()) { + }else if (cpu_is_omap15xx ()) { level2_wake |=OMAP_IRQ_BIT (INT_KEYBOARD );omap_writel (~level2_wake,OMAP_IH2_MIR ); }else if (cpu_is_omap16xx ()) {
@@ -283,7 +283,7 @@MPUI730_SAVE (EMIFS_CONFIG );MPUI730_SAVE (EMIFF_SDRAM_CONFIG ); - }else if (cpu_is_omap1510 ()) { + }else if (cpu_is_omap15xx ()) {MPUI1510_SAVE (OMAP_IH1_MIR );MPUI1510_SAVE (OMAP_IH2_MIR );MPUI1510_SAVE (MPUI_CTRL );
@@ -307,7 +307,7 @@ARM_SAVE (ARM_CKCTL );ARM_SAVE (ARM_IDLECT1 );ARM_SAVE (ARM_IDLECT2 ); -if (!(cpu_is_omap1510 ())) +if (!(cpu_is_omap15xx ()))ARM_SAVE (ARM_IDLECT3 );ARM_SAVE (ARM_EWUPCT );ARM_SAVE (ARM_RSTCT1 );
@@ -395,7 +395,7 @@* Restore ARM state, except ARM_IDLECT1/2 which omap_cpu_suspend did */ -if (!(cpu_is_omap1510 ())) +if (!(cpu_is_omap15xx ()))ARM_RESTORE (ARM_IDLECT3 );ARM_RESTORE (ARM_CKCTL );ARM_RESTORE (ARM_EWUPCT );
@@ -411,7 +411,7 @@MPUI730_RESTORE (OMAP_IH1_MIR );MPUI730_RESTORE (OMAP_IH2_0_MIR );MPUI730_RESTORE (OMAP_IH2_1_MIR ); - }else if (cpu_is_omap1510 ()) { + }else if (cpu_is_omap15xx ()) {MPUI1510_RESTORE (MPUI_CTRL );MPUI1510_RESTORE (MPUI_DSP_BOOT_CONFIG );MPUI1510_RESTORE (MPUI_DSP_API_CONFIG );
@@ -472,7 +472,7 @@ARM_SAVE (ARM_CKCTL );ARM_SAVE (ARM_IDLECT1 );ARM_SAVE (ARM_IDLECT2 ); -if (!(cpu_is_omap1510 ())) +if (!(cpu_is_omap15xx ()))ARM_SAVE (ARM_IDLECT3 );ARM_SAVE (ARM_EWUPCT );ARM_SAVE (ARM_RSTCT1 );
@@ -493,7 +493,7 @@MPUI730_SAVE (MPUI_DSP_API_CONFIG );MPUI730_SAVE (EMIFF_SDRAM_CONFIG );MPUI730_SAVE (EMIFS_CONFIG ); - }else if (cpu_is_omap1510 ()) { + }else if (cpu_is_omap15xx ()) {MPUI1510_SAVE (MPUI_CTRL );MPUI1510_SAVE (MPUI_DSP_STATUS );MPUI1510_SAVE (MPUI_DSP_BOOT_CONFIG );
@@ -556,7 +556,7 @@MPUI730_SHOW (MPUI_DSP_API_CONFIG ),MPUI730_SHOW (EMIFF_SDRAM_CONFIG ), MPUI730_SHOW(EMIFS_CONFIG)); - }else if (cpu_is_omap1510 ()) { + }else if (cpu_is_omap15xx ()) { my_buffer_offset +=sprintf (my_base + my_buffer_offset,"MPUI1510_CTRL_REG 0x%-8x \n" "MPUI1510_DSP_STATUS_REG: 0x%-8x \n"
@@ -716,7 +716,7 @@ omap730_idle_loop_suspend_sz); omap_sram_suspend =omap_sram_push (omap730_cpu_suspend, omap730_cpu_suspend_sz); - }else if (cpu_is_omap1510 ()) { + }else if (cpu_is_omap15xx ()) { omap_sram_idle =omap_sram_push (omap1510_idle_loop_suspend, omap1510_idle_loop_suspend_sz); omap_sram_suspend = omap_sram_push(omap1510_cpu_suspend,
arch/arm/plat-omap/dsp/dsp_common.c +1 -1
@@ -260,7 +260,7 @@ { dspmem_size =0 ;#ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) { dspmem_base =OMAP1510_DSP_BASE ; dspmem_size =OMAP1510_DSP_SIZE ; daram_base =OMAP1510_DARAM_BASE ;
arch/arm/plat-omap/gpio.c +4 -4
@@ -174,7 +174,7 @@static inline struct gpio_bank *get_gpio_bank (int gpio) {#ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) {if (OMAP_GPIO_IS_MPUIO (gpio))return &gpio_bank[0 ];return &gpio_bank[1 ];
@@ -223,7 +223,7 @@return 0 ; }#ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 () && gpio <16 ) +if (cpu_is_omap15xx () && gpio <16 )return 0 ;#endif #if defined(CONFIG_ARCH_OMAP16XX )
@@ -879,7 +879,7 @@ initialized =1 ; -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) { gpio_ick =clk_get (NULL ,"arm_gpio_ck" );if (IS_ERR (gpio_ick))printk ("Could not get arm_gpio_ck\n" );
@@ -900,7 +900,7 @@ }#ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) {printk (KERN_INFO "OMAP1510 GPIO hardware\n" ); gpio_bank_count =2 ; gpio_bank = gpio_bank_1510;
arch/arm/plat-omap/mcbsp.c +4 -4
@@ -184,7 +184,7 @@return 0 ; } -if (cpu_is_omap1510 () ||cpu_is_omap16xx () ||cpu_is_omap24xx ()) { +if (cpu_is_omap15xx () ||cpu_is_omap16xx () ||cpu_is_omap24xx ()) {if (id >OMAP_MAX_MCBSP_COUNT ) {printk (KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n" , id +1 );return -1 ;
@@ -198,7 +198,7 @@#ifdef CONFIG_ARCH_OMAP1 static void omap_mcbsp_dsp_request (void ) { -if (cpu_is_omap1510 () ||cpu_is_omap16xx ()) { +if (cpu_is_omap15xx () ||cpu_is_omap16xx ()) {omap_dsp_request_mem ();clk_enable (mcbsp_dsp_ck);clk_enable (mcbsp_api_ck);
@@ -217,7 +217,7 @@static void omap_mcbsp_dsp_free (void ) { -if (cpu_is_omap1510 () ||cpu_is_omap16xx ()) { +if (cpu_is_omap15xx () ||cpu_is_omap16xx ()) {omap_dsp_release_mem ();clk_disable (mcbsp_dspxor_ck);clk_disable (mcbsp_dsp_ck);
@@ -833,7 +833,7 @@ }#endif #ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) { mcbsp_info = mcbsp_1510; mcbsp_count =ARRAY_SIZE (mcbsp_1510); }
drivers/video/omap/lcd_palmte.c +5 -5
@@ -24,9 +24,9 @@#include <linux/module.h> #include <asm/io.h> -#include <asm/arch/fpga.h> -#include "omapfb.h" +#include <asm/arch/fpga.h> +#include <asm/arch/omapfb.h> /* #define OMAPFB_DBG 1 */
@@ -67,11 +67,11 @@ .name = "palmte", .config =OMAP_LCDC_PANEL_TFT |OMAP_LCDC_INV_VSYNC |OMAP_LCDC_INV_HSYNC |OMAP_LCDC_HSVS_RISING_EDGE | -OMAP_LCDC_HSVS_OPPOSITE ; + OMAP_LCDC_HSVS_OPPOSITE, .data_lines = 16, .bpp = 8, - .pixel_clock = 12500, + .pixel_clock = 12000, .x_res = 320, .y_res = 320, .hsw = 4,
@@ -80,7 +80,7 @@ .vsw = 1, .vfp = 8, .vbp = 7, - .pcd = 5, + .pcd = 0, .init = palmte_panel_init, .cleanup = palmte_panel_cleanup,
include/asm-arm/arch-omap/clock.h +1 -1
@@ -81,7 +81,7 @@#define CM_PLL_SEL2 (1 << 19)#define CM_SYSCLKOUT_SEL1 (1 << 20)#define CLOCK_IN_OMAP730 (1 << 21) -#define CLOCK_IN_OMAP1510 (1 << 22) +#define CLOCK_IN_OMAP15XX (1 << 22)#define CLOCK_IN_OMAP16XX (1 << 23)#define CLOCK_IN_OMAP242X (1 << 24)#define CLOCK_IN_OMAP243X (1 << 25)
include/asm-arm/arch-omap/mcbsp.h +1 -1
@@ -40,7 +40,7 @@#define OMAP24XX_MCBSP1_BASE 0x48074000#define OMAP24XX_MCBSP2_BASE 0x48076000 -#ifdef CONFIG_ARCH_OMAP16XX +#if defined(CONFIG_ARCH_OMAP16XX ) || defined(CONFIG_ARCH_OMAP15XX )#define OMAP_MCBSP_REG_DRR2 0x00#define OMAP_MCBSP_REG_DRR1 0x02
arch/arm/mach-omap1/Kconfig +5 -5
@@ -73,11 +73,11 @@ bool "Palm Tungsten E" depends on ARCH_OMAP1 && ARCH_OMAP15XX help - Support for the Palm Tungsten E PDA. Currently only the LCD panel - is supported. To boot the kernel, you'll need a PalmOS compatible - bootloader; check out http://palmtelinux.sourceforge.net for more - informations. - Say Y here if you have such a PDA, say NO otherwise. + Support for the Palm Tungsten E PDA. Currently only the LCD + panel with the touchscreen input are supported. To boot the + kernel, you'll need a PalmOS compatible bootloader; check out + http://palmtelinux.sourceforge.net for more informations. + Say Y here if you have such a PDA, say N otherwise. config MACH_OMAP_GENERIC bool "Generic OMAP board"
drivers/input/touchscreen/Kconfig +2 -1
@@ -99,7 +99,8 @@ config TOUCHSCREEN_OMAP tristate "OMAP touchscreen input driver" depends on INPUT && INPUT_TOUCHSCREEN && ARCH_OMAP - select OMAP_TSC2101 + select OMAP_TSC2101 if MACH_OMAP_H3 || MACH_OMAP_H2 + select OMAP_TSC2301 if MACH_OMAP_PALMTE help Say Y here if you have an OMAP based board with touchscreen attached to it, e.g. OMAP Innovator, OSK, H2 or H3
drivers/input/touchscreen/omap/Makefile +1 -0
@@ -8,5 +8,6 @@ objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_H3) += ts_hx.o objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += ts_inn1510.o objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_OSK) += ts_osk.o +objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_PALMTE) += ts_palmte.o omapts-objs := omap_ts.o $(objs-yy)
drivers/input/touchscreen/omap/omap_ts.c +48 -4
95 lines not on this page · raw message
drivers/input/touchscreen/omap/omap_ts.h +2 -1
@@ -38,7 +38,7 @@void (*enable) (void );void (*disable) (void );void (*remove) (void ); -int (*penup) (void ); +int (*penup) (void ); };struct omap_ts_t {
@@ -54,5 +54,6 @@extern struct ts_device hx_ts;extern struct ts_device osk_ts;extern struct ts_device innovator1510_ts; +extern struct ts_device palmte_ts;#endif /* __OMAP_TS_H */
drivers/input/touchscreen/omap/ts_palmte.c +186 -0
186 lines not on this page · raw message
drivers/ssi/Kconfig +8 -0
@@ -15,4 +15,12 @@ ---help--- Say Y here if you want support for the TSC2101 codec. It is needed for touchscreen and audio on OMAP1610 and 1710. + +config OMAP_TSC2301 + depends on ARCH_OMAP1 || ARCH_OMAP15XX + tristate "TSC2301 codec support for Touchscreen" + select OMAP_UWIRE if MACH_OMAP_PALMTE + ---help--- + Say Y here if you want support for the TSC2301 codec. It is + needed for the touchscreen driver for OMAP310 and 311. endmenu
drivers/ssi/Makefile +1 -0
@@ -4,3 +4,4 @@ obj-$(CONFIG_OMAP_UWIRE) += omap-uwire.o obj-$(CONFIG_OMAP_TSC2101) += omap-tsc2101.o +obj-$(CONFIG_OMAP_TSC2301) += omap-tsc2301.o
drivers/ssi/omap-tsc2301.c +184 -0
184 lines not on this page · raw message
drivers/ssi/omap-tsc2301.h +36 -0
@@ -0,0 +1,36 @@ +/* +* drivers/ssi/omap-tsc2301.h +* +* TSC2301 codec interface driver for the OMAP platform +* +* Copyright (c) 2005 Andrzej Zaborowski <[email protected]> +* based on the TSC2101 codec interface driver: +* Copyright (C) 2004 Texas Instruments, Inc. +* +* This package 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. +* +* This package is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this package; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef __OMAP_TSC2301_H +#define __OMAP_TSC2301_H + +extern u16 omap_tsc2301_read (int page,u8 address); +extern void omap_tsc2301_reads (int page,u8 startaddress,u16 *data, +int numregs); +extern void omap_tsc2301_write (int page,u8 address,u16 data); + +extern void omap_tsc2301_disable (void ); +extern int omap_tsc2301_enable (void ); + +#endif /* __OMAP_TSC2301_H */
include/asm-arm/hardware/tsc2301.h +116 -0
116 lines not on this page · raw message
Documentation/arm/Booting +1 -1
@@ -118,7 +118,7 @@ In either case, the following conditions must be met: -- Quiesce all DMA capable devicess so that memory does not get +- Quiesce all DMA capable devices so that memory does not get corrupted by bogus network packets or disk data. This will save you many hours of debug.
Documentation/arm/README +1 -1
@@ -89,7 +89,7 @@ Although modularisation is supported (and required for the FP emulator), each module on an ARM2/ARM250/ARM3 machine when is loaded will take memory up to the next 32k boundary due to the size of the pages. - Therefore, modularisation on these machines really worth it? + Therefore, is modularisation on these machines really worth it? However, ARM6 and up machines allow modules to take multiples of 4k, and as such Acorn RiscPCs and other architectures using these processors can
Documentation/arm/Setup +1 -1
@@ -58,7 +58,7 @@ video_y This describes the character position of cursor on VGA console, and - is otherwise unused. (should not used for other console types, and + is otherwise unused. (should not be used for other console types, and should not be used for other purposes). memc_control_reg
include/linux/timer.h +3 -3
@@ -69,13 +69,13 @@* @timer: the timer to be added * * The kernel will do a ->function(->data) callback from the -* timer interrupt at the ->expired point in the future. The +* timer interrupt at the ->expires point in the future. The * current time is 'jiffies'. * -* The timer's ->expired, ->function (and if the handler uses it, ->data) +* The timer's ->expires, ->function (and if the handler uses it, ->data) * fields must be set prior calling this function. * -* Timers with an ->expired field in the past will be executed in the next +* Timers with an ->expires field in the past will be executed in the next * timer tick. */ static inline void add_timer (struct timer_list *timer)
Quoted 7 lines · --- andrzej zaborowski
- The first one fixes the compilation errors and some clock issues
that made the kernel hang on boot on Palm Tungsten E. While these
changes make the kernel boot and work well with the device, and
Tony can comment on this clock changes for 15xx.
Quoted 4 lines
Note that the last hunk is for a compilation error introduced two days
ago here:
Quoted 3 lines
and I think today someone already proposed a different idea for
dealing with this error.
Yes, as I don't like #ifdefers. Your fix is good, but for future as more and more silicons will be popped out from TI and McBSP reamins their standard choice for Audio Codec chip interface, it is better work on small/thin framework which can take platform specific data, and let audio codec chip also know from their platform specific data about McBSP configuration.
e.g Integrating OMAP2430 and DM6446/DM6443 McBSP interface and imagine how this mcbsp.c will look like :)
Quoted 17 lines
- The second patch adds support for the Touchscreen device found in
OMAP310. Again I don't know how proper is the driver, but it works and
it was written according to the documentation from Texas Instruments.
Because the DSP chipset of the OMAP310 board (called TSC2301) carries
out a big part of the task of controlling the touchscreen, in
hardware, the driver mechanism for this touchscreen is much simpler
than other OMAP touchscreens and I had to make small changes in
"omap_ts.c" which is generic for all OMAP touchscreens.
TSC2301 support is really good, there was no community known driver available yet. Even this chip has audio + 2 gpios + keyboard controller which you may want to experiment with now.
See as of know all audio codec + tsc controller drivers are specific to OMAP, but can be used with other chips, and generally interfaced by uWire (SPI half-duplex) or SPI or I2C for command interface to the chip. So recently we had SPI framework developed by David Brownell, Dmitry, Vitally wool which will make its way in 2.6.16, considering there is no objections.
You may want to experiment more with it. David had uWire hacks to merge with its SPI subsytem, which I will forward to you. Here is the link of that subsystem as GIT tree.
http://www.kernel.org/git/?p=linux/kernel/git/gregkh/spi-2.6.git;a=summary
Quoted 3 lines
- The last patch only corrects some typos I found while browsing the sources.
These are generic ARM typos changes, and it should be submitted to linux-arm-kernel mailing list. But see that our tree is not synced with linus tree as of now. So, it is better to generate those typos patches against linus tree (if generic) than OMAP tree.
Quoted 3 lines
I think the second and the third patch are 100% safe to apply, and the
--- linux-omap-2.6.orig/drivers/input/touchscreen/omap/omap_ts.c
2006-01-14 14:59:17.000000000 +0000
+++ linux-omap-2.6/drivers/input/touchscreen/omap/omap_ts.c 2006-01-14
15:56:12.000000000 +0000
@@ -23,7 +23,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
* History:
* 12/12/2004 Srinath Modified and intergrated code for H2 and H3
- *
+ * 13/01/2006 Added PalmTE specific code, Andrzej Zaborowski
*/
I would suggest to not add up History changes as above, as AUTHOR name will be there when Tony commits in the tree, until we have create a new file (eg. plamte_ts.c).
---Komal Shah
http://komalshah.blogspot.com/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Quoted 3 lines · ext Komal Shah
TSC2301 support is really good, there was no community known driver available yet. Even this chip has audio + 2 gpios + keyboard controller which you may want to experiment with now.
We have a TSC2301 driver that's in a pretty good shape now. At the moment keypad and touchscreen are supported. The audio mixer driver is work-in-progress.
We'll merge it whenever Dave's SPI stuff finds its way into linux-omap.
BTW, we also have a McSPI controller driver for OMAP2. It uses PIO at the moment, but DMA support is on its way.
Cheers,
Juha
Quoted 6 lines · --- Juha Yrjölä
We have a TSC2301 driver that's in a pretty good shape now. At the moment keypad and touchscreen are supported. The audio mixer driver is
work-in-progress.
Quoted 6 lines
We'll merge it whenever Dave's SPI stuff finds its way into linux-omap.
BTW, we also have a McSPI controller driver for OMAP2. It uses PIO at
the moment, but DMA support is on its way.
Cool. I hope you know that Dave's SPI fwk made it to Linus tree 2 days back. :). It is time to sync up our tree.
And I had made a attempt to write OMAP2 SPI controller driver with that framework. Here is the work-in-progress patch.
You can re-use most of the code from that when you further implement patch based on Dave's fwk.
http://linux.omap.com/pipermail/linux-omap-open-source/2006-January/006107.html
_or_ give me some review, so that I can change it and test it again. You can send me your work-in-progress McSPI driver. Thanx.
---Komal Shah
http://komalshah.blogspot.com/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Hi,
thanks for looking at the patches,
Quoted 3 lines
e.g Integrating OMAP2430 and DM6446/DM6443 McBSP interface and imagine how this
mcbsp.cwill look like :)
Right, that would make it a big mess and kindof hard to maintain. Additionaly, I think the OMAP 730 definitions have been left out of the conditional part and will produce compilation errors.
Quoted 7 lines
See as of know all audio codec + tsc controller drivers are specific to OMAP, but can be used with other chips, and generally interfaced by uWire (SPI half-duplex) or SPI or I2C for command interface to the chip. So recently we had SPI framework developed by David Brownell, Dmitry, Vitally wool which will make its way in 2.6.16, considering there is no objections.
Quoted 6 lines
You may want to experiment more with it. David had uWire hacks to merge with its SPI subsytem, which I will forward to you. Here is the link of that subsystem as GIT tree.
http://www.kernel.org/git/?p=linux/kernel/git/gregkh/spi-2.6.git;a=summary
Thanks for the link. Unfortunately I only have this one PDA that contains the TSC2301 chip, and it uses only uWire to communicate with it. And.. I'm currently at the point of trying to mount some initrd as root and having somethng for input (like the touchscreen) so I didn't have space for experimenting with things like audio so far. But I think both the TSC2301 and the Touchscreen code can be reused.
Quoted 8 lines
Quoted 2 lines
- The last patch only corrects some typos I found
while browsing the sources.These are generic ARM typos changes, and it should be submitted to linux-arm-kernel mailing list. But see that our tree is not synced with linus tree as of now. So, it is better to generate those typos patches against linus tree (if generic) than OMAP tree.
Okay, already sent it. It applied cleanly to Linus tree without rediff'ing.
Quoted 13 lines
---
linux-omap-2.6.orig/drivers/input/touchscreen/omap/omap_ts.c2006-01-14 14:59:17.000000000 +0000+++
linux-omap-2.6/drivers/input/touchscreen/omap/omap_ts.c2006-01-14
15:56:12.000000000 +0000(quoted diff) +0
-0@@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA
* History:
* 12/12/2004 Srinath Modified and intergrated code for H2 and H3
- *
+ * 13/01/2006 Added PalmTE specific code, Andrzej Zaborowski
*/
Quoted 4 lines
I would suggest to not add up History changes as above, as AUTHOR name will be there when Tony commits in the tree, until we have create a new file (eg.
plamte_ts.c).
Good point. In the end the revision system (GIT) is there to keep the history.
I am attaching a corrected version of the Touchscreen support patch (the second one).
Regards,
Andrzej Zaborowski
--
balrog 2oo6
Dear Outlook users: Please remove me from your address books
http://www.newsforge.com/article.pl?sid=03/08/21/143258
Tony Lindgren
reviewerHi,
Good to hear you got things working against the current git tree!
Quoted 6 lines · andrzej zaborowski
- The first one fixes the compilation errors and some clock issues that made the kernel hang on boot on Palm Tungsten E. While these changes make the kernel boot and work well with the device, and hopefully don't affect other devices, I don't know how correct are my ways of fixing it, as I'm completely inexperienced in kernel insides.
Regarding changes to clock.[ch], we should have CLOCK_IN_OMAP1510 and CLOCK_IN_OMAP3XX separate. At least the DSP clocks should not be on 310 because it does not have a DSP AFAIK. They may be also other clocks that are not on 310.
Could you please redo the clock.[ch] patch so it adds CLOCK_IN_OMAP3XX, and masks it only for the clocks you think you have on 310?
Or if you don't know which clocks are on both 310 and 1510, you could just leave out DSP clocks for now, and enable all other 1510 clocks also for 310.
Regards,
Tony
Hi there,
Quoted 11 lines
Regarding changes to clock.[ch], we should have
CLOCK_IN_OMAP1510andCLOCK_IN_OMAP3XXseparate. At least the DSP clocks should not be on 310 because it does not have a DSP AFAIK. They may be also other clocks that are not on 310.Could you please redo the clock.[ch] patch so it adds
CLOCK_IN_OMAP3XX, and masks it only for the clocks you think you have on 310?Or if you don't know which clocks are on both 310 and 1510, you could just leave out DSP clocks for now, and enable all other 1510 clocks also for 310.
Indeed, I don't know which clocks are there and I don't know if the board has a DSP or not. There is no real documentation for OMAP310 publicly availiable. The product page
(http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=11997&path=templatedata/cm/product/data/omap_310)
doesn't mention DSP, except the line
"Digital Phase-Locked Loop (DPLL) for MPU/DSP/TC Clocking Control", however it is said that OMAP310 is similar to OMAP5910
(http://focus.ti.com/docs/prod/folders/print/omap5910.html) which is fully documented and this one definitely has a DSP.
After disabling the DSP related clocks and the DSP initialisation, McBSP fails to initialise with the message: "mcbsp: could not acquire dsp_ck handle", nevertheless the kernel still boots and everything works fine. (It feels bad not knowing what's inside your computer.) I'm attaching the same patch but with CLOCK_IN_OMAP1510 and CLOCK_IN_OMAP310 separate and everything DSP-related turned off. Regards,
--
balrog 2oo6
Dear Outlook users: Please remove me from your address books
http://www.newsforge.com/article.pl?sid=03/08/21/143258
arch/arm/mach-omap1/board-generic.c +1 -1
@@ -88,7 +88,7 @@ static struct omap_board_config_kernel gstatic void __init omap_generic_init (void ) {#ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) { generic_config[0 ].data = &generic1510_usb_config; }#endif
arch/arm/mach-omap1/clock.c +6 -1
@@ -687,6 +687,11 @@ int __init omap1_clk_init(void)clk_register (*clkp);continue ; } + +if (((*clkp)->flags &CLOCK_IN_OMAP310 ) &&cpu_is_omap310 ()) { +clk_register (*clkp); +continue ; + } } info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config);
@@ -784,7 +789,7 @@ int __init omap1_clk_init(void)clk_enable (&armxor_ck.clk);clk_enable (&armtim_ck.clk);/* This should be done by timer code */ -if (cpu_is_omap1510 ()) +if (cpu_is_omap15xx ())clk_enable (&arm_gpio_ck);return 0 ;
arch/arm/mach-omap1/clock.h +40 -30
214 lines not on this page · raw message
arch/arm/mach-omap1/io.c +1 -1
@@ -110,7 +110,7 @@ void __init omap1_map_common_io(void) }#endif #ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) {iotable_init (omap1510_io_desc,ARRAY_SIZE (omap1510_io_desc)); }#endif
arch/arm/mach-omap1/pm.c +11 -11
@@ -165,7 +165,7 @@ void omap_pm_idle(void)if ((use_idlect1 != ~0 ) || !do_sleep) {__u32 saved_idlect1 =omap_readl (ARM_IDLECT1 ); -if (cpu_is_omap1510 ()) +if (cpu_is_omap15xx ()) use_idlect1 &=OMAP1510_BIG_SLEEP_REQUEST ;else use_idlect1 &=OMAP1610_IDLECT1_SLEEP_VAL ;
@@ -204,7 +204,7 @@ static void omap_pm_wakeup_setup(void)if (cpu_is_omap730 ()) level1_wake =OMAP_IRQ_BIT (INT_730_GPIO_BANK1 ) |OMAP_IRQ_BIT (INT_730_IH2_IRQ ); -else if (cpu_is_omap1510 ()) +else if (cpu_is_omap15xx ()) level1_wake =OMAP_IRQ_BIT (INT_GPIO_BANK1 ) |OMAP_IRQ_BIT (INT_1510_IH2_IRQ );else if (cpu_is_omap16xx ())
@@ -218,7 +218,7 @@ static void omap_pm_wakeup_setup(void)omap_writel (~(OMAP_IRQ_BIT (INT_730_WAKE_UP_REQ ) |OMAP_IRQ_BIT (INT_730_MPUIO_KEYPAD )),OMAP_IH2_1_MIR ); - }else if (cpu_is_omap1510 ()) { + }else if (cpu_is_omap15xx ()) { level2_wake |=OMAP_IRQ_BIT (INT_KEYBOARD );omap_writel (~level2_wake,OMAP_IH2_MIR ); }else if (cpu_is_omap16xx ()) {
@@ -283,7 +283,7 @@ void omap_pm_suspend(void)MPUI730_SAVE (EMIFS_CONFIG );MPUI730_SAVE (EMIFF_SDRAM_CONFIG ); - }else if (cpu_is_omap1510 ()) { + }else if (cpu_is_omap15xx ()) {MPUI1510_SAVE (OMAP_IH1_MIR );MPUI1510_SAVE (OMAP_IH2_MIR );MPUI1510_SAVE (MPUI_CTRL );
@@ -307,7 +307,7 @@ void omap_pm_suspend(void)ARM_SAVE (ARM_CKCTL );ARM_SAVE (ARM_IDLECT1 );ARM_SAVE (ARM_IDLECT2 ); -if (!(cpu_is_omap1510 ())) +if (!(cpu_is_omap15xx ()))ARM_SAVE (ARM_IDLECT3 );ARM_SAVE (ARM_EWUPCT );ARM_SAVE (ARM_RSTCT1 );
@@ -395,7 +395,7 @@ void omap_pm_suspend(void)* Restore ARM state, except ARM_IDLECT1/2 which omap_cpu_suspend did */ -if (!(cpu_is_omap1510 ())) +if (!(cpu_is_omap15xx ()))ARM_RESTORE (ARM_IDLECT3 );ARM_RESTORE (ARM_CKCTL );ARM_RESTORE (ARM_EWUPCT );
@@ -411,7 +411,7 @@ void omap_pm_suspend(void)MPUI730_RESTORE (OMAP_IH1_MIR );MPUI730_RESTORE (OMAP_IH2_0_MIR );MPUI730_RESTORE (OMAP_IH2_1_MIR ); - }else if (cpu_is_omap1510 ()) { + }else if (cpu_is_omap15xx ()) {MPUI1510_RESTORE (MPUI_CTRL );MPUI1510_RESTORE (MPUI_DSP_BOOT_CONFIG );MPUI1510_RESTORE (MPUI_DSP_API_CONFIG );
@@ -472,7 +472,7 @@ static int omap_pm_read_proc(ARM_SAVE (ARM_CKCTL );ARM_SAVE (ARM_IDLECT1 );ARM_SAVE (ARM_IDLECT2 ); -if (!(cpu_is_omap1510 ())) +if (!(cpu_is_omap15xx ()))ARM_SAVE (ARM_IDLECT3 );ARM_SAVE (ARM_EWUPCT );ARM_SAVE (ARM_RSTCT1 );
@@ -493,7 +493,7 @@ static int omap_pm_read_proc(MPUI730_SAVE (MPUI_DSP_API_CONFIG );MPUI730_SAVE (EMIFF_SDRAM_CONFIG );MPUI730_SAVE (EMIFS_CONFIG ); - }else if (cpu_is_omap1510 ()) { + }else if (cpu_is_omap15xx ()) {MPUI1510_SAVE (MPUI_CTRL );MPUI1510_SAVE (MPUI_DSP_STATUS );MPUI1510_SAVE (MPUI_DSP_BOOT_CONFIG );
@@ -556,7 +556,7 @@ static int omap_pm_read_proc(MPUI730_SHOW (MPUI_DSP_API_CONFIG ),MPUI730_SHOW (EMIFF_SDRAM_CONFIG ), MPUI730_SHOW(EMIFS_CONFIG)); - }else if (cpu_is_omap1510 ()) { + }else if (cpu_is_omap15xx ()) { my_buffer_offset +=sprintf (my_base + my_buffer_offset,"MPUI1510_CTRL_REG 0x%-8x \n" "MPUI1510_DSP_STATUS_REG: 0x%-8x \n"
@@ -716,7 +716,7 @@ static int __init omap_pm_init(void) omap730_idle_loop_suspend_sz); omap_sram_suspend =omap_sram_push (omap730_cpu_suspend, omap730_cpu_suspend_sz); - }else if (cpu_is_omap1510 ()) { + }else if (cpu_is_omap15xx ()) { omap_sram_idle =omap_sram_push (omap1510_idle_loop_suspend, omap1510_idle_loop_suspend_sz); omap_sram_suspend = omap_sram_push(omap1510_cpu_suspend,
arch/arm/plat-omap/gpio.c +4 -4
@@ -174,7 +174,7 @@ static int gpio_bank_count;static inline struct gpio_bank *get_gpio_bank (int gpio) {#ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) {if (OMAP_GPIO_IS_MPUIO (gpio))return &gpio_bank[0 ];return &gpio_bank[1 ];
@@ -223,7 +223,7 @@ static inline int gpio_valid(int gpio)return 0 ; }#ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 () && gpio <16 ) +if (cpu_is_omap15xx () && gpio <16 )return 0 ;#endif #if defined(CONFIG_ARCH_OMAP16XX )
@@ -879,7 +879,7 @@ static int __init _omap_gpio_init(void) initialized =1 ; -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) { gpio_ick =clk_get (NULL ,"arm_gpio_ck" );if (IS_ERR (gpio_ick))printk ("Could not get arm_gpio_ck\n" );
@@ -900,7 +900,7 @@ static int __init _omap_gpio_init(void) }#ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) {printk (KERN_INFO "OMAP1510 GPIO hardware\n" ); gpio_bank_count =2 ; gpio_bank = gpio_bank_1510;
arch/arm/plat-omap/mcbsp.c +4 -4
@@ -184,7 +184,7 @@ static int omap_mcbsp_check(unsigned intreturn 0 ; } -if (cpu_is_omap1510 () ||cpu_is_omap16xx () ||cpu_is_omap24xx ()) { +if (cpu_is_omap15xx () ||cpu_is_omap16xx () ||cpu_is_omap24xx ()) {if (id >OMAP_MAX_MCBSP_COUNT ) {printk (KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n" , id +1 );return -1 ;
@@ -198,7 +198,7 @@ static int omap_mcbsp_check(unsigned int#ifdef CONFIG_ARCH_OMAP1 static void omap_mcbsp_dsp_request (void ) { -if (cpu_is_omap1510 () ||cpu_is_omap16xx ()) { +if (cpu_is_omap15xx () ||cpu_is_omap16xx ()) {omap_dsp_request_mem ();clk_enable (mcbsp_dsp_ck);clk_enable (mcbsp_api_ck);
@@ -217,7 +217,7 @@ static void omap_mcbsp_dsp_request(void)static void omap_mcbsp_dsp_free (void ) { -if (cpu_is_omap1510 () ||cpu_is_omap16xx ()) { +if (cpu_is_omap15xx () ||cpu_is_omap16xx ()) {omap_dsp_release_mem ();clk_disable (mcbsp_dspxor_ck);clk_disable (mcbsp_dsp_ck);
@@ -833,7 +833,7 @@ static int __init omap_mcbsp_init(void) }#endif #ifdef CONFIG_ARCH_OMAP15XX -if (cpu_is_omap1510 ()) { +if (cpu_is_omap15xx ()) { mcbsp_info = mcbsp_1510; mcbsp_count =ARRAY_SIZE (mcbsp_1510); }
drivers/video/omap/lcd_palmte.c +5 -5
@@ -24,9 +24,9 @@#include <linux/module.h> #include <asm/io.h> -#include <asm/arch/fpga.h> -#include "omapfb.h" +#include <asm/arch/fpga.h> +#include <asm/arch/omapfb.h> /* #define OMAPFB_DBG 1 */
@@ -67,11 +67,11 @@ struct lcd_panel palmte_panel = { .name = "palmte", .config =OMAP_LCDC_PANEL_TFT |OMAP_LCDC_INV_VSYNC |OMAP_LCDC_INV_HSYNC |OMAP_LCDC_HSVS_RISING_EDGE | -OMAP_LCDC_HSVS_OPPOSITE ; + OMAP_LCDC_HSVS_OPPOSITE, .data_lines = 16, .bpp = 8, - .pixel_clock = 12500, + .pixel_clock = 12000, .x_res = 320, .y_res = 320, .hsw = 4,
@@ -80,7 +80,7 @@ struct lcd_panel palmte_panel = { .vsw = 1, .vfp = 8, .vbp = 7, - .pcd = 5, + .pcd = 0, .init = palmte_panel_init, .cleanup = palmte_panel_cleanup,
include/asm-arm/arch-omap/clock.h +6 -5
@@ -80,10 +80,11 @@ extern void clk_deny_idle(struct clk *cl#define CM_PLL_SEL1 (1 << 18)#define CM_PLL_SEL2 (1 << 19)#define CM_SYSCLKOUT_SEL1 (1 << 20) -#define CLOCK_IN_OMAP730 (1 << 21) -#define CLOCK_IN_OMAP1510 (1 << 22) -#define CLOCK_IN_OMAP16XX (1 << 23) -#define CLOCK_IN_OMAP242X (1 << 24) -#define CLOCK_IN_OMAP243X (1 << 25) +#define CLOCK_IN_OMAP310 (1 << 21) +#define CLOCK_IN_OMAP730 (1 << 22) +#define CLOCK_IN_OMAP1510 (1 << 23) +#define CLOCK_IN_OMAP16XX (1 << 24) +#define CLOCK_IN_OMAP242X (1 << 25) +#define CLOCK_IN_OMAP243X (1 << 26)#endif
include/asm-arm/arch-omap/mcbsp.h +1 -1
@@ -40,7 +40,7 @@#define OMAP24XX_MCBSP1_BASE 0x48074000#define OMAP24XX_MCBSP2_BASE 0x48076000 -#ifdef CONFIG_ARCH_OMAP16XX +#if defined(CONFIG_ARCH_OMAP16XX ) || defined(CONFIG_ARCH_OMAP15XX )#define OMAP_MCBSP_REG_DRR2 0x00#define OMAP_MCBSP_REG_DRR1 0x02
[email protected]
reviewerQuoted 14 lines · andrzej zaborowski
Hi there,
Quoted 11 lines
Regarding changes to clock.[ch], we should have
CLOCK_IN_OMAP1510andCLOCK_IN_OMAP3XXseparate. At least the DSP clocks should not be on 310 because it does not have a DSP AFAIK. They may be also other clocks that are not on 310.Could you please redo the clock.[ch] patch so it adds
CLOCK_IN_OMAP3XX, and masks it only for the clocks you think you have on 310?Or if you don't know which clocks are on both 310 and 1510, you could just leave out DSP clocks for now, and enable all other 1510 clocks also for 310.
Quoted 15 lines
Indeed, I don't know which clocks are there and I don't know if the board has a DSP or not. There is no real documentation for OMAP310 publicly availiable. The product page
(http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=11997&path=templatedata/cm/product/data/omap_310)
doesn't mention DSP, except the line
"Digital Phase-Locked Loop (DPLL) for MPU/DSP/TC Clocking Control", however it is said that OMAP310 is similar to OMAP5910
(http://focus.ti.com/docs/prod/folders/print/omap5910.html) which is fully documented and this one definitely has a DSP.
After disabling the DSP related clocks and the DSP initialisation, McBSP fails to initialise with the message: "mcbsp: could not acquiredsp_ckhandle", nevertheless the kernel still boots and everything works fine. (It feels bad not knowing what's inside your computer.) I'm attaching the same patch but withCLOCK_IN_OMAP1510andCLOCK_IN_OMAP310separate and everything DSP-related turned off.
OK, I've pushed linux-palmte-errors.patch in three separate patches. Where did find out the mclk for 15xx entry, BTW? Just trying out the bits?
Regards,
Tony
Quoted 1 line · On 20/01/06, [email protected] <[email protected]> wrote:
OK, I've pushed linux-palmte-errors.patch in three separate patches.
Thank you!
Quoted 2 lines
Where did find out the mclk for 15xx entry, BTW? Just trying out the bits?
Basically yes, but it took only 3 tries since the values are #defined in drivers/ssi/omap-tsc2101.c and for some reason unused. Without that the TSC2301 driver wouldn't work and I wasn't sure if it would be correct to set the values dynamically from inside the TSC2301 driver or some other place.
Regards,
Andrew