2006-10-17 20:30:46

by Greg.Chandler

[permalink] [raw]
Subject: Touchscreen hardware hacking/driver hacking.


I'm working on a prototype Hitachi tablet, it uses a Fujitsu 4-wire
resistive touchscreen. {10.4" I think}
I've found that windows-xp embedded uses a generic ps/2 driver for the
device.

I've ripped this thing to pieces on several occasions looking for chips
to help the porting, my problem is that I can not find the
analog-digital converter for this thing. The connector goes to a
surface mount header on an 8 layer board.
I loose the traces almost instantly. Given that I can't find the
converter anywhere what should I do next?

I've done my homework and found that this HAS to be either serial or usb
attached according to Fujitsu.
Aparently it's neither. There are no unknown USB devices {or known
matching}, and there is no activity on the single serial port on the
system. Since the windows driver uses PS/2 as the interface I have a
horrible feeling this thing has an interpretation layer that makes it a
PS/2 mouse, and that may or may not royally be a nightmare.

I would have posted this to a different group but there is no "input"
mailing list.

Help?


I'll give a reward to anyone willing to actually help me get this hacked
out.
Reward defined:
Permanent shell access to my personal development envirnoment for
testing kernel code.
Equipment in the environment: ARM, Alpha, x86-32, MIPS/Origin, HPPA,
SPARC, PPC

--Greg Chandler


2006-10-17 21:05:56

by Andreas Mohr

[permalink] [raw]
Subject: Re: Touchscreen hardware hacking/driver hacking.

Hi,

On Tue, Oct 17, 2006 at 03:30:43PM -0500, [email protected] wrote:
> I would have posted this to a different group but there is no "input"
> mailing list.

Your posting was probably missing the Dmitry Torokhov CC (input guru,
as can be seen in MAINTAINERS).

> Reward defined:
> Permanent shell access to my personal development envirnoment for
> testing kernel code.
> Equipment in the environment: ARM, Alpha, x86-32, MIPS/Origin, HPPA,
> SPARC, PPC

Oh, interesting stuff. Thus let me try a cheap shot at this reward ;-):
did you run Windows driver debug message monitors (VxDMon or so)
to go fishing for some suspicious/insightful driver activities?

A last desperate resort might be running some Windows plug'n play
device viewers which might tell you more than the usual dull
Windows environment stuff.

But I'm most likely not telling you any cool new things anyway...

Andreas Mohr

2006-10-17 21:12:14

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Touchscreen hardware hacking/driver hacking.

On 10/17/06, [email protected] <[email protected]> wrote:
>
> I'm working on a prototype Hitachi tablet, it uses a Fujitsu 4-wire
> resistive touchscreen. {10.4" I think}
> I've found that windows-xp embedded uses a generic ps/2 driver for the
> device.
>
> I've ripped this thing to pieces on several occasions looking for chips
> to help the porting, my problem is that I can not find the
> analog-digital converter for this thing. The connector goes to a
> surface mount header on an 8 layer board.
> I loose the traces almost instantly. Given that I can't find the
> converter anywhere what should I do next?
>
> I've done my homework and found that this HAS to be either serial or usb
> attached according to Fujitsu.
> Aparently it's neither. There are no unknown USB devices {or known
> matching}, and there is no activity on the single serial port on the
> system. Since the windows driver uses PS/2 as the interface I have a
> horrible feeling this thing has an interpretation layer that makes it a
> PS/2 mouse, and that may or may not royally be a nightmare.
>

The touchscreen might need a "magic knock" to activate. You might try
to see what data wondows driver sends to PS/2 port.

Also check of Lifebook touchscreen protocol will work for you. You
will need to adjust DMI table in drivers/input/mouse/lifebook.c/

> I would have posted this to a different group but there is no "input"
> mailing list.
>

[email protected]

But you must be subscribed to post otherwise list just drops your
mails on the floor.

--
Dmitry

2006-10-17 21:29:08

by Greg.Chandler

[permalink] [raw]
Subject: RE: Touchscreen hardware hacking/driver hacking.


In my many rounds of research on this, I'm pretty sure that this is the
same setup as the lifebook.
Wether the implementation is the same, is a matter of conjecture as long
as I can't see the device.

Both of you suggested checking the PS/2 under windows, unfortunatly I
know of no "sniffer" type drivers or apps
to listen directly on a logical PS/2 interface. If you know where I can
find something like that that would be of more help than anything at
this point.



-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Dmitry Torokhov
Sent: Tuesday, October 17, 2006 4:12 PM
To: Chandler, Greg
Cc: [email protected]; [email protected]
Subject: Re: Touchscreen hardware hacking/driver hacking.

On 10/17/06, [email protected] <[email protected]>
wrote:
>
> I'm working on a prototype Hitachi tablet, it uses a Fujitsu 4-wire
> resistive touchscreen. {10.4" I think} I've found that windows-xp
> embedded uses a generic ps/2 driver for the device.
>
> I've ripped this thing to pieces on several occasions looking for
> chips to help the porting, my problem is that I can not find the
> analog-digital converter for this thing. The connector goes to a
> surface mount header on an 8 layer board.
> I loose the traces almost instantly. Given that I can't find the
> converter anywhere what should I do next?
>
> I've done my homework and found that this HAS to be either serial or
> usb attached according to Fujitsu.
> Aparently it's neither. There are no unknown USB devices {or known
> matching}, and there is no activity on the single serial port on the
> system. Since the windows driver uses PS/2 as the interface I have a
> horrible feeling this thing has an interpretation layer that makes it
> a
> PS/2 mouse, and that may or may not royally be a nightmare.
>

