# Ethernet PHY drivers configuration options

# Copyright (c) 2021 IP-Logix Inc.
# SPDX-License-Identifier: Apache-2.0

menuconfig ETH_PHY_DRIVER
	bool "Ethernet PHY drivers"
	default y if NET_L2_ETHERNET || ETH_DRIVER

if ETH_PHY_DRIVER

module = PHY
module-dep = LOG
module-str = Log level for Ethernet PHY driver
module-help = Sets log level for Ethernet PHY Device Drivers.
source "subsys/net/Kconfig.template.log_config.net"
source "drivers/ethernet/phy/Kconfig.tja11xx"
source "drivers/ethernet/phy/Kconfig.tja1103"
source "drivers/ethernet/phy/Kconfig.dm8806"
source "drivers/ethernet/phy/Kconfig.microchip_t1s"

config PHY_INIT_PRIORITY
	int "Ethernet PHY driver init priority"
	default 70
	help
	  Ethernet PHY device driver initialization priority.
	  Do not mess with it unless you know what you are doing.
	  Note that the priority needs to be lower than the net stack
	  so that it can start before the networking sub-system.

config PHY_GENERIC_MII
	bool "Generic MII PHY Driver"
	default y
	depends on DT_HAS_ETHERNET_PHY_ENABLED
	select MDIO
	select GPIO if $(dt_compat_any_has_prop,$(DT_COMPAT_ETHERNET_PHY),reset-gpios)
	help
	  This is a generic MII PHY interface that communicates with the
	  PHY using the MDIO bus.

config PHY_GENERIC_FIXED_LINK
	bool "Generic MII PHY with Fixed Link Driver"
	default y
	depends on DT_HAS_ETHERNET_PHY_FIXED_LINK_ENABLED
	select GPIO if $(dt_compat_any_has_prop,$(DT_COMPAT_ETHERNET_PHY_FIXED_LINK),reset-gpios)
	help
	  This is a generic MII PHY with Fixed Link interface that does not
	  communicate with the PHY using the MDIO bus. Can be used as a placeholder
	  when the ethernet driver requires a PHY but there is no interface to configure
	  the PHY.

config PHY_ADIN2111
	bool "ADIN2111 PHY driver"
	default y
	depends on DT_HAS_ADI_ADIN2111_PHY_ENABLED || DT_HAS_ADI_ADIN1100_PHY_ENABLED
	select MDIO
	select GPIO if $(dt_compat_any_has_prop,$(DT_COMPAT_ADI_ADIN1100_PHY),reset-gpios)
	help
	  Enable ADIN2111 PHY driver.

config PHY_MICROCHIP_KSZ8081
	bool "Microchip KSZ8081 PHY Driver"
	default y
	depends on DT_HAS_MICROCHIP_KSZ8081_ENABLED
	select MDIO
	select GPIO if ($(dt_compat_any_has_prop,$(DT_COMPAT_MICROCHIP_KSZ8081),reset-gpios) || \
			$(dt_compat_any_has_prop,$(DT_COMPAT_MICROCHIP_KSZ8081),int-gpios))
	help
	  Enable Microchip KSZ8081 Ethernet PHY Driver

config PHY_MICROCHIP_KSZ9131
	bool "Microchip KSZ9131 PHY Driver"
	default y
	depends on DT_HAS_MICROCHIP_KSZ9131_ENABLED
	select MDIO
	select GPIO if $(dt_compat_any_has_prop,$(DT_COMPAT_MICROCHIP_KSZ9131),int-gpios)
	help
	  Enable Microchip KSZ9131 Ethernet PHY Driver

config PHY_MICROCHIP_LAN8742
	bool "Microchip LAN8742 PHY Driver"
	default y
	depends on DT_HAS_MICROCHIP_LAN8742_ENABLED
	select MDIO
	select GPIO if ($(dt_compat_any_has_prop,$(DT_COMPAT_MICROCHIP_LAN8742),reset-gpios))
	help
	  Enable Microchip LAN8742 Ethernet PHY Driver

config PHY_MICROCHIP_VSC8541
	bool "Microchip VSC8541 PHY Driver"
	default y
	depends on DT_HAS_MICROCHIP_VSC8541_ENABLED
	select MDIO
	select GPIO if ($(dt_compat_any_has_prop,$(DT_COMPAT_MICROCHIP_VSC8541),reset-gpios) || \
			$(dt_compat_any_has_prop,$(DT_COMPAT_MICROCHIP_VSC8541),int-gpios))
	help
	  Enable Microchip VSC8541 Ethernet PHY Driver

config PHY_TI_DP83825
	bool "TI DP83825 PHY Driver"
	default y
	depends on DT_HAS_TI_DP83825_ENABLED
	select MDIO
	select GPIO if ($(dt_compat_any_has_prop,$(DT_COMPAT_TI_DP83825),reset-gpios) || \
			$(dt_compat_any_has_prop,$(DT_COMPAT_TI_DP83825),int-gpios))
	help
	  Enable TI DP83825 Ethernet PHY Driver

config PHY_TI_DP83867
	bool "TI DP83867 PHY Driver"
	default y
	depends on DT_HAS_TI_DP83867_ENABLED
	select MDIO
	select GPIO if ($(dt_compat_any_has_prop,$(DT_COMPAT_TI_DP83867),reset-gpios) || \
			$(dt_compat_any_has_prop,$(DT_COMPAT_TI_DP83867),int-gpios))
	help
	  Enable TI DP83867 Ethernet PHY Driver

config PHY_REALTEK_RTL8211F
	bool "Realtek RTL8211F PHY Driver"
	default y
	depends on DT_HAS_REALTEK_RTL8211F_ENABLED
	select MDIO
	select GPIO if ($(dt_compat_any_has_prop,$(DT_COMPAT_REALTEK_RTL8211F),reset-gpios) || \
			$(dt_compat_any_has_prop,$(DT_COMPAT_REALTEK_RTL8211F),int-gpios))
	help
	  Enable Realtek RTL8211F Ethernet PHY Driver

config PHY_QUALCOMM_AR8031
	bool "Qualcomm Atheros AR8031 Ethernet PHY Driver"
	default y
	depends on DT_HAS_QCA_AR8031_ENABLED
	select MDIO
	help
	  Enable Qualcomm Atheros AR8031 Ethernet PHY Driver

config PHY_AUTONEG_TIMEOUT_MS
	int "Auto-negotiation timeout value in milliseconds"
	default 4000
	help
	  Maximum duration of auto-negotiation sequence in milliseconds
	  before the process fails

config PHY_MONITOR_PERIOD
	int "Monitor task execution period"
	default 500
	help
	  Monitor task execution period in milliseconds. The monitor task is
	  periodically executed to detect and report any changes in the
	  PHY link status to the operating system.

config PHY_OA_TC14_PLCA_LIB
	bool "Open Alliance TC14 PLCA generic lib"
	help
	  Enable Open Alliance TC14 PLCA generic lib.

config PHY_VERIFY_DEVICE_IDENTIFICATION
	bool "Verify selected phy to actual reported phy chip id"
	help
	  Verify the organizationally unique identifier that is reported
	  by the phy chip.

config PHY_MOTORCOMM_YT8521
	bool "Motorcomm YT8521 Ethernet PHY Driver"
	default y
	depends on DT_HAS_MOTORCOMM_YT8521_ENABLED
	select MDIO
	help
	  Enable Motorcomm YT8521 Ethernet PHY Driver

endif # "Ethernet PHY Drivers"
