Kconfig 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see the file kconfig-language.txt in the NuttX tools repository.
  4. #
  5. comment "USB Device Controller Driver Options"
  6. config USBDEV_ISOCHRONOUS
  7. bool "Enable isochronous"
  8. default n
  9. ---help---
  10. Build in extra support for isochronous endpoints
  11. config USBDEV_DUALSPEED
  12. bool "Enable high and full speed"
  13. default n
  14. ---help---
  15. Hardware handles high and full speed operation (USB 2.0)
  16. choice
  17. prompt "Select USB device powered"
  18. default USBDEV_SELFPOWERED
  19. config USBDEV_SELFPOWERED
  20. bool "Self powered"
  21. ---help---
  22. Will cause USB features to indicate that the device is self-powered
  23. config USBDEV_BUSPOWERED
  24. bool "Bus powered"
  25. ---help---
  26. Will cause USB features to indicate that the device is not self-powered
  27. endchoice
  28. config USBDEV_MAXPOWER
  29. int "Maximum power consumption in mA"
  30. default 100
  31. # depends on USBDEV_BUSPOWERED
  32. ---help---
  33. Maximum power consumption in mA. This selection should only apply if
  34. the device is bus powered (USBDEV_BUSPOWERED). It is, however, used
  35. unconditionally in several USB device drivers.
  36. config USBDEV_DMA
  37. bool "Enable DMA methods"
  38. default n
  39. ---help---
  40. Select this enable DMA-related methods in USB device controller driver
  41. interface. These methods include the DMA buffer allocation methods:
  42. allobuffer() and freebuffer().
  43. The USB class driver allocates packet I/O buffers for data transfer by
  44. calling the driver allocbuffer() and freebuffer() methods. Those methods
  45. are only available if USBDEV_DMA is defined in the system configuration.
  46. config USBDEV_DMAMEMORY
  47. bool "Board DMA Allocation Hooks"
  48. default n
  49. depends on USBDEV_DMA
  50. ---help---
  51. The USB class driver allocates packet I/O buffers for data transfer by
  52. calling the driver allocbuffer() and freebuffer() methods. Those methods
  53. are only available if USBDEV_DMA is defined in the system configuration.
  54. If USBDEV_DMAMEMORY is also defined in the NuttX configuration, then
  55. the driver implementations of the allocbuffer() and freebuffer()
  56. methods may use board-specific usbdev_dma_alloc() and usbdev_dma_free().
  57. If USBDEV_DMA and USBDEV_DMAMEMORY are both defined, then the board-
  58. specific logic must provide the functions usbdev_dma_alloc() and
  59. usbdev_dma_free(): usbdev_dma_alloc() will allocate DMA-capable
  60. memory of the specified size; usbdev_dma_free() is the corresponding
  61. function that will be called to free the DMA-capable memory.
  62. config ARCH_USBDEV_STALLQUEUE
  63. bool
  64. default n
  65. ---help---
  66. This option is set by the USB device controller driver (DCD)
  67. selection. These selection means that the DCD can support
  68. queuing of stall requests. By this, it is meant that, (1) the
  69. stall is not sent until all write requests preceding the stall
  70. request are sent, (2) the stall is sent, and then after the
  71. stall is cleared, (3) all write requests queued after the stall
  72. are sent.
  73. If the driver does not support this feature, that the class drivers
  74. will enable some hokey and inefficient delay logic to workaround
  75. the lack of queuing.
  76. menuconfig USBDEV_TRACE
  77. bool "Enable USB tracing for debug"
  78. default n
  79. select HAVE_USBTRACE
  80. ---help---
  81. Enables USB tracing for debug
  82. if USBDEV_TRACE
  83. config USBDEV_TRACE_NRECORDS
  84. int "Number of trace entries to remember"
  85. default 128
  86. ---help---
  87. Number of trace entries to remember
  88. config USBDEV_TRACE_STRINGS
  89. bool "Decode device controller events"
  90. default n
  91. depends on DEBUG_USB
  92. ---help---
  93. If USBDEV_TRACE_STRINGS is defined, then the USB device controller
  94. driver must provide arrays of strings to support decoding of device-
  95. specific trace events. These arrays of strings (and the type struct
  96. trace_msg_t) are defined in include/nuttx/usb/usbdev_trace.h:
  97. #ifdef CONFIG_USBDEV_TRACE_STRINGS
  98. extern const struct trace_msg_t g_usb_trace_strings_deverror[];
  99. extern const struct trace_msg_t g_usb_trace_strings_intdecode[];
  100. #endif
  101. config USBDEV_TRACE_INITIALIDSET
  102. int "Initial enable bits"
  103. default 0
  104. ---help---
  105. This is the set of initial USB features that are enabled at boot
  106. time. See the event ID class bit definitions in
  107. include/nuttx/usbdev_trace.h.
  108. endif # USBDEV_TRACE
  109. menuconfig USBDEV_CUSTOM_TXFIFO_SIZE
  110. bool "Custom TX Fifo size"
  111. default n
  112. ---help---
  113. Enables custom TX Fifo size
  114. if USBDEV_CUSTOM_TXFIFO_SIZE
  115. config USBDEV_EP0_TXFIFO_SIZE
  116. int "USBDEV_EP0_TXFIFO_SIZE"
  117. default 64
  118. config USBDEV_EP1_TXFIFO_SIZE
  119. int "USBDEV_EP1_TXFIFO_SIZE"
  120. default 0
  121. config USBDEV_EP2_TXFIFO_SIZE
  122. int "USBDEV_EP2_TXFIFO_SIZE"
  123. default 0
  124. config USBDEV_EP3_TXFIFO_SIZE
  125. int "USBDEV_EP3_TXFIFO_SIZE"
  126. default 0
  127. config USBDEV_EP4_TXFIFO_SIZE
  128. int "USBDEV_EP4_TXFIFO_SIZE"
  129. default 0
  130. config USBDEV_EP5_TXFIFO_SIZE
  131. int "USBDEV_EP5_TXFIFO_SIZE"
  132. default 0
  133. config USBDEV_EP6_TXFIFO_SIZE
  134. int "USBDEV_EP6_TXFIFO_SIZE"
  135. default 0
  136. config USBDEV_EP7_TXFIFO_SIZE
  137. int "USBDEV_EP7_TXFIFO_SIZE"
  138. default 0
  139. config USBDEV_EP8_TXFIFO_SIZE
  140. int "USBDEV_EP8_TXFIFO_SIZE"
  141. default 0
  142. endif # USBDEV_CUSTOM_TXFIFO_SIZE
  143. comment "USB Device Class Driver Options"
  144. menuconfig USBDEV_COMPOSITE
  145. bool "USB composite device support"
  146. default n
  147. ---help---
  148. Enables USB composite device support
  149. if USBDEV_COMPOSITE
  150. config COMPOSITE_IAD
  151. bool "Use Interface Associate Descriptor (IAD)"
  152. default n
  153. ---help---
  154. If one of the members of the composite has multiple interfaces
  155. (such as CDC/ACM), then an Interface Association Descriptor (IAD)
  156. will be necessary. Default: IAD will be used automatically if
  157. needed. It should not be necessary to set this.
  158. config COMPOSITE_EP0MAXPACKET
  159. int "Max packet size for endpoint 0"
  160. default 64
  161. ---help---
  162. Max packet size for endpoint 0
  163. config COMPOSITE_VENDORID
  164. hex "Composite vendor ID"
  165. default 0x0000
  166. config COMPOSITE_VENDORSTR
  167. string "Composite vendor ID"
  168. default "NuttX"
  169. ---help---
  170. The vendor ID code/string
  171. config COMPOSITE_PRODUCTID
  172. hex "Composite product id"
  173. default 0x0000
  174. config COMPOSITE_PRODUCTSTR
  175. string "Composite product string"
  176. default "Composite device"
  177. ---help---
  178. The product ID code/string
  179. config COMPOSITE_SERIALSTR
  180. string "Composite serial string"
  181. default "001"
  182. ---help---
  183. Device serial number string
  184. config COMPOSITE_CONFIGSTR
  185. string "Configuration string"
  186. default "NuttX COMPOSITE config"
  187. ---help---
  188. Configuration string
  189. config COMPOSITE_VERSIONNO
  190. hex "Composite version number"
  191. default 0x1010
  192. ---help---
  193. Interface version number.
  194. config COMPOSITE_MSFT_OS_DESCRIPTORS
  195. bool "Add support for Microsoft OS Descriptors"
  196. default n
  197. ---help---
  198. Microsoft Windows cannot always automatically determine appropriate
  199. drivers for different interfaces of a USB composite device. There is
  200. a vendor-specific mechanism called "Microsoft OS Descriptors" that
  201. allows the interface to provide further ID code to help with driver
  202. loading. See https://msdn.microsoft.com/en-us/windows/hardware/gg463179
  203. Enabling this feature in composite driver will pass these requests
  204. onwards to the interface drivers.
  205. endif
  206. config PL2303
  207. bool "Prolific PL2303 serial/USB converter emulation"
  208. default n
  209. select SERIAL_REMOVABLE
  210. ---help---
  211. This logic emulates the Prolific PL2303 serial/USB converter
  212. if PL2303
  213. config PL2303_CONSOLE
  214. bool "PL2303 console device"
  215. default n
  216. ---help---
  217. Register the USB device as /dev/console so that is will be used
  218. as the console device.
  219. config PL2303_EPINTIN
  220. int "Interrupt IN endpoint number"
  221. default 1
  222. config PL2303_EPBULKOUT
  223. int "Bulk OUT endpoint number"
  224. default 2
  225. config PL2303_EPBULKIN
  226. int "Bulk IN endpoint number"
  227. default 3
  228. config PL2303_EP0MAXPACKET
  229. int "Packet and request buffer sizes"
  230. default 64
  231. config PL2303_NWRREQS
  232. int "Number of read requests that can be in flight"
  233. default 4
  234. ---help---
  235. The number of read requests that can be in flight
  236. config PL2303_NRDREQS
  237. int "Number of write requests that can be in flight"
  238. default 4
  239. ---help---
  240. The number of write/read requests that can be in flight
  241. config PL2303_BULKIN_REQLEN
  242. int "Size of one write request buffer"
  243. default 768 if USBDEV_DUALSPEED
  244. default 96 if !USBDEV_DUALSPEED
  245. ---help---
  246. Ideally, the BULKOUT request size should *not* be the same size as
  247. the maxpacket size. That is because IN transfers of exactly the
  248. maxpacket size will be followed by a NULL packet. The BULKOUT,
  249. on the other hand, request buffer size is always the same as the
  250. maxpacket size.
  251. There is also no reason from PL2303_BULKIN_REQLEN to be greater
  252. than PL2303_TXBUFSIZE-1, since a request larger than the TX
  253. buffer can never be sent.
  254. config PL2303_RXBUFSIZE
  255. int "Receive buffer size"
  256. default 513 if USBDEV_DUALSPEED
  257. default 257 if !USBDEV_DUALSPEED
  258. ---help---
  259. Size of the serial receive buffers. The actual amount of data that
  260. can be held in the buffer is this number minus one due to the way
  261. that the circular buffer is managed. So an RX buffer size of 257
  262. will hold four full-speed, 64 byte packets; a buffer size of 513
  263. will hold one high-speed, 512 byte packet.
  264. config PL2303_TXBUFSIZE
  265. int "Transmit buffer size"
  266. default 769 if USBDEV_DUALSPEED
  267. default 193 if !USBDEV_DUALSPEED
  268. ---help---
  269. Size of the serial transmit buffers. The actual amount of data that
  270. can be held in the buffer is this number minus one due to the way
  271. that the circular buffer is managed. So a TX buffer size of 769
  272. will hold one request of size 768; a buffer size of 193 will hold
  273. two requests of size 96 bytes.
  274. config PL2303_VENDORID
  275. hex "Vendor ID"
  276. default 0x067b
  277. config PL2303_PRODUCTID
  278. hex "Product ID"
  279. default 0x2303
  280. config PL2303_VENDORSTR
  281. string "Vendor string"
  282. default "NuttX"
  283. config PL2303_PRODUCTSTR
  284. string "Product string"
  285. default "PL2303 Emulation"
  286. endif
  287. menuconfig CDCACM
  288. bool "USB Modem (CDC/ACM) support"
  289. default n
  290. select SERIAL_REMOVABLE
  291. ---help---
  292. Enables USB Modem (CDC/ACM) support
  293. if CDCACM
  294. config CDCACM_CONSOLE
  295. bool "CDC/ACM console device"
  296. default n
  297. ---help---
  298. Register the USB device as /dev/console so that is will be used
  299. as the console device.
  300. config CDCACM_IFLOWCONTROL
  301. bool "CDC/ACM RTS flow control"
  302. default n
  303. select SERIAL_IFLOWCONTROL
  304. ---help---
  305. Enable CDC/ACM RTS flow control
  306. config CDCACM_OFLOWCONTROL
  307. bool "CDC/ACM CTS flow control"
  308. default n
  309. depends on EXPERIMENTAL
  310. select SERIAL_OFLOWCONTROL
  311. ---help---
  312. Enable CDC/ACM CTS flow control
  313. menuconfig CDCACM_COMPOSITE
  314. bool "CDC/ACM composite support"
  315. default n
  316. depends on USBDEV_COMPOSITE
  317. ---help---
  318. Configure the CDC serial driver as part of a composite driver
  319. (only if USBDEV_COMPOSITE is also defined)
  320. if !CDCACM_COMPOSITE
  321. # In a composite device the EP0 config comes from the composite device
  322. # and the EP-Number is configured dynamically via composite_initialize
  323. config CDCACM_EP0MAXPACKET
  324. int "Endpoint 0 max packet size"
  325. default 64
  326. ---help---
  327. Endpoint 0 max packet size. Default 64.
  328. config CDCACM_EPINTIN
  329. int "Interrupt IN endpoint number"
  330. default 1
  331. ---help---
  332. The logical 7-bit address of a hardware endpoint that supports
  333. interrupt IN operation. Default 1.
  334. endif
  335. config CDCACM_EPINTIN_FSSIZE
  336. int "Interrupt IN full speed MAXPACKET size"
  337. default 64
  338. ---help---
  339. Max package size for the interrupt IN endpoint if full speed mode.
  340. Default 64.
  341. config CDCACM_EPINTIN_HSSIZE
  342. int "Interrupt IN high speed MAXPACKET size"
  343. default 64
  344. ---help---
  345. Max package size for the interrupt IN endpoint if high speed mode.
  346. Default 64.
  347. if !CDCACM_COMPOSITE
  348. # In a composite device the EP-Number is configured dynamically via
  349. # composite_initialize
  350. config CDCACM_EPBULKOUT
  351. int "Bulk OUT endpoint number"
  352. default 3
  353. ---help---
  354. The logical 7-bit address of a hardware endpoint that supports
  355. bulk OUT operation. Default: 3
  356. endif
  357. config CDCACM_EPBULKOUT_FSSIZE
  358. int "Bulk OUT full speed MAXPACKET size"
  359. default 64
  360. ---help---
  361. Max package size for the bulk OUT endpoint if full speed mode.
  362. Default 64.
  363. config CDCACM_EPBULKOUT_HSSIZE
  364. int "Bulk OUT out high speed MAXPACKET size"
  365. default 512
  366. ---help---
  367. Max package size for the bulk OUT endpoint if high speed mode.
  368. Default 512.
  369. if !CDCACM_COMPOSITE
  370. # In a composite device the EP-Number is configured dynamically via
  371. # composite_initialize
  372. config CDCACM_EPBULKIN
  373. int "Bulk IN endpoint number"
  374. default 2
  375. ---help---
  376. The logical 7-bit address of a hardware endpoint that supports
  377. bulk IN operation. Default: 2
  378. endif
  379. config CDCACM_EPBULKIN_FSSIZE
  380. int "Bulk IN full speed MAXPACKET size"
  381. default 64
  382. ---help---
  383. Max package size for the bulk IN endpoint if full speed mode.
  384. Default 64.
  385. config CDCACM_EPBULKIN_HSSIZE
  386. int "Bulk IN high speed MAXPACKET size"
  387. default 512
  388. ---help---
  389. Max package size for the bulk IN endpoint if high speed mode.
  390. Default 512.
  391. config CDCACM_NRDREQS
  392. int "Number of read requests that can be in flight"
  393. default 4
  394. ---help---
  395. The number of read requests that can be in flight
  396. config CDCACM_NWRREQS
  397. int "Number of write requests that can be in flight"
  398. default 4
  399. ---help---
  400. The number of write/read requests that can be in flight
  401. config CDCACM_BULKIN_REQLEN
  402. int "Size of one write request buffer"
  403. default 768 if USBDEV_DUALSPEED
  404. default 96 if !USBDEV_DUALSPEED
  405. ---help---
  406. Ideally, the BULKOUT request size should *not* be the same size as
  407. the maxpacket size. That is because IN transfers of exactly the
  408. maxpacket size will be followed by a NULL packet. The BULKOUT,
  409. on the other hand, request buffer size is always the same as the
  410. maxpacket size.
  411. There is also no reason from CDCACM_BULKIN_REQLEN to be greater
  412. than CDCACM_TXBUFSIZE-1, since a request larger than the TX
  413. buffer can never be sent.
  414. config CDCACM_RXBUFSIZE
  415. int "Receive buffer size"
  416. default 513 if USBDEV_DUALSPEED
  417. default 257 if !USBDEV_DUALSPEED
  418. ---help---
  419. Size of the serial receive buffers. The actual amount of data that
  420. can be held in the buffer is this number minus one due to the way
  421. that the circular buffer is managed. So an RX buffer size of 257
  422. will hold four full-speed, 64 byte packets; a buffer size of 513
  423. will hold one high-speed, 512 byte packet.
  424. config CDCACM_TXBUFSIZE
  425. int "Transmit buffer size"
  426. default 769 if USBDEV_DUALSPEED
  427. default 193 if !USBDEV_DUALSPEED
  428. ---help---
  429. Size of the serial transmit buffers. The actual amount of data that
  430. can be held in the buffer is this number minus one due to the way
  431. that the circular buffer is managed. So a TX buffer size of 769
  432. will hold one request of size 768; a buffer size of 193 will hold
  433. two requests of size 96 bytes.
  434. if !CDCACM_COMPOSITE
  435. # In a composite device the Vendor- and Product-ID is given by the composite
  436. # device
  437. config CDCACM_VENDORID
  438. hex "Vendor ID"
  439. default 0x0525
  440. ---help---
  441. The vendor ID code/string. Default 0x0525 and "NuttX"
  442. 0x0525 is the Netchip vendor and should not be used in any
  443. products. This default VID was selected for compatibility with
  444. the Linux CDC ACM default VID.
  445. config CDCACM_PRODUCTID
  446. hex "Product ID"
  447. default 0xa4a7
  448. ---help---
  449. The product ID code/string. Default 0xa4a7 and "CDC/ACM Serial"
  450. 0xa4a7 was selected for compatibility with the Linux CDC ACM
  451. default PID.
  452. config CDCACM_VENDORSTR
  453. string "Vendor string"
  454. default "NuttX"
  455. config CDCACM_PRODUCTSTR
  456. string "Product string"
  457. default "CDC/ACM Serial"
  458. endif # !CDCACM_COMPOSITE
  459. endif # CDCACM
  460. menuconfig USBMSC
  461. bool "USB Mass storage class device"
  462. default n
  463. select FS_READABLE
  464. select FS_WRITABLE
  465. ---help---
  466. References:
  467. "Universal Serial Bus Mass Storage Class, Specification Overview,"
  468. Revision 1.2, USB Implementer's Forum, June 23, 2003.
  469. "Universal Serial Bus Mass Storage Class, Bulk-Only Transport,"
  470. Revision 1.0, USB Implementer's Forum, September 31, 1999.
  471. "SCSI Primary Commands - 3 (SPC-3)," American National Standard
  472. for Information Technology, May 4, 2005
  473. "SCSI Primary Commands - 4 (SPC-4)," American National Standard
  474. for Information Technology, July 19, 2008
  475. "SCSI Block Commands -2 (SBC-2)," American National Standard
  476. for Information Technology, November 13, 2004
  477. "SCSI Multimedia Commands - 3 (MMC-3)," American National Standard
  478. for Information Technology, November 12, 2001
  479. if USBMSC
  480. config USBMSC_COMPOSITE
  481. bool "Mass storage composite support"
  482. default n
  483. depends on USBDEV_COMPOSITE
  484. ---help---
  485. Configure the mass storage driver as part of a composite driver
  486. (only if USBDEV_COMPOSITE is also defined)
  487. config USBMSC_EP0MAXPACKET
  488. int "Max packet size for endpoint 0"
  489. default 64
  490. ---help---
  491. Max packet size for endpoint 0
  492. if !USBMSC_COMPOSITE
  493. # In a composite device the EP-Number and STR-Number is configured
  494. # dynamically via composite_initialize
  495. config USBMSC_EPBULKOUT
  496. int "Bulk OUT endpoint number"
  497. default 2
  498. ---help---
  499. The logical 7-bit address of a hardware endpoints that support
  500. bulk OUT and IN operations
  501. config USBMSC_EPBULKIN
  502. int "Bulk IN endpoint number"
  503. default 3
  504. ---help---
  505. The logical 7-bit address of a hardware endpoints that support
  506. bulk OUT and IN operations
  507. endif
  508. config USBMSC_NWRREQS
  509. int "The number of write requests that can be in flight"
  510. default 4
  511. ---help---
  512. The number of write/read requests that can be in flight
  513. config USBMSC_NRDREQS
  514. int "The number of read requests that can be in flight"
  515. default 4
  516. ---help---
  517. The number of write/read requests that can be in flight
  518. config USBMSC_BULKINREQLEN
  519. int "Bulk IN request size"
  520. default 512 if USBDEV_DUALSPEED
  521. default 64 if !USBDEV_DUALSPEED
  522. ---help---
  523. The size of the buffer in each WRITE request. This value should to be
  524. at least as large as the endpoint maxpacket size . Most DCDs can divide
  525. a large request buffer down and enqueue the smaller, outgoing packets
  526. for better performance. So, ideally, the size of write request buffer
  527. should be the size of one block device sector which is, often, 512
  528. bytes. The default, however, is the minimum size of 512 or 64 bytes
  529. (depending upon if dual speed operation is supported or not).
  530. config USBMSC_BULKOUTREQLEN
  531. int "Bulk OUT request size"
  532. default 512 if USBDEV_DUALSPEED
  533. default 64 if !USBDEV_DUALSPEED
  534. ---help---
  535. The size of the buffer in each READ request. This value should to be
  536. at least as large as the endpoint maxpacket size. Most DCDs will return
  537. the completed READ request to the caller as each packet is received.
  538. Therefore, there is no benefit in increasing the size of this buffer
  539. beyond the maximum size of one packet. Default: 512 or 64 bytes
  540. (depending upon if dual speed operation is supported or not).
  541. if !USBMSC_COMPOSITE
  542. # In a composite device the Vendor- and Product-IDs are handled by the
  543. # composite device
  544. config USBMSC_VENDORID
  545. hex "Mass storage Vendor ID"
  546. default 0x584e
  547. ---help---
  548. The vendor ID (VID). The value here is bogus. You should not use
  549. it in any commercial products! You must go through the proper
  550. channels to request a vendor ID for your company if you do not
  551. already have one!
  552. config USBMSC_VENDORSTR
  553. string "Mass storage vendor string"
  554. default "NuttX"
  555. ---help---
  556. The vendor ID code/string
  557. config USBMSC_PRODUCTID
  558. hex "Mass storage Product ID"
  559. default 0x5342
  560. ---help---
  561. The product ID (PID).
  562. config USBMSC_PRODUCTSTR
  563. string "Mass storage product string"
  564. default "Mass Storage"
  565. endif # !USBMSC_COMPOSITE
  566. config USBMSC_VERSIONNO
  567. hex "USB MSC Version Number"
  568. default "0x399"
  569. config USBMSC_REMOVABLE
  570. bool "Mass storage removable"
  571. default n
  572. ---help---
  573. Select if the media is removable
  574. USB Composite Device Configuration
  575. config USBMSC_SCSI_PRIO
  576. int "USBMSC SCSI daemon priority"
  577. default 128
  578. ---help---
  579. Priority of the SCSI kernel thread. This must be a relatively high
  580. priority so that the SCSI daemon can be response to USB block driver
  581. accesses.
  582. config USBMSC_SCSI_STACKSIZE
  583. int "USBMSC SCSI daemon stack size"
  584. default 2048
  585. ---help---
  586. Stack size used with the SCSI kernel thread. The default value
  587. is not tuned.
  588. endif
  589. menuconfig RNDIS
  590. bool "RNDIS Ethernet-over-USB"
  591. default n
  592. ---help---
  593. References:
  594. - "MS-RNDIS: Remote Network Driver Interface Specification (RNDIS)
  595. Protocol"
  596. - "Remote NDIS To USB Mapping"
  597. This option may required CONFIG_NETDEV_LATEINIT=y otherwise, the
  598. power-up initialization may call the non-existent up_netinitialize().
  599. This option is not automatically selected because it may be that
  600. you have an additional network device that requires the early
  601. up_netinitialize() call.
  602. if RNDIS
  603. config RNDIS_NWRREQS
  604. int "The number of write requests that can be in flight"
  605. default 2
  606. ---help---
  607. The number of write/read requests that can be in flight
  608. config RNDIS_COMPOSITE
  609. bool "RNDIS composite support"
  610. default n
  611. depends on USBDEV_COMPOSITE
  612. ---help---
  613. Configure the RNDIS driver as part of a composite driver
  614. (only if USBDEV_COMPOSITE is also defined)
  615. if !RNDIS_COMPOSITE
  616. config RNDIS_VENDORID
  617. hex "RNDIS Vendor ID"
  618. default 0x584e
  619. ---help---
  620. The vendor ID (VID). The value here is bogus. You should not use
  621. it in any commercial products! You must go through the proper
  622. channels to request a vendor ID for your company if you do not
  623. already have one!
  624. config RNDIS_VENDORSTR
  625. string "RNDIS vendor string"
  626. default "NuttX"
  627. ---help---
  628. The vendor ID code/string
  629. config RNDIS_PRODUCTID
  630. hex "RNDIS Product ID"
  631. default 0x5342
  632. ---help---
  633. The product ID (PID).
  634. config RNDIS_PRODUCTSTR
  635. string "RNDIS product string"
  636. default "RNDIS gadget"
  637. config RNDIS_SERIALSTR
  638. string "RNDIS serial string"
  639. default "1234"
  640. config RNDIS_VERSIONNO
  641. hex "RNDIS Version Number"
  642. default 0x0001
  643. endif # !RNDIS_COMPOSITE
  644. endif # RNDIS
  645. menuconfig DFU
  646. bool "DFU Device Firmware Upgrade"
  647. default n
  648. ---help---
  649. References:
  650. - "Universal Serial Bus Device Class Specification for Device
  651. Firmware Upgrade, Version 1.1, Aug 5, 2004"
  652. This driver implements the application-part of DFU protocol. It enables
  653. a host application to send DFU_DETACH request and to cause the device
  654. to reboot into a bootloader mode.
  655. if DFU
  656. config DFU_MSFT_OS_DESCRIPTORS
  657. bool "Microsoft OS descriptor support"
  658. default n
  659. depends on COMPOSITE_MSFT_OS_DESCRIPTORS
  660. ---help---
  661. Enabling this option will cause the DFU driver to return "WINUSB" as
  662. the compatible ID of the DFU interface. This will automatically load
  663. the appropriate driver for use with e.g. libusb and dfu-util.
  664. Note that as of 2018 there are some issues with libusb and
  665. composite devices, you may need a patched version:
  666. https://sourceforge.net/p/libusb/mailman/message/36304399/
  667. config DFU_INTERFACE_NAME
  668. string "DFU interface string"
  669. default "DFU interface"
  670. ---help---
  671. String to assign as a name for the DFU interface.
  672. if DFU_MSFT_OS_DESCRIPTORS
  673. config DFU_INTERFACE_GUID
  674. string "DFU interface GUID"
  675. default "{8FE6D4D7-49DD-41E7-9486-49AFC6BFE475}"
  676. ---help---
  677. DeviceInterfaceGUID to use for DFU interface in Microsoft OS descriptors.
  678. Actual value does not matter for libusb, but if using WinUSB API directly
  679. you can request your device by this GUID.
  680. endif # DFU_MSFT_OS_DESCRIPTORS
  681. endif # DFU
  682. menuconfig NET_CDCECM
  683. bool "CDC-ECM Ethernet-over-USB"
  684. default n
  685. select NETDEVICES
  686. select NET
  687. select NET_ETHERNET
  688. ---help---
  689. References:
  690. - "Universal Serial Bus - Communications Class - Subclass
  691. Specification for Ethernet Control Model Devices,
  692. Revision 1.2, Feburary 9, 2007"
  693. This option may require CONFIG_NETDEV_LATEINIT=y, otherwise the
  694. power-up initialization may call the non-existent up_netinitialize().
  695. This option is not automatically selected because it may be that
  696. you have an additional network device that requires the early
  697. up_netinitialize() call.
  698. if NET_CDCECM
  699. menuconfig CDCECM_COMPOSITE
  700. bool "CDC/ECM composite support"
  701. default n
  702. depends on USBDEV_COMPOSITE
  703. ---help---
  704. Configure the CDC Ethernet Control Model driver as part of a
  705. composite driver (only if USBDEV_COMPOSITE is also defined)
  706. if !CDCECM_COMPOSITE
  707. # In a composite device the EP0 config comes from the composite device
  708. # and the EP-Number is configured dynamically via composite_initialize
  709. config CDCECM_EP0MAXPACKET
  710. int "Endpoint 0 max packet size"
  711. default 64
  712. ---help---
  713. Endpoint 0 max packet size. Default 64.
  714. config CDCECM_EPINTIN
  715. int "Interrupt IN endpoint number"
  716. default 1
  717. ---help---
  718. The logical 7-bit address of a hardware endpoint that supports
  719. interrupt IN operation. Default 1.
  720. endif # !CDCECM_COMPOSITE
  721. config CDCECM_EPINTIN_FSSIZE
  722. int "Interupt IN full speed MAXPACKET size"
  723. default 16
  724. ---help---
  725. Max package size for the interrupt IN endpoint if full speed mode.
  726. Default 16.
  727. if USBDEV_DUALSPEED
  728. config CDCECM_EPINTIN_HSSIZE
  729. int "Interupt IN high speed MAXPACKET size"
  730. default 64
  731. ---help---
  732. Max package size for the interrupt IN endpoint if high speed mode.
  733. Default 64.
  734. endif # USBDEV_DUALSPEED
  735. if !CDCECM_COMPOSITE
  736. # In a composite device the EP-Number is configured dynamically via
  737. # composite_initialize
  738. config CDCECM_EPBULKOUT
  739. int "Bulk OUT endpoint number"
  740. default 5
  741. ---help---
  742. The logical 7-bit address of a hardware endpoint that supports
  743. bulk OUT operation. Default: 5
  744. endif # !CDCECM_COMPOSITE
  745. config CDCECM_EPBULKOUT_FSSIZE
  746. int "Bulk OUT full speed MAXPACKET size"
  747. default 64
  748. ---help---
  749. Max package size for the bulk OUT endpoint if full speed mode.
  750. Default 64.
  751. if USBDEV_DUALSPEED
  752. config CDCECM_EPBULKOUT_HSSIZE
  753. int "Bulk OUT out high speed MAXPACKET size"
  754. default 512
  755. ---help---
  756. Max package size for the bulk OUT endpoint if high speed mode.
  757. Default 512.
  758. endif # USBDEV_DUALSPEED
  759. if !CDCECM_COMPOSITE
  760. # In a composite device the EP-Number is configured dynamically via
  761. # composite_initialize
  762. config CDCECM_EPBULKIN
  763. int "Bulk IN endpoint number"
  764. default 2
  765. ---help---
  766. The logical 7-bit address of a hardware endpoint that supports
  767. bulk IN operation. Default: 2
  768. endif # !CDCECM_COMPOSITE
  769. config CDCECM_EPBULKIN_FSSIZE
  770. int "Bulk IN full speed MAXPACKET size"
  771. default 64
  772. ---help---
  773. Max package size for the bulk IN endpoint if full speed mode.
  774. Default 64.
  775. if USBDEV_DUALSPEED
  776. config CDCECM_EPBULKIN_HSSIZE
  777. int "Bulk IN high speed MAXPACKET size"
  778. default 512
  779. ---help---
  780. Max package size for the bulk IN endpoint if high speed mode.
  781. Default 512.
  782. endif # USBDEV_DUALSPEED
  783. if !CDCECM_COMPOSITE
  784. # In a composite device the Vendor- and Product-ID is given by the composite
  785. # device
  786. config CDCECM_VENDORID
  787. hex "Vendor ID"
  788. default 0x0525
  789. ---help---
  790. The vendor ID code/string. Default 0x0525 and "NuttX"
  791. 0x0525 is the Netchip vendor and should not be used in any
  792. products. This default VID was selected for compatibility with
  793. the Linux CDC ECM default VID.
  794. config CDCECM_PRODUCTID
  795. hex "Product ID"
  796. default 0xa4a2
  797. ---help---
  798. The product ID code/string. Default 0xa4a2 and "CDC/ECM Ethernet"
  799. 0xa4a2 was selected for compatibility with the Linux CDC ECM
  800. default PID.
  801. config CDCECM_VENDORSTR
  802. string "Vendor string"
  803. default "NuttX"
  804. config CDCECM_PRODUCTSTR
  805. string "Product string"
  806. default "CDC/ECM Ethernet"
  807. endif # !CDCECM_COMPOSITE
  808. endif # CDCECM