162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ci#
362306a36Sopenharmony_ci# MDIO Layer Configuration
462306a36Sopenharmony_ci#
562306a36Sopenharmony_ci
662306a36Sopenharmony_cimenuconfig MDIO_DEVICE
762306a36Sopenharmony_ci	tristate "MDIO bus device drivers"
862306a36Sopenharmony_ci	help
962306a36Sopenharmony_ci	  MDIO devices and driver infrastructure code.
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciif MDIO_DEVICE
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciconfig MDIO_BUS
1462306a36Sopenharmony_ci	tristate
1562306a36Sopenharmony_ci	default m if PHYLIB=m
1662306a36Sopenharmony_ci	default MDIO_DEVICE
1762306a36Sopenharmony_ci	help
1862306a36Sopenharmony_ci	  This internal symbol is used for link time dependencies and it
1962306a36Sopenharmony_ci	  reflects whether the mdio_bus/mdio_device code is built as a
2062306a36Sopenharmony_ci	  loadable module or built-in.
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciconfig FWNODE_MDIO
2362306a36Sopenharmony_ci	def_tristate PHYLIB
2462306a36Sopenharmony_ci	depends on (ACPI || OF) || COMPILE_TEST
2562306a36Sopenharmony_ci	select FIXED_PHY
2662306a36Sopenharmony_ci	help
2762306a36Sopenharmony_ci	  FWNODE MDIO bus (Ethernet PHY) accessors
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ciconfig OF_MDIO
3062306a36Sopenharmony_ci	def_tristate PHYLIB
3162306a36Sopenharmony_ci	depends on OF
3262306a36Sopenharmony_ci	depends on PHYLIB
3362306a36Sopenharmony_ci	select FIXED_PHY
3462306a36Sopenharmony_ci	help
3562306a36Sopenharmony_ci	  OpenFirmware MDIO bus (Ethernet PHY) accessors
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ciconfig ACPI_MDIO
3862306a36Sopenharmony_ci	def_tristate PHYLIB
3962306a36Sopenharmony_ci	depends on ACPI
4062306a36Sopenharmony_ci	depends on PHYLIB
4162306a36Sopenharmony_ci	help
4262306a36Sopenharmony_ci	  ACPI MDIO bus (Ethernet PHY) accessors
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ciif MDIO_BUS
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ciconfig MDIO_DEVRES
4762306a36Sopenharmony_ci	tristate
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ciconfig MDIO_SUN4I
5062306a36Sopenharmony_ci	tristate "Allwinner sun4i MDIO interface support"
5162306a36Sopenharmony_ci	depends on ARCH_SUNXI || COMPILE_TEST
5262306a36Sopenharmony_ci	help
5362306a36Sopenharmony_ci	  This driver supports the MDIO interface found in the network
5462306a36Sopenharmony_ci	  interface units of the Allwinner SoC that have an EMAC (A10,
5562306a36Sopenharmony_ci	  A12, A10s, etc.)
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ciconfig MDIO_XGENE
5862306a36Sopenharmony_ci	tristate "APM X-Gene SoC MDIO bus controller"
5962306a36Sopenharmony_ci	depends on ARCH_XGENE || COMPILE_TEST
6062306a36Sopenharmony_ci	help
6162306a36Sopenharmony_ci	  This module provides a driver for the MDIO busses found in the
6262306a36Sopenharmony_ci	  APM X-Gene SoC's.
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ciconfig MDIO_ASPEED
6562306a36Sopenharmony_ci	tristate "ASPEED MDIO bus controller"
6662306a36Sopenharmony_ci	depends on ARCH_ASPEED || COMPILE_TEST
6762306a36Sopenharmony_ci	depends on OF_MDIO && HAS_IOMEM
6862306a36Sopenharmony_ci	depends on MDIO_DEVRES
6962306a36Sopenharmony_ci	help
7062306a36Sopenharmony_ci	  This module provides a driver for the independent MDIO bus
7162306a36Sopenharmony_ci	  controllers found in the ASPEED AST2600 SoC. This is a driver for the
7262306a36Sopenharmony_ci	  third revision of the ASPEED MDIO register interface - the first two
7362306a36Sopenharmony_ci	  revisions are the "old" and "new" interfaces found in the AST2400 and
7462306a36Sopenharmony_ci	  AST2500, embedded in the MAC. For legacy reasons, FTGMAC100 driver
7562306a36Sopenharmony_ci	  continues to drive the embedded MDIO controller for the AST2400 and
7662306a36Sopenharmony_ci	  AST2500 SoCs, so say N if AST2600 support is not required.
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ciconfig MDIO_BITBANG
7962306a36Sopenharmony_ci	tristate "Bitbanged MDIO buses"
8062306a36Sopenharmony_ci	help
8162306a36Sopenharmony_ci	  This module implements the MDIO bus protocol in software,
8262306a36Sopenharmony_ci	  for use by low level drivers that export the ability to
8362306a36Sopenharmony_ci	  drive the relevant pins.
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ci	  If in doubt, say N.
8662306a36Sopenharmony_ci
8762306a36Sopenharmony_ciconfig MDIO_BCM_IPROC
8862306a36Sopenharmony_ci	tristate "Broadcom iProc MDIO bus controller"
8962306a36Sopenharmony_ci	depends on ARCH_BCM_IPROC || COMPILE_TEST
9062306a36Sopenharmony_ci	depends on HAS_IOMEM && OF_MDIO
9162306a36Sopenharmony_ci	default ARCH_BCM_IPROC
9262306a36Sopenharmony_ci	help
9362306a36Sopenharmony_ci	  This module provides a driver for the MDIO busses found in the
9462306a36Sopenharmony_ci	  Broadcom iProc SoC's.
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ciconfig MDIO_BCM_UNIMAC
9762306a36Sopenharmony_ci	tristate "Broadcom UniMAC MDIO bus controller"
9862306a36Sopenharmony_ci	depends on HAS_IOMEM
9962306a36Sopenharmony_ci	help
10062306a36Sopenharmony_ci	  This module provides a driver for the Broadcom UniMAC MDIO busses.
10162306a36Sopenharmony_ci	  This hardware can be found in the Broadcom GENET Ethernet MAC
10262306a36Sopenharmony_ci	  controllers as well as some Broadcom Ethernet switches such as the
10362306a36Sopenharmony_ci	  Starfighter 2 switches.
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ciconfig MDIO_CAVIUM
10662306a36Sopenharmony_ci	tristate
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ciconfig MDIO_GPIO
10962306a36Sopenharmony_ci	tristate "GPIO lib-based bitbanged MDIO buses"
11062306a36Sopenharmony_ci	depends on MDIO_BITBANG
11162306a36Sopenharmony_ci	depends on GPIOLIB || COMPILE_TEST
11262306a36Sopenharmony_ci	help
11362306a36Sopenharmony_ci	  Supports GPIO lib-based MDIO busses.
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ci	  To compile this driver as a module, choose M here: the module
11662306a36Sopenharmony_ci	  will be called mdio-gpio.
11762306a36Sopenharmony_ci
11862306a36Sopenharmony_ciconfig MDIO_HISI_FEMAC
11962306a36Sopenharmony_ci	tristate "Hisilicon FEMAC MDIO bus controller"
12062306a36Sopenharmony_ci	depends on HAS_IOMEM && OF_MDIO
12162306a36Sopenharmony_ci	help
12262306a36Sopenharmony_ci	  This module provides a driver for the MDIO busses found in the
12362306a36Sopenharmony_ci	  Hisilicon SoC that have an Fast Ethernet MAC.
12462306a36Sopenharmony_ci
12562306a36Sopenharmony_ciconfig MDIO_I2C
12662306a36Sopenharmony_ci	tristate
12762306a36Sopenharmony_ci	depends on I2C
12862306a36Sopenharmony_ci	help
12962306a36Sopenharmony_ci	  Support I2C based PHYs.  This provides a MDIO bus bridged
13062306a36Sopenharmony_ci	  to I2C to allow PHYs connected in I2C mode to be accessed
13162306a36Sopenharmony_ci	  using the existing infrastructure.
13262306a36Sopenharmony_ci
13362306a36Sopenharmony_ci	  This is library mode.
13462306a36Sopenharmony_ci
13562306a36Sopenharmony_ciconfig MDIO_MVUSB
13662306a36Sopenharmony_ci	tristate "Marvell USB to MDIO Adapter"
13762306a36Sopenharmony_ci	depends on USB
13862306a36Sopenharmony_ci	select MDIO_DEVRES
13962306a36Sopenharmony_ci	help
14062306a36Sopenharmony_ci	  A USB to MDIO converter present on development boards for
14162306a36Sopenharmony_ci	  Marvell's Link Street family of Ethernet switches.
14262306a36Sopenharmony_ci
14362306a36Sopenharmony_ciconfig MDIO_MSCC_MIIM
14462306a36Sopenharmony_ci	tristate "Microsemi MIIM interface support"
14562306a36Sopenharmony_ci	depends on HAS_IOMEM && REGMAP_MMIO
14662306a36Sopenharmony_ci	select MDIO_DEVRES
14762306a36Sopenharmony_ci	help
14862306a36Sopenharmony_ci	  This driver supports the MIIM (MDIO) interface found in the network
14962306a36Sopenharmony_ci	  switches of the Microsemi SoCs; it is recommended to switch on
15062306a36Sopenharmony_ci	  CONFIG_HIGH_RES_TIMERS
15162306a36Sopenharmony_ci
15262306a36Sopenharmony_ciconfig MDIO_MOXART
15362306a36Sopenharmony_ci	tristate "MOXA ART MDIO interface support"
15462306a36Sopenharmony_ci	depends on ARCH_MOXART || COMPILE_TEST
15562306a36Sopenharmony_ci	help
15662306a36Sopenharmony_ci	  This driver supports the MDIO interface found in the network
15762306a36Sopenharmony_ci	  interface units of the MOXA ART SoC
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ciconfig MDIO_OCTEON
16062306a36Sopenharmony_ci	tristate "Octeon and some ThunderX SOCs MDIO buses"
16162306a36Sopenharmony_ci	depends on (64BIT && OF_MDIO) || COMPILE_TEST
16262306a36Sopenharmony_ci	depends on HAS_IOMEM
16362306a36Sopenharmony_ci	select MDIO_CAVIUM
16462306a36Sopenharmony_ci	select MDIO_DEVRES
16562306a36Sopenharmony_ci	help
16662306a36Sopenharmony_ci	  This module provides a driver for the Octeon and ThunderX MDIO
16762306a36Sopenharmony_ci	  buses. It is required by the Octeon and ThunderX ethernet device
16862306a36Sopenharmony_ci	  drivers on some systems.
16962306a36Sopenharmony_ci
17062306a36Sopenharmony_ciconfig MDIO_IPQ4019
17162306a36Sopenharmony_ci	tristate "Qualcomm IPQ4019 MDIO interface support"
17262306a36Sopenharmony_ci	depends on HAS_IOMEM && OF_MDIO
17362306a36Sopenharmony_ci	depends on COMMON_CLK
17462306a36Sopenharmony_ci	depends on MDIO_DEVRES
17562306a36Sopenharmony_ci	help
17662306a36Sopenharmony_ci	  This driver supports the MDIO interface found in Qualcomm
17762306a36Sopenharmony_ci	  IPQ40xx, IPQ60xx, IPQ807x and IPQ50xx series Soc-s.
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ciconfig MDIO_IPQ8064
18062306a36Sopenharmony_ci	tristate "Qualcomm IPQ8064 MDIO interface support"
18162306a36Sopenharmony_ci	depends on HAS_IOMEM && OF_MDIO
18262306a36Sopenharmony_ci	depends on MFD_SYSCON
18362306a36Sopenharmony_ci	depends on MDIO_DEVRES
18462306a36Sopenharmony_ci	help
18562306a36Sopenharmony_ci	  This driver supports the MDIO interface found in the network
18662306a36Sopenharmony_ci	  interface units of the IPQ8064 SoC
18762306a36Sopenharmony_ci
18862306a36Sopenharmony_ciconfig MDIO_REGMAP
18962306a36Sopenharmony_ci	tristate
19062306a36Sopenharmony_ci	help
19162306a36Sopenharmony_ci	  This driver allows using MDIO devices that are not sitting on a
19262306a36Sopenharmony_ci	  regular MDIO bus, but still exposes the standard 802.3 register
19362306a36Sopenharmony_ci	  layout. It's regmap-based so that it can be used on integrated,
19462306a36Sopenharmony_ci	  memory-mapped PHYs, SPI PHYs and so on. A new virtual MDIO bus is
19562306a36Sopenharmony_ci	  created, and its read/write operations are mapped to the underlying
19662306a36Sopenharmony_ci	  regmap. Users willing to use this driver must explicitly select
19762306a36Sopenharmony_ci	  REGMAP.
19862306a36Sopenharmony_ci
19962306a36Sopenharmony_ciconfig MDIO_THUNDER
20062306a36Sopenharmony_ci	tristate "ThunderX SOCs MDIO buses"
20162306a36Sopenharmony_ci	depends on 64BIT
20262306a36Sopenharmony_ci	depends on PCI
20362306a36Sopenharmony_ci	select MDIO_CAVIUM
20462306a36Sopenharmony_ci	select MDIO_DEVRES
20562306a36Sopenharmony_ci	help
20662306a36Sopenharmony_ci	  This driver supports the MDIO interfaces found on Cavium
20762306a36Sopenharmony_ci	  ThunderX SoCs when the MDIO bus device appears as a PCI
20862306a36Sopenharmony_ci	  device.
20962306a36Sopenharmony_ci
21062306a36Sopenharmony_cicomment "MDIO Multiplexers"
21162306a36Sopenharmony_ci
21262306a36Sopenharmony_ciconfig MDIO_BUS_MUX
21362306a36Sopenharmony_ci	tristate
21462306a36Sopenharmony_ci	depends on OF_MDIO
21562306a36Sopenharmony_ci	help
21662306a36Sopenharmony_ci	  This module provides a driver framework for MDIO bus
21762306a36Sopenharmony_ci	  multiplexers which connect one of several child MDIO busses
21862306a36Sopenharmony_ci	  to a parent bus.  Switching between child busses is done by
21962306a36Sopenharmony_ci	  device specific drivers.
22062306a36Sopenharmony_ci
22162306a36Sopenharmony_ciconfig MDIO_BUS_MUX_MESON_G12A
22262306a36Sopenharmony_ci	tristate "Amlogic G12a based MDIO bus multiplexer"
22362306a36Sopenharmony_ci	depends on ARCH_MESON || COMPILE_TEST
22462306a36Sopenharmony_ci	depends on OF_MDIO && HAS_IOMEM && COMMON_CLK
22562306a36Sopenharmony_ci	select MDIO_BUS_MUX
22662306a36Sopenharmony_ci	default m if ARCH_MESON
22762306a36Sopenharmony_ci	help
22862306a36Sopenharmony_ci	  This module provides a driver for the MDIO multiplexer/glue of
22962306a36Sopenharmony_ci	  the amlogic g12a SoC. The multiplexers connects either the external
23062306a36Sopenharmony_ci	  or the internal MDIO bus to the parent bus.
23162306a36Sopenharmony_ci
23262306a36Sopenharmony_ciconfig MDIO_BUS_MUX_MESON_GXL
23362306a36Sopenharmony_ci	tristate "Amlogic GXL based MDIO bus multiplexer"
23462306a36Sopenharmony_ci	depends on ARCH_MESON || COMPILE_TEST
23562306a36Sopenharmony_ci	depends on OF_MDIO && HAS_IOMEM && COMMON_CLK
23662306a36Sopenharmony_ci	select MDIO_BUS_MUX
23762306a36Sopenharmony_ci	default m if ARCH_MESON
23862306a36Sopenharmony_ci	help
23962306a36Sopenharmony_ci	  This module provides a driver for the MDIO multiplexer/glue of
24062306a36Sopenharmony_ci	  the amlogic GXL SoC. The multiplexer connects either the external
24162306a36Sopenharmony_ci	  or the internal MDIO bus to the parent bus.
24262306a36Sopenharmony_ci
24362306a36Sopenharmony_ciconfig MDIO_BUS_MUX_BCM6368
24462306a36Sopenharmony_ci	tristate "Broadcom BCM6368 MDIO bus multiplexers"
24562306a36Sopenharmony_ci	depends on OF && OF_MDIO && (BMIPS_GENERIC || COMPILE_TEST)
24662306a36Sopenharmony_ci	select MDIO_BUS_MUX
24762306a36Sopenharmony_ci	default BMIPS_GENERIC
24862306a36Sopenharmony_ci	help
24962306a36Sopenharmony_ci	  This module provides a driver for MDIO bus multiplexers found in
25062306a36Sopenharmony_ci	  BCM6368 based Broadcom SoCs. This multiplexer connects one of several
25162306a36Sopenharmony_ci	  child MDIO bus to a parent bus. Buses could be internal as well as
25262306a36Sopenharmony_ci	  external and selection logic lies inside the same multiplexer.
25362306a36Sopenharmony_ci
25462306a36Sopenharmony_ciconfig MDIO_BUS_MUX_BCM_IPROC
25562306a36Sopenharmony_ci	tristate "Broadcom iProc based MDIO bus multiplexers"
25662306a36Sopenharmony_ci	depends on OF && OF_MDIO && (ARCH_BCM_IPROC || COMPILE_TEST)
25762306a36Sopenharmony_ci	select MDIO_BUS_MUX
25862306a36Sopenharmony_ci	default ARCH_BCM_IPROC
25962306a36Sopenharmony_ci	help
26062306a36Sopenharmony_ci	  This module provides a driver for MDIO bus multiplexers found in
26162306a36Sopenharmony_ci	  iProc based Broadcom SoCs. This multiplexer connects one of several
26262306a36Sopenharmony_ci	  child MDIO bus to a parent bus. Buses could be internal as well as
26362306a36Sopenharmony_ci	  external and selection logic lies inside the same multiplexer.
26462306a36Sopenharmony_ci
26562306a36Sopenharmony_ciconfig MDIO_BUS_MUX_GPIO
26662306a36Sopenharmony_ci	tristate "GPIO controlled MDIO bus multiplexers"
26762306a36Sopenharmony_ci	depends on OF_GPIO && OF_MDIO
26862306a36Sopenharmony_ci	select MDIO_BUS_MUX
26962306a36Sopenharmony_ci	help
27062306a36Sopenharmony_ci	  This module provides a driver for MDIO bus multiplexers that
27162306a36Sopenharmony_ci	  are controlled via GPIO lines.  The multiplexer connects one of
27262306a36Sopenharmony_ci	  several child MDIO busses to a parent bus.  Child bus
27362306a36Sopenharmony_ci	  selection is under the control of GPIO lines.
27462306a36Sopenharmony_ci
27562306a36Sopenharmony_ciconfig MDIO_BUS_MUX_MULTIPLEXER
27662306a36Sopenharmony_ci	tristate "MDIO bus multiplexer using kernel multiplexer subsystem"
27762306a36Sopenharmony_ci	depends on OF_MDIO
27862306a36Sopenharmony_ci	select MULTIPLEXER
27962306a36Sopenharmony_ci	select MDIO_BUS_MUX
28062306a36Sopenharmony_ci	help
28162306a36Sopenharmony_ci	  This module provides a driver for MDIO bus multiplexer
28262306a36Sopenharmony_ci	  that is controlled via the kernel multiplexer subsystem. The
28362306a36Sopenharmony_ci	  bus multiplexer connects one of several child MDIO busses to
28462306a36Sopenharmony_ci	  a parent bus.  Child bus selection is under the control of
28562306a36Sopenharmony_ci	  the kernel multiplexer subsystem.
28662306a36Sopenharmony_ci
28762306a36Sopenharmony_ciconfig MDIO_BUS_MUX_MMIOREG
28862306a36Sopenharmony_ci	tristate "MMIO device-controlled MDIO bus multiplexers"
28962306a36Sopenharmony_ci	depends on OF_MDIO && HAS_IOMEM
29062306a36Sopenharmony_ci	select MDIO_BUS_MUX
29162306a36Sopenharmony_ci	help
29262306a36Sopenharmony_ci	  This module provides a driver for MDIO bus multiplexers that
29362306a36Sopenharmony_ci	  are controlled via a simple memory-mapped device, like an FPGA.
29462306a36Sopenharmony_ci	  The multiplexer connects one of several child MDIO busses to a
29562306a36Sopenharmony_ci	  parent bus.  Child bus selection is under the control of one of
29662306a36Sopenharmony_ci	  the FPGA's registers.
29762306a36Sopenharmony_ci
29862306a36Sopenharmony_ci	  Currently, only 8/16/32 bits registers are supported.
29962306a36Sopenharmony_ci
30062306a36Sopenharmony_ci
30162306a36Sopenharmony_ciendif
30262306a36Sopenharmony_ciendif
303