kl5kusb105.h 1.8 KB

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