The touchscreen might need a "magic knock" to activate. You might try to
see what data wondows driver sends to PS/2 port.

Also check of Lifebook touchscreen protocol will work for you. You will
need to adjust DMI table in drivers/input/mouse/lifebook.c/

> I would have posted this to a different group but there is no "input"
> mailing list.
>

[email protected]

But you must be subscribed to post otherwise list just drops your mails
on the floor.

--
Dmitry


2006-10-17 21:47:11

by Greg.Chandler

[permalink] [raw]
Subject: RE: Touchscreen hardware hacking/driver hacking.



I'll troll through dmidecode on it when I get home, and see if I can
tweak the lifebook driver.
If not I will let you know and we can maybe try to figure something out
from there.

2006-10-17 23:36:37

by Greg Chandler

[permalink] [raw]
Subject: RE: Touchscreen hardware hacking/driver hacking.


I'm not sure this will help all too much, but at least I have the
strings...


Here is what dmidecode spat out:

# dmidecode 2.8
SMBIOS 2.3 present.
23 structures occupying 646 bytes.
Table at 0x000DC010.

Handle 0x0000, DMI type 0, 20 bytes
BIOS Information
Vendor: Phoenix Technologies Ltd.
Version: 1.06VB
Release Date: 03/13/2003
Address: 0xE7A00
Runtime Size: 99840 bytes
ROM Size: 512 kB
Characteristics:
ISA is supported
PCI is supported
PC Card (PCMCIA) is supported
PNP is supported
APM is supported
BIOS is upgradeable
BIOS shadowing is allowed
Selectable boot is supported
EDD is supported
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
Smart battery is supported
BIOS boot specification is supported

Handle 0x0001, DMI type 1, 25 bytes
System Information
Manufacturer: HITACHI
Product Name: FLORA-ie 55mi
Version: crusoe/ALi1535
Serial Number: 0
UUID: 00000000-0000-0000-0000-FFFFFFFFFFFF
Wake-up Type: Power Switch

Handle 0x0002, DMI type 3, 17 bytes
Chassis Information
Manufacturer: HITACHI
Type: Portable
Lock: Not Present
Version: crusoe/ALi1535
Serial Number: XXXXXXXXXXXXXXXX
Asset Tag: 0
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: None
OEM Information: 0x00001234

Handle 0x0003, DMI type 4, 32 bytes
Processor Information
Socket Designation: CPU
Type: Central Processor
Family: K6-3
Manufacturer: Transmeta
ID: 43 05 00 00 3F 89 84 00
Signature: Family 5, Model 4, Stepping 3
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
CX8 (CMPXCHG8 instruction supported)
SEP (Fast system call)
CMOV (Conditional move instruction supported)
PSN (Processor serial number present and enabled)
MMX (MMX technology supported)
Version: Crusoe(tm)
Voltage: 1.6 V
External Clock: 66 MHz
Max Speed: 400 MHz
Current Speed: 400 MHz
Status: Populated, Enabled
Upgrade: None
L1 Cache Handle: 0x0004
L2 Cache Handle: 0x0005
L3 Cache Handle: Not Provided

Handle 0x0004, DMI type 7, 19 bytes
Cache Information
Socket Designation: Cache1
Configuration: Enabled, Not Socketed, Level 1
Operational Mode: Write Back
Location: Internal
Installed Size: 128 KB
Maximum Size: 128 KB
Supported SRAM Types:
Pipeline Burst
Installed SRAM Type: Pipeline Burst
Speed: Unknown
Error Correction Type: None
System Type: Unknown
Associativity: Unknown

Handle 0x0005, DMI type 7, 19 bytes
Cache Information
Socket Designation: Cache2
Configuration: Enabled, Not Socketed, Level 2
Operational Mode: Write Back
Location: Internal
Installed Size: 256 KB
Maximum Size: 256 KB
Supported SRAM Types:
Pipeline Burst
Installed SRAM Type: None
Speed: Unknown
Error Correction Type: None
System Type: Unknown
Associativity: Unknown

Handle 0x0006, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: Not Specified
Internal Connector Type: None
External Reference Designator: SERIAL
External Connector Type: None
Port Type: Serial Port 16550A Compatible

Handle 0x0007, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: Not Specified
Internal Connector Type: None
External Reference Designator: USB1
External Connector Type: Access Bus (USB)
Port Type: USB

Handle 0x0008, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: Not Specified
Internal Connector Type: None
External Reference Designator: USB2
External Connector Type: Access Bus (USB)
Port Type: USB

Handle 0x0009, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: Not Specified
Internal Connector Type: None
External Reference Designator: MICROPHONE MINI JACK
External Connector Type: Other
Port Type: Other

Handle 0x000A, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: Not Specified
Internal Connector Type: None
External Reference Designator: AUDIO OUT MINI JACK
External Connector Type: Mini Jack (headphones)
Port Type: Audio Port

Handle 0x000D, DMI type 9, 13 bytes
System Slot Information
Designation: PCCARD SLOT1
Type: 16-bit PC Card (PCMCIA)
Current Usage: Unknown
Length: Other
ID: Adapter 0, Socket 1
Characteristics:
5.0 V is provided
3.3 V is provided
PC Card-16 is supported
Modem ring resume is supported

