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