162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci#
362306a36Sopenharmony_ci# USB Core configuration
462306a36Sopenharmony_ci#
562306a36Sopenharmony_ciconfig USB_ANNOUNCE_NEW_DEVICES
662306a36Sopenharmony_ci	bool "USB announce new devices"
762306a36Sopenharmony_ci	help
862306a36Sopenharmony_ci	  Say Y here if you want the USB core to always announce the
962306a36Sopenharmony_ci	  idVendor, idProduct, Manufacturer, Product, and SerialNumber
1062306a36Sopenharmony_ci	  strings for every new USB device to the syslog.  This option is
1162306a36Sopenharmony_ci	  usually used by distro vendors to help with debugging and to
1262306a36Sopenharmony_ci	  let users know what specific device was added to the machine
1362306a36Sopenharmony_ci	  in what location.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci	  If you do not want this kind of information sent to the system
1662306a36Sopenharmony_ci	  log, or have any doubts about this, say N here.
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_cicomment "Miscellaneous USB options"
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciconfig USB_DEFAULT_PERSIST
2162306a36Sopenharmony_ci	bool "Enable USB persist by default"
2262306a36Sopenharmony_ci	default y
2362306a36Sopenharmony_ci	help
2462306a36Sopenharmony_ci	  Say N here if you don't want USB power session persistence
2562306a36Sopenharmony_ci	  enabled by default.  If you say N it will make suspended USB
2662306a36Sopenharmony_ci	  devices that lose power get reenumerated as if they had been
2762306a36Sopenharmony_ci	  unplugged, causing any mounted filesystems to be lost.  The
2862306a36Sopenharmony_ci	  persist feature can still be enabled for individual devices
2962306a36Sopenharmony_ci	  through the power/persist sysfs node. See
3062306a36Sopenharmony_ci	  Documentation/driver-api/usb/persist.rst for more info.
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci	  If you have any questions about this, say Y here, only say N
3362306a36Sopenharmony_ci	  if you know exactly what you are doing.
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ciconfig USB_FEW_INIT_RETRIES
3662306a36Sopenharmony_ci	bool "Limit USB device initialization to only a few retries"
3762306a36Sopenharmony_ci	help
3862306a36Sopenharmony_ci	  When a new USB device is detected, the kernel tries very hard
3962306a36Sopenharmony_ci	  to initialize and enumerate it, with lots of nested retry loops.
4062306a36Sopenharmony_ci	  This almost always works, but when it fails it can take a long time.
4162306a36Sopenharmony_ci	  This option tells the kernel to make only a few retry attempts,
4262306a36Sopenharmony_ci	  so that the total time required for a failed initialization is
4362306a36Sopenharmony_ci	  no more than 30 seconds (as required by the USB OTG spec).
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci	  Say N here unless you require new-device enumeration failure to
4662306a36Sopenharmony_ci	  occur within 30 seconds (as might be needed in an embedded
4762306a36Sopenharmony_ci	  application).
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ciconfig USB_DYNAMIC_MINORS
5062306a36Sopenharmony_ci	bool "Dynamic USB minor allocation"
5162306a36Sopenharmony_ci	help
5262306a36Sopenharmony_ci	  If you say Y here, the USB subsystem will use dynamic minor
5362306a36Sopenharmony_ci	  allocation for any device that uses the USB major number.
5462306a36Sopenharmony_ci	  This means that you can have more than 16 of a single type
5562306a36Sopenharmony_ci	  of device (like USB printers).
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ci	  If you are unsure about this, say N here.
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ciconfig USB_OTG
6062306a36Sopenharmony_ci	bool "OTG support"
6162306a36Sopenharmony_ci	depends on PM
6262306a36Sopenharmony_ci	help
6362306a36Sopenharmony_ci	  The most notable feature of USB OTG is support for a
6462306a36Sopenharmony_ci	  "Dual-Role" device, which can act as either a device
6562306a36Sopenharmony_ci	  or a host. The initial role is decided by the type of
6662306a36Sopenharmony_ci	  plug inserted and can be changed later when two dual
6762306a36Sopenharmony_ci	  role devices talk to each other.
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ci	  Select this only if your board has Mini-AB/Micro-AB
7062306a36Sopenharmony_ci	  connector.
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ciconfig USB_OTG_PRODUCTLIST
7362306a36Sopenharmony_ci	bool "Rely on OTG and EH Targeted Peripherals List"
7462306a36Sopenharmony_ci	depends on USB
7562306a36Sopenharmony_ci	help
7662306a36Sopenharmony_ci	  If you say Y here, the "otg_productlist.h" file will be used as a
7762306a36Sopenharmony_ci	  product list, so USB peripherals not listed there will be
7862306a36Sopenharmony_ci	  rejected during enumeration.  This behavior is required by the
7962306a36Sopenharmony_ci	  USB OTG and EH specification for all devices not on your product's
8062306a36Sopenharmony_ci	  "Targeted Peripherals List".  "Embedded Hosts" are likewise
8162306a36Sopenharmony_ci	  allowed to support only a limited number of peripherals.
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ciconfig USB_OTG_DISABLE_EXTERNAL_HUB
8462306a36Sopenharmony_ci	bool "Disable external hubs"
8562306a36Sopenharmony_ci	depends on USB_OTG || EXPERT
8662306a36Sopenharmony_ci	help
8762306a36Sopenharmony_ci	  If you say Y here, then Linux will refuse to enumerate
8862306a36Sopenharmony_ci	  external hubs.  OTG hosts are allowed to reduce hardware
8962306a36Sopenharmony_ci	  and software costs by not supporting external hubs.  So
9062306a36Sopenharmony_ci	  are "Embedded Hosts" that don't offer OTG support.
9162306a36Sopenharmony_ci
9262306a36Sopenharmony_ciconfig USB_OTG_FSM
9362306a36Sopenharmony_ci	tristate "USB 2.0 OTG FSM implementation"
9462306a36Sopenharmony_ci	depends on USB && USB_OTG
9562306a36Sopenharmony_ci	select USB_PHY
9662306a36Sopenharmony_ci	help
9762306a36Sopenharmony_ci	  Implements OTG Finite State Machine as specified in On-The-Go
9862306a36Sopenharmony_ci	  and Embedded Host Supplement to the USB Revision 2.0 Specification.
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ciconfig USB_LEDS_TRIGGER_USBPORT
10162306a36Sopenharmony_ci	tristate "USB port LED trigger"
10262306a36Sopenharmony_ci	depends on USB && LEDS_TRIGGERS
10362306a36Sopenharmony_ci	help
10462306a36Sopenharmony_ci	  This driver allows LEDs to be controlled by USB events. Enabling this
10562306a36Sopenharmony_ci	  trigger allows specifying list of USB ports that should turn on LED
10662306a36Sopenharmony_ci	  when some USB device gets connected.
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ciconfig USB_AUTOSUSPEND_DELAY
10962306a36Sopenharmony_ci	int "Default autosuspend delay"
11062306a36Sopenharmony_ci	depends on USB
11162306a36Sopenharmony_ci	default 2
11262306a36Sopenharmony_ci	help
11362306a36Sopenharmony_ci	  The default autosuspend delay in seconds.  Can be overridden
11462306a36Sopenharmony_ci	  with the usbcore.autosuspend command line or module parameter.
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ci	  The default value Linux has always had is 2 seconds.  Change
11762306a36Sopenharmony_ci	  this value if you want a different delay and cannot modify
11862306a36Sopenharmony_ci	  the command line or module parameter.
119