18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Definitions for the KLSI KL5KUSB105 serial port adapter 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci/* vendor/product pairs that are known to contain this chipset */ 78c2ecf20Sopenharmony_ci#define PALMCONNECT_VID 0x0830 88c2ecf20Sopenharmony_ci#define PALMCONNECT_PID 0x0080 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci/* Vendor commands: */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci/* port table -- the chip supports up to 4 channels */ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci/* baud rates */ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_cienum { 188c2ecf20Sopenharmony_ci kl5kusb105a_sio_b115200 = 0, 198c2ecf20Sopenharmony_ci kl5kusb105a_sio_b57600 = 1, 208c2ecf20Sopenharmony_ci kl5kusb105a_sio_b38400 = 2, 218c2ecf20Sopenharmony_ci kl5kusb105a_sio_b19200 = 4, 228c2ecf20Sopenharmony_ci kl5kusb105a_sio_b14400 = 5, 238c2ecf20Sopenharmony_ci kl5kusb105a_sio_b9600 = 6, 248c2ecf20Sopenharmony_ci kl5kusb105a_sio_b4800 = 8, /* unchecked */ 258c2ecf20Sopenharmony_ci kl5kusb105a_sio_b2400 = 9, /* unchecked */ 268c2ecf20Sopenharmony_ci kl5kusb105a_sio_b1200 = 0xa, /* unchecked */ 278c2ecf20Sopenharmony_ci kl5kusb105a_sio_b600 = 0xb /* unchecked */ 288c2ecf20Sopenharmony_ci}; 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci/* data bits */ 318c2ecf20Sopenharmony_ci#define kl5kusb105a_dtb_7 7 328c2ecf20Sopenharmony_ci#define kl5kusb105a_dtb_8 8 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/* requests: */ 378c2ecf20Sopenharmony_ci#define KL5KUSB105A_SIO_SET_DATA 1 388c2ecf20Sopenharmony_ci#define KL5KUSB105A_SIO_POLL 2 398c2ecf20Sopenharmony_ci#define KL5KUSB105A_SIO_CONFIGURE 3 408c2ecf20Sopenharmony_ci/* values used for request KL5KUSB105A_SIO_CONFIGURE */ 418c2ecf20Sopenharmony_ci#define KL5KUSB105A_SIO_CONFIGURE_READ_ON 3 428c2ecf20Sopenharmony_ci#define KL5KUSB105A_SIO_CONFIGURE_READ_OFF 2 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci/* Interpretation of modem status lines */ 458c2ecf20Sopenharmony_ci/* These need sorting out by individually connecting pins and checking 468c2ecf20Sopenharmony_ci * results. FIXME! 478c2ecf20Sopenharmony_ci * When data is being sent we see 0x30 in the lower byte; this must 488c2ecf20Sopenharmony_ci * contain DSR and CTS ... 498c2ecf20Sopenharmony_ci */ 508c2ecf20Sopenharmony_ci#define KL5KUSB105A_DSR ((1<<4) | (1<<5)) 518c2ecf20Sopenharmony_ci#define KL5KUSB105A_CTS ((1<<5) | (1<<4)) 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci#define KL5KUSB105A_WANTS_TO_SEND 0x30 548c2ecf20Sopenharmony_ci#if 0 558c2ecf20Sopenharmony_ci#define KL5KUSB105A_DTR /* Data Terminal Ready */ 568c2ecf20Sopenharmony_ci#define KL5KUSB105A_CTS /* Clear To Send */ 578c2ecf20Sopenharmony_ci#define KL5KUSB105A_CD /* Carrier Detect */ 588c2ecf20Sopenharmony_ci#define KL5KUSB105A_DSR /* Data Set Ready */ 598c2ecf20Sopenharmony_ci#define KL5KUSB105A_RxD /* Receive pin */ 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci#define KL5KUSB105A_LE 628c2ecf20Sopenharmony_ci#define KL5KUSB105A_RTS 638c2ecf20Sopenharmony_ci#define KL5KUSB105A_ST 648c2ecf20Sopenharmony_ci#define KL5KUSB105A_SR 658c2ecf20Sopenharmony_ci#define KL5KUSB105A_RI /* Ring Indicator */ 668c2ecf20Sopenharmony_ci#endif 67