Fujitsu lifebook application panel
Technical information and drivers for *n*x platforms

Technical Details - Obsolete


Attention this page is obsolete. I discovered that the application panel is attached to the PIIX4 chip, on the system management bus. You might want to look at the new tech page.


Well, the debugging is still in progress and we don't (yet) know how it works exactly, but some of what we know is shown below. The information may actually be inaccurate, so be careful when experimenting. When you discover something, please mail me.

Currently, the driver uses direct outb commands, not exactly according to the information below. If you want working code and it doens't work with the following information, try copying it from the source available from the download page

Enable application panel hardware

Before the application panel hardware can be accessed, it has to be enabled. When turning on the c4110, it is enabled by default. However, when windows is shut down, the btnhnd driver disables it. It can be enabled by the following code:

enable:
outb 0x477, inb(0x477)&0xf7

Output: LED and LCD

The i/o ports that have a central place in all this are 0xff80-0xff8f. For output (lcd&led), the following commands are executed:

output:
outb baseport+4, device
outb baseport+5, value&0xff
outb baseport+6, value>>8
outb baseport+3, minor

outb baseport+2, inb(baseport+2)&0x1c|0x0c
call applysub

baseport is equal to 0xff80 for the Fujitsu C-4110. The device is either 0x30 for the LED and 0x34 for the LCD. The subroutine applysub will be defined later. Below is a table with observed values obtained by debugging:

device minor value
0x34 6 tracknumber*0x100 set lcdnumber
1 0
0x30 10 0x8080 led on
0x0f 0
0x0f 0x100
0 0x10 led off

I managed to figure out some sequences for the led (device=0x30).

  • minor=0x02: master switch. value=0000 for led off, value=0x0080 for led on
  • minor=0x10: 2nd switch. value=0000 for led off, value=0x0080 for led on
  • minor=0x0f: blinking. value=0000 for blinking on, value=0x0080 pause blinking
  • minor=0x11: set blink speed, value=0xMM00, where the blink time t is determined as follows: t=2^(4-MM/16).

When minor=0x00, the blink speed of the led increases drastically and I don't know how to turn it of. minors 0x0f,0x10 and 0x02 still work. After playing with some sequences I discovered that a minor of 11 could set the blinking speed.

Input: Application keys

For input, the code is somewhat different:

input:
outb baseport+4, device | 1
outb baseport+3, switchpos

outb baseport+2,inb(baseport+2)&0x1c|0x0c
call applysub
return inb(baseport+6)*0x100 + inb(baseport+5)

The value device is 0x34. The value of switchpos depends on the position of the left switch you want to read. If the left switch is set on Application, the value of switchpos is 8, if the switch is set on CDPlayer, the value is 1. So you have to check the button status for both the Application and CDPlayer position. The output values are as follows:

Application modeCDPlayer mode
Key Value Key Value
A 0x04 Stop/Eject 0x08
B 0x08 Play/Pause 0x20
Internet0x02 Backward 0x01
E-mail0x01 Forward 0x02

applysub

This is called after or in the middle of every i/o operation. It needed a name, so I called it appysub. It has some VxD calls in it (in the windows driver of course), Begin_Nest_Exec, Resume_Exec and End_Nest_Exec. I have no clue what they do, so if you have, please mail me. Here is the code that I use and works for the LED:

applysub: for loop=0 to 32
outb baseport, inb(baseport ) | 0x1e
outb baseport+1, inb(baseport+1) | 0x3c
outb baseport+2, inb(baseport+2) | 0x40

waitloop:
al=0
while (al&0x1c == 0)
al = inb(baseport)&0x1f;
if ( al==2 ) goto done
endwh

next

done:
outb baseport, inb(baseport ) | 2

I implemented the above code in a FreeBSD driver and the led works. The keys don't work so I have to be missing something, but I'm trying to find out.