Commit 6e2868e5 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: added driver to support the I/O Networks TI based usb-serial devices.

parent 018122ca
...@@ -268,6 +268,16 @@ CONFIG_USB_SERIAL_EDGEPORT ...@@ -268,6 +268,16 @@ CONFIG_USB_SERIAL_EDGEPORT
The module will be called io_edgeport.o. If you want to compile it The module will be called io_edgeport.o. If you want to compile it
as a module, say M here and read <file:Documentation/modules.txt>. as a module, say M here and read <file:Documentation/modules.txt>.
CONFIG_USB_SERIAL_EDGEPORT_TI
Say Y here if you want to use any of the devices from Inside Out
Networks (Digi) that are not supported by the io_edgeport driver.
This includes the Edgeport/1 device.
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called io_ti.o. If you want to compile it
as a module, say M here and read <file:Documentation/modules.txt>.
CONFIG_USB_SERIAL_KLSI CONFIG_USB_SERIAL_KLSI
Say Y here if you want to use a KL5KUSB105 - based single port Say Y here if you want to use a KL5KUSB105 - based single port
serial adapter. The most widely known -- and currently the only serial adapter. The most widely known -- and currently the only
......
...@@ -19,6 +19,7 @@ dep_tristate ' USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_ ...@@ -19,6 +19,7 @@ dep_tristate ' USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_
dep_tristate ' USB Compaq iPAQ / HP Jornada / Casio EM500 Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL dep_tristate ' USB Compaq iPAQ / HP Jornada / Casio EM500 Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL
dep_tristate ' USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
dep_tristate ' USB Inside Out Edgeport Serial Driver' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL dep_tristate ' USB Inside Out Edgeport Serial Driver' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL
dep_tristate ' USB Inside Out Edgeport Serial Driver (TI devices)' CONFIG_USB_SERIAL_EDGEPORT_TI $CONFIG_USB_SERIAL
dep_tristate ' USB Keyspan PDA Single Port Serial Driver' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL dep_tristate ' USB Keyspan PDA Single Port Serial Driver' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL
dep_tristate ' USB Keyspan USA-xxx Serial Driver' CONFIG_USB_SERIAL_KEYSPAN $CONFIG_USB_SERIAL dep_tristate ' USB Keyspan USA-xxx Serial Driver' CONFIG_USB_SERIAL_KEYSPAN $CONFIG_USB_SERIAL
dep_mbool ' USB Keyspan USA-28 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28 $CONFIG_USB_SERIAL_KEYSPAN dep_mbool ' USB Keyspan USA-28 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28 $CONFIG_USB_SERIAL_KEYSPAN
......
...@@ -18,6 +18,7 @@ obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o ...@@ -18,6 +18,7 @@ obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o
obj-$(CONFIG_USB_SERIAL_EMPEG) += empeg.o obj-$(CONFIG_USB_SERIAL_EMPEG) += empeg.o
obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o
obj-$(CONFIG_USB_SERIAL_EDGEPORT) += io_edgeport.o obj-$(CONFIG_USB_SERIAL_EDGEPORT) += io_edgeport.o
obj-$(CONFIG_USB_SERIAL_EDGEPORT_TI) += io_ti.o
obj-$(CONFIG_USB_SERIAL_PL2303) += pl2303.o obj-$(CONFIG_USB_SERIAL_PL2303) += pl2303.o
obj-$(CONFIG_USB_SERIAL_CYBERJACK) += cyberjack.o obj-$(CONFIG_USB_SERIAL_CYBERJACK) += cyberjack.o
obj-$(CONFIG_USB_SERIAL_IR) += ir-usb.o obj-$(CONFIG_USB_SERIAL_IR) += ir-usb.o
......
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
*
* Copyright (c) 1997-2002 Inside Out Networks, Inc.
*
* 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.
*
*
* Feb-16-2001 DMI Added I2C structure definitions
* May-29-2002 gkh Ported to Linux
*
*
******************************************************************************/
#ifndef _IO_TI_H_
#define _IO_TI_H_
/* Address Space */
#define DTK_ADDR_SPACE_XDATA 0x03 /* Addr is placed in XDATA space */
#define DTK_ADDR_SPACE_I2C_TYPE_II 0x82 /* Addr is placed in I2C area */
#define DTK_ADDR_SPACE_I2C_TYPE_III 0x83 /* Addr is placed in I2C area */
// UART Defines
#define UMPMEM_BASE_UART1 0xFFA0 /* UMP UART1 base address */
#define UMPMEM_BASE_UART2 0xFFB0 /* UMP UART2 base address */
#define UMPMEM_OFFS_UART_LSR 0x05 /* UMP UART LSR register offset */
/* Bits per character */
#define UMP_UART_CHAR5BITS 0x00
#define UMP_UART_CHAR6BITS 0x01
#define UMP_UART_CHAR7BITS 0x02
#define UMP_UART_CHAR8BITS 0x03
/* Parity */
#define UMP_UART_NOPARITY 0x00
#define UMP_UART_ODDPARITY 0x01
#define UMP_UART_EVENPARITY 0x02
#define UMP_UART_MARKPARITY 0x03
#define UMP_UART_SPACEPARITY 0x04
/* Stop bits */
#define UMP_UART_STOPBIT1 0x00
#define UMP_UART_STOPBIT15 0x01
#define UMP_UART_STOPBIT2 0x02
/* Line status register masks */
#define UMP_UART_LSR_OV_MASK 0x01
#define UMP_UART_LSR_PE_MASK 0x02
#define UMP_UART_LSR_FE_MASK 0x04
#define UMP_UART_LSR_BR_MASK 0x08
#define UMP_UART_LSR_ER_MASK 0x0F
#define UMP_UART_LSR_RX_MASK 0x10
#define UMP_UART_LSR_TX_MASK 0x20
#define UMP_UART_LSR_DATA_MASK ( LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK )
/* Port Settings Constants) */
#define UMP_MASK_UART_FLAGS_RTS_FLOW 0x0001
#define UMP_MASK_UART_FLAGS_RTS_DISABLE 0x0002
#define UMP_MASK_UART_FLAGS_PARITY 0x0008
#define UMP_MASK_UART_FLAGS_OUT_X_DSR_FLOW 0x0010
#define UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW 0x0020
#define UMP_MASK_UART_FLAGS_OUT_X 0x0040
#define UMP_MASK_UART_FLAGS_OUT_XA 0x0080
#define UMP_MASK_UART_FLAGS_IN_X 0x0100
#define UMP_MASK_UART_FLAGS_DTR_FLOW 0x0800
#define UMP_MASK_UART_FLAGS_DTR_DISABLE 0x1000
#define UMP_MASK_UART_FLAGS_RECEIVE_MS_INT 0x2000
#define UMP_MASK_UART_FLAGS_AUTO_START_ON_ERR 0x4000
#define UMP_DMA_MODE_CONTINOUS 0x01
#define UMP_PIPE_TRANS_TIMEOUT_ENA 0x80
#define UMP_PIPE_TRANSFER_MODE_MASK 0x03
#define UMP_PIPE_TRANS_TIMEOUT_MASK 0x7C
/* Purge port Direction Mask Bits */
#define UMP_PORT_DIR_OUT 0x01
#define UMP_PORT_DIR_IN 0x02
// Address of Port 0
#define UMPM_UART1_PORT 0x03
// Commands
#define UMPC_SET_CONFIG 0x05
#define UMPC_OPEN_PORT 0x06
#define UMPC_CLOSE_PORT 0x07
#define UMPC_START_PORT 0x08
#define UMPC_STOP_PORT 0x09
#define UMPC_TEST_PORT 0x0A
#define UMPC_PURGE_PORT 0x0B
#define UMPC_COMPLETE_READ 0x80 // Force the Firmware to complete the current Read
#define UMPC_HARDWARE_RESET 0x81 // Force UMP back into BOOT Mode
#define UMPC_COPY_DNLD_TO_I2C 0x82 // Copy current download image to type 0xf2 record in 16k I2C
// firmware will change 0xff record to type 2 record when complete
// Special function register commands
// wIndex is register address
// wValue is MSB/LSB mask/data
#define UMPC_WRITE_SFR 0x83 // Write SFR Register
// wIndex is register address
#define UMPC_READ_SFR 0x84 // Read SRF Register
// Set or Clear DTR (wValue bit 0 Set/Clear) wIndex ModuleID (port)
#define UMPC_SET_CLR_DTR 0x85
// Set or Clear RTS (wValue bit 0 Set/Clear) wIndex ModuleID (port)
#define UMPC_SET_CLR_RTS 0x86
// Set or Clear LOOPBACK (wValue bit 0 Set/Clear) wIndex ModuleID (port)
#define UMPC_SET_CLR_LOOPBACK 0x87
// Set or Clear BREAK (wValue bit 0 Set/Clear) wIndex ModuleID (port)
#define UMPC_SET_CLR_BREAK 0x88
// Read MSR wIndex ModuleID (port)
#define UMPC_READ_MSR 0x89
/* Toolkit commands */
/* Read-write group */
#define UMPC_MEMORY_READ 0x92
#define UMPC_MEMORY_WRITE 0x93
/*
* UMP DMA Definitions
*/
#define UMPD_OEDB1_ADDRESS 0xFF08
#define UMPD_OEDB2_ADDRESS 0xFF10
struct out_endpoint_desc_block
{
__u8 Configuration;
__u8 XBufAddr;
__u8 XByteCount;
__u8 Unused1;
__u8 Unused2;
__u8 YBufAddr;
__u8 YByteCount;
__u8 BufferSize;
} __attribute__((packed));
/*
* TYPE DEFINITIONS
* Structures for Firmware commands
*/
struct ump_uart_config /* UART settings */
{
__u16 wBaudRate; /* Baud rate */
__u16 wFlags; /* Bitmap mask of flags */
__u8 bDataBits; /* 5..8 - data bits per character */
__u8 bParity; /* Parity settings */
__u8 bStopBits; /* Stop bits settings */
char cXon; /* XON character */
char cXoff; /* XOFF character */
__u8 bUartMode; /* Will be updated when a user */
/* interface is defined */
} __attribute__((packed));
/*
* TYPE DEFINITIONS
* Structures for USB interrupts
*/
struct ump_interrupt /* Interrupt packet structure */
{
__u8 bICode; /* Interrupt code (interrupt num) */
__u8 bIInfo; /* Interrupt information */
} __attribute__((packed));
#define TIUMP_GET_PORT_FROM_CODE(c) (((c) >> 4) - 3)
#define TIUMP_GET_FUNC_FROM_CODE(c) ((c) & 0x0f)
#define TIUMP_INTERRUPT_CODE_LSR 0x03
#define TIUMP_INTERRUPT_CODE_MSR 0x04
#endif
...@@ -106,11 +106,23 @@ ...@@ -106,11 +106,23 @@
#define ION_DEVICE_ID_BB_EDGEPORT_4_DIN 0x011 // Edgeport/4 RS232 with Apple DIN connector #define ION_DEVICE_ID_BB_EDGEPORT_4_DIN 0x011 // Edgeport/4 RS232 with Apple DIN connector
#define ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU 0x012 // Half of an Edgeport/16 (the kind with 2 EP/8s) #define ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU 0x012 // Half of an Edgeport/16 (the kind with 2 EP/8s)
#define ION_DEVICE_ID_BB_EDGEPORT_8I 0x014 // Edgeport/8 RS422 (single-CPU) #define ION_DEVICE_ID_BB_EDGEPORT_8I 0x014 // Edgeport/8 RS422 (single-CPU)
// These IDs are used by the Edgeport.exe program for uninstalling.
//
#define EDGEPORT_DEVICE_IDS {0x001, 0x003, 0x004, 0x005, 0x006, 0x007, 0x00B, \ /* Edgeport TI based devices */
0x00C, 0x00D, 0x00E, 0x00F, 0x010, 0x011, 0x012, \ #define ION_DEVICE_ID_TI_EDGEPORT_4 0x0201 /* Edgeport/4 RS232 */
0x013, 0x014 } #define ION_DEVICE_ID_TI_EDGEPORT_2 0x0205 /* Edgeport/2 RS232 */
#define ION_DEVICE_ID_TI_EDGEPORT_4I 0x0206 /* Edgeport/4i RS422 */
#define ION_DEVICE_ID_TI_EDGEPORT_2I 0x0207 /* Edgeport/2i RS422/RS485 */
#define ION_DEVICE_ID_TI_EDGEPORT_421 0x020C /* Edgeport/421 4 hub 2 RS232 + Parallel (lucent on a different hub port) */
#define ION_DEVICE_ID_TI_EDGEPORT_21 0x020D /* Edgeport/21 2 RS232 + Parallel (lucent on a different hub port) */
#define ION_DEVICE_ID_TI_EDGEPORT_1 0x0215 /* Edgeport/1 RS232 */
#define ION_DEVICE_ID_TI_EDGEPORT_42 0x0217 /* Edgeport/42 4 hub 2 RS232 */
#define ION_DEVICE_ID_TI_EDGEPORT_22 0x021A /* Edgeport/22 Edgeport/22I is an Edgeport/4 with ports 1&2 RS422 and ports 3&4 RS232 */
#define ION_DEVICE_ID_TI_EDGEPORT_421_BOOT 0x0240 /* Edgeport/421 in boot mode */
#define ION_DEVICE_ID_TI_EDGEPORT_421_DOWN 0x0241 /* Edgeport/421 in download mode first interface is 2 RS232 (Note that the second interface of this multi interface device should be a standard USB class 7 printer port) */
#define ION_DEVICE_ID_TI_EDGEPORT_21_BOOT 0x0242 /* Edgeport/21 in boot mode */
#define ION_DEVICE_ID_TI_EDGEPORT_21_DOWN 0x0243 /*Edgeport/42 in download mode: first interface is 2 RS232 (Note that the second interface of this multi interface device should be a standard USB class 7 printer port) */
#define MAKE_USB_PRODUCT_ID( OemId, DeviceId ) \ #define MAKE_USB_PRODUCT_ID( OemId, DeviceId ) \
...@@ -217,7 +229,7 @@ ...@@ -217,7 +229,7 @@
// descriptor format, so that they may be separately retrieved, // descriptor format, so that they may be separately retrieved,
// if necessary, with a minimum of work on the 930. This also // if necessary, with a minimum of work on the 930. This also
// requires them to be in UNICODE format, which, for English at // requires them to be in UNICODE format, which, for English at
// least, simply means extending each UCHAR into a USHORT. // least, simply means extending each __u8 into a __u16.
// 3. For all fields, 00 means 'uninitialized'. // 3. For all fields, 00 means 'uninitialized'.
// 4. All unused areas should be set to 00 for future expansion. // 4. All unused areas should be set to 00 for future expansion.
// //
...@@ -384,5 +396,92 @@ struct edge_boot_descriptor { ...@@ -384,5 +396,92 @@ struct edge_boot_descriptor {
#define BOOT_CAP_RESET_CMD 0x0001 // If set, boot correctly supports ION_RESET_DEVICE #define BOOT_CAP_RESET_CMD 0x0001 // If set, boot correctly supports ION_RESET_DEVICE
#endif // if !defined()
/************************************************************************
T I U M P D E F I N I T I O N S
***********************************************************************/
//************************************************************************
// TI I2C Format Definitions
//************************************************************************
#define I2C_DESC_TYPE_INFO_BASIC 1
#define I2C_DESC_TYPE_FIRMWARE_BASIC 2
#define I2C_DESC_TYPE_DEVICE 3
#define I2C_DESC_TYPE_CONFIG 4
#define I2C_DESC_TYPE_STRING 5
#define I2C_DESC_TYPE_FIRMWARE_BLANK 0xf2
#define I2C_DESC_TYPE_MAX 5
// 3410 may define types 6, 7 for other firmware downloads
// Special section defined by ION
#define I2C_DESC_TYPE_ION 0 // Not defined by TI
struct ti_i2c_desc
{
__u8 Type; // Type of descriptor
__u16 Size; // Size of data only not including header
__u8 CheckSum; // Checksum (8 bit sum of data only)
__u8 Data[0]; // Data starts here
}__attribute__((packed));
struct ti_i2c_firmware_rec
{
__u8 Ver_Major; // Firmware Major version number
__u8 Ver_Minor; // Firmware Minor version number
__u8 Data[0]; // Download starts here
}__attribute__((packed));
// Structure of header of download image in fw_down.h
struct ti_i2c_image_header
{
__u16 Length;
__u8 CheckSum;
}__attribute__((packed));
struct ti_basic_descriptor
{
__u8 Power; // Self powered
// bit 7: 1 - power switching supported
// 0 - power switching not supported
//
// bit 0: 1 - self powered
// 0 - bus powered
//
//
__u16 HubVid; // VID HUB
__u16 HubPid; // PID HUB
__u16 DevPid; // PID Edgeport
__u8 HubTime; // Time for power on to power good
__u8 HubCurrent; // HUB Current = 100ma
} __attribute__((packed));
#define TI_GET_CPU_REVISION(x) (__u8)((((x)>>4)&0x0f))
#define TI_GET_BOARD_REVISION(x) (__u8)(((x)&0x0f))
#define TI_I2C_SIZE_MASK 0x1f // 5 bits
#define TI_GET_I2C_SIZE(x) ((((x) & TI_I2C_SIZE_MASK)+1)*256)
#define TI_MAX_I2C_SIZE ( 16 * 1024 )
/* TI USB 5052 definitions */
struct edge_ti_manuf_descriptor
{
__u8 IonConfig; // Config byte for ION manufacturing use
__u8 IonConfig2; // Expansion
__u8 Version; // Verqsion
__u8 CpuRev_BoardRev; // CPU revision level (0xF0) and Board Rev Level (0x0F)
__u8 NumPorts; // Number of ports for this UMP
__u8 NumVirtualPorts; // Number of Virtual ports
__u8 HubConfig1; // Used to configure the Hub
__u8 HubConfig2; // Used to configure the Hub
__u8 TotalPorts; // Total Number of Com Ports for the entire device (All UMPs)
__u8 Reserved;
}__attribute__((packed));
#endif // if !defined()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment