xref: /plan9/sys/src/cmd/usb/serial/prolific.h (revision 80e9508eeb4c3647c9fac9436f0155e81be86f60)
1 enum {
2 	/* flavours of the device */
3 	TypeH,
4 	TypeHX,
5 	TypeUnk,
6 
7 	RevH		= 0x0202,
8 	RevX		= 0x0300,
9 	RevHX		= 0x0400,
10 	Rev1		= 0x0001,
11 
12 	/* usbcmd parameters */
13 	SetLineReq	= 0x20,
14 
15 	SetCtlReq	= 0x22,
16 
17 	BreakReq	= 0x23,
18 	BreakOn		= 0xffff,
19 	BreakOff	= 0x0000,
20 
21 	GetLineReq	= 0x21,
22 
23 	VendorWriteReq	= 0x01,		/* BUG: is this a standard request? */
24 	VendorReadReq	= 0x01,
25 
26 	ParamReqSz	= 7,
27 	VendorReqSz	= 10,
28 
29 	/* status read from interrupt endpoint */
30 	DcdStatus	= 0x01,
31 	DsrStatus	= 0x02,
32 	BreakerrStatus	= 0x04,
33 	RingStatus	= 0x08,
34 	FrerrStatus	= 0x10,
35 	ParerrStatus	= 0x20,
36 	OvererrStatus	= 0x40,
37 	CtsStatus	= 0x80,
38 
39 	DcrGet		= 0x80,
40 	DcrSet		= 0x00,
41 
42 	Dcr0Idx		= 0x00,
43 
44 	Dcr0Init	= 0x0001,
45 	Dcr0HwFcH	= 0x0040,
46 	Dcr0HwFcX	= 0x0060,
47 
48 	Dcr1Idx		= 0x01,
49 
50 	Dcr1Init	= 0x0000,
51 	Dcr1InitH	= 0x0080,
52 	Dcr1InitX	= 0x0000,
53 
54 	Dcr2Idx		= 0x02,
55 
56 	Dcr2InitH	= 0x0024,
57 	Dcr2InitX	= 0x0044,
58 
59 	PipeDSRst	= 0x08,
60 	PipeUSRst	= 0x09,
61 
62 };
63 
64 enum {
65 	PL2303Vid	= 0x067b,
66 	PL2303Did	= 0x2303,
67 	PL2303DidRSAQ2	= 0x04bb,
68 	PL2303DidDCU11	= 0x1234,
69 	PL2303DidPHAROS	= 0xaaa0,
70 	PL2303DidRSAQ3	= 0xaaa2,
71 	PL2303DidALDIGA	= 0x0611,
72 	PL2303DidMMX	= 0x0612,
73 	PL2303DidGPRS	= 0x0609,
74 
75 	ATENVid		= 0x0557,
76 	ATENVid2	= 0x0547,
77 	ATENDid		= 0x2008,
78 
79 	IODATAVid	= 0x04bb,
80 	IODATADid	= 0x0a03,
81 	IODATADidRSAQ5	= 0x0a0e,
82 
83 	ELCOMVid	= 0x056e,
84 	ELCOMDid	= 0x5003,
85 	ELCOMDidUCSGT	= 0x5004,
86 
87 	ITEGNOVid	= 0x0eba,
88 	ITEGNODid	= 0x1080,
89 	ITEGNODid2080	= 0x2080,
90 
91 	MA620Vid	= 0x0df7,
92 	MA620Did	= 0x0620,
93 
94 	RATOCVid	= 0x0584,
95 	RATOCDid	= 0xb000,
96 
97 	TRIPPVid	= 0x2478,
98 	TRIPPDid	= 0x2008,
99 
100 	RADIOSHACKVid	= 0x1453,
101 	RADIOSHACKDid	= 0x4026,
102 
103 	DCU10Vid	= 0x0731,
104 	DCU10Did	= 0x0528,
105 
106 	SITECOMVid	= 0x6189,
107 	SITECOMDid	= 0x2068,
108 
109 	 /* Alcatel OT535/735 USB cable */
110 	ALCATELVid	= 0x11f7,
111 	ALCATELDid	= 0x02df,
112 
113 	/* Samsung I330 phone cradle */
114 	SAMSUNGVid	= 0x04e8,
115 	SAMSUNGDid	= 0x8001,
116 
117 	SIEMENSVid	= 0x11f5,
118 	SIEMENSDidSX1	= 0x0001,
119 	SIEMENSDidX65	= 0x0003,
120 	SIEMENSDidX75	= 0x0004,
121 	SIEMENSDidEF81	= 0x0005,
122 
123 	SYNTECHVid	= 0x0745,
124 	SYNTECHDid	= 0x0001,
125 
126 	/* Nokia CA-42 Cable */
127 	NOKIACA42Vid	= 0x078b,
128 	NOKIACA42Did	= 0x1234,
129 
130 	/* CA-42 CLONE Cable www.ca-42.com chipset: Prolific Technology Inc */
131 	CA42CA42Vid	= 0x10b5,
132 	CA42CA42Did	= 0xac70,
133 
134 	SAGEMVid	= 0x079b,
135 	SAGEMDid	= 0x0027,
136 
137 	/* Leadtek GPS 9531 (ID 0413:2101) */
138 	LEADTEKVid	= 0x0413,
139 	LEADTEK9531Did	= 0x2101,
140 
141 	 /* USB GSM cable from Speed Dragon Multimedia, Ltd */
142 	SPEEDDRAGONVid	= 0x0e55,
143 	SPEEDDRAGONDid	= 0x110b,
144 
145 	/* DATAPILOT Universal-2 Phone Cable */
146 	BELKINVid	= 0x050d,
147 	BELKINDid	= 0x0257,
148 
149 	/* Belkin "F5U257" Serial Adapter */
150 	DATAPILOTU2Vid	= 0x0731,
151 	DATAPILOTU2Did	= 0x2003,
152 
153 	ALCORVid	= 0x058F,
154 	ALCORDid	= 0x9720,
155 
156 	/* Willcom WS002IN Data Driver (by NetIndex Inc.) */,
157 	WS002INVid	= 0x11f6,
158 	WS002INDid	= 0x2001,
159 
160 	/* Corega CG-USBRS232R Serial Adapter */,
161 	COREGAVid	= 0x07aa,
162 	COREGADid	= 0x002a,
163 
164 	/* Y.C. Cable U.S.A., Inc - USB to RS-232 */,
165 	YCCABLEVid	= 0x05ad,
166 	YCCABLEDid	= 0x0fba,
167 
168 	/* "Superial" USB - Serial */,
169 	SUPERIALVid	= 0x5372,
170 	SUPERIALDid	= 0x2303,
171 
172 	/* Hewlett-Packard LD220-HP POS Pole Display */,
173 	HPVid		= 0x03f0,
174 	HPLD220Did	= 0x3524,
175 };
176 
177 extern Serialops plops;
178 int	plmatch(char *info);
179