Commit 5d6c2f4b5aab1ba5fe484fdd65bf78a71907f70d

Authored by Paul Kocialkowski
Committed by Marek Vasut
1 parent 95de1e2f26

usb: musb-new: Kconfig support for USB_MUSB_HOST and USB_MUSB_GADGET

Having MUSB_HOST and MUSB_GADGET in Kconfig allows more flexibility with regard
to what Kconfig options to enable, such as USB_STORAGE or USB_KEYBOARD.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>

Showing 2 changed files with 16 additions and 0 deletions Inline Diff

1 menuconfig USB 1 menuconfig USB
2 bool "USB support" 2 bool "USB support"
3 ---help--- 3 ---help---
4 Universal Serial Bus (USB) is a specification for a serial bus 4 Universal Serial Bus (USB) is a specification for a serial bus
5 subsystem which offers higher speeds and more features than the 5 subsystem which offers higher speeds and more features than the
6 traditional PC serial port. The bus supplies power to peripherals 6 traditional PC serial port. The bus supplies power to peripherals
7 and allows for hot swapping. Up to 127 USB peripherals can be 7 and allows for hot swapping. Up to 127 USB peripherals can be
8 connected to a single USB host in a tree structure. 8 connected to a single USB host in a tree structure.
9 9
10 The USB host is the root of the tree, the peripherals are the 10 The USB host is the root of the tree, the peripherals are the
11 leaves and the inner nodes are special USB devices called hubs. 11 leaves and the inner nodes are special USB devices called hubs.
12 Most PCs now have USB host ports, used to connect peripherals 12 Most PCs now have USB host ports, used to connect peripherals
13 such as scanners, keyboards, mice, modems, cameras, disks, 13 such as scanners, keyboards, mice, modems, cameras, disks,
14 flash memory, network links, and printers to the PC. 14 flash memory, network links, and printers to the PC.
15 15
16 Say Y here if your device has an USB port, either host, peripheral or 16 Say Y here if your device has an USB port, either host, peripheral or
17 dual-role. 17 dual-role.
18 18
19 For an USB host port, you then need to say Y to at least one of the 19 For an USB host port, you then need to say Y to at least one of the
20 Host Controller Driver (HCD) options below. Choose a USB 1.1 20 Host Controller Driver (HCD) options below. Choose a USB 1.1
21 controller, such as "UHCI HCD support" or "OHCI HCD support", 21 controller, such as "UHCI HCD support" or "OHCI HCD support",
22 and "EHCI HCD (USB 2.0) support" except for older systems that 22 and "EHCI HCD (USB 2.0) support" except for older systems that
23 do not have USB 2.0 support. It doesn't normally hurt to select 23 do not have USB 2.0 support. It doesn't normally hurt to select
24 them all if you are not certain. 24 them all if you are not certain.
25 25
26 If your system has a device-side USB port, used in the peripheral 26 If your system has a device-side USB port, used in the peripheral
27 side of the USB protocol, see the "USB Gadget" framework instead. 27 side of the USB protocol, see the "USB Gadget" framework instead.
28 28
29 After choosing your HCD, then select drivers for the USB peripherals 29 After choosing your HCD, then select drivers for the USB peripherals
30 you'll be using. You may want to check out the information provided 30 you'll be using. You may want to check out the information provided
31 in <file:Documentation/usb/> and especially the links given in 31 in <file:Documentation/usb/> and especially the links given in
32 <file:Documentation/usb/usb-help.txt>. 32 <file:Documentation/usb/usb-help.txt>.
33 33
34 if USB 34 if USB
35 35
36 config DM_USB 36 config DM_USB
37 bool "Enable driver model for USB" 37 bool "Enable driver model for USB"
38 depends on USB && DM 38 depends on USB && DM
39 help 39 help
40 Enable driver model for USB. The USB interface is then implemented 40 Enable driver model for USB. The USB interface is then implemented
41 by the USB uclass. Multiple USB controllers of different types 41 by the USB uclass. Multiple USB controllers of different types
42 (XHCI, EHCI) can be attached and used. The 'usb' command works as 42 (XHCI, EHCI) can be attached and used. The 'usb' command works as
43 normal. OCHI is not supported at present. 43 normal. OCHI is not supported at present.
44 44
45 Much of the code is shared but with this option enabled the USB 45 Much of the code is shared but with this option enabled the USB
46 uclass takes care of device enumeration. USB devices can be 46 uclass takes care of device enumeration. USB devices can be
47 declared with the U_BOOT_USB_DEVICE() macro and will be 47 declared with the U_BOOT_USB_DEVICE() macro and will be
48 automatically probed when found on the bus. 48 automatically probed when found on the bus.
49 49
50 source "drivers/usb/host/Kconfig" 50 source "drivers/usb/host/Kconfig"
51 51
52 source "drivers/usb/musb-new/Kconfig"
53
52 source "drivers/usb/emul/Kconfig" 54 source "drivers/usb/emul/Kconfig"
53 55
54 comment "USB peripherals" 56 comment "USB peripherals"
55 57
56 config USB_STORAGE 58 config USB_STORAGE
57 bool "USB Mass Storage support" 59 bool "USB Mass Storage support"
58 ---help--- 60 ---help---
59 Say Y here if you want to connect USB mass storage devices to your 61 Say Y here if you want to connect USB mass storage devices to your
60 board's USB port. 62 board's USB port.
61 63
62 config USB_KEYBOARD 64 config USB_KEYBOARD
63 bool "USB Keyboard support" 65 bool "USB Keyboard support"
64 ---help--- 66 ---help---
65 Say Y here if you want to use a USB keyboard for U-Boot command line 67 Say Y here if you want to use a USB keyboard for U-Boot command line
66 input. 68 input.
67 69
68 if USB_KEYBOARD 70 if USB_KEYBOARD
69 71
70 choice 72 choice
71 prompt "USB keyboard polling" 73 prompt "USB keyboard polling"
72 optional 74 optional
73 ---help--- 75 ---help---
74 Enable a polling mechanism for USB keyboard. 76 Enable a polling mechanism for USB keyboard.
75 77
76 config SYS_USB_EVENT_POLL 78 config SYS_USB_EVENT_POLL
77 bool "Interrupt polling" 79 bool "Interrupt polling"
78 80
79 config SYS_USB_EVENT_POLL_VIA_INT_QUEUE 81 config SYS_USB_EVENT_POLL_VIA_INT_QUEUE
80 bool "Poll via interrupt queue" 82 bool "Poll via interrupt queue"
81 83
82 config SYS_USB_EVENT_POLL_VIA_CONTROL_EP 84 config SYS_USB_EVENT_POLL_VIA_CONTROL_EP
83 bool "Poll via control EP" 85 bool "Poll via control EP"
84 86
85 endchoice 87 endchoice
86 88
87 endif 89 endif
88 90
89 endif 91 endif
90 92
drivers/usb/musb-new/Kconfig
File was created 1 #
2 # MUSB Controller Driver
3 #
4 comment "MUSB Controller Driver"
5
6 config USB_MUSB_HOST
7 bool "MUSB host mode support"
8 help
9 Enables the MUSB USB dual-role controller in host mode.
10
11 config USB_MUSB_GADGET
12 bool "MUSB gadget mode support"
13 help
14 Enables the MUSB USB dual-role controller in gadget mode.
15