blob: 969d890d0fe2e5a4c053d16470eeae800b154aa8 [file] [log] [blame]
Kévin Redona1012b12018-07-01 18:11:01 +02001/* This program is free software; you can redistribute it and/or
2 * modify it under the terms of the GNU General Public License
3 * as published by the Free Software Foundation; either version 2
4 * of the License, or (at your option) any later version.
5 *
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
10 *
11 * You should have received a copy of the GNU General Public License
12 * along with this program; if not, write to the Free Software
13 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14 *
15 * (C) 2018 by sysmocom -s.f.m.c. GmbH, Author: Kevin Redon <kredon@sysmocom.de>
16 * All Rights Reserved
17 */
18
19/* SIMtrace USB IDs */
20#define USB_VENDOR_OPENMOKO 0x1d50
21#define USB_PRODUCT_OWHW_SAM3_DFU 0x4001 /* was 0x4000 */
22#define USB_PRODUCT_OWHW_SAM3 0x4001
23#define USB_PRODUCT_QMOD_HUB 0x4002
24#define USB_PRODUCT_QMOD_SAM3_DFU 0x4004 /* was 0x4003 */
25#define USB_PRODUCT_QMOD_SAM3 0x4004
26#define USB_PRODUCT_SIMTRACE2_DFU 0x60e3 /* was 0x60e2 */
27#define USB_PRODUCT_SIMTRACE2 0x60e3
28
29/* USB proprietary class */
30#define USB_CLASS_PROPRIETARY 0xff
31
32/* SIMtrace USB sub-classes */
33/*! Sniffer USB sub-class */
34#define SIMTRACE_SNIFFER_USB_SUBCLASS 1
35/*! Card-emulation USB sub-class */
36#define SIMTRACE_CARDEM_USB_SUBCLASS 2
37
38/* Generic USB endpoint numbers */
39/*! Card-side USB data out (host to device) endpoint number */
40#define SIMTRACE_USB_EP_CARD_DATAOUT 1
41/*! Card-side USB data in (device to host) endpoint number */
42#define SIMTRACE_USB_EP_CARD_DATAIN 2
43/*! Card-side USB interrupt endpoint number */
44#define SIMTRACE_USB_EP_CARD_INT 3
45/*! Phone-side USB data out (host to device) endpoint number */
46#define SIMTRACE_USB_EP_PHONE_DATAOUT 4
47/*! Phone-side USB data in (device to host) endpoint number */
48#define SIMTRACE_USB_EP_PHONE_DATAIN 5
49/*! Phone-side USB interrupt endpoint number */
50#define SIMTRACE_USB_EP_PHONE_INT 6
51
52/* Card-emulation USB endpoint numbers */
53/*! USIM1 USB data out (host to device) endpoint number */
54#define SIMTRACE_CARDEM_USB_EP_USIM1_DATAOUT 4
55/*! USIM1 USB data in (device to host) endpoint number */
56#define SIMTRACE_CARDEM_USB_EP_USIM1_DATAIN 5
57/*! USIM1 USB interrupt endpoint number */
58#define SIMTRACE_CARDEM_USB_EP_USIM1_INT 6
59/*! USIM2 USB data out (host to device) endpoint number */
60#define SIMTRACE_CARDEM_USB_EP_USIM2_DATAOUT 1
61/*! USIM2 USB data in (device to host) endpoint number */
62#define SIMTRACE_CARDEM_USB_EP_USIM2_DATAIN 2
63/*! USIM2 USB interrupt endpoint number */
64#define SIMTRACE_CARDEM_USB_EP_USIM2_INT 3
65
66/*! Maximum number of endpoints */
67#define BOARD_USB_NUMENDPOINTS 6