xref: /linux/drivers/usb/serial/kl5kusb105.h (revision 3eb66e91a25497065c5322b1268cbc3953642227)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
21da177e4SLinus Torvalds /*
31da177e4SLinus Torvalds  * Definitions for the KLSI KL5KUSB105 serial port adapter
41da177e4SLinus Torvalds  */
51da177e4SLinus Torvalds 
61da177e4SLinus Torvalds /* vendor/product pairs that are known to contain this chipset */
71da177e4SLinus Torvalds #define PALMCONNECT_VID		0x0830
81da177e4SLinus Torvalds #define PALMCONNECT_PID		0x0080
91da177e4SLinus Torvalds 
101da177e4SLinus Torvalds /* Vendor commands: */
111da177e4SLinus Torvalds 
121da177e4SLinus Torvalds 
131da177e4SLinus Torvalds /* port table -- the chip supports up to 4 channels */
141da177e4SLinus Torvalds 
151da177e4SLinus Torvalds /* baud rates */
161da177e4SLinus Torvalds 
171da177e4SLinus Torvalds enum {
181da177e4SLinus Torvalds 	kl5kusb105a_sio_b115200 = 0,
191da177e4SLinus Torvalds 	kl5kusb105a_sio_b57600  = 1,
201da177e4SLinus Torvalds 	kl5kusb105a_sio_b38400  = 2,
211da177e4SLinus Torvalds 	kl5kusb105a_sio_b19200  = 4,
221da177e4SLinus Torvalds 	kl5kusb105a_sio_b14400  = 5,
231da177e4SLinus Torvalds 	kl5kusb105a_sio_b9600   = 6,
241da177e4SLinus Torvalds 	kl5kusb105a_sio_b4800   = 8,	/* unchecked */
251da177e4SLinus Torvalds 	kl5kusb105a_sio_b2400   = 9,	/* unchecked */
261da177e4SLinus Torvalds 	kl5kusb105a_sio_b1200   = 0xa,	/* unchecked */
271da177e4SLinus Torvalds 	kl5kusb105a_sio_b600    = 0xb	/* unchecked */
281da177e4SLinus Torvalds };
291da177e4SLinus Torvalds 
301da177e4SLinus Torvalds /* data bits */
311da177e4SLinus Torvalds #define kl5kusb105a_dtb_7   7
321da177e4SLinus Torvalds #define kl5kusb105a_dtb_8   8
331da177e4SLinus Torvalds 
341da177e4SLinus Torvalds 
351da177e4SLinus Torvalds 
361da177e4SLinus Torvalds /* requests: */
371da177e4SLinus Torvalds #define KL5KUSB105A_SIO_SET_DATA  1
381da177e4SLinus Torvalds #define KL5KUSB105A_SIO_POLL      2
391da177e4SLinus Torvalds #define KL5KUSB105A_SIO_CONFIGURE      3
401da177e4SLinus Torvalds /* values used for request KL5KUSB105A_SIO_CONFIGURE */
411da177e4SLinus Torvalds #define KL5KUSB105A_SIO_CONFIGURE_READ_ON      3
421da177e4SLinus Torvalds #define KL5KUSB105A_SIO_CONFIGURE_READ_OFF     2
431da177e4SLinus Torvalds 
441da177e4SLinus Torvalds /* Interpretation of modem status lines */
451da177e4SLinus Torvalds /* These need sorting out by individually connecting pins and checking
461da177e4SLinus Torvalds  * results. FIXME!
471da177e4SLinus Torvalds  * When data is being sent we see 0x30 in the lower byte; this must
481da177e4SLinus Torvalds  * contain DSR and CTS ...
491da177e4SLinus Torvalds  */
501da177e4SLinus Torvalds #define KL5KUSB105A_DSR			((1<<4) | (1<<5))
511da177e4SLinus Torvalds #define KL5KUSB105A_CTS			((1<<5) | (1<<4))
521da177e4SLinus Torvalds 
531da177e4SLinus Torvalds #define KL5KUSB105A_WANTS_TO_SEND	0x30
54932d22c9SGreg Kroah-Hartman #if 0
55932d22c9SGreg Kroah-Hartman #define KL5KUSB105A_DTR			/* Data Terminal Ready */
56932d22c9SGreg Kroah-Hartman #define KL5KUSB105A_CTS			/* Clear To Send */
57932d22c9SGreg Kroah-Hartman #define KL5KUSB105A_CD			/* Carrier Detect */
58932d22c9SGreg Kroah-Hartman #define KL5KUSB105A_DSR			/* Data Set Ready */
59932d22c9SGreg Kroah-Hartman #define KL5KUSB105A_RxD			/* Receive pin */
601da177e4SLinus Torvalds 
61932d22c9SGreg Kroah-Hartman #define KL5KUSB105A_LE
62932d22c9SGreg Kroah-Hartman #define KL5KUSB105A_RTS
63932d22c9SGreg Kroah-Hartman #define KL5KUSB105A_ST
64932d22c9SGreg Kroah-Hartman #define KL5KUSB105A_SR
65932d22c9SGreg Kroah-Hartman #define KL5KUSB105A_RI			/* Ring Indicator */
66932d22c9SGreg Kroah-Hartman #endif
67