1 # ====================================================================
5 # USB device driver for the ATMEL AT91 family of processors.
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 2006 eCosCentric
12 ## Copyright (C) 2006 Andrew Lunn
14 ## eCos is free software; you can redistribute it and/or modify it under
15 ## the terms of the GNU General Public License as published by the Free
16 ## Software Foundation; either version 2 or (at your option) any later version.
18 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
19 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 ## You should have received a copy of the GNU General Public License along
24 ## with eCos; if not, write to the Free Software Foundation, Inc.,
25 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
27 ## As a special exception, if other files instantiate templates or use macros
28 ## or inline functions from this file, or you compile this file and link it
29 ## with other works to produce a work based on this file, this file does not
30 ## by itself cause the resulting work to be covered by the GNU General Public
31 ## License. However the source code for this file must still be made available
32 ## in accordance with section (3) of the GNU General Public License.
34 ## This exception does not invalidate any other reasons why a work based on
35 ## this file might be covered by the GNU General Public License.
36 ## -------------------------------------------
37 #####ECOSGPLCOPYRIGHTEND####
38 # ====================================================================
39 ######DESCRIPTIONBEGIN####
41 # Author(s): Oliver Munz, Andrew Lunn
42 # Original data: bartv
46 #####DESCRIPTIONEND####
47 # ====================================================================
49 cdl_package CYGPKG_DEVS_USB_AT91 {
50 display "Atmel AT91 USB Device Driver"
51 include_dir "cyg/io/usb"
53 implements CYGHWR_IO_USB_SLAVE
55 cdl_interface CYGINT_DEVS_USB_AT91_HAS_USB {
57 This interface is implemented by HALs for devices which have
62 This package provides a suitable eCos device driver
64 In this version the driver will support the AT91SAM7S.
65 Other AT92 devices may work, but have not been tested.
66 The Driver needs 48, 96 or 192MHz plus minus 0.25%.
67 Buffers are allocated only in the higher level. There
68 is no need to configure the endpoints in this CDL, because
69 they will be configured dynamical at the set_configuration
71 The endpoints 1..3 can be configured as bulk or interrupt
72 IN or OUT endpoint. Isochronous transfer is not supported."
74 cdl_component CYGFUN_DEVS_USB_AT91_EP0 {
75 display "Support the control endpoint 0"
77 default_value CYGINT_IO_USB_SLAVE_CLIENTS
78 requires CYGPKG_IO_USB CYGPKG_IO_USB_SLAVE
80 ((CYGNUM_HAL_ARM_AT91_CLOCK_SPEED < 48120000 &&
81 CYGNUM_HAL_ARM_AT91_CLOCK_SPEED > 47880000) ||
82 (CYGNUM_HAL_ARM_AT91_CLOCK_SPEED < 96240000 &&
83 CYGNUM_HAL_ARM_AT91_CLOCK_SPEED > 95760000))
86 active_if CYGINT_DEVS_USB_AT91_HAS_USB
87 implements CYGHWR_IO_USB_SLAVE_OUT_ENDPOINTS
88 implements CYGHWR_IO_USB_SLAVE_IN_ENDPOINTS
91 compile -library=libextras.a usbs_at91_data.cxx
93 Enable support for endpoint 0. If this support is disabled
94 then the entire USB port is unusable."
96 cdl_option CYGDAT_DEVS_USB_AT91_GPIO_SET_PULLUP_PIN {
97 display "PIO-Pin who controls the pullup resistor"
99 default_value { "AT91_GPIO_PA16" }
101 Every GPIO pin is able to do it. If you don't need
102 a pin because your HW has the pullup fixed wired
106 cdl_option CYGNUM_DEVS_USB_AT91_GPIO_SET_PULLUP_INVERTED {
107 display "Has the signal to be inverted?"
111 This option indicates that the pullup pin should
112 be inverted. ie VDD is active, VCC is inactive. For the
113 AT91SAM7SEK it needs to be inverted, hence this default."
116 cdl_option CYGDAT_DEVS_USB_AT91_GPIO_READ_POWER_PIN {
117 display "PIO-Pin who see the USB-Power"
119 default_value { "AT91_GPIO_PA13"}
121 Every GPIO pin is able to do it. If you don't need
122 a pin then select NONE"
125 cdl_option CYGNUM_DEVS_USB_AT91_GPIO_READ_POWER_INVERTED {
126 display "Has the signal to be inverted?"
130 This option indicates that the power detect pin should
131 be inverted. ie VDD is active, VCC is inactive."
135 cdl_component CYGPKG_DEVS_USB_AT91_DEVTAB_ENTRIES {
136 display "Provide a devtab entry for endpoints"
137 active_if CYGFUN_DEVS_USB_AT91_EP0
140 This component controls if /dev/usb entries will be created."
142 cdl_option CYGVAR_DEVS_USB_AT91_EP0_DEVTAB_ENTRY {
143 display "Provide a devtab entry for endpoint 0"
148 If endpoint 0 will only be accessed via the low-level
149 USB-specific calls then there is no need for an entry
150 in the device table, saving some memory. If the
151 application intends to access the endpoint by means
152 of open and ioctl calls then a devtab entry is needed."
155 cdl_option CYGVAR_DEVS_USB_AT91_EP1_DEVTAB_ENTRY {
156 display "Provide a devtab entry for endpoint 1"
161 If this endpoint will only be accessed via the low-level
162 USB-specific calls then there is no need for an entry
163 in the device table, saving some memory. If the
164 application intends to access the endpoint by means
165 of open and read calls then a devtab entry is needed."
168 cdl_option CYGVAR_DEVS_USB_AT91_EP2_DEVTAB_ENTRY {
169 display "Provide a devtab entry for endpoint 2"
174 If this endpoint will only be accessed via the low-level
175 USB-specific calls then there is no need for an entry
176 in the device table, saving some memory. If the
177 application intends to access the endpoint by means
178 of open and read calls then a devtab entry is needed."
181 cdl_option CYGVAR_DEVS_USB_AT91_EP3_DEVTAB_ENTRY {
182 display "Provide a devtab entry for endpoint 3"
187 If this endpoint will only be accessed via the low-level
188 USB-specific calls then there is no need for an entry
189 in the device table, saving some memory. If the
190 application intends to access the endpoint by means
191 of open and read calls then a devtab entry is needed."
194 cdl_option CYGDAT_DEVS_USB_AT91_DEVTAB_BASENAME {
195 display "Base name for devtab entries"
197 default_value { "\"/dev/usbs\"" }
199 If the uAT91 USB device driver package provides devtab
200 entries for any of the endpoints then this option gives
201 control over the names of these entries. By default the
202 endpoints will be called \"/dev/usbs0c\", \"/dev/usbs3w\"
203 and \"/dev/usbs4r\" (assuming all three endpoints are
204 enabled. The common part \"/dev/usbs\" is determined
205 by this configuration option. It may be necessary to
206 change this if there are multiple USB slave-side
207 devices on the target hardware to prevent a name clash."