2019-05-19 13:07:45 +01:00
# SPDX-License-Identifier: GPL-2.0-only
2011-06-14 12:56:50 -07:00
#
# TI device configuration
#
config NET_VENDOR_TI
bool "Texas Instruments (TI) devices"
2011-08-23 01:29:52 -07:00
default y
2020-03-24 00:52:49 +02:00
depends on PCI || EISA || AR7 || ARCH_DAVINCI || ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3
2011-06-14 12:56:50 -07:00
---help---
2015-06-21 16:28:02 -04:00
If you have a network (Ethernet) card belonging to this class, say Y.
2011-06-14 12:56:50 -07:00
Note that the answer to this question doesn't directly affect the
kernel: saying N will just cause the configurator to skip all
the questions about TI devices. If you say Y, you will be asked for
your specific card in the following questions.
if NET_VENDOR_TI
config TI_DAVINCI_EMAC
tristate "TI DaVinci EMAC Support"
2018-05-17 13:07:43 -07:00
depends on ARM && ( ARCH_DAVINCI || ARCH_OMAP3 ) || COMPILE_TEST
2011-06-14 12:56:50 -07:00
select TI_DAVINCI_MDIO
select PHYLIB
2019-11-12 14:33:58 +08:00
select GENERIC_ALLOCATOR
2011-06-14 12:56:50 -07:00
---help---
This driver supports TI's DaVinci Ethernet .
To compile this driver as a module, choose M here: the module
will be called davinci_emac_driver. This is recommended.
config TI_DAVINCI_MDIO
tristate "TI DaVinci MDIO Support"
2020-03-24 00:52:49 +02:00
depends on ARCH_DAVINCI || ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
2011-06-14 12:56:50 -07:00
select PHYLIB
---help---
This driver supports TI's DaVinci MDIO module.
To compile this driver as a module, choose M here: the module
will be called davinci_mdio. This is recommended.
2013-09-21 00:50:39 +05:30
config TI_CPSW_PHY_SEL
2019-02-20 17:25:19 +02:00
bool "TI CPSW Phy mode Selection (DEPRECATED)"
default n
2013-09-21 00:50:39 +05:30
---help---
This driver supports configuring of the phy mode connected to
2019-02-20 17:25:19 +02:00
the CPSW. DEPRECATED: use PHY_TI_GMII_SEL.
2013-09-21 00:50:39 +05:30
2012-03-18 20:17:54 +00:00
config TI_CPSW
tristate "TI CPSW Switch Support"
2018-05-17 13:07:43 -07:00
depends on ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST
2012-03-18 20:17:54 +00:00
select TI_DAVINCI_MDIO
2014-09-29 08:53:17 +02:00
select MFD_SYSCON
net: ethernet: ti: cpsw: add XDP support
Add XDP support based on rx page_pool allocator, one frame per page.
Page pool allocator is used with assumption that only one rx_handler
is running simultaneously. DMA map/unmap is reused from page pool
despite there is no need to map whole page.
Due to specific of cpsw, the same TX/RX handler can be used by 2
network devices, so special fields in buffer are added to identify
an interface the frame is destined to. Thus XDP works for both
interfaces, that allows to test xdp redirect between two interfaces
easily. Also, each rx queue have own page pools, but common for both
netdevs.
XDP prog is common for all channels till appropriate changes are added
in XDP infrastructure. Also, once page_pool recycling becomes part of
skb netstack some simplifications can be added, like removing
page_pool_release_page() before skb receive.
In order to keep rx_dev while redirect, that can be somehow used in
future, do flush in rx_handler, that allows to keep rx dev the same
while redirect. It allows to conform with tracing rx_dev pointed
by Jesper.
Also, there is probability, that XDP generic code can be extended to
support multi ndev drivers like this one, using same rx queue for
several ndevs, based on switchdev for instance or else. In this case,
driver can be modified like exposed here:
https://lkml.org/lkml/2019/7/3/243
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-07-09 00:34:32 +03:00
select PAGE_POOL
2014-09-29 08:53:17 +02:00
select REGMAP
2020-03-24 00:52:44 +02:00
imply PHY_TI_GMII_SEL
2012-03-18 20:17:54 +00:00
---help---
This driver supports TI's CPSW Ethernet Switch.
To compile this driver as a module, choose M here: the module
will be called cpsw.
2019-11-20 00:19:19 +02:00
config TI_CPSW_SWITCHDEV
tristate "TI CPSW Switch Support with switchdev"
depends on ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST
2019-12-04 19:45:32 +02:00
depends on NET_SWITCHDEV
2019-12-11 13:56:09 +01:00
select PAGE_POOL
2019-11-20 00:19:19 +02:00
select TI_DAVINCI_MDIO
select MFD_SYSCON
select REGMAP
select NET_DEVLINK
imply PHY_TI_GMII_SEL
help
This driver supports TI's CPSW Ethernet Switch.
To compile this driver as a module, choose M here: the module
will be called cpsw_new.
2012-10-29 08:45:16 +00:00
config TI_CPTS
2017-03-20 09:52:50 +01:00
bool "TI Common Platform Time Sync (CPTS) Support"
2019-11-20 00:19:19 +02:00
depends on TI_CPSW || TI_KEYSTONE_NETCP || TI_CPSW_SWITCHDEV || COMPILE_TEST
2019-06-11 14:16:32 +03:00
depends on COMMON_CLK
2017-04-28 17:03:58 +02:00
depends on POSIX_TIMERS
2012-10-29 08:45:16 +00:00
---help---
This driver supports the Common Platform Time Sync unit of
2016-12-08 16:21:56 -06:00
the CPSW Ethernet Switch and Keystone 2 1g/10g Switch Subsystem.
The unit can time stamp PTP UDP/IPv4 and Layer 2 packets, and the
driver offers a PTP Hardware Clock.
2012-10-29 08:45:16 +00:00
2017-03-20 09:52:50 +01:00
config TI_CPTS_MOD
tristate
depends on TI_CPTS
net: Make PTP-specific drivers depend on PTP_1588_CLOCK
Commit d1cbfd771ce8 ("ptp_clock: Allow for it to be optional") changed
all PTP-capable Ethernet drivers from `select PTP_1588_CLOCK` to `imply
PTP_1588_CLOCK`, "in order to break the hard dependency between the PTP
clock subsystem and ethernet drivers capable of being clock providers."
As a result it is possible to build PTP-capable Ethernet drivers without
the PTP subsystem by deselecting PTP_1588_CLOCK. Drivers are required to
handle the missing dependency gracefully.
Some PTP-capable Ethernet drivers (e.g., TI_CPSW) factor their PTP code
out into separate drivers (e.g., TI_CPTS_MOD). The above commit also
changed these PTP-specific drivers to `imply PTP_1588_CLOCK`, making it
possible to build them without the PTP subsystem. But as Grygorii
Strashko noted in [1]:
On Wed, Apr 22, 2020 at 02:16:11PM +0300, Grygorii Strashko wrote:
> Another question is that CPTS completely nonfunctional in this case and
> it was never expected that somebody will even try to use/run such
> configuration (except for random build purposes).
In my view, enabling a PTP-specific driver without the PTP subsystem is
a configuration error made possible by the above commit. Kconfig should
not allow users to create a configuration with missing dependencies that
results in "completely nonfunctional" drivers.
I audited all network drivers that call ptp_clock_register() but merely
`imply PTP_1588_CLOCK` and found five PTP-specific drivers that are
likely nonfunctional without PTP_1588_CLOCK:
NET_DSA_MV88E6XXX_PTP
NET_DSA_SJA1105_PTP
MACB_USE_HWSTAMP
CAVIUM_PTP
TI_CPTS_MOD
Note how these symbols all reference PTP or timestamping in their name;
this is a clue that they depend on PTP_1588_CLOCK.
Change them from `imply PTP_1588_CLOCK` [2] to `depends on PTP_1588_CLOCK`.
I'm not using `select PTP_1588_CLOCK` here because PTP_1588_CLOCK has
its own dependencies, which `select` would not transitively apply.
Additionally, remove the `select NET_PTP_CLASSIFY` from CPTS_TI_MOD;
PTP_1588_CLOCK already selects that.
[1]: https://lore.kernel.org/lkml/c04458ed-29ee-1797-3a11-7f3f560553e6@ti.com/
[2]: NET_DSA_SJA1105_PTP had never declared any type of dependency on
PTP_1588_CLOCK (`imply` or otherwise); adding a `depends on PTP_1588_CLOCK`
here seems appropriate.
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: d1cbfd771ce8 ("ptp_clock: Allow for it to be optional")
Signed-off-by: Clay McClure <clay@daemons.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-29 00:59:00 -07:00
depends on PTP_1588_CLOCK
2019-11-20 00:19:19 +02:00
default y if TI_CPSW=y || TI_KEYSTONE_NETCP=y || TI_CPSW_SWITCHDEV=y
2017-03-20 09:52:50 +01:00
default m
2020-03-24 00:52:49 +02:00
config TI_K3_AM65_CPSW_NUSS
tristate "TI K3 AM654x/J721E CPSW Ethernet driver"
depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER
select TI_DAVINCI_MDIO
imply PHY_TI_GMII_SEL
2020-05-05 19:21:23 +03:00
depends on TI_K3_AM65_CPTS || !TI_K3_AM65_CPTS
2020-03-24 00:52:49 +02:00
help
This driver supports TI K3 AM654/J721E CPSW2G Ethernet SubSystem.
The two-port Gigabit Ethernet MAC (MCU_CPSW0) subsystem provides
Ethernet packet communication for the device: One Ethernet port
(port 1) with selectable RGMII and RMII interfaces and an internal
Communications Port Programming Interface (CPPI) port (port 0).
To compile this driver as a module, choose M here: the module
will be called ti-am65-cpsw-nuss.
2020-05-01 23:50:06 +03:00
config TI_K3_AM65_CPTS
tristate "TI K3 AM65x CPTS"
2020-05-05 19:21:23 +03:00
depends on ARCH_K3 && OF
2020-05-01 23:50:06 +03:00
depends on PTP_1588_CLOCK
help
Say y here to support the TI K3 AM65x CPTS with 1588 features such as
PTP hardware clock for each CPTS device and network packets
timestamping where applicable.
Depending on integration CPTS blocks enable compliance with
the IEEE 1588-2008 standard for a precision clock synchronization
protocol, Ethernet Enhanced Scheduled Traffic Operations (CPTS_ESTFn)
and PCIe Subsystem Precision Time Measurement (PTM).
2015-01-15 19:12:50 -05:00
config TI_KEYSTONE_NETCP
2015-01-29 18:15:51 -05:00
tristate "TI Keystone NETCP Core Support"
2015-03-20 16:11:23 -04:00
select TI_DAVINCI_MDIO
2015-01-15 19:12:50 -05:00
depends on OF
depends on KEYSTONE_NAVIGATOR_DMA && KEYSTONE_NAVIGATOR_QMSS
---help---
2015-01-29 18:15:51 -05:00
This driver supports TI's Keystone NETCP Core.
2015-01-15 19:12:50 -05:00
To compile this driver as a module, choose M here: the module
will be called keystone_netcp.
2015-01-29 18:15:51 -05:00
config TI_KEYSTONE_NETCP_ETHSS
depends on TI_KEYSTONE_NETCP
tristate "TI Keystone NETCP Ethernet subsystem Support"
---help---
To compile this driver as a module, choose M here: the module
will be called keystone_netcp_ethss.
2011-06-14 12:56:50 -07:00
config TLAN
tristate "TI ThunderLAN support"
depends on (PCI || EISA)
---help---
If you have a PCI Ethernet network card based on the ThunderLAN chip
2015-06-21 16:28:02 -04:00
which is supported by this driver, say Y here.
2011-06-14 12:56:50 -07:00
Devices currently supported by this driver are Compaq Netelligent,
Compaq NetFlex and Olicom cards. Please read the file
2020-05-01 16:44:56 +02:00
<file:Documentation/networking/device_drivers/ti/tlan.rst>
2018-12-03 17:43:28 -08:00
for more details.
2011-06-14 12:56:50 -07:00
To compile this driver as a module, choose M here. The module
will be called tlan.
Please email feedback to <torben.mathiasen@compaq.com>.
config CPMAC
2012-10-02 11:18:24 -07:00
tristate "TI AR7 CPMAC Ethernet support"
depends on AR7
2011-06-14 12:56:50 -07:00
select PHYLIB
---help---
TI AR7 CPMAC Ethernet support
endif # NET_VENDOR_TI