Skip to content

Commit ed3525e

Browse files
apalosdavem330
authored andcommitted
net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac
Part 1: Introduce basic CPSW dual_mac driver (cpsw_new.c) which is operating in dual-emac mode by default, thus working as 2 individual network interfaces. Main differences from legacy CPSW driver are: - optimized promiscuous mode: The P0_UNI_FLOOD (both ports) is enabled in addition to ALLMULTI (current port) instead of ALE_BYPASS. So, Ports in promiscuous mode will keep possibility of mcast and vlan filtering, which is provides significant benefits when ports are joined to the same bridge, but without enabling "switch" mode, or to different bridges. - learning disabled on ports as it make not too much sense for segregated ports - no forwarding in HW. - enabled basic support for devlink. devlink dev show platform/48484000.switch devlink dev param show platform/48484000.switch: name ale_bypass type driver-specific values: cmode runtime value false - "ale_bypass" devlink driver parameter allows to enable ALE_CONTROL(4).BYPASS mode for debug purposes. - updated DT bindings. Signed-off-by: Ilias Apalodimas <[email protected]> Signed-off-by: Murali Karicheri <[email protected]> Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ef63fe7 commit ed3525e

File tree

5 files changed

+1710
-5
lines changed

5 files changed

+1710
-5
lines changed

drivers/net/ethernet/ti/Kconfig

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,24 @@ config TI_CPSW
5959
To compile this driver as a module, choose M here: the module
6060
will be called cpsw.
6161

62+
config TI_CPSW_SWITCHDEV
63+
tristate "TI CPSW Switch Support with switchdev"
64+
depends on ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST
65+
select NET_SWITCHDEV
66+
select TI_DAVINCI_MDIO
67+
select MFD_SYSCON
68+
select REGMAP
69+
select NET_DEVLINK
70+
imply PHY_TI_GMII_SEL
71+
help
72+
This driver supports TI's CPSW Ethernet Switch.
73+
74+
To compile this driver as a module, choose M here: the module
75+
will be called cpsw_new.
76+
6277
config TI_CPTS
6378
bool "TI Common Platform Time Sync (CPTS) Support"
64-
depends on TI_CPSW || TI_KEYSTONE_NETCP || COMPILE_TEST
79+
depends on TI_CPSW || TI_KEYSTONE_NETCP || TI_CPSW_SWITCHDEV || COMPILE_TEST
6580
depends on COMMON_CLK
6681
depends on POSIX_TIMERS
6782
---help---
@@ -73,7 +88,7 @@ config TI_CPTS
7388
config TI_CPTS_MOD
7489
tristate
7590
depends on TI_CPTS
76-
default y if TI_CPSW=y || TI_KEYSTONE_NETCP=y
91+
default y if TI_CPSW=y || TI_KEYSTONE_NETCP=y || TI_CPSW_SWITCHDEV=y
7792
select NET_PTP_CLASSIFY
7893
imply PTP_1588_CLOCK
7994
default m

drivers/net/ethernet/ti/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ obj-$(CONFIG_TI_CPSW_PHY_SEL) += cpsw-phy-sel.o
1515
obj-$(CONFIG_TI_CPTS_MOD) += cpts.o
1616
obj-$(CONFIG_TI_CPSW) += ti_cpsw.o
1717
ti_cpsw-y := cpsw.o davinci_cpdma.o cpsw_ale.o cpsw_priv.o cpsw_sl.o cpsw_ethtool.o
18+
obj-$(CONFIG_TI_CPSW_SWITCHDEV) += ti_cpsw_new.o
19+
ti_cpsw_new-y := cpsw_new.o davinci_cpdma.o cpsw_ale.o cpsw_sl.o cpsw_priv.o cpsw_ethtool.o
1820

1921
obj-$(CONFIG_TI_KEYSTONE_NETCP) += keystone_netcp.o
2022
keystone_netcp-y := netcp_core.o cpsw_ale.o

0 commit comments

Comments
 (0)