]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/devs/usb/at91/v2_0/cdl/usbs_at91.cdl
Initial revision
[karo-tx-redboot.git] / packages / devs / usb / at91 / v2_0 / cdl / usbs_at91.cdl
1 # ====================================================================
2 #
3 #      usbs_at91.cdl
4 #
5 #      USB device driver for the ATMEL AT91 family of processors.
6 #
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
13 ##
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.
17 ##
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
21 ## for more details.
22 ##
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.
26 ##
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.
33 ##
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####
40 #
41 # Author(s):      Oliver Munz, Andrew Lunn
42 # Original data:  bartv
43 # Contributors:
44 # Date:           2006-02-25
45 #
46 #####DESCRIPTIONEND####
47 # ====================================================================
48
49 cdl_package CYGPKG_DEVS_USB_AT91 {
50     display     "Atmel AT91 USB Device Driver"
51     include_dir "cyg/io/usb"
52     parent      CYGPKG_IO_USB
53     implements  CYGHWR_IO_USB_SLAVE
54     
55     cdl_interface CYGINT_DEVS_USB_AT91_HAS_USB {
56         description "
57             This interface is implemented by HALs for devices which have
58             the USB hardware."
59     }
60
61     description "
62         This package provides a suitable eCos device driver
63         for AT91 USB. 
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
70         call from the host...
71         The endpoints 1..3 can be configured as bulk or interrupt
72         IN or OUT endpoint. Isochronous transfer is not supported."
73
74     cdl_component CYGFUN_DEVS_USB_AT91_EP0 {
75         display       "Support the control endpoint 0"
76         flavor        bool
77         default_value CYGINT_IO_USB_SLAVE_CLIENTS
78         requires      CYGPKG_IO_USB CYGPKG_IO_USB_SLAVE
79         requires { 
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)) 
84         }   
85
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    
89
90         compile       usbs_at91.c
91         compile       -library=libextras.a usbs_at91_data.cxx
92         description   "
93             Enable support for endpoint 0. If this support is disabled
94             then the entire USB port is unusable."
95     
96         cdl_option CYGDAT_DEVS_USB_AT91_GPIO_SET_PULLUP_PIN {
97             display       "PIO-Pin who controls the pullup resistor"
98             flavor        data
99             default_value { "AT91_GPIO_PA16" }
100             description "
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
103                    then select NONE"
104         }
105
106         cdl_option CYGNUM_DEVS_USB_AT91_GPIO_SET_PULLUP_INVERTED {
107             display       "Has the signal to be inverted?"
108             flavor        bool
109             default_value 1
110             description "
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."
114         }
115
116         cdl_option CYGDAT_DEVS_USB_AT91_GPIO_READ_POWER_PIN {
117             display       "PIO-Pin who see the USB-Power"
118             flavor        data
119             default_value { "AT91_GPIO_PA13"}
120             description "
121                    Every GPIO pin is able to do it. If you don't need
122                    a pin then select NONE"
123         }
124
125         cdl_option CYGNUM_DEVS_USB_AT91_GPIO_READ_POWER_INVERTED {
126             display       "Has the signal to be inverted?"
127             flavor        bool
128             default_value 0
129             description "
130                    This option indicates that the power detect pin should
131                    be inverted. ie VDD is active, VCC is inactive."
132         }
133     }    
134     
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
138         default_value 0
139         description "
140              This component controls if /dev/usb entries will be created."
141
142         cdl_option CYGVAR_DEVS_USB_AT91_EP0_DEVTAB_ENTRY {
143             display       "Provide a devtab entry for endpoint 0"
144             flavor        bool
145             default_value 0
146             requires      CYGPKG_IO
147             description "
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."
153         }
154
155         cdl_option CYGVAR_DEVS_USB_AT91_EP1_DEVTAB_ENTRY {
156             display       "Provide a devtab entry for endpoint 1"
157             flavor        bool
158             default_value 1
159             requires      CYGPKG_IO 
160             description "
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."
166         }
167
168         cdl_option CYGVAR_DEVS_USB_AT91_EP2_DEVTAB_ENTRY {
169             display       "Provide a devtab entry for endpoint 2"
170             flavor        bool
171             default_value 1
172             requires      CYGPKG_IO 
173             description "
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."
179         }
180
181         cdl_option CYGVAR_DEVS_USB_AT91_EP3_DEVTAB_ENTRY {
182             display       "Provide a devtab entry for endpoint 3"
183             flavor        bool
184             default_value 1
185             requires      CYGPKG_IO 
186             description "
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."
192         }
193
194             cdl_option CYGDAT_DEVS_USB_AT91_DEVTAB_BASENAME {
195                 display       "Base name for devtab entries"
196                 flavor        data
197                 default_value { "\"/dev/usbs\"" }
198                 description "
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."
208             }
209     }
210 }