18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ci#
38c2ecf20Sopenharmony_ci# MDIO Layer Configuration
48c2ecf20Sopenharmony_ci#
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_cimenuconfig MDIO_DEVICE
78c2ecf20Sopenharmony_ci	tristate "MDIO bus device drivers"
88c2ecf20Sopenharmony_ci	help
98c2ecf20Sopenharmony_ci	  MDIO devices and driver infrastructure code.
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciif MDIO_DEVICE
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciconfig MDIO_BUS
148c2ecf20Sopenharmony_ci	tristate
158c2ecf20Sopenharmony_ci	default m if PHYLIB=m
168c2ecf20Sopenharmony_ci	default MDIO_DEVICE
178c2ecf20Sopenharmony_ci	help
188c2ecf20Sopenharmony_ci	  This internal symbol is used for link time dependencies and it
198c2ecf20Sopenharmony_ci	  reflects whether the mdio_bus/mdio_device code is built as a
208c2ecf20Sopenharmony_ci	  loadable module or built-in.
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ciconfig OF_MDIO
238c2ecf20Sopenharmony_ci	def_tristate PHYLIB
248c2ecf20Sopenharmony_ci	depends on OF
258c2ecf20Sopenharmony_ci	depends on PHYLIB
268c2ecf20Sopenharmony_ci	select FIXED_PHY
278c2ecf20Sopenharmony_ci	help
288c2ecf20Sopenharmony_ci	  OpenFirmware MDIO bus (Ethernet PHY) accessors
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ciif MDIO_BUS
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciconfig MDIO_DEVRES
338c2ecf20Sopenharmony_ci	tristate
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciconfig MDIO_SUN4I
368c2ecf20Sopenharmony_ci	tristate "Allwinner sun4i MDIO interface support"
378c2ecf20Sopenharmony_ci	depends on ARCH_SUNXI || COMPILE_TEST
388c2ecf20Sopenharmony_ci	help
398c2ecf20Sopenharmony_ci	  This driver supports the MDIO interface found in the network
408c2ecf20Sopenharmony_ci	  interface units of the Allwinner SoC that have an EMAC (A10,
418c2ecf20Sopenharmony_ci	  A12, A10s, etc.)
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ciconfig MDIO_XGENE
448c2ecf20Sopenharmony_ci	tristate "APM X-Gene SoC MDIO bus controller"
458c2ecf20Sopenharmony_ci	depends on ARCH_XGENE || COMPILE_TEST
468c2ecf20Sopenharmony_ci	help
478c2ecf20Sopenharmony_ci	  This module provides a driver for the MDIO busses found in the
488c2ecf20Sopenharmony_ci	  APM X-Gene SoC's.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ciconfig MDIO_ASPEED
518c2ecf20Sopenharmony_ci	tristate "ASPEED MDIO bus controller"
528c2ecf20Sopenharmony_ci	depends on ARCH_ASPEED || COMPILE_TEST
538c2ecf20Sopenharmony_ci	depends on OF_MDIO && HAS_IOMEM
548c2ecf20Sopenharmony_ci	help
558c2ecf20Sopenharmony_ci	  This module provides a driver for the independent MDIO bus
568c2ecf20Sopenharmony_ci	  controllers found in the ASPEED AST2600 SoC. This is a driver for the
578c2ecf20Sopenharmony_ci	  third revision of the ASPEED MDIO register interface - the first two
588c2ecf20Sopenharmony_ci	  revisions are the "old" and "new" interfaces found in the AST2400 and
598c2ecf20Sopenharmony_ci	  AST2500, embedded in the MAC. For legacy reasons, FTGMAC100 driver
608c2ecf20Sopenharmony_ci	  continues to drive the embedded MDIO controller for the AST2400 and
618c2ecf20Sopenharmony_ci	  AST2500 SoCs, so say N if AST2600 support is not required.
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ciconfig MDIO_BITBANG
648c2ecf20Sopenharmony_ci	tristate "Bitbanged MDIO buses"
658c2ecf20Sopenharmony_ci	help
668c2ecf20Sopenharmony_ci	  This module implements the MDIO bus protocol in software,
678c2ecf20Sopenharmony_ci	  for use by low level drivers that export the ability to
688c2ecf20Sopenharmony_ci	  drive the relevant pins.
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci	  If in doubt, say N.
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ciconfig MDIO_BCM_IPROC
738c2ecf20Sopenharmony_ci	tristate "Broadcom iProc MDIO bus controller"
748c2ecf20Sopenharmony_ci	depends on ARCH_BCM_IPROC || COMPILE_TEST
758c2ecf20Sopenharmony_ci	depends on HAS_IOMEM && OF_MDIO
768c2ecf20Sopenharmony_ci	default ARCH_BCM_IPROC
778c2ecf20Sopenharmony_ci	help
788c2ecf20Sopenharmony_ci	  This module provides a driver for the MDIO busses found in the
798c2ecf20Sopenharmony_ci	  Broadcom iProc SoC's.
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ciconfig MDIO_BCM_UNIMAC
828c2ecf20Sopenharmony_ci	tristate "Broadcom UniMAC MDIO bus controller"
838c2ecf20Sopenharmony_ci	depends on HAS_IOMEM
848c2ecf20Sopenharmony_ci	help
858c2ecf20Sopenharmony_ci	  This module provides a driver for the Broadcom UniMAC MDIO busses.
868c2ecf20Sopenharmony_ci	  This hardware can be found in the Broadcom GENET Ethernet MAC
878c2ecf20Sopenharmony_ci	  controllers as well as some Broadcom Ethernet switches such as the
888c2ecf20Sopenharmony_ci	  Starfighter 2 switches.
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ciconfig MDIO_CAVIUM
918c2ecf20Sopenharmony_ci	tristate
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ciconfig MDIO_GPIO
948c2ecf20Sopenharmony_ci	tristate "GPIO lib-based bitbanged MDIO buses"
958c2ecf20Sopenharmony_ci	depends on MDIO_BITBANG
968c2ecf20Sopenharmony_ci	depends on GPIOLIB || COMPILE_TEST
978c2ecf20Sopenharmony_ci	help
988c2ecf20Sopenharmony_ci	  Supports GPIO lib-based MDIO busses.
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ci	  To compile this driver as a module, choose M here: the module
1018c2ecf20Sopenharmony_ci	  will be called mdio-gpio.
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ciconfig MDIO_HISI_FEMAC
1048c2ecf20Sopenharmony_ci	tristate "Hisilicon FEMAC MDIO bus controller"
1058c2ecf20Sopenharmony_ci	depends on HAS_IOMEM && OF_MDIO
1068c2ecf20Sopenharmony_ci	help
1078c2ecf20Sopenharmony_ci	  This module provides a driver for the MDIO busses found in the
1088c2ecf20Sopenharmony_ci	  Hisilicon SoC that have an Fast Ethernet MAC.
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ciconfig MDIO_I2C
1118c2ecf20Sopenharmony_ci	tristate
1128c2ecf20Sopenharmony_ci	depends on I2C
1138c2ecf20Sopenharmony_ci	help
1148c2ecf20Sopenharmony_ci	  Support I2C based PHYs.  This provides a MDIO bus bridged
1158c2ecf20Sopenharmony_ci	  to I2C to allow PHYs connected in I2C mode to be accessed
1168c2ecf20Sopenharmony_ci	  using the existing infrastructure.
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ci	  This is library mode.
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ciconfig MDIO_MVUSB
1218c2ecf20Sopenharmony_ci	tristate "Marvell USB to MDIO Adapter"
1228c2ecf20Sopenharmony_ci	depends on USB
1238c2ecf20Sopenharmony_ci	select MDIO_DEVRES
1248c2ecf20Sopenharmony_ci	help
1258c2ecf20Sopenharmony_ci	  A USB to MDIO converter present on development boards for
1268c2ecf20Sopenharmony_ci	  Marvell's Link Street family of Ethernet switches.
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ciconfig MDIO_MSCC_MIIM
1298c2ecf20Sopenharmony_ci	tristate "Microsemi MIIM interface support"
1308c2ecf20Sopenharmony_ci	depends on HAS_IOMEM
1318c2ecf20Sopenharmony_ci	select MDIO_DEVRES
1328c2ecf20Sopenharmony_ci	help
1338c2ecf20Sopenharmony_ci	  This driver supports the MIIM (MDIO) interface found in the network
1348c2ecf20Sopenharmony_ci	  switches of the Microsemi SoCs; it is recommended to switch on
1358c2ecf20Sopenharmony_ci	  CONFIG_HIGH_RES_TIMERS
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ciconfig MDIO_MOXART
1388c2ecf20Sopenharmony_ci	tristate "MOXA ART MDIO interface support"
1398c2ecf20Sopenharmony_ci	depends on ARCH_MOXART || COMPILE_TEST
1408c2ecf20Sopenharmony_ci	help
1418c2ecf20Sopenharmony_ci	  This driver supports the MDIO interface found in the network
1428c2ecf20Sopenharmony_ci	  interface units of the MOXA ART SoC
1438c2ecf20Sopenharmony_ci
1448c2ecf20Sopenharmony_ciconfig MDIO_OCTEON
1458c2ecf20Sopenharmony_ci	tristate "Octeon and some ThunderX SOCs MDIO buses"
1468c2ecf20Sopenharmony_ci	depends on (64BIT && OF_MDIO) || COMPILE_TEST
1478c2ecf20Sopenharmony_ci	depends on HAS_IOMEM
1488c2ecf20Sopenharmony_ci	select MDIO_CAVIUM
1498c2ecf20Sopenharmony_ci	select MDIO_DEVRES
1508c2ecf20Sopenharmony_ci	help
1518c2ecf20Sopenharmony_ci	  This module provides a driver for the Octeon and ThunderX MDIO
1528c2ecf20Sopenharmony_ci	  buses. It is required by the Octeon and ThunderX ethernet device
1538c2ecf20Sopenharmony_ci	  drivers on some systems.
1548c2ecf20Sopenharmony_ci
1558c2ecf20Sopenharmony_ciconfig MDIO_IPQ4019
1568c2ecf20Sopenharmony_ci	tristate "Qualcomm IPQ4019 MDIO interface support"
1578c2ecf20Sopenharmony_ci	depends on HAS_IOMEM && OF_MDIO
1588c2ecf20Sopenharmony_ci	help
1598c2ecf20Sopenharmony_ci	  This driver supports the MDIO interface found in Qualcomm
1608c2ecf20Sopenharmony_ci	  IPQ40xx series Soc-s.
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_ciconfig MDIO_IPQ8064
1638c2ecf20Sopenharmony_ci	tristate "Qualcomm IPQ8064 MDIO interface support"
1648c2ecf20Sopenharmony_ci	depends on HAS_IOMEM && OF_MDIO
1658c2ecf20Sopenharmony_ci	depends on MFD_SYSCON
1668c2ecf20Sopenharmony_ci	help
1678c2ecf20Sopenharmony_ci	  This driver supports the MDIO interface found in the network
1688c2ecf20Sopenharmony_ci	  interface units of the IPQ8064 SoC
1698c2ecf20Sopenharmony_ci
1708c2ecf20Sopenharmony_ciconfig MDIO_THUNDER
1718c2ecf20Sopenharmony_ci	tristate "ThunderX SOCs MDIO buses"
1728c2ecf20Sopenharmony_ci	depends on 64BIT
1738c2ecf20Sopenharmony_ci	depends on PCI
1748c2ecf20Sopenharmony_ci	select MDIO_CAVIUM
1758c2ecf20Sopenharmony_ci	select MDIO_DEVRES
1768c2ecf20Sopenharmony_ci	help
1778c2ecf20Sopenharmony_ci	  This driver supports the MDIO interfaces found on Cavium
1788c2ecf20Sopenharmony_ci	  ThunderX SoCs when the MDIO bus device appears as a PCI
1798c2ecf20Sopenharmony_ci	  device.
1808c2ecf20Sopenharmony_ci
1818c2ecf20Sopenharmony_cicomment "MDIO Multiplexers"
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ciconfig MDIO_BUS_MUX
1848c2ecf20Sopenharmony_ci	tristate
1858c2ecf20Sopenharmony_ci	depends on OF_MDIO
1868c2ecf20Sopenharmony_ci	help
1878c2ecf20Sopenharmony_ci	  This module provides a driver framework for MDIO bus
1888c2ecf20Sopenharmony_ci	  multiplexers which connect one of several child MDIO busses
1898c2ecf20Sopenharmony_ci	  to a parent bus.  Switching between child busses is done by
1908c2ecf20Sopenharmony_ci	  device specific drivers.
1918c2ecf20Sopenharmony_ci
1928c2ecf20Sopenharmony_ciconfig MDIO_BUS_MUX_MESON_G12A
1938c2ecf20Sopenharmony_ci	tristate "Amlogic G12a based MDIO bus multiplexer"
1948c2ecf20Sopenharmony_ci	depends on ARCH_MESON || COMPILE_TEST
1958c2ecf20Sopenharmony_ci	depends on OF_MDIO && HAS_IOMEM && COMMON_CLK
1968c2ecf20Sopenharmony_ci	select MDIO_BUS_MUX
1978c2ecf20Sopenharmony_ci	default m if ARCH_MESON
1988c2ecf20Sopenharmony_ci	help
1998c2ecf20Sopenharmony_ci	  This module provides a driver for the MDIO multiplexer/glue of
2008c2ecf20Sopenharmony_ci	  the amlogic g12a SoC. The multiplexers connects either the external
2018c2ecf20Sopenharmony_ci	  or the internal MDIO bus to the parent bus.
2028c2ecf20Sopenharmony_ci
2038c2ecf20Sopenharmony_ciconfig MDIO_BUS_MUX_BCM_IPROC
2048c2ecf20Sopenharmony_ci	tristate "Broadcom iProc based MDIO bus multiplexers"
2058c2ecf20Sopenharmony_ci	depends on OF && OF_MDIO && (ARCH_BCM_IPROC || COMPILE_TEST)
2068c2ecf20Sopenharmony_ci	select MDIO_BUS_MUX
2078c2ecf20Sopenharmony_ci	default ARCH_BCM_IPROC
2088c2ecf20Sopenharmony_ci	help
2098c2ecf20Sopenharmony_ci	  This module provides a driver for MDIO bus multiplexers found in
2108c2ecf20Sopenharmony_ci	  iProc based Broadcom SoCs. This multiplexer connects one of several
2118c2ecf20Sopenharmony_ci	  child MDIO bus to a parent bus. Buses could be internal as well as
2128c2ecf20Sopenharmony_ci	  external and selection logic lies inside the same multiplexer.
2138c2ecf20Sopenharmony_ci
2148c2ecf20Sopenharmony_ciconfig MDIO_BUS_MUX_GPIO
2158c2ecf20Sopenharmony_ci	tristate "GPIO controlled MDIO bus multiplexers"
2168c2ecf20Sopenharmony_ci	depends on OF_GPIO && OF_MDIO
2178c2ecf20Sopenharmony_ci	select MDIO_BUS_MUX
2188c2ecf20Sopenharmony_ci	help
2198c2ecf20Sopenharmony_ci	  This module provides a driver for MDIO bus multiplexers that
2208c2ecf20Sopenharmony_ci	  are controlled via GPIO lines.  The multiplexer connects one of
2218c2ecf20Sopenharmony_ci	  several child MDIO busses to a parent bus.  Child bus
2228c2ecf20Sopenharmony_ci	  selection is under the control of GPIO lines.
2238c2ecf20Sopenharmony_ci
2248c2ecf20Sopenharmony_ciconfig MDIO_BUS_MUX_MULTIPLEXER
2258c2ecf20Sopenharmony_ci	tristate "MDIO bus multiplexer using kernel multiplexer subsystem"
2268c2ecf20Sopenharmony_ci	depends on OF_MDIO
2278c2ecf20Sopenharmony_ci	select MULTIPLEXER
2288c2ecf20Sopenharmony_ci	select MDIO_BUS_MUX
2298c2ecf20Sopenharmony_ci	help
2308c2ecf20Sopenharmony_ci	  This module provides a driver for MDIO bus multiplexer
2318c2ecf20Sopenharmony_ci	  that is controlled via the kernel multiplexer subsystem. The
2328c2ecf20Sopenharmony_ci	  bus multiplexer connects one of several child MDIO busses to
2338c2ecf20Sopenharmony_ci	  a parent bus.  Child bus selection is under the control of
2348c2ecf20Sopenharmony_ci	  the kernel multiplexer subsystem.
2358c2ecf20Sopenharmony_ci
2368c2ecf20Sopenharmony_ciconfig MDIO_BUS_MUX_MMIOREG
2378c2ecf20Sopenharmony_ci	tristate "MMIO device-controlled MDIO bus multiplexers"
2388c2ecf20Sopenharmony_ci	depends on OF_MDIO && HAS_IOMEM
2398c2ecf20Sopenharmony_ci	select MDIO_BUS_MUX
2408c2ecf20Sopenharmony_ci	help
2418c2ecf20Sopenharmony_ci	  This module provides a driver for MDIO bus multiplexers that
2428c2ecf20Sopenharmony_ci	  are controlled via a simple memory-mapped device, like an FPGA.
2438c2ecf20Sopenharmony_ci	  The multiplexer connects one of several child MDIO busses to a
2448c2ecf20Sopenharmony_ci	  parent bus.  Child bus selection is under the control of one of
2458c2ecf20Sopenharmony_ci	  the FPGA's registers.
2468c2ecf20Sopenharmony_ci
2478c2ecf20Sopenharmony_ci	  Currently, only 8/16/32 bits registers are supported.
2488c2ecf20Sopenharmony_ci
2498c2ecf20Sopenharmony_ci
2508c2ecf20Sopenharmony_ciendif
2518c2ecf20Sopenharmony_ciendif
252