Kévin Redon | 26a6609 | 2018-10-10 00:30:23 +0200 | [diff] [blame] | 1 | /* SIMtrace 2 USB definitions |
| 2 | * |
| 3 | * (C) 2018 by sysmocom -s.f.m.c. GmbH, Author: Kevin Redon <kredon@sysmocom.de> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA |
| 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 |