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