USB: add iuu_phoenix driver

Signed-off-by: Alain Degreffe <eczema@ecze.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Alain Degreffe 2007-10-26 13:51:49 +02:00 committed by Greg Kroah-Hartman
parent c74e809565
commit 60a8fc0171
5 changed files with 1435 additions and 0 deletions

View file

@ -0,0 +1,84 @@
Infinity Usb Unlimited Readme
-----------------------------
Hi all,
This module provide a serial interface to use your
IUU unit in phoenix mode. Loading this module will
bring a ttyUSB[0-x] interface. This driver must be
used by your favorite application to pilot the IUU
This driver is still in beta stage, so bugs can
occur and your system may freeze. As far I now,
I never had any problem with it, but I'm not a real
guru, so don't blame me if your system is unstable
You can plug more than one IUU. Every unit will
have his own device file(/dev/ttyUSB0,/dev/ttyUSB1,...)
How to tune the reader speed ?
A few parameters can be used at load time
To use parameters, just unload the module if it is
already loaded and use modprobe iuu_phoenix param=value.
In case of prebuilt module, use the command
insmod iuu_phoenix param=value.
Example:
modprobe iuu_phoenix clockmode=3
The parameters are:
parm: clockmode:1=3Mhz579,2=3Mhz680,3=6Mhz (int)
parm: boost:overclock boost percent 100 to 500 (int)
parm: cdmode:Card detect mode 0=none, 1=CD, 2=!CD, 3=DSR, 4=!DSR, 5=CTS, 6=!CTS, 7=RING, 8=!RING (int)
parm: xmas:xmas color enabled or not (bool)
parm: debug:Debug enabled or not (bool)
- clockmode will provide 3 different base settings commonly adopted by
different software:
1. 3Mhz579
2. 3Mhz680
3. 6Mhz
- boost provide a way to overclock the reader ( my favorite :-) )
For example to have best performance than a simple clockmode=3, try this:
modprobe boost=195
This will put the reader in a base of 3Mhz579 but boosted a 195 % !
the real clock will be now : 6979050 Hz ( 6Mhz979 ) and will increase
the speed to a score 10 to 20% better than the simple clockmode=3 !!!
- cdmode permit to setup the signal used to inform the userland ( ioctl answer )
if the card is present or not. Eight signals are possible.
- xmas is completely useless except for your eyes. This is one of my friend who was
so sad to have a nice device like the iuu without seeing all color range available.
So I have added this option to permit him to see a lot of color ( each activity change the color
and the frequency randomly )
- debug will produce a lot of debugging messages...
Last notes:
Don't worry about the serial settings, the serial emulation
is an abstraction, so use any speed or parity setting will
work. ( This will not change anything ).Later I will perhaps
use this settings to deduce de boost but is that feature
really necessary ?
The autodetect feature used is the serial CD. If that doesn't
work for your software, disable detection mechanism in it.
Have fun !
Alain Degreffe
eczema(at)ecze.com

View file

@ -282,6 +282,17 @@ config USB_SERIAL_IPW
To compile this driver as a module, choose M here: the
module will be called ipw.
config USB_SERIAL_IUU
tristate "USB Infinity USB Unlimited Phoenix Driver (Experimental)"
depends on USB_SERIAL && EXPERIMENTAL
help
Say Y here if you want to use a IUU in phoenix mode and get
an extra ttyUSBx device. More information available on
http://eczema.ecze.com/iuu_phoenix.html
To compile this driver as a module, choose M here: the
module will be called iuu_phoenix.o
config USB_SERIAL_KEYSPAN_PDA
tristate "USB Keyspan PDA Single Port Serial Driver"
depends on USB_SERIAL

View file

