zephyr/drivers/ethernet/dsa/Kconfig
Yangbo Lu f0b1cb578f net: dsa: introduce new DSA framework
The new DSA framework purpose and changes are as below.

- Aligned to Linux DSA framework which has been already mature framework
  for many years, For now in zephyr, the DSA components were splited
  as: switch, port, master(not need driver file for now), slave, and tag.
  Seperated drivers were used for maintaining and developing new
  features.

- The unified dts bindings (aligned to linux) were supported. The port
  driver would parse DTS to decide the port type (master port, slave
  port, or cpu port) to set up the switch. All the ports registered as
  standard ethernet devices. (dsa port and dsa switch tree was not
  supported.)

- How to add DSA device driver based on the framework? All the device
  driver needing to do is providing dsa_spi implementation and private
  data, and calling below initialization.

    DSA_INIT_INSTANCE(n, _dapi, data)

- For switch tag case, recv/xmit helpers in dsa_api could be used for
  taging/untagging. No modified ethernet drivers.
  For no-tag type case, ethernet driver of master port should support
  packet injection/extraction for slave ports leaving NULL recv/xmit.

The dsa_nxp_imx_netc.c driver will be the first example of the new DSA
framework.

The future work for DSA will be supporting bridge for ports. We may align
Linux to give users two options to use DSA device:

- Standalone mode: the switch ports work as regular ethernet ports.

- Bridge mode: switch mode with virtual bridge device which could be
  assigned IP address.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00

96 lines
2.4 KiB
Plaintext

# Distributed Switch Architecture [DSA] configuration options
# Copyright (c) 2020 DENX Software Engineering GmbH
# Lukasz Majewski <lukma@denx.de>
# SPDX-License-Identifier: Apache-2.0
config ETH_DSA_SUPPORT_DEPRECATED
bool
help
Set by an ethernet driver that supports DSA. This is obsolete,
and only used for legacy dsa device.
menuconfig NET_DSA
bool "Distributed Switch Architecture support"
help
Enable Distributed Switch Architecture support.
if NET_DSA
config NET_DSA_DEPRECATED
bool "Distributed Switch Architecture support for legacy device"
select DEPRECATED
depends on ETH_DSA_SUPPORT_DEPRECATED
help
This is obsolete, and only used for legacy dsa device.
config DSA_PORT_MAX_COUNT
int "DSA port max count"
default 8
help
Set DSA port max count.
config DSA_KSZ8XXX
bool
config DSA_KSZ8794
bool "Support for KSZ8794"
default y
depends on DT_HAS_MICROCHIP_KSZ8794_ENABLED
select DSA_KSZ8XXX
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_MICROCHIP_KSZ8794),spi)
help
Add support for KSZ8794 DSA device driver.
config DSA_KSZ8863
bool "Support for KSZ8863"
default y
depends on DT_HAS_MICROCHIP_KSZ8863_ENABLED
select DSA_KSZ8XXX
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_MICROCHIP_KSZ8863),spi)
help
Add support for KSZ8863 DSA device driver.
config DSA_KSZ8463
bool "Support for KSZ8463"
default y
depends on DT_HAS_MICROCHIP_KSZ8463_ENABLED
select DSA_KSZ8XXX
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_MICROCHIP_KSZ8463),spi)
help
Add support for KSZ8463 DSA device driver.
config DSA_KSZ_TAIL_TAGGING
bool "Support for tail tagging"
depends on DSA_KSZ8794 || DSA_KSZ8863 || DSA_KSZ8463
help
Add support for tail tagging on DSA device.
config DSA_TAG_SIZE
int "DSA tag size in bytes"
default 1 if DSA_KSZ8794 || DSA_KSZ8863 || DSA_KSZ8463
default 0
depends on DSA_KSZ_TAIL_TAGGING
help
Set the DSA tag length in bytes.
config DSA_KSZ_PORT_ISOLATING
bool "Support for ports isolating"
depends on DSA_KSZ8794 || DSA_KSZ8863 || DSA_KSZ8463
help
Add support for traffic isolation on DSA slave ports
config DSA_SPI
bool "Support for PHY SPI interface"
depends on SPI && (DSA_KSZ8794 || DSA_KSZ8863 || DSA_KSZ8463)
help
Use SPI bus to communicate with PHY
module = NET_DSA
module-dep = NET_LOG
module-str = Log level for DSA
module-help = Enables core DSA code to output debug messages.
source "subsys/net/Kconfig.template.log_config.net"
endif # NET_DSA