1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Definitions for the KLSI KL5KUSB105 serial port adapter 4 */ 5 6 /* vendor/product pairs that are known to contain this chipset */ 7 #define PALMCONNECT_VID 0x0830 8 #define PALMCONNECT_PID 0x0080 9 10 /* Vendor commands: */ 11 12 13 /* port table -- the chip supports up to 4 channels */ 14 15 /* baud rates */ 16 17 enum { 18 kl5kusb105a_sio_b115200 = 0, 19 kl5kusb105a_sio_b57600 = 1, 20 kl5kusb105a_sio_b38400 = 2, 21 kl5kusb105a_sio_b19200 = 4, 22 kl5kusb105a_sio_b14400 = 5, 23 kl5kusb105a_sio_b9600 = 6, 24 kl5kusb105a_sio_b4800 = 8, /* unchecked */ 25 kl5kusb105a_sio_b2400 = 9, /* unchecked */ 26 kl5kusb105a_sio_b1200 = 0xa, /* unchecked */ 27 kl5kusb105a_sio_b600 = 0xb /* unchecked */ 28 }; 29 30 /* data bits */ 31 #define kl5kusb105a_dtb_7 7 32 #define kl5kusb105a_dtb_8 8 33 34 35 36 /* requests: */ 37 #define KL5KUSB105A_SIO_SET_DATA 1 38 #define KL5KUSB105A_SIO_POLL 2 39 #define KL5KUSB105A_SIO_CONFIGURE 3 40 /* values used for request KL5KUSB105A_SIO_CONFIGURE */ 41 #define KL5KUSB105A_SIO_CONFIGURE_READ_ON 3 42 #define KL5KUSB105A_SIO_CONFIGURE_READ_OFF 2 43 44 /* Interpretation of modem status lines */ 45 /* These need sorting out by individually connecting pins and checking 46 * results. FIXME! 47 * When data is being sent we see 0x30 in the lower byte; this must 48 * contain DSR and CTS ... 49 */ 50 #define KL5KUSB105A_DSR ((1<<4) | (1<<5)) 51 #define KL5KUSB105A_CTS ((1<<5) | (1<<4)) 52 53 #define KL5KUSB105A_WANTS_TO_SEND 0x30 54 #if 0 55 #define KL5KUSB105A_DTR /* Data Terminal Ready */ 56 #define KL5KUSB105A_CTS /* Clear To Send */ 57 #define KL5KUSB105A_CD /* Carrier Detect */ 58 #define KL5KUSB105A_DSR /* Data Set Ready */ 59 #define KL5KUSB105A_RxD /* Receive pin */ 60 61 #define KL5KUSB105A_LE 62 #define KL5KUSB105A_RTS 63 #define KL5KUSB105A_ST 64 #define KL5KUSB105A_SR 65 #define KL5KUSB105A_RI /* Ring Indicator */ 66 #endif 67