# Distributed Switch Architecture [DSA] device configuration options

# Copyright (c) 2020 DENX Software Engineering GmbH
#               Lukasz Majewski <lukma@denx.de>
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

menuconfig DSA_DRIVERS
	bool "Distributed Switch Architecture device drivers"
	default y if NET_DSA
	help
	  Enable Distributed Switch Architecture support.

if DSA_DRIVERS

config DSA_NXP_IMX_NETC
	bool "Support for NXP i.MX NETC"
	default y
	depends on DT_HAS_NXP_NETC_SWITCH_ENABLED
	select NET_PKT_CONTROL_BLOCK if NET_L2_PTP && PTP_CLOCK_NXP_NETC
	help
	  Add support for NXP i.MX NETC DSA device driver.

config DSA_NXP_IMX_NETC_GCL_LEN
	int "Gate control list length for i.MX NETC switch"
	default 64
	range 1 256
	depends on DSA_NXP_IMX_NETC && NET_QBV
	help
	  Amount of Gate control list to use. Small value saves RAM.
	  The Max of the value can be 64, 128, or 256.

# DSA tag protocol drivers
#   Tag protocol ID found in <zephyr/dt-bindings/ethernet/dsa_tag_proto.h>

DSA_PORT_COMPAT := zephyr,dsa-port

config DSA_TAG_PROTOCOL_NETC
	bool "Tag protocol - NETC"
	default y
	select NET_PKT_CONTROL_BLOCK
	depends on $(dt_compat_any_has_prop,$(DSA_PORT_COMPAT),dsa-tag-protocol,1)
	help
	  NXP NETC tag protocol.

endif # DSA_DRIVERS
