11da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifndef CYPRESS_M8_H
21da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CYPRESS_M8_H
31da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman/*
5995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman * definitions and function prototypes used for the cypress USB to Serial
6995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman * controller
7995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman */
81da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman/*
10995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman * For sending our feature buffer - controlling serial communication states.
11995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman * Linux HID has no support for serial devices so we do this through the driver
12995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman */
13995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define HID_REQ_GET_REPORT	0x01
14995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define HID_REQ_SET_REPORT	0x09
151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* List other cypress USB to Serial devices here, and add them to the id_table */
171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* DeLorme Earthmate USB - a GPS device */
19995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define VENDOR_ID_DELORME		0x1163
20995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define PRODUCT_ID_EARTHMATEUSB		0x0100
21995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define PRODUCT_ID_EARTHMATEUSB_LT20	0x0200
221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Cypress HID->COM RS232 Adapter */
24995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define VENDOR_ID_CYPRESS		0x04b4
25995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define PRODUCT_ID_CYPHIDCOM		0x5500
26a5c44e29e5637b5e6fe59d225eb4f438688b3849Lonnie Mendez
276529591e3eef65f0f528a81ac169f6e294b947a7Robert Butora/* FRWD Dongle - a GPS sports watch */
286529591e3eef65f0f528a81ac169f6e294b947a7Robert Butora#define VENDOR_ID_FRWD			0x6737
296529591e3eef65f0f528a81ac169f6e294b947a7Robert Butora#define PRODUCT_ID_CYPHIDCOM_FRWD	0x0001
306529591e3eef65f0f528a81ac169f6e294b947a7Robert Butora
316f6f06ee6ada13b0fb39c800f8567ff81d4e807dDmitry Shapin/* Powercom UPS, chip CY7C63723 */
32995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define VENDOR_ID_POWERCOM		0x0d9f
33995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define PRODUCT_ID_UPS			0x0002
346f6f06ee6ada13b0fb39c800f8567ff81d4e807dDmitry Shapin
35a5c44e29e5637b5e6fe59d225eb4f438688b3849Lonnie Mendez/* Nokia CA-42 USB to serial cable */
36a5c44e29e5637b5e6fe59d225eb4f438688b3849Lonnie Mendez#define VENDOR_ID_DAZZLE		0x07d0
37a5c44e29e5637b5e6fe59d225eb4f438688b3849Lonnie Mendez#define PRODUCT_ID_CA42			0x4101
381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* End of device listing */
391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Used for setting / requesting serial line settings */
41995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define CYPRESS_SET_CONFIG	0x01
42995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define CYPRESS_GET_CONFIG	0x02
431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Used for throttle control */
45995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define THROTTLED		0x1
46995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman#define ACTUALLY_THROTTLED	0x2
471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
48995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman/*
49995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman * chiptypes - used in case firmware differs from the generic form ... offering
50995834eb37c22ee9fd85324165ff71e9d6da5ae4Greg Kroah-Hartman * different baud speeds/etc.
511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */
521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CT_EARTHMATE	0x01
531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CT_CYPHIDCOM	0x02
54a5c44e29e5637b5e6fe59d225eb4f438688b3849Lonnie Mendez#define CT_CA42V2	0x03
551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CT_GENERIC	0x0F
561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* End of chiptype definitions */
571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
582534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold/*
592534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold * RS-232 serial data communication protocol definitions.
602534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold *
612534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold * These are sent / read at byte 0 of the input/output hid reports.
622534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold * You can find these values defined in the CY4601 USB to Serial design notes.
632534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold */
642534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold
652534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold#define CONTROL_DTR	0x20	/* data terminal ready */
662534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold#define CONTROL_RTS	0x10	/* request to send */
672534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold#define CONTROL_RESET	0x08	/* sent with output report */
682534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold
697603381e3e7ffebe8c0b46c416fe0f88e13b4d34Johan Hovold#define UART_MSR_MASK	0xf0
702534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold#define UART_RI		0x80	/* ring indicator */
712534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold#define UART_CD		0x40	/* carrier detect */
722534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold#define UART_DSR	0x20	/* data set ready */
732534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold#define UART_CTS	0x10	/* clear to send */
742534be34c9f728759e7e7ba69bab9d3a5cbb5984Johan Hovold#define CYP_ERROR	0x08	/* received from input report */
751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* End of RS-232 protocol definitions */
771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif /* CYPRESS_M8_H */
79