xref: /openbmc/linux/drivers/usb/serial/visor.h (revision c8ba84a0c682068a55a5892d6e12e3f196fd792c)
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_ZIRE_ID			0x0070
361da177e4SLinus Torvalds #define PALM_M100_ID			0x0080
371da177e4SLinus Torvalds 
3804d52461SHendrik Schweppe #define GSPDA_VENDOR_ID		0x115e
3904d52461SHendrik Schweppe #define GSPDA_XPLORE_M68_ID		0xf100
4004d52461SHendrik Schweppe 
411da177e4SLinus Torvalds #define SONY_VENDOR_ID			0x054C
421da177e4SLinus Torvalds #define SONY_CLIE_3_5_ID		0x0038
431da177e4SLinus Torvalds #define SONY_CLIE_4_0_ID		0x0066
441da177e4SLinus Torvalds #define SONY_CLIE_S360_ID		0x0095
451da177e4SLinus Torvalds #define SONY_CLIE_4_1_ID		0x009A
461da177e4SLinus Torvalds #define SONY_CLIE_NX60_ID		0x00DA
471da177e4SLinus Torvalds #define SONY_CLIE_NZ90V_ID		0x00E9
481da177e4SLinus Torvalds #define SONY_CLIE_UX50_ID		0x0144
491da177e4SLinus Torvalds #define SONY_CLIE_TJ25_ID		0x0169
501da177e4SLinus Torvalds 
51*c8ba84a0SMaximilian Attems #define ACER_VENDOR_ID			0x0502
52*c8ba84a0SMaximilian Attems #define ACER_S10_ID			0x0001
53*c8ba84a0SMaximilian Attems 
541da177e4SLinus Torvalds #define SAMSUNG_VENDOR_ID		0x04E8
551da177e4SLinus Torvalds #define SAMSUNG_SCH_I330_ID		0x8001
561da177e4SLinus Torvalds #define SAMSUNG_SPH_I500_ID		0x6601
571da177e4SLinus Torvalds 
58115c1ce5SLarry Battraw #define TAPWAVE_VENDOR_ID		0x12EF
59115c1ce5SLarry Battraw #define TAPWAVE_ZODIAC_ID		0x0100
60115c1ce5SLarry Battraw 
611da177e4SLinus Torvalds #define GARMIN_VENDOR_ID		0x091E
621da177e4SLinus Torvalds #define GARMIN_IQUE_3600_ID		0x0004
631da177e4SLinus Torvalds 
641da177e4SLinus Torvalds #define ACEECA_VENDOR_ID		0x4766
651da177e4SLinus Torvalds #define ACEECA_MEZ1000_ID		0x0001
661da177e4SLinus Torvalds 
671da177e4SLinus Torvalds #define KYOCERA_VENDOR_ID		0x0C88
681da177e4SLinus Torvalds #define KYOCERA_7135_ID			0x0021
691da177e4SLinus Torvalds 
701da177e4SLinus Torvalds #define FOSSIL_VENDOR_ID		0x0E67
711da177e4SLinus Torvalds #define FOSSIL_ABACUS_ID		0x0002
721da177e4SLinus Torvalds 
731da177e4SLinus Torvalds /****************************************************************************
741da177e4SLinus Torvalds  * Handspring Visor Vendor specific request codes (bRequest values)
751da177e4SLinus Torvalds  * A big thank you to Handspring for providing the following information.
761da177e4SLinus Torvalds  * If anyone wants the original file where these values and structures came
771da177e4SLinus Torvalds  * from, send email to <greg@kroah.com>.
781da177e4SLinus Torvalds  ****************************************************************************/
791da177e4SLinus Torvalds 
801da177e4SLinus Torvalds /****************************************************************************
811da177e4SLinus Torvalds  * VISOR_REQUEST_BYTES_AVAILABLE asks the visor for the number of bytes that
821da177e4SLinus Torvalds  * are available to be transferred to the host for the specified endpoint.
831da177e4SLinus Torvalds  * Currently this is not used, and always returns 0x0001
841da177e4SLinus Torvalds  ****************************************************************************/
851da177e4SLinus Torvalds #define VISOR_REQUEST_BYTES_AVAILABLE		0x01
861da177e4SLinus Torvalds 
871da177e4SLinus Torvalds /****************************************************************************
881da177e4SLinus Torvalds  * VISOR_CLOSE_NOTIFICATION is set to the device to notify it that the host
891da177e4SLinus Torvalds  * is now closing the pipe. An empty packet is sent in response.
901da177e4SLinus Torvalds  ****************************************************************************/
911da177e4SLinus Torvalds #define VISOR_CLOSE_NOTIFICATION		0x02
921da177e4SLinus Torvalds 
931da177e4SLinus Torvalds /****************************************************************************
941da177e4SLinus Torvalds  * VISOR_GET_CONNECTION_INFORMATION is sent by the host during enumeration to
951da177e4SLinus Torvalds  * get the endpoints used by the connection.
961da177e4SLinus Torvalds  ****************************************************************************/
971da177e4SLinus Torvalds #define VISOR_GET_CONNECTION_INFORMATION	0x03
981da177e4SLinus Torvalds 
991da177e4SLinus Torvalds 
1001da177e4SLinus Torvalds /****************************************************************************
1011da177e4SLinus Torvalds  * VISOR_GET_CONNECTION_INFORMATION returns data in the following format
1021da177e4SLinus Torvalds  ****************************************************************************/
1031da177e4SLinus Torvalds struct visor_connection_info {
1041da177e4SLinus Torvalds 	__le16	num_ports;
1051da177e4SLinus Torvalds 	struct {
1061da177e4SLinus Torvalds 		__u8	port_function_id;
1071da177e4SLinus Torvalds 		__u8	port;
1081da177e4SLinus Torvalds 	} connections[2];
1091da177e4SLinus Torvalds };
1101da177e4SLinus Torvalds 
1111da177e4SLinus Torvalds 
1121da177e4SLinus Torvalds /* struct visor_connection_info.connection[x].port defines: */
1131da177e4SLinus Torvalds #define VISOR_ENDPOINT_1		0x01
1141da177e4SLinus Torvalds #define VISOR_ENDPOINT_2		0x02
1151da177e4SLinus Torvalds 
1161da177e4SLinus Torvalds /* struct visor_connection_info.connection[x].port_function_id defines: */
1171da177e4SLinus Torvalds #define VISOR_FUNCTION_GENERIC		0x00
1181da177e4SLinus Torvalds #define VISOR_FUNCTION_DEBUGGER		0x01
1191da177e4SLinus Torvalds #define VISOR_FUNCTION_HOTSYNC		0x02
1201da177e4SLinus Torvalds #define VISOR_FUNCTION_CONSOLE		0x03
1211da177e4SLinus Torvalds #define VISOR_FUNCTION_REMOTE_FILE_SYS	0x04
1221da177e4SLinus Torvalds 
1231da177e4SLinus Torvalds 
1241da177e4SLinus Torvalds /****************************************************************************
1251da177e4SLinus Torvalds  * PALM_GET_SOME_UNKNOWN_INFORMATION is sent by the host during enumeration to
1261da177e4SLinus Torvalds  * get some information from the M series devices, that is currently unknown.
1271da177e4SLinus Torvalds  ****************************************************************************/
1281da177e4SLinus Torvalds #define PALM_GET_EXT_CONNECTION_INFORMATION	0x04
1291da177e4SLinus Torvalds 
1301da177e4SLinus Torvalds /**
1311da177e4SLinus Torvalds  * struct palm_ext_connection_info - return data from a PALM_GET_EXT_CONNECTION_INFORMATION request
1321da177e4SLinus Torvalds  * @num_ports: maximum number of functions/connections in use
1331da177e4SLinus Torvalds  * @endpoint_numbers_different: will be 1 if in and out endpoints numbers are
1341da177e4SLinus Torvalds  *	different, otherwise it is 0.  If value is 1, then
1351da177e4SLinus Torvalds  *	connections.end_point_info is non-zero.  If value is 0, then
1361da177e4SLinus Torvalds  *	connections.port contains the endpoint number, which is the same for in
1371da177e4SLinus Torvalds  *	and out.
1381da177e4SLinus Torvalds  * @port_function_id: contains the creator id of the applicaton that opened
1391da177e4SLinus Torvalds  *	this connection.
1401da177e4SLinus Torvalds  * @port: contains the in/out endpoint number.  Is 0 if in and out endpoint
1411da177e4SLinus Torvalds  *	numbers are different.
1421da177e4SLinus Torvalds  * @end_point_info: high nubbe is in endpoint and low nibble will indicate out
1431da177e4SLinus Torvalds  *	endpoint.  Is 0 if in and out endpoints are the same.
1441da177e4SLinus Torvalds  *
1451da177e4SLinus Torvalds  * The maximum number of connections currently supported is 2
1461da177e4SLinus Torvalds  */
1471da177e4SLinus Torvalds struct palm_ext_connection_info {
1481da177e4SLinus Torvalds 	__u8 num_ports;
1491da177e4SLinus Torvalds 	__u8 endpoint_numbers_different;
1501da177e4SLinus Torvalds 	__le16 reserved1;
1511da177e4SLinus Torvalds 	struct {
1521da177e4SLinus Torvalds 		__u32 port_function_id;
1531da177e4SLinus Torvalds 		__u8 port;
1541da177e4SLinus Torvalds 		__u8 end_point_info;
1551da177e4SLinus Torvalds 		__le16 reserved;
1561da177e4SLinus Torvalds 	} connections[2];
1571da177e4SLinus Torvalds };
1581da177e4SLinus Torvalds 
1591da177e4SLinus Torvalds #endif
1601da177e4SLinus Torvalds 
161