Convert CONFIG_USB_MAX_CONTROLLER_COUNT to Kconfig
[platform/kernel/u-boot.git] / drivers / usb / host / Kconfig
index 10b0479..7d5bde5 100644 (file)
@@ -116,11 +116,19 @@ config USB_XHCI_BRCM
 
 endif # USB_XHCI_HCD
 
+config EHCI_DESC_BIG_ENDIAN
+       bool
+
+config EHCI_MMIO_BIG_ENDIAN
+       bool
+
 config USB_EHCI_HCD
        bool "EHCI HCD (USB 2.0) support"
        default y if ARCH_MX5 || ARCH_MX6
        depends on DM && OF_CONTROL
        select USB_HOST
+       select EHCI_DESC_BIG_ENDIAN if SYS_BIG_ENDIAN
+       select EHCI_MMIO_BIG_ENDIAN if SYS_BIG_ENDIAN
        ---help---
          The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
          "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
@@ -139,6 +147,9 @@ config USB_EHCI_HCD
 
 if USB_EHCI_HCD
 
+config USB_EHCI_IS_TDI
+       bool
+
 config USB_EHCI_ATMEL
        bool  "Support for Atmel on-chip EHCI USB controller"
        depends on ARCH_AT91
@@ -150,6 +161,7 @@ config USB_EHCI_MARVELL
        bool "Support for Marvell on-chip EHCI USB controller"
        depends on ARCH_MVEBU || ARCH_KIRKWOOD || ARCH_ORION5X
        default y
+       select USB_EHCI_IS_TDI if !ARM64
        ---help---
          Enables support for the on-chip EHCI controller on MVEBU SoCs.
 
@@ -162,6 +174,7 @@ config USB_EHCI_MX5
 config USB_EHCI_MX6
        bool "Support for i.MX6/i.MX7ULP on-chip EHCI USB controller"
        depends on ARCH_MX6 || ARCH_MX7ULP || ARCH_IMXRT
+       select EHCI_HCD_INIT_AFTER_RESET
        default y
        ---help---
          Enables support for the on-chip EHCI controller on i.MX6 SoCs.
@@ -169,54 +182,32 @@ config USB_EHCI_MX6
 config USB_EHCI_MX7
        bool "Support for i.MX7 on-chip EHCI USB controller"
        depends on ARCH_MX7 || IMX8M
+       select EHCI_HCD_INIT_AFTER_RESET if ARCH_MX7
        select PHY if IMX8M
        select NOP_PHY if IMX8M
        default y
        ---help---
          Enables support for the on-chip EHCI controller on i.MX7 SoCs.
 
+config USB_EHCI_MXS
+       bool "Support for i.MX23/i.MX28 EHCI USB controller"
+       depends on ARCH_MX23 || ARCH_MX28
+       default y
+       select USB_EHCI_IS_TDI
+       help
+         Enables support for the on-chip EHCI controller on i.MX23 and
+         i.MX28 SoCs.
+
 config USB_EHCI_OMAP
        bool "Support for OMAP3+ on-chip EHCI USB controller"
        depends on ARCH_OMAP2PLUS
+       select PHY
+       imply NOP_PHY
        default y
        ---help---
          Enables support for the on-chip EHCI controller on OMAP3 and later
          SoCs.
 
-if USB_EHCI_OMAP
-
-config HAS_OMAP_EHCI_PHY1_RESET_GPIO
-       bool "PHY #1 requires a GPIO hold to it in RESET while PHY settles"
-       help
-         Enable this to be able to configure the GPIO number used to hold the
-         PHY in RESET for enough time until the PHY is settled and ready.
-
-config OMAP_EHCI_PHY1_RESET_GPIO
-       int "GPIO number to hold PHY #1 in RESET"
-       depends on HAS_OMAP_EHCI_PHY1_RESET_GPIO
-
-config HAS_OMAP_EHCI_PHY2_RESET_GPIO
-       bool "PHY #2 requires a GPIO hold to it in RESET while PHY settles"
-       help
-         Enable this to be able to configure the GPIO number used to hold the
-         PHY in RESET for enough time until the PHY is settled and ready.
-
-config OMAP_EHCI_PHY2_RESET_GPIO
-       int "GPIO number to hold PHY #2 in RESET"
-       depends on HAS_OMAP_EHCI_PHY2_RESET_GPIO
-
-config HAS_OMAP_EHCI_PHY3_RESET_GPIO
-       bool "PHY #3 requires a GPIO hold to it in RESET while PHY settles"
-       help
-         Enable this to be able to configure the GPIO number used to hold the
-         PHY in RESET for enough time until the PHY is settled and ready.
-
-config OMAP_EHCI_PHY3_RESET_GPIO
-       int "GPIO number to hold PHY #3 in RESET"
-       depends on HAS_OMAP_EHCI_PHY3_RESET_GPIO
-
-endif
-
 config USB_EHCI_VF
        bool "Support for Vybrid on-chip EHCI USB controller"
        depends on ARCH_VF610
@@ -251,12 +242,14 @@ config USB_EHCI_PCI
 config USB_EHCI_TEGRA
        bool "Support for NVIDIA Tegra on-chip EHCI USB controller"
        depends on ARCH_TEGRA
+       select USB_EHCI_IS_TDI
        ---help---
          Enable support for Tegra on-chip EHCI USB controller
 
 config USB_EHCI_ZYNQ
        bool "Support for Xilinx Zynq on-chip EHCI USB controller"
        default y if ARCH_ZYNQ
+       select USB_EHCI_IS_TDI
        ---help---
          Enable support for Zynq on-chip EHCI USB controller
 
@@ -267,11 +260,25 @@ config USB_EHCI_GENERIC
        ---help---
          Enables support for generic EHCI controller.
 
+config EHCI_HCD_INIT_AFTER_RESET
+       bool
+
 config USB_EHCI_FSL
        bool  "Support for FSL on-chip EHCI USB controller"
-       select  CONFIG_EHCI_HCD_INIT_AFTER_RESET
+       select EHCI_HCD_INIT_AFTER_RESET
        ---help---
          Enables support for the on-chip EHCI controller on FSL chips.
+
+config USB_EHCI_TXFIFO_THRESH
+       hex
+       depends on USB_EHCI_TEGRA
+       default 0x10
+       help
+         This parameter affects a TXFILLTUNING field that controls how much
+         data is sent to the latency fifo before it is sent to the wire.
+         Without this parameter, the default (2) causes occasional Data Buffer
+         Errors in OUT packets depending on the buffer address and size.
+
 endif # USB_EHCI_HCD
 
 config USB_OHCI_HCD
@@ -357,3 +364,9 @@ config USB_R8A66597_HCD
        ---help---
          This enables support for the on-chip Renesas R8A66597 USB 2.0
          controller, present in various RZ and SH SoCs.
+
+config USB_MAX_CONTROLLER_COUNT
+       int "Maximum number of USB host controllers"
+       depends on USB_EHCI_FSL || USB_XHCI_FSL || \
+               (SPL_USB_HOST && !DM_SPL_USB) || (USB_HOST && !DM_USB)
+       default 1