Handle 0x000E, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 128 MB
Error Information Handle: Not Provided
Number Of Devices: 1

Handle 0x000F, DMI type 17, 23 bytes
Memory Device
Array Handle: 0x000E
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 128 MB
Form Factor: DIMM
Set: 1
Locator: Socket
Bank Locator: Bank0
Type: SDRAM
Type Detail: Synchronous
Speed: 100 MHz (10.0 ns)

Handle 0x0010, DMI type 17, 23 bytes
Memory Device
Array Handle: 0x000E
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 112 MB
Form Factor: DIMM
Set: 2
Locator: Base
Bank Locator: Bank1
Type: SDRAM
Type Detail: Synchronous
Speed: 100 MHz (10.0 ns)

Handle 0x0011, DMI type 19, 15 bytes
Memory Array Mapped Address
Starting Address: 0x00000000000
Ending Address: 0x0000EFFFFFF
Range Size: 240 MB
Physical Array Handle: 0x000E
Partition Width: 0

Handle 0x0012, DMI type 20, 19 bytes
Memory Device Mapped Address
Starting Address: 0x00000000000
Ending Address: 0x00007FFFFFF
Range Size: 128 MB
Physical Device Handle: 0x000F
Memory Array Mapped Address Handle: 0x0011
Partition Row Position: Unknown

Handle 0x0013, DMI type 20, 19 bytes
Memory Device Mapped Address
Starting Address: 0x00008000000
Ending Address: 0x0000EFFFFFF
Range Size: 112 MB
Physical Device Handle: 0x0010
Memory Array Mapped Address Handle: 0x0011
Partition Row Position: Unknown

Handle 0x0014, DMI type 21, 7 bytes
Built-in Pointing Device
Type: Track Ball
Interface: PS/2
Buttons: 0

Handle 0x0015, DMI type 32, 20 bytes
System Boot Information
Status: <OUT OF SPEC>

Handle 0x0016, DMI type 127, 4 bytes
End Of Table

Wrong DMI structures count: 23 announced, only 21 decoded.

2006-10-18 02:14:31

by Lee Revell

[permalink] [raw]
Subject: RE: Touchscreen hardware hacking/driver hacking.

On Tue, 2006-10-17 at 16:28 -0500, [email protected] wrote:
> Both of you suggested checking the PS/2 under windows, unfortunatly I
> know of no "sniffer" type drivers or apps
> to listen directly on a logical PS/2 interface. If you know where I
> can
> find something like that that would be of more help than anything at
> this point.
>

You can use SoftICE to set an IO breakpoint on the PS/2 port. It is not
free though...

Lee

2006-10-18 03:18:43

by Greg Chandler

[permalink] [raw]
Subject: RE: Touchscreen hardware hacking/driver hacking.


I added the following to drivers/input/mouse/lifebook.c
{
.ident = "FLORA-ie 55mi",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "FLORA-ie 55mi"),
},
},

It scrolled oopses for a little while then booted normally.
gpmd using /dev/mouse is taking input from the touchscreen. kind of....

If I move up or down on the screen it moves the cursor like a mouse would,
but it acts like the button is always pressed.


I'm happy that it accepts data at all but concerned about the oops
scroll... There is so much that it is pushed out of the dmesg log, and
the kernel scrollback log. I have no way of recording it {I can't soldier
down a pin header for serial}

Any ideas?


On Tue, 17 Oct 2006, Greg Chandler wrote:

