1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_USB_USBSER_PL2303_VENDOR_H
28 #define	_SYS_USB_USBSER_PL2303_VENDOR_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /*
33  * Prolific PL2303 vendor-specific variables
34  */
35 
36 #ifdef	__cplusplus
37 extern "C" {
38 #endif
39 
40 
41 /*
42  * Prolific PL2303 Vendor and Product IDs
43  */
44 
45 #define	PROLIFIC_REV_H				0x0202
46 #define	PROLIFIC_REV_X				0x0300
47 
48 /*
49  * Vendor-specific Requests
50  */
51 #define	PL2303_SET_LINE_CODING_REQUEST_TYPE	0x21
52 #define	PL2303_SET_LINE_CODING_REQUEST		0x20
53 #define	PL2303_SET_LINE_CODING_LENGTH		0x07
54 
55 #define	PL2303_GET_LINE_CODING_REQUEST_TYPE	0xa1
56 #define	PL2303_GET_LINE_CODING_REQUEST		0x21
57 #define	PL2303_GET_LINE_CODING_LENGTH		0x07
58 
59 #define	PL2303_SET_CONTROL_REQUEST_TYPE		0x21
60 #define	PL2303_SET_CONTROL_REQUEST		0x22
61 #define	PL2303_SET_CONTROL_LENGTH		0x00
62 #define	PL2303_CONTROL_DTR			0x01
63 #define	PL2303_CONTROL_RTS			0x02
64 
65 #define	PL2303_BREAK_REQUEST_TYPE		0x21
66 #define	PL2303_BREAK_REQUEST			0x23
67 #define	PL2303_BREAK_LENGTH			0X00
68 #define	PL2303_BREAK_ON				0xffff
69 #define	PL2303_BREAK_OFF			0x0000
70 
71 #define	PL2303_VENDOR_WRITE_REQUEST_TYPE	0x40
72 #define	PL2303_VENDOR_WRITE_REQUEST		0x01
73 #define	PL2303_VENDOR_WRITE_LENGTH		0x00
74 
75 #define	PL2303_VENDOR_READ_REQUEST_TYPE		0xc0
76 #define	PL2303_VENDOR_READ_REQUEST		0x01
77 #define	PL2303_VENDOR_READ_LENGTH		0x01
78 
79 /*
80  * Cmds of setting XON/XOFF symbol
81  */
82 #define	SET_XONXOFF				0x05
83 
84 /*
85  * Device Configuration Registers (DCR0, DCR1, DCR2)
86  */
87 #define	SET_DCR0				0x00
88 #define	GET_DCR0				0x80
89 #define	DCR0_INIT				0x01
90 #define	DCR0_INIT_H				0x41
91 #define	DCR0_INIT_X				0x61
92 
93 #define	SET_DCR1				0x01
94 #define	GET_DCR1				0x81
95 #define	DCR1_INIT_H				0x80
96 #define	DCR1_INIT_X				0x00
97 
98 #define	SET_DCR2				0x02
99 #define	GET_DCR2				0x82
100 #define	DCR2_INIT_H				0x24
101 #define	DCR2_INIT_X				0x44
102 
103 /*
104  * On-chip Date Buffers:
105  */
106 #define	RESET_DOWNSTREAM_DATA_PIPE		0x08
107 #define	RESET_UPSTREAM_DATA_PIPE		0x09
108 
109 
110 #ifdef	__cplusplus
111 }
112 #endif
113 
114 #endif	/* _SYS_USB_USBSER_PL2303_VENDOR_H */
115