]> git.baikalelectronics.ru Git - kernel.git/commit
net: ti: am65-cpsw-nuss: Add devlink support
authorVignesh Raghavendra <vigneshr@ti.com>
Thu, 11 Feb 2021 10:56:41 +0000 (16:26 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Feb 2021 01:52:13 +0000 (17:52 -0800)
commit2fcdb11e8dc6f5220612291e5c7f6778f4227fa4
tree0c7d78fc8491652d9b5c6afc19b25a9eb95de246
parent517e2546a36e5eada2a9272250c3486935e320bf
net: ti: am65-cpsw-nuss: Add devlink support

AM65 NUSS ethernet switch on K3 devices can be configured to work either
in independent mac mode where each port acts as independent network
interface (multi mac) or switch mode.

Add devlink hooks to provide a way to switch b/w these modes.

Rationale to use devlink instead of defaulting to bridge mode is that
SoC use cases require to support multiple independent MAC ports with no
switching so that users can use software bridges with multi-mac
configuration (e.g: to support LAG, HSR/PRP, etc). Also, switching
between multi mac and switch mode requires significant Port and ALE
reconfiguration, therefore is easier to be made as part of mode change
devlink hooks. It also allows to keep user interface similar to what
was implemented for the previous generation of TI CPSW IP
(on AM33/AM43/AM57 SoCs).

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/devlink/am65-nuss-cpsw-switch.rst [new file with mode: 0644]
Documentation/networking/devlink/index.rst
drivers/net/ethernet/ti/Kconfig
drivers/net/ethernet/ti/am65-cpsw-nuss.c
drivers/net/ethernet/ti/am65-cpsw-nuss.h