>
> I'm not sure this will help all too much, but at least I have the strings...
>
>
> Here is what dmidecode spat out:
>
> # dmidecode 2.8
> SMBIOS 2.3 present.
> 23 structures occupying 646 bytes.
> Table at 0x000DC010.
>
> Handle 0x0000, DMI type 0, 20 bytes
> BIOS Information
> Vendor: Phoenix Technologies Ltd.
> Version: 1.06VB
> Release Date: 03/13/2003
> Address: 0xE7A00
> Runtime Size: 99840 bytes
> ROM Size: 512 kB
> Characteristics:
> ISA is supported
> PCI is supported
> PC Card (PCMCIA) is supported
> PNP is supported
> APM is supported
> BIOS is upgradeable
> BIOS shadowing is allowed
> Selectable boot is supported
> EDD is supported
> Print screen service is supported (int 5h)
> 8042 keyboard services are supported (int 9h)
> Serial services are supported (int 14h)
> Printer services are supported (int 17h)
> CGA/mono video services are supported (int 10h)
> ACPI is supported
> USB legacy is supported
> Smart battery is supported
> BIOS boot specification is supported
>
> Handle 0x0001, DMI type 1, 25 bytes
> System Information
> Manufacturer: HITACHI
> Product Name: FLORA-ie 55mi
> Version: crusoe/ALi1535
> Serial Number: 0
> UUID: 00000000-0000-0000-0000-FFFFFFFFFFFF
> Wake-up Type: Power Switch
>
> Handle 0x0002, DMI type 3, 17 bytes
> Chassis Information
> Manufacturer: HITACHI
> Type: Portable
> Lock: Not Present
> Version: crusoe/ALi1535
> Serial Number: XXXXXXXXXXXXXXXX
> Asset Tag: 0
> Boot-up State: Safe
> Power Supply State: Safe
> Thermal State: Safe
> Security Status: None
> OEM Information: 0x00001234
>
> Handle 0x0003, DMI type 4, 32 bytes
> Processor Information
> Socket Designation: CPU
> Type: Central Processor
> Family: K6-3
> Manufacturer: Transmeta
> ID: 43 05 00 00 3F 89 84 00
> Signature: Family 5, Model 4, Stepping 3
> Flags:
> FPU (Floating-point unit on-chip)
> VME (Virtual mode extension)
> DE (Debugging extension)
> PSE (Page size extension)
> TSC (Time stamp counter)
> MSR (Model specific registers)
> CX8 (CMPXCHG8 instruction supported)
> SEP (Fast system call)
> CMOV (Conditional move instruction supported)
> PSN (Processor serial number present and enabled)
> MMX (MMX technology supported)
> Version: Crusoe(tm)
> Voltage: 1.6 V
> External Clock: 66 MHz
> Max Speed: 400 MHz
> Current Speed: 400 MHz
> Status: Populated, Enabled
> Upgrade: None
> L1 Cache Handle: 0x0004
> L2 Cache Handle: 0x0005
> L3 Cache Handle: Not Provided
>
> Handle 0x0004, DMI type 7, 19 bytes
> Cache Information
> Socket Designation: Cache1
> Configuration: Enabled, Not Socketed, Level 1
> Operational Mode: Write Back
> Location: Internal
> Installed Size: 128 KB
> Maximum Size: 128 KB
> Supported SRAM Types:
> Pipeline Burst
> Installed SRAM Type: Pipeline Burst
> Speed: Unknown
> Error Correction Type: None
> System Type: Unknown
> Associativity: Unknown
>
> Handle 0x0005, DMI type 7, 19 bytes
> Cache Information
> Socket Designation: Cache2
> Configuration: Enabled, Not Socketed, Level 2
> Operational Mode: Write Back
> Location: Internal
> Installed Size: 256 KB
> Maximum Size: 256 KB
> Supported SRAM Types:
> Pipeline Burst
> Installed SRAM Type: None
> Speed: Unknown
> Error Correction Type: None
> System Type: Unknown
> Associativity: Unknown
>
> Handle 0x0006, DMI type 8, 9 bytes
> Port Connector Information
> Internal Reference Designator: Not Specified
> Internal Connector Type: None
> External Reference Designator: SERIAL
> External Connector Type: None
> Port Type: Serial Port 16550A Compatible
>
> Handle 0x0007, DMI type 8, 9 bytes
> Port Connector Information
> Internal Reference Designator: Not Specified
> Internal Connector Type: None
> External Reference Designator: USB1
> External Connector Type: Access Bus (USB)
> Port Type: USB
>
> Handle 0x0008, DMI type 8, 9 bytes
> Port Connector Information
> Internal Reference Designator: Not Specified
> Internal Connector Type: None
> External Reference Designator: USB2
> External Connector Type: Access Bus (USB)
> Port Type: USB
>
> Handle 0x0009, DMI type 8, 9 bytes
> Port Connector Information
> Internal Reference Designator: Not Specified
> Internal Connector Type: None
> External Reference Designator: MICROPHONE MINI JACK
> External Connector Type: Other
> Port Type: Other
>
> Handle 0x000A, DMI type 8, 9 bytes
> Port Connector Information
> Internal Reference Designator: Not Specified
> Internal Connector Type: None
> External Reference Designator: AUDIO OUT MINI JACK
> External Connector Type: Mini Jack (headphones)
> Port Type: Audio Port
>
> Handle 0x000D, DMI type 9, 13 bytes
> System Slot Information
> Designation: PCCARD SLOT1
> Type: 16-bit PC Card (PCMCIA)
> Current Usage: Unknown
> Length: Other
> ID: Adapter 0, Socket 1
> Characteristics:
> 5.0 V is provided
> 3.3 V is provided
> PC Card-16 is supported
> Modem ring resume is supported
>
> Handle 0x000E, DMI type 16, 15 bytes
> Physical Memory Array
> Location: System Board Or Motherboard
> Use: System Memory
> Error Correction Type: None
> Maximum Capacity: 128 MB
> Error Information Handle: Not Provided
> Number Of Devices: 1
>
> Handle 0x000F, DMI type 17, 23 bytes
> Memory Device
> Array Handle: 0x000E
> Error Information Handle: Not Provided
> Total Width: 64 bits
> Data Width: 64 bits
> Size: 128 MB
> Form Factor: DIMM
> Set: 1
> Locator: Socket
> Bank Locator: Bank0
> Type: SDRAM
> Type Detail: Synchronous
> Speed: 100 MHz (10.0 ns)
>
> Handle 0x0010, DMI type 17, 23 bytes
> Memory Device
> Array Handle: 0x000E
> Error Information Handle: Not Provided
> Total Width: 64 bits
> Data Width: 64 bits
> Size: 112 MB
> Form Factor: DIMM
> Set: 2
> Locator: Base
> Bank Locator: Bank1
> Type: SDRAM
> Type Detail: Synchronous
> Speed: 100 MHz (10.0 ns)
>
> Handle 0x0011, DMI type 19, 15 bytes
> Memory Array Mapped Address
> Starting Address: 0x00000000000
> Ending Address: 0x0000EFFFFFF
> Range Size: 240 MB
> Physical Array Handle: 0x000E
> Partition Width: 0
>
> Handle 0x0012, DMI type 20, 19 bytes
> Memory Device Mapped Address
> Starting Address: 0x00000000000
> Ending Address: 0x00007FFFFFF
> Range Size: 128 MB
> Physical Device Handle: 0x000F
> Memory Array Mapped Address Handle: 0x0011
> Partition Row Position: Unknown
>
> Handle 0x0013, DMI type 20, 19 bytes
> Memory Device Mapped Address
> Starting Address: 0x00008000000
> Ending Address: 0x0000EFFFFFF
> Range Size: 112 MB
> Physical Device Handle: 0x0010
> Memory Array Mapped Address Handle: 0x0011
> Partition Row Position: Unknown
>
> Handle 0x0014, DMI type 21, 7 bytes
> Built-in Pointing Device
> Type: Track Ball
> Interface: PS/2
> Buttons: 0
>
> Handle 0x0015, DMI type 32, 20 bytes
> System Boot Information
> Status: <OUT OF SPEC>
>
> Handle 0x0016, DMI type 127, 4 bytes
> End Of Table
>
> Wrong DMI structures count: 23 announced, only 21 decoded.
>

