# SPDX-License-Identifier: GPL-2.0-only
#
# Cavium ethernet device configuration
#

config NET_VENDOR_CAVIUM
	bool "Cavium ethernet drivers"
	default y
	---help---
	  Select this option if you want enable Cavium network support.

	  If you have a Cavium SoC or network adapter, say Y.

if NET_VENDOR_CAVIUM

config THUNDER_NIC_PF
	tristate "Thunder Physical function driver"
	depends on 64BIT && PCI
	select THUNDER_NIC_BGX
	---help---
	  This driver supports Thunder's NIC physical function.
	  The NIC provides the controller and DMA engines to
	  move network traffic to/from the memory. The NIC
	  works closely with TNS, BGX and SerDes to implement the
	  functions replacing and virtualizing those of a typical
	  standalone PCIe NIC chip.

config THUNDER_NIC_VF
	tristate "Thunder Virtual function driver"
	imply CAVIUM_PTP
	depends on 64BIT && PCI
	---help---
	  This driver supports Thunder's NIC virtual function

config	THUNDER_NIC_BGX
	tristate "Thunder MAC interface driver (BGX)"
	depends on 64BIT && PCI
	select PHYLIB
	select MDIO_THUNDER if PCI
	select THUNDER_NIC_RGX
	---help---
	  This driver supports programming and controlling of MAC
	  interface from NIC physical function driver.

config	THUNDER_NIC_RGX
	tristate "Thunder MAC interface driver (RGX)"
	depends on 64BIT && PCI
	select PHYLIB
	select MDIO_THUNDER if PCI
	---help---
	  This driver supports configuring XCV block of RGX interface
	  present on CN81XX chip.

config CAVIUM_PTP
	tristate "Cavium PTP coprocessor as PTP clock"
	depends on 64BIT && PCI
	imply PTP_1588_CLOCK
	---help---
	  This driver adds support for the Precision Time Protocol Clocks and
	  Timestamping coprocessor (PTP) found on Cavium processors.
	  PTP provides timestamping mechanism that is suitable for use in IEEE 1588
	  Precision Time Protocol or other purposes.  Timestamps can be used in
	  BGX, TNS, GTI, and NIC blocks.

config LIQUIDIO
	tristate "Cavium LiquidIO support"
	depends on 64BIT && PCI
	depends on PCI
	imply PTP_1588_CLOCK
	select FW_LOADER
	select LIBCRC32C
	select NET_DEVLINK
	---help---
	  This driver supports Cavium LiquidIO Intelligent Server Adapters
	  based on CN66XX, CN68XX and CN23XX chips.

	  To compile this driver as a module, choose M here: the module
	  will be called liquidio.  This is recommended.

config OCTEON_MGMT_ETHERNET
	tristate "Octeon Management port ethernet driver (CN5XXX, CN6XXX)"
	depends on CAVIUM_OCTEON_SOC
	select PHYLIB
	select MDIO_OCTEON
	select OCTEON_ETHERNET_COMMON
	select OCTEON_BGX_PORT
	default y
	help
	  Enable the ethernet driver for the management
	  port on Cavium Networks' Octeon CN57XX, CN56XX, CN55XX,
	  CN54XX, CN52XX, and CN6XXX chips.

config LIQUIDIO_VF
	tristate "Cavium LiquidIO VF support"
	depends on 64BIT && PCI_MSI
	imply PTP_1588_CLOCK
	---help---
	  This driver supports Cavium LiquidIO Intelligent Server Adapter
	  based on CN23XX chips.

	  To compile this driver as a module, choose M here: The module
	  will be called liquidio_vf. MSI-X interrupt support is required
	  for this driver to work correctly

config OCTEON_ETHERNET
	tristate "OCTEON Ethernet support"
	depends on CAVIUM_OCTEON_SOC
	select PHYLIB
	select MDIO_OCTEON
	select OCTEON_ETHERNET_MEM
	select OCTEON_ETHERNET_COMMON
	---help---
	  This driver supports the builtin ethernet ports on Cavium
	  Inc.' products in the Octeon family. This driver supports the
	  CN3XXX, CN5XXX, CN6XXX and CNF7XXX OCTEON processors.

	  To compile this driver as a module, choose M here.  The module
	  will be called octeon-ethernet.

config OCTEON3_ETHERNET
	tristate "OCTEON III PKI/PKO Ethernet support (not cn70xx)"
	depends on CAVIUM_OCTEON_SOC
	select OCTEON_BGX_PORT
	select OCTEON_FPA3
	---help---
	  Support for 'BGX' Ethernet via PKI/PKO units.  No support
	  for cn70xx chips (use OCTEON_ETHERNET for cn70xx).

config OCTEON3_ETHERNET_SRIO
	tristate "SRIO support for OCTEON III Ethernet driver"
	depends on (OCTEON3_ETHERNET && CAVIUM_OCTEON_RAPIDIO)
	select OCTEON_SRIO_NEXUS
	---help---
	  This driver adds 'SRIO' support to the Ethernet driver via PKI/PKO
	  units. It supports Caviums CNF75XX SOC. To compile this driver as a
	  module, choose M here. The module will be called
	  octeon3-ethernet-srio.

config OCTEON_ETHERNET_MEM
	tristate
	depends on CAVIUM_OCTEON_SOC

config OCTEON_POW_ONLY_ETHERNET
	tristate "POW based internal only ethernet driver"
	depends on CAVIUM_OCTEON_SOC
	depends on OCTEON_ETHERNET
	---help---
	  This option enables a very simple ethernet driver for internal core
	  to core traffic. It relies on another driver, octeon-ethernet,
	  to perform all hardware setup. This driver's purpose is to supply
	  basic networking between different Linux images running on the same
	  chip. A single core loads the octeon-ethernet module, all other cores
	  load this driver. On load, the driver waits for some other core to
	  perform hardware setup.

config OCTEON_ETHERNET_COMMON
	tristate

config OCTEON_BGX_NEXUS
	tristate
	depends on CAVIUM_OCTEON_SOC

config OCTEON_SRIO_NEXUS
	tristate

config OCTEON_COMMON_NEXUS
	tristate

config OCTEON_BGX_PORT
	tristate
	depends on CAVIUM_OCTEON_SOC
	select OCTEON_BGX_NEXUS
	select OCTEON_COMMON_NEXUS

endif # NET_VENDOR_CAVIUM
