xref: /openbmc/linux/drivers/usb/serial/visor.h (revision 04d52461c6ecfc5b72e688b0eb2ead7b555eca25)
11da177e4SLinus Torvalds /*
21da177e4SLinus Torvalds  * USB HandSpring Visor driver
31da177e4SLinus Torvalds  *
41da177e4SLinus Torvalds  *	Copyright (C) 1999 - 2003
51da177e4SLinus Torvalds  *	    Greg Kroah-Hartman (greg@kroah.com)
61da177e4SLinus Torvalds  *
71da177e4SLinus Torvalds  *	This program is free software; you can redistribute it and/or modify
81da177e4SLinus Torvalds  *	it under the terms of the GNU General Public License as published by
91da177e4SLinus Torvalds  *	the Free Software Foundation; either version 2 of the License, or
101da177e4SLinus Torvalds  *	(at your option) any later version.
111da177e4SLinus Torvalds  *
121da177e4SLinus Torvalds  * See Documentation/usb/usb-serial.txt for more information on using this driver
131da177e4SLinus Torvalds  *
141da177e4SLinus Torvalds  */
151da177e4SLinus Torvalds 
161da177e4SLinus Torvalds #ifndef __LINUX_USB_SERIAL_VISOR_H
171da177e4SLinus Torvalds #define __LINUX_USB_SERIAL_VISOR_H
181da177e4SLinus Torvalds 
191da177e4SLinus Torvalds 
201da177e4SLinus Torvalds #define HANDSPRING_VENDOR_ID		0x082d
211da177e4SLinus Torvalds #define HANDSPRING_VISOR_ID		0x0100
221da177e4SLinus Torvalds #define HANDSPRING_TREO_ID		0x0200
231da177e4SLinus Torvalds #define HANDSPRING_TREO600_ID		0x0300
241da177e4SLinus Torvalds 
251da177e4SLinus Torvalds #define PALM_VENDOR_ID			0x0830
261da177e4SLinus Torvalds #define PALM_M500_ID			0x0001
271da177e4SLinus Torvalds #define PALM_M505_ID			0x0002
281da177e4SLinus Torvalds #define PALM_M515_ID			0x0003
291da177e4SLinus Torvalds #define PALM_I705_ID			0x0020
301da177e4SLinus Torvalds #define PALM_M125_ID			0x0040
311da177e4SLinus Torvalds #define PALM_M130_ID			0x0050
321da177e4SLinus Torvalds #define PALM_TUNGSTEN_T_ID		0x0060
33ac21e9ffSgregkh@suse.de #define PALM_TREO_650			0x0061
341da177e4SLinus Torvalds #define PALM_TUNGSTEN_Z_ID		0x0031
351da177e4SLinus Torvalds #define PALM_ZIRE31_ID			0x0061
361da177e4SLinus Torvalds #define PALM_ZIRE_ID			0x0070
371da177e4SLinus Torvalds #define PALM_M100_ID			0x0080
381da177e4SLinus Torvalds 
39*04d52461SHendrik Schweppe #define GSPDA_VENDOR_ID		0x115e
40*04d52461SHendrik Schweppe #define GSPDA_XPLORE_M68_ID		0xf100
41*04d52461SHendrik Schweppe 
421da177e4SLinus Torvalds #define SONY_VENDOR_ID			0x054C
431da177e4SLinus Torvalds #define SONY_CLIE_3_5_ID		0x0038
441da177e4SLinus Torvalds #define SONY_CLIE_4_0_ID		0x0066
451da177e4SLinus Torvalds #define SONY_CLIE_S360_ID		0x0095
461da177e4SLinus Torvalds #define SONY_CLIE_4_1_ID		0x009A
471da177e4SLinus Torvalds #define SONY_CLIE_NX60_ID		0x00DA
481da177e4SLinus Torvalds #define SONY_CLIE_NZ90V_ID		0x00E9
491da177e4SLinus Torvalds #define SONY_CLIE_UX50_ID		0x0144
501da177e4SLinus Torvalds #define SONY_CLIE_TJ25_ID		0x0169
511da177e4SLinus Torvalds 
521da177e4SLinus Torvalds #define SAMSUNG_VENDOR_ID		0x04E8
531da177e4SLinus Torvalds #define SAMSUNG_SCH_I330_ID		0x8001
541da177e4SLinus Torvalds #define SAMSUNG_SPH_I500_ID		0x6601
551da177e4SLinus Torvalds 
56115c1ce5SLarry Battraw #define TAPWAVE_VENDOR_ID		0x12EF
57115c1ce5SLarry Battraw #define TAPWAVE_ZODIAC_ID		0x0100
58115c1ce5SLarry Battraw 
591da177e4SLinus Torvalds #define GARMIN_VENDOR_ID		0x091E
601da177e4SLinus Torvalds #define GARMIN_IQUE_3600_ID		0x0004
611da177e4SLinus Torvalds 
621da177e4SLinus Torvalds #define ACEECA_VENDOR_ID		0x4766
631da177e4SLinus Torvalds #define ACEECA_MEZ1000_ID		0x0001
641da177e4SLinus Torvalds 
651da177e4SLinus Torvalds #define KYOCERA_VENDOR_ID		0x0C88
661da177e4SLinus Torvalds #define KYOCERA_7135_ID			0x0021
671da177e4SLinus Torvalds 
681da177e4SLinus Torvalds #define FOSSIL_VENDOR_ID		0x0E67
691da177e4SLinus Torvalds #define FOSSIL_ABACUS_ID		0x0002
701da177e4SLinus Torvalds 
711da177e4SLinus Torvalds /****************************************************************************
721da177e4SLinus Torvalds  * Handspring Visor Vendor specific request codes (bRequest values)
731da177e4SLinus Torvalds  * A big thank you to Handspring for providing the following information.
741da177e4SLinus Torvalds  * If anyone wants the original file where these values and structures came
751da177e4SLinus Torvalds  * from, send email to <greg@kroah.com>.
761da177e4SLinus Torvalds  ****************************************************************************/
771da177e4SLinus Torvalds 
781da177e4SLinus Torvalds /****************************************************************************
791da177e4SLinus Torvalds  * VISOR_REQUEST_BYTES_AVAILABLE asks the visor for the number of bytes that
801da177e4SLinus Torvalds  * are available to be transferred to the host for the specified endpoint.
811da177e4SLinus Torvalds  * Currently this is not used, and always returns 0x0001
821da177e4SLinus Torvalds  ****************************************************************************/
831da177e4SLinus Torvalds #define VISOR_REQUEST_BYTES_AVAILABLE		0x01
841da177e4SLinus Torvalds 
851da177e4SLinus Torvalds /****************************************************************************
861da177e4SLinus Torvalds  * VISOR_CLOSE_NOTIFICATION is set to the device to notify it that the host
871da177e4SLinus Torvalds  * is now closing the pipe. An empty packet is sent in response.
881da177e4SLinus Torvalds  ****************************************************************************/
891da177e4SLinus Torvalds #define VISOR_CLOSE_NOTIFICATION		0x02
901da177e4SLinus Torvalds 
911da177e4SLinus Torvalds /****************************************************************************
921da177e4SLinus Torvalds  * VISOR_GET_CONNECTION_INFORMATION is sent by the host during enumeration to
931da177e4SLinus Torvalds  * get the endpoints used by the connection.
941da177e4SLinus Torvalds  ****************************************************************************/
951da177e4SLinus Torvalds #define VISOR_GET_CONNECTION_INFORMATION	0x03
961da177e4SLinus Torvalds 
971da177e4SLinus Torvalds 
981da177e4SLinus Torvalds /****************************************************************************
991da177e4SLinus Torvalds  * VISOR_GET_CONNECTION_INFORMATION returns data in the following format
1001da177e4SLinus Torvalds  ****************************************************************************/
1011da177e4SLinus Torvalds struct visor_connection_info {
1021da177e4SLinus Torvalds 	__le16	num_ports;
1031da177e4SLinus Torvalds 	struct {
1041da177e4SLinus Torvalds 		__u8	port_function_id;
1051da177e4SLinus Torvalds 		__u8	port;
1061da177e4SLinus Torvalds 	} connections[2];
1071da177e4SLinus Torvalds };
1081da177e4SLinus Torvalds 
1091da177e4SLinus Torvalds 
1101da177e4SLinus Torvalds /* struct visor_connection_info.connection[x].port defines: */
1111da177e4SLinus Torvalds #define VISOR_ENDPOINT_1		0x01
1121da177e4SLinus Torvalds #define VISOR_ENDPOINT_2		0x02
1131da177e4SLinus Torvalds 
1141da177e4SLinus Torvalds /* struct visor_connection_info.connection[x].port_function_id defines: */
1151da177e4SLinus Torvalds #define VISOR_FUNCTION_GENERIC		0x00
1161da177e4SLinus Torvalds #define VISOR_FUNCTION_DEBUGGER		0x01
1171da177e4SLinus Torvalds #define VISOR_FUNCTION_HOTSYNC		0x02
1181da177e4SLinus Torvalds #define VISOR_FUNCTION_CONSOLE		0x03
1191da177e4SLinus Torvalds #define VISOR_FUNCTION_REMOTE_FILE_SYS	0x04
1201da177e4SLinus Torvalds 
1211da177e4SLinus Torvalds 
1221da177e4SLinus Torvalds /****************************************************************************
1231da177e4SLinus Torvalds  * PALM_GET_SOME_UNKNOWN_INFORMATION is sent by the host during enumeration to
1241da177e4SLinus Torvalds  * get some information from the M series devices, that is currently unknown.
1251da177e4SLinus Torvalds  ****************************************************************************/
1261da177e4SLinus Torvalds #define PALM_GET_EXT_CONNECTION_INFORMATION	0x04
1271da177e4SLinus Torvalds 
1281da177e4SLinus Torvalds /**
1291da177e4SLinus Torvalds  * struct palm_ext_connection_info - return data from a PALM_GET_EXT_CONNECTION_INFORMATION request
1301da177e4SLinus Torvalds  * @num_ports: maximum number of functions/connections in use
1311da177e4SLinus Torvalds  * @endpoint_numbers_different: will be 1 if in and out endpoints numbers are
1321da177e4SLinus Torvalds  *	different, otherwise it is 0.  If value is 1, then
1331da177e4SLinus Torvalds  *	connections.end_point_info is non-zero.  If value is 0, then
1341da177e4SLinus Torvalds  *	connections.port contains the endpoint number, which is the same for in
1351da177e4SLinus Torvalds  *	and out.
1361da177e4SLinus Torvalds  * @port_function_id: contains the creator id of the applicaton that opened
1371da177e4SLinus Torvalds  *	this connection.
1381da177e4SLinus Torvalds  * @port: contains the in/out endpoint number.  Is 0 if in and out endpoint
1391da177e4SLinus Torvalds  *	numbers are different.
1401da177e4SLinus Torvalds  * @end_point_info: high nubbe is in endpoint and low nibble will indicate out
1411da177e4SLinus Torvalds  *	endpoint.  Is 0 if in and out endpoints are the same.
1421da177e4SLinus Torvalds  *
1431da177e4SLinus Torvalds  * The maximum number of connections currently supported is 2
1441da177e4SLinus Torvalds  */
1451da177e4SLinus Torvalds struct palm_ext_connection_info {
1461da177e4SLinus Torvalds 	__u8 num_ports;
1471da177e4SLinus Torvalds 	__u8 endpoint_numbers_different;
1481da177e4SLinus Torvalds 	__le16 reserved1;
1491da177e4SLinus Torvalds 	struct {
1501da177e4SLinus Torvalds 		__u32 port_function_id;
1511da177e4SLinus Torvalds 		__u8 port;
1521da177e4SLinus Torvalds 		__u8 end_point_info;
1531da177e4SLinus Torvalds 		__le16 reserved;
1541da177e4SLinus Torvalds 	} connections[2];
1551da177e4SLinus Torvalds };
1561da177e4SLinus Torvalds 
1571da177e4SLinus Torvalds #endif
1581da177e4SLinus Torvalds 
159