diff --git a/configs/sama5d3x-ek/README.txt b/configs/sama5d3x-ek/README.txt index d050ac32f8..0716476d04 100644 --- a/configs/sama5d3x-ek/README.txt +++ b/configs/sama5d3x-ek/README.txt @@ -1037,10 +1037,37 @@ Configurations nsh> msdis nsh> mount -t vfat /dev/mtdblock0 /mnt/at25 + 7. The USB high-speed EHCI and the low-/full- OHCI host drivers are supported + in this configuration. + Here are the relevant configuration options that enable EHCI support: + + System Type -> ATSAMA5 Peripheral Support + CONFIG_SAMA5_UHPHS=y : USB Host High Speed + + System Type -> USB High Speed Host driver options + CONFIG_SAMA5_EHCI=y : High-speed EHCI support + CONFIG_SAMA5_OHCI=y : Low/full-speed OHCI support + : Defaults for values probably OK for both + Device Drivers + CONFIG_USBHOST=y : Enable USB host support + CONFIG_USBHOST_ISOC_DISABLE=y : Isochronous endpoints not needed + + Device Drivers -> USB Host Driver Support + CONFIG_USBHOST_ISOC_DISABLE=y : Isochronous endpoints not used + CONFIG_USBHOST_MSC=y : Enable the mass storage class driver + CONFIG_USBHOST_HIDKBD=y : Enable the HID keybaord class driver + : Defaults for values probably OK for both + + Library Routines + CONFIG_SCHED_WORKQUEUE=y : Worker thread support is required + + Application Configuration -> NSH Library + CONFIG_NSH_ARCHINIT=y : NSH board-initialization + The following features are *not* enabled in the demo configuration but might be of some use to you: - 7. Debugging USB Device. There is normal console debug output available + 8. Debugging USB Device. There is normal console debug output available that can be enabled with CONFIG_DEBUG + CONFIG_DEBUG_USB. However, USB device operation is very time critical and enabling this debug output WILL interfere with the operation of the UDPHS. USB device @@ -1395,7 +1422,7 @@ Configurations CONFIG_USBHOST_MSC=y : Enable the mass storage class driver Library Routines - CONFIG_SCHED_WORKQUEUE : Worker thread support is required + CONFIG_SCHED_WORKQUEUE=y : Worker thread support is required Application Configuration -> NSH Library CONFIG_NSH_ARCHINIT=y : NSH board-initialization @@ -1427,12 +1454,12 @@ Configurations CONFIG_USBHOST_MSC=y : Enable the mass storage class driver Library Routines - CONFIG_SCHED_WORKQUEUE : Worker thread support is required + CONFIG_SCHED_WORKQUEUE=y : Worker thread support is required Application Configuration -> NSH Library CONFIG_NSH_ARCHINIT=y : NSH board-initialization - 12. Support the USB high-speed EHCI device driver (UDPHS) can be enabled + 12. Support the USB high-speed USB device driver (UDPHS) can be enabled by changing the NuttX configuration file as follows: Device Drivers -> USB Device Driver Support diff --git a/configs/sama5d3x-ek/demo/defconfig b/configs/sama5d3x-ek/demo/defconfig index e3362f2b6e..1a94d9772a 100644 --- a/configs/sama5d3x-ek/demo/defconfig +++ b/configs/sama5d3x-ek/demo/defconfig @@ -109,6 +109,9 @@ CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y # CONFIG_ARMV7A_TOOLCHAIN_GNU_EABIL is not set # CONFIG_ARMV7A_TOOLCHAIN_GNU_EABIW is not set # CONFIG_ARMV7A_TOOLCHAIN_GNU_OABI is not set +# CONFIG_USBHOST_BULK_DISABLE is not set +# CONFIG_USBHOST_INT_DISABLE is not set +CONFIG_USBHOST_ISOC_DISABLE=y # # ATSAMA5 Configuration Options @@ -146,7 +149,7 @@ CONFIG_SAMA5_SPI0=y # CONFIG_SAMA5_ADC is not set CONFIG_SAMA5_DMAC0=y # CONFIG_SAMA5_DMAC1 is not set -# CONFIG_SAMA5_UHPHS is not set +CONFIG_SAMA5_UHPHS=y CONFIG_SAMA5_UDPHS=y # CONFIG_SAMA5_GMAC is not set # CONFIG_SAMA5_EMAC is not set @@ -176,6 +179,22 @@ CONFIG_SAMA5_SPI_DMATHRESHOLD=4 # # CONFIG_UDPHS_SCATTERGATHER is not set +# +# USB High Speed Host Controller driver (HCD) options +# +CONFIG_SAMA5_OHCI=y +CONFIG_SAMA5_OHCI_NEDS=6 +CONFIG_SAMA5_OHCI_NTDS=9 +CONFIG_SAMA5_OHCI_TDBUFFERS=6 +CONFIG_SAMA5_OHCI_TDBUFSIZE=128 +CONFIG_SAMA5_EHCI=y +CONFIG_SAMA5_EHCI_NQHS=4 +CONFIG_SAMA5_EHCI_NQTDS=6 +CONFIG_SAMA5_EHCI_BUFSIZE=128 +CONFIG_SAMA5_EHCI_PREALLOCATE=y +CONFIG_SAMA5_UHPHS_RHPORT2=y +CONFIG_SAMA5_UHPHS_RHPORT3=y + # # External Memory Configuration # @@ -313,6 +332,7 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 # # Sizes of configurable things (0 disables) @@ -449,7 +469,17 @@ CONFIG_USBMSC_PRODUCTID=0x5342 CONFIG_USBMSC_PRODUCTSTR="Mass Storage" CONFIG_USBMSC_VERSIONNO=0x399 # CONFIG_USBMSC_REMOVABLE is not set -# CONFIG_USBHOST is not set +CONFIG_USBHOST=y +CONFIG_USBHOST_NPREALLOC=4 +CONFIG_USBHOST_MSC=y +CONFIG_USBHOST_HIDKBD=y +CONFIG_HIDKBD_POLLUSEC=100000 +CONFIG_HIDKBD_DEFPRIO=50 +CONFIG_HIDKBD_STACKSIZE=1024 +CONFIG_HIDKBD_BUFSIZE=64 +# CONFIG_HIDKBD_RAWSCANCODES is not set +# CONFIG_HIDKBD_ALLSCANCODES is not set +# CONFIG_HIDKBD_NODEBOUNCE is not set # CONFIG_WIRELESS is not set # @@ -551,7 +581,12 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Non-standard Library Support # -# CONFIG_SCHED_WORKQUEUE is not set +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_WORKPRIORITY=192 +CONFIG_SCHED_WORKPERIOD=50000 +CONFIG_SCHED_WORKSTACKSIZE=2048 +# CONFIG_SCHED_LPWORK is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set