2006-10-18 03:43:03

by Kyle Moffett

[permalink] [raw]
Subject: Re: Touchscreen hardware hacking/driver hacking.

On Oct 17, 2006, at 22:30:57, Greg Chandler wrote:

>
> I added the following to drivers/input/mouse/lifebook.c
> {
> .ident = "FLORA-ie 55mi",
> .matches = {
> DMI_MATCH(DMI_PRODUCT_NAME, "FLORA-ie 55mi"),
> },
> },
>
> It scrolled oopses for a little while then booted normally.
> gpmd using /dev/mouse is taking input from the touchscreen. kind
> of....
>
> If I move up or down on the screen it moves the cursor like a mouse
> would, but it acts like the button is always pressed.
>
> I'm happy that it accepts data at all but concerned about the oops
> scroll... There is so much that it is pushed out of the dmesg log,
> and the kernel scrollback log. I have no way of recording it {I
> can't soldier down a pin header for serial}
>
> Any ideas?

Pass "log_buf_len=4M" on the kernel command line (or pick any other
power of 2). Without a suffix specifies size in bytes, "k" means 1
kiB or 2^10 bytes, "M" means 1 MiB or 2^20 bytes.

Cheers,
Kyle Moffett

2006-10-18 07:39:58

by Matthew Garrett

[permalink] [raw]
Subject: Re: Touchscreen hardware hacking/driver hacking.

On Tue, Oct 17, 2006 at 03:30:43PM -0500, [email protected] wrote:

> I've done my homework and found that this HAS to be either serial or usb
> attached according to Fujitsu.

While the fact that Windows uses a PS/2 driver suggests that it's not
serial, tablet devices are often connected to a UART at a non-legacy
address. cat /sys/bus/pnp/*/id should give you a list of IDs, one of
which may look quite obviously different to the others - Wacom devices
tend to be WAC0004 or something, for instance. If there is one, try
sticking it in the table in drivers/serial/8250_pnp.c and see if that
results in a new serial device showing up.

--
Matthew Garrett | [email protected]

2006-10-18 18:45:32

by Greg.Chandler

[permalink] [raw]
Subject: RE: Touchscreen hardware hacking/driver hacking.


Ok, I was wrong about the kernel oops, it was for another driver that I
had not turned off. {which has now been reported seporately}

I was also wrong about it acting as if the button was always pressed.
It's just VERY sensitive.
I need to completely re-install my machine now to test it outside of
gpm. I hosed the system in a futile bid to have a prototype X driver
work instead.

"Kevin K" has replied back saying that the Panasonic Toughbooks also
should use this driver. I've asked him if he would like to test a kernel
for one or a couple since his fix was in the 2.4 port. If so I'd like
to throw all the additions into a patch and submit it all in one pass..




-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Greg Chandler
Sent: Tuesday, October 17, 2006 9:31 PM
To: [email protected]
Cc: [email protected]; [email protected]
Subject: RE: Touchscreen hardware hacking/driver hacking.


I added the following to drivers/input/mouse/lifebook.c
{
.ident = "FLORA-ie 55mi",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "FLORA-ie 55mi"),
},
},

It scrolled oopses for a little while then booted normally.
gpmd using /dev/mouse is taking input from the touchscreen. kind of....

If I move up or down on the screen it moves the cursor like a mouse
would, but it acts like the button is always pressed.


I'm happy that it accepts data at all but concerned about the oops
scroll... There is so much that it is pushed out of the dmesg log, and
the kernel scrollback log. I have no way of recording it {I can't
soldier
down a pin header for serial}

Any ideas?


On Tue, 17 Oct 2006, Greg Chandler wrote:

>
> I'm not sure this will help all too much, but at least I have the
strings...
>
>
> Here is what dmidecode spat out:
>
> # dmidecode 2.8
> SMBIOS 2.3 present.
> 23 structures occupying 646 bytes.
> Table at 0x000DC010.
>
> Handle 0x0000, DMI type 0, 20 bytes
> BIOS Information
> Vendor: Phoenix Technologies Ltd.
> Version: 1.06VB
> Release Date: 03/13/2003
> Address: 0xE7A00
> Runtime Size: 99840 bytes
> ROM Size: 512 kB
> Characteristics:
> ISA is supported
> PCI is supported
> PC Card (PCMCIA) is supported
> PNP is supported
> APM is supported
> BIOS is upgradeable
> BIOS shadowing is allowed
> Selectable boot is supported
> EDD is supported
> Print screen service is supported (int 5h)
> 8042 keyboard services are supported (int 9h)
> Serial services are supported (int 14h)
> Printer services are supported (int 17h)
> CGA/mono video services are supported (int 10h)
> ACPI is supported
> USB legacy is supported
> Smart battery is supported
> BIOS boot specification is supported
>
> Handle 0x0001, DMI type 1, 25 bytes
> System Information
> Manufacturer: HITACHI
> Product Name: FLORA-ie 55mi
> Version: crusoe/ALi1535
> Serial Number: 0
> UUID: 00000000-0000-0000-0000-FFFFFFFFFFFF
> Wake-up Type: Power Switch
>
> Handle 0x0002, DMI type 3, 17 bytes
> Chassis Information
> Manufacturer: HITACHI
> Type: Portable
> Lock: Not Present
> Version: crusoe/ALi1535
> Serial Number: XXXXXXXXXXXXXXXX
> Asset Tag: 0
> Boot-up State: Safe
> Power Supply State: Safe
> Thermal State: Safe
> Security Status: None
> OEM Information: 0x00001234
>
> Handle 0x0003, DMI type 4, 32 bytes
> Processor Information
> Socket Designation: CPU
> Type: Central Processor
> Family: K6-3
> Manufacturer: Transmeta
> ID: 43 05 00 00 3F 89 84 00
> Signature: Family 5, Model 4, Stepping 3
> Flags:
> FPU (Floating-point unit on-chip)
> VME (Virtual mode extension)
> DE (Debugging extension)
> PSE (Page size extension)
> TSC (Time stamp counter)
> MSR (Model specific registers)
> CX8 (CMPXCHG8 instruction supported)
> SEP (Fast system call)
> CMOV (Conditional move instruction supported)
> PSN (Processor serial number present and enabled)
> MMX (MMX technology supported)
> Version: Crusoe(tm)
> Voltage: 1.6 V
> External Clock: 66 MHz
> Max Speed: 400 MHz
> Current Speed: 400 MHz
> Status: Populated, Enabled
> Upgrade: None
> L1 Cache Handle: 0x0004
> L2 Cache Handle: 0x0005
> L3 Cache Handle: Not Provided
>
> Handle 0x0004, DMI type 7, 19 bytes
> Cache Information
> Socket Designation: Cache1
> Configuration: Enabled, Not Socketed, Level 1
> Operational Mode: Write Back
> Location: Internal
> Installed Size: 128 KB
> Maximum Size: 128 KB
> Supported SRAM Types:
> Pipeline Burst
> Installed SRAM Type: Pipeline Burst
> Speed: Unknown
> Error Correction Type: None
> System Type: Unknown
> Associativity: Unknown
>
> Handle 0x0005, DMI type 7, 19 bytes
> Cache Information
> Socket Designation: Cache2
> Configuration: Enabled, Not Socketed, Level 2
> Operational Mode: Write Back
> Location: Internal
> Installed Size: 256 KB
> Maximum Size: 256 KB
> Supported SRAM Types:
> Pipeline Burst
> Installed SRAM Type: None
> Speed: Unknown
> Error Correction Type: None
> System Type: Unknown
> Associativity: Unknown
>
> Handle 0x0006, DMI type 8, 9 bytes
> Port Connector Information
> Internal Reference Designator: Not Specified
> Internal Connector Type: None
> External Reference Designator: SERIAL
> External Connector Type: None
> Port Type: Serial Port 16550A Compatible
>
> Handle 0x0007, DMI type 8, 9 bytes
> Port Connector Information
> Internal Reference Designator: Not Specified
> Internal Connector Type: None
> External Reference Designator: USB1
> External Connector Type: Access Bus (USB)
> Port Type: USB
>
> Handle 0x0008, DMI type 8, 9 bytes
> Port Connector Information
> Internal Reference Designator: Not Specified
> Internal Connector Type: None
> External Reference Designator: USB2
> External Connector Type: Access Bus (USB)
> Port Type: USB
>
> Handle 0x0009, DMI type 8, 9 bytes
> Port Connector Information
> Internal Reference Designator: Not Specified
> Internal Connector Type: None
> External Reference Designator: MICROPHONE MINI JACK
> External Connector Type: Other
> Port Type: Other
>
> Handle 0x000A, DMI type 8, 9 bytes
> Port Connector Information
> Internal Reference Designator: Not Specified
> Internal Connector Type: None
> External Reference Designator: AUDIO OUT MINI JACK
> External Connector Type: Mini Jack (headphones)
> Port Type: Audio Port
>
> Handle 0x000D, DMI type 9, 13 bytes
> System Slot Information
> Designation: PCCARD SLOT1
> Type: 16-bit PC Card (PCMCIA)
> Current Usage: Unknown
> Length: Other
> ID: Adapter 0, Socket 1
> Characteristics:
> 5.0 V is provided
> 3.3 V is provided
> PC Card-16 is supported
> Modem ring resume is supported
>
> Handle 0x000E, DMI type 16, 15 bytes
> Physical Memory Array
> Location: System Board Or Motherboard
> Use: System Memory
> Error Correction Type: None
> Maximum Capacity: 128 MB
> Error Information Handle: Not Provided
> Number Of Devices: 1
>
> Handle 0x000F, DMI type 17, 23 bytes
> Memory Device
> Array Handle: 0x000E
> Error Information Handle: Not Provided
> Total Width: 64 bits
> Data Width: 64 bits
> Size: 128 MB
> Form Factor: DIMM
> Set: 1
> Locator: Socket
> Bank Locator: Bank0
> Type: SDRAM
> Type Detail: Synchronous
> Speed: 100 MHz (10.0 ns)
>
> Handle 0x0010, DMI type 17, 23 bytes
> Memory Device
> Array Handle: 0x000E
> Error Information Handle: Not Provided
> Total Width: 64 bits
> Data Width: 64 bits
> Size: 112 MB
> Form Factor: DIMM
> Set: 2
> Locator: Base
> Bank Locator: Bank1
> Type: SDRAM
> Type Detail: Synchronous
> Speed: 100 MHz (10.0 ns)
>
> Handle 0x0011, DMI type 19, 15 bytes
> Memory Array Mapped Address
> Starting Address: 0x00000000000
> Ending Address: 0x0000EFFFFFF
> Range Size: 240 MB
> Physical Array Handle: 0x000E
> Partition Width: 0
>
> Handle 0x0012, DMI type 20, 19 bytes
> Memory Device Mapped Address
> Starting Address: 0x00000000000
> Ending Address: 0x00007FFFFFF
> Range Size: 128 MB
> Physical Device Handle: 0x000F
> Memory Array Mapped Address Handle: 0x0011
> Partition Row Position: Unknown
>
> Handle 0x0013, DMI type 20, 19 bytes
> Memory Device Mapped Address
> Starting Address: 0x00008000000
> Ending Address: 0x0000EFFFFFF
> Range Size: 112 MB
> Physical Device Handle: 0x0010
> Memory Array Mapped Address Handle: 0x0011
> Partition Row Position: Unknown
>
> Handle 0x0014, DMI type 21, 7 bytes
> Built-in Pointing Device
> Type: Track Ball
> Interface: PS/2
> Buttons: 0
>
> Handle 0x0015, DMI type 32, 20 bytes
> System Boot Information
> Status: <OUT OF SPEC>
>
> Handle 0x0016, DMI type 127, 4 bytes
> End Of Table
>
> Wrong DMI structures count: 23 announced, only 21 decoded.
>

2006-10-25 20:15:15

by Greg.Chandler

[permalink] [raw]
Subject: RE: Touchscreen hardware hacking/driver hacking.


I've been thinking about the code I added:
{
.ident = "FLORA-ie 55mi",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "FLORA-ie 55mi"),
},
},

That's nice and all that it works, but I'd like to make it work for all
models. Some don't return the same strings, but do have the same
hardware. I noticed the same thing with your lifebook models.
I can't find the definition for "DMI_MATCH", of if I did, I sure don't
understand it. What I'd like to do is something along the lines of:

const char* UPCASEME(string str)
{
for (int x = 0; x < str.size(); x = x + 1)
{
str[x] = toupper(str[x]);
}
return str.c_str();
}

{
if (strncmp(UPCASEME(DMI_PRODUCT_NAME), UPCASEME("FLORA-ie ") ,9) ==
0)
{
.ident = "FLORA-ie 55mi",
.matches = { DMI_MATCH(UPCASEME(DMI_PRODUCT_NAME),
UPCASEME("FLORA-ie ")) },
}
else if (strncmp(UPCASEME(DMI_PRODUCT_NAME), UPCASEME("LifeBook B")
,10) == 0)
{
.ident = "LifeBook B",
.matches = { DMI_MATCH(UPCASEME(DMI_PRODUCT_NAME),
UPCASEME("LifeBook B")) },
}
else
{
}
}


Now that I have looked at it {going over my code to see if it should
work I saw this in drivers/firmware/dmi_scan.c:
/**
* dmi_check_system - check system DMI data
* @list: array of dmi_system_id structures to match against
* All non-null elements of the list must match
* their slot's (field index's) data (i.e., each
* list string must be a substring of the specified
* DMI slot's string data) to be considered a
* successful match.
*
* Walk the blacklist table running matching functions until
someone
* returns non zero or we hit the end. Callback function is called
for
* each successful match. Returns the number of matches.
*/
int dmi_check_system(struct dmi_system_id *list)

If this is true, maybe that function should be changed to make it
case-insensitive?
If so then, 4 of the pre-existing cases can be summed up as "LifeBook
B", and all of the Flora-ie tablets can be listed as a single entry as
well.

I know somone will object to this as a dangerous assumption that all
models, or all spellings are the same. Byt the time the flames hit, I
should have my asbestos armour out and ready. However, I know for a
fact that all of the Hitachi tablets do have this, and for what I have
read so do the lifebooks. My opinion is that "it's only a PS/2" driver,
what could go wrong. I'm no kernel developer, and not much of a
developer in general so, now that I've erected the lightning rod I guess
it's time for discussion?

What do you guys think?













-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Dmitry Torokhov
Sent: Tuesday, October 17, 2006 4:12 PM
To: Chandler, Greg
Cc: [email protected]; [email protected]
Subject: Re: Touchscreen hardware hacking/driver hacking.

On 10/17/06, [email protected] <[email protected]>
wrote:
>
> I'm working on a prototype Hitachi tablet, it uses a Fujitsu 4-wire
> resistive touchscreen. {10.4" I think} I've found that windows-xp
> embedded uses a generic ps/2 driver for the device.
>
> I've ripped this thing to pieces on several occasions looking for
> chips to help the porting, my problem is that I can not find the
> analog-digital converter for this thing. The connector goes to a
> surface mount header on an 8 layer board.
> I loose the traces almost instantly. Given that I can't find the
> converter anywhere what should I do next?
>
> I've done my homework and found that this HAS to be either serial or
> usb attached according to Fujitsu.
> Aparently it's neither. There are no unknown USB devices {or known
> matching}, and there is no activity on the single serial port on the
> system. Since the windows driver uses PS/2 as the interface I have a
> horrible feeling this thing has an interpretation layer that makes it
> a
> PS/2 mouse, and that may or may not royally be a nightmare.
>

The touchscreen might need a "magic knock" to activate. You might try to
see what data wondows driver sends to PS/2 port.

Also check of Lifebook touchscreen protocol will work for you. You will
need to adjust DMI table in drivers/input/mouse/lifebook.c/

> I would have posted this to a different group but there is no "input"
> mailing list.
>

[email protected]

But you must be subscribed to post otherwise list just drops your mails
on the floor.

--
Dmitry


2006-10-25 20:55:18

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Touchscreen hardware hacking/driver hacking.

Hi Greg,

On 10/25/06, [email protected] <[email protected]> wrote:
>
> I've been thinking about the code I added:
> {
> .ident = "FLORA-ie 55mi",
> .matches = {
> DMI_MATCH(DMI_PRODUCT_NAME, "FLORA-ie 55mi"),
> },
> },
>
> That's nice and all that it works

Great!

> but I'd like to make it work for all
> models. Some don't return the same strings, but do have the same
> hardware. I noticed the same thing with your lifebook models.
> I can't find the definition for "DMI_MATCH"

inlude/linux/dmi.h

>, of if I did, I sure don't
> understand it. What I'd like to do is something along the lines of:
>
> const char* UPCASEME(string str)
> {
> for (int x = 0; x < str.size(); x = x + 1)
> {
> str[x] = toupper(str[x]);
> }
> return str.c_str();
> }
>
> {
> if (strncmp(UPCASEME(DMI_PRODUCT_NAME), UPCASEME("FLORA-ie ") ,9) ==
> 0)

DMI_PRODUCT_NAME is number of field in DMI tables containing product
name, it is a number and can't be upcased ;)

<...skip...>
> int dmi_check_system(struct dmi_system_id *list)
>
> If this is true, maybe that function should be changed to make it
> case-insensitive?
> If so then, 4 of the pre-existing cases can be summed up as "LifeBook
> B", and all of the Flora-ie tablets can be listed as a single entry as
> well.
>
> I know somone will object to this as a dangerous assumption that all
> models, or all spellings are the same. Byt the time the flames hit, I
> should have my asbestos armour out and ready. However, I know for a
> fact that all of the Hitachi tablets do have this, and for what I have
> read so do the lifebooks. My opinion is that "it's only a PS/2" driver,
> what could go wrong.

It was considered but we decided that if we need to rely on solely DMI
data when activating some features we need to add models one by one
and do not use "blanket" options. There are lifebooks out there that
do not have that kind of outscreen so if we tried to match just on
"LIFEBOOK" present in the product name we might hit such models and
then their PS/2 mice would not work.

If we knew of a way to query the touchscreen for lifebook protocol
support that would be a different story...

--
Dmitry

2006-10-26 08:48:45

by Matthew Garrett

[permalink] [raw]
Subject: Re: Touchscreen hardware hacking/driver hacking.

On Wed, Oct 25, 2006 at 04:55:13PM -0400, Dmitry Torokhov wrote:

> It was considered but we decided that if we need to rely on solely DMI
> data when activating some features we need to add models one by one
> and do not use "blanket" options. There are lifebooks out there that
> do not have that kind of outscreen so if we tried to match just on
> "LIFEBOOK" present in the product name we might hit such models and
> then their PS/2 mice would not work.

Do the Lifebooks with these touchscreens not have a PnPBIOS or ACPI
entry that describes the type?

--
Matthew Garrett | [email protected]

2006-10-26 16:29:22

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Touchscreen hardware hacking/driver hacking.

On 10/26/06, Matthew Garrett <[email protected]> wrote:
> On Wed, Oct 25, 2006 at 04:55:13PM -0400, Dmitry Torokhov wrote:
>
> > It was considered but we decided that if we need to rely on solely DMI
> > data when activating some features we need to add models one by one
> > and do not use "blanket" options. There are lifebooks out there that
> > do not have that kind of outscreen so if we tried to match just on
> > "LIFEBOOK" present in the product name we might hit such models and
> > then their PS/2 mice would not work.
>
> Do the Lifebooks with these touchscreens not have a PnPBIOS or ACPI
> entry that describes the type?
>

I don't recall anything in ACPI spec that would help determining type
of PS/2 device connected, but then I did not read the latest version.
Anyway, I would not hold my breath...

--
Dmitry

2006-10-26 22:47:14

by Matthew Garrett

[permalink] [raw]
Subject: Re: Touchscreen hardware hacking/driver hacking.

On Thu, Oct 26, 2006 at 12:29:18PM -0400, Dmitry Torokhov wrote:

> I don't recall anything in ACPI spec that would help determining type
> of PS/2 device connected, but then I did not read the latest version.
> Anyway, I would not hold my breath...

It's possible for PnP devices to have multiple identifiers associated
with them. One of these probably identifies a PS/2 mouse device as a
mouse device, but it's possible that there's a second identifier that
indicates that it's something else as well.

--
Matthew Garrett | [email protected]