TuxMobil: Linux with Laptops, PDAs, Mobile Phones and Portable Computers
PRINT version of "TuxMobil - PCMCIA Annotations 7"
    <= Back to SCREEN version <=

<-- Back to Linux PCMCIA Survey.

From: Fabrizio Gennari at the iPAQ mailing list(http://handhelds.org/mailman/listinfo/ipaq) (03/2002) .

"The Compaq iPAQ Bluetooth/CF combo mounts an OXCF950 chip (CF version of 16C950 UART) connected to a CSR Bluetooth chip. Only the OXCF950 chip is seen by the PCMCIA subsystem.

The default settings for the CSR chip are 1MB baudrate and BCSP. As in all CSR chip, this can be altered by modifying the "persistent store" keys.

The current version of serial_cs.c detects it as a dual-port chip: this is because the cftable entry:

cftable_entry 0x01 [default]
  Vcc Vnom 3300mV
  io 0x03f8-0x0407 [lines=8] [8bit] [range]

declares 16 bytes of I/O space (0x03f8-0x0407). In fact, there is only one UART there: 8 bytes are the UART registers, the other 8 bytes are "local configuration registers" or LCRs (more detail about LCRs is in OXCF950 data sheet). For some strange reasons, when cftable entry 0x01 is used, the "local configuration registers" are mapped to the first 8 I/O addresses (0x03f8-0x03ff) and the UART registers are mapped to the following 8 (0x400-0x0407). The data sheet says the opposite. When cftable entry 0x02 is used (for example, if another serial port already occupies addresses from 0x03f8) this does not happen. I exchanged some e-mails about this with an Oxford Semiconductor woman, but without getting a real answer. I posted a patch at http://sourceforge.net/projects/pcmcia-cs, in "Patches" section, that solves this issue.

The Bluetooth chip needs to be powered. Power is turned on by setting the MIO1 pin to 1 in OXCF950. MIO1 pin is controlled by bits 2:3 in the OXCF950's "Multi-Purpose I/O Configuration" (MIC) local configuration register. The above-mentioned patch also turns on power in Bluetooth chip.

The 16C950 clock frequency is 16 MHz. Therefore, the "baud_base" should be set to 1000000 (1/16th of the clock frequency) with setserial. Since 16 MHz is not an integral multiple of 115200 Hz, if anybody needs to set the serial port baudrate to "normal values" of 57600, 115200, 230400 b/s etc., (s)he must use Ian Abbott's kernel patch that adds support for 16C950's CPR register. The CPR register controls a high-resolution divisor, that can be set with steps of 1/8, instead of 1, thus allowing for tuning speed in a finer way. Unfortunately, Jean Tourrilhes' patch cannot be used for the purpose, because it disables CPR for speeds of 115200 b/s and higher, and therefore is only indicated for clock speeds that are integral multiples of 115200 Hz. Ian Abbott's patch is at http://sourceforge.net/tracker/index.php?func=detail&aid=432453&group_id=310&atid=300310 His patch has also been applied to cvs.handhelds.org kernel sources."

        /* Adv.    Xtops.DE - Laptops and PDAs with pre-installed Linux   Adv. */        

http://tuxmobil.org/pcmcia_linux_db_a7.html, copyright © Werner Heuser, 1997-2008