@ -30,6 +30,7 @@ obj-$(CONFIG_USB_SERIAL_GARMIN) += garmin_gps.o
obj-$(CONFIG_USB_SERIAL_HP4X) += hp4x.o
obj-$(CONFIG_USB_SERIAL_IPAQ) += ipaq.o
obj-$(CONFIG_USB_SERIAL_IPW) += ipw.o
obj-$(CONFIG_USB_SERIAL_IUU) += iuu_phoenix.o
obj-$(CONFIG_USB_SERIAL_IR) += ir-usb.o
obj-$(CONFIG_USB_SERIAL_KEYSPAN) += keyspan.o
obj-$(CONFIG_USB_SERIAL_KEYSPAN_PDA) += keyspan_pda.o

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,122 @@
/*
* Infinity Unlimited USB Phoenix driver
*
* Copyright (C) 2007 Alain Degreffe (eczema@ecze.com)
*
*
* Original code taken from iuutool ( Copyright (C) 2006 Juan Carlos Borrás )
*
* This program 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.
*
* And tested with help of WB Electronics
*
*/
#define IUU_USB_VENDOR_ID 0x104f
#define IUU_USB_PRODUCT_ID 0x0004
#define IUU_USB_OP_TIMEOUT 0x0200
/* Programmer commands */
#define IUU_NO_OPERATION 0x00
#define IUU_GET_FIRMWARE_VERSION 0x01
#define IUU_GET_PRODUCT_NAME 0x02
#define IUU_GET_STATE_REGISTER 0x03
#define IUU_SET_LED 0x04
#define IUU_WAIT_MUS 0x05
#define IUU_WAIT_MS 0x06
#define IUU_GET_LOADER_VERSION 0x50
#define IUU_RST_SET 0x52
#define IUU_RST_CLEAR 0x53
#define IUU_SET_VCC 0x59
#define IUU_UART_ENABLE 0x49
#define IUU_UART_DISABLE 0x4A
#define IUU_UART_WRITE_I2C 0x4C
#define IUU_UART_ESC 0x5E
#define IUU_UART_TRAP 0x54
#define IUU_UART_TRAP_BREAK 0x5B
#define IUU_UART_RX 0x56
#define IUU_AVR_ON 0x21
#define IUU_AVR_OFF 0x22
#define IUU_AVR_1CLK 0x23
#define IUU_AVR_RESET 0x24
#define IUU_AVR_RESET_PC 0x25
#define IUU_AVR_INC_PC 0x26
#define IUU_AVR_INCN_PC 0x27
#define IUU_AVR_PREAD 0x29
#define IUU_AVR_PREADN 0x2A
#define IUU_AVR_PWRITE 0x28
#define IUU_AVR_DREAD 0x2C
#define IUU_AVR_DREADN 0x2D
#define IUU_AVR_DWRITE 0x2B
#define IUU_AVR_PWRITEN 0x2E
#define IUU_EEPROM_ON 0x37
#define IUU_EEPROM_OFF 0x38
#define IUU_EEPROM_WRITE 0x39
#define IUU_EEPROM_WRITEX 0x3A
#define IUU_EEPROM_WRITE8 0x3B
#define IUU_EEPROM_WRITE16 0x3C
#define IUU_EEPROM_WRITEX32 0x3D
#define IUU_EEPROM_WRITEX64 0x3E
#define IUU_EEPROM_READ 0x3F
#define IUU_EEPROM_READX 0x40
#define IUU_EEPROM_BREAD 0x41
#define IUU_EEPROM_BREADX 0x42
#define IUU_PIC_CMD 0x0A
#define IUU_PIC_CMD_LOAD 0x0B
#define IUU_PIC_CMD_READ 0x0C
#define IUU_PIC_ON 0x0D
#define IUU_PIC_OFF 0x0E
#define IUU_PIC_RESET 0x16
#define IUU_PIC_INC_PC 0x0F
#define IUU_PIC_INCN_PC 0x10
#define IUU_PIC_PWRITE 0x11
#define IUU_PIC_PREAD 0x12
#define IUU_PIC_PREADN 0x13
#define IUU_PIC_DWRITE 0x14
#define IUU_PIC_DREAD 0x15
#define IUU_UART_NOP 0x00
#define IUU_UART_CHANGE 0x02
#define IUU_UART_TX 0x04
#define IUU_DELAY_MS 0x06
#define IUU_OPERATION_OK 0x00
#define IUU_DEVICE_NOT_FOUND 0x01
#define IUU_INVALID_HANDLE 0x02
#define IUU_INVALID_PARAMETER 0x03
#define IUU_INVALID_voidERFACE 0x04
#define IUU_INVALID_REQUEST_LENGTH 0x05
#define IUU_UART_NOT_ENABLED 0x06
#define IUU_WRITE_ERROR 0x07
#define IUU_READ_ERROR 0x08
#define IUU_TX_ERROR 0x09
#define IUU_RX_ERROR 0x0A
#define IUU_PARITY_NONE 0x00
#define IUU_PARITY_EVEN 0x01
#define IUU_PARITY_ODD 0x02
#define IUU_PARITY_MARK 0x03
#define IUU_PARITY_SPACE 0x04
#define IUU_SC_INSERTED 0x01
#define IUU_VERIFY_ERROR 0x02
#define IUU_SIM_INSERTED 0x04
#define IUU_TWO_STOP_BITS 0x00
#define IUU_ONE_STOP_BIT 0x20
#define IUU_BAUD_2400 0x0398
#define IUU_BAUD_9600 0x0298
#define IUU_BAUD_19200 0x0164
#define IUU_BAUD_28800 0x0198
#define IUU_BAUD_38400 0x01B2
#define IUU_BAUD_57600 0x0030
#define IUU_BAUD_115200 0x0098
#define IUU_CLK_3579000 3579000
#define IUU_CLK_3680000 3680000
#define IUU_CLK_6000000 6000000
#define IUU_FULLCARD_IN 0x01
#define IUU_DEV_ERROR 0x02
#define IUU_MINICARD_IN 0x04
#define IUU_VCC_5V 0x00
#define IUU_VCC_3V 0x01