xref: /openbmc/linux/drivers/net/can/Kconfig (revision 0c7e1151)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
26a528644SVincent Mailhol
36a528644SVincent Mailholmenuconfig CAN_DEV
46a528644SVincent Mailhol	tristate "CAN Device Drivers"
56a528644SVincent Mailhol	default y
66a528644SVincent Mailhol	help
76a528644SVincent Mailhol	  Controller Area Network (CAN) is serial communications protocol up to
86a528644SVincent Mailhol	  1Mbit/s for its original release (now known as Classical CAN) and up
96a528644SVincent Mailhol	  to 8Mbit/s for the more recent CAN with Flexible Data-Rate
106a528644SVincent Mailhol	  (CAN-FD). The CAN bus was originally mainly for automotive, but is now
116a528644SVincent Mailhol	  widely used in marine (NMEA2000), industrial, and medical
126a528644SVincent Mailhol	  applications. More information on the CAN network protocol family
136a528644SVincent Mailhol	  PF_CAN is contained in <Documentation/networking/can.rst>.
146a528644SVincent Mailhol
156a528644SVincent Mailhol	  This section contains all the CAN(-FD) device drivers including the
166a528644SVincent Mailhol	  virtual ones. If you own such devices or plan to use the virtual CAN
176a528644SVincent Mailhol	  interfaces to develop applications, say Y here.
186a528644SVincent Mailhol
196a528644SVincent Mailhol	  To compile as a module, choose M here: the module will be called
206a528644SVincent Mailhol	  can-dev.
216a528644SVincent Mailhol
226a528644SVincent Mailholif CAN_DEV
23ccb29637SOliver Hartkopp
24ccb29637SOliver Hartkoppconfig CAN_VCAN
25ccb29637SOliver Hartkopp	tristate "Virtual Local CAN Interface (vcan)"
26a7f7f624SMasahiro Yamada	help
27ccb29637SOliver Hartkopp	  Similar to the network loopback devices, vcan offers a
28ccb29637SOliver Hartkopp	  virtual local CAN interface.
29ccb29637SOliver Hartkopp
30ccb29637SOliver Hartkopp	  This driver can also be built as a module.  If so, the module
31ccb29637SOliver Hartkopp	  will be called vcan.
32ccb29637SOliver Hartkopp
33a8f820a3SOliver Hartkoppconfig CAN_VXCAN
34a8f820a3SOliver Hartkopp	tristate "Virtual CAN Tunnel (vxcan)"
35a7f7f624SMasahiro Yamada	help
36a8f820a3SOliver Hartkopp	  Similar to the virtual ethernet driver veth, vxcan implements a
37a8f820a3SOliver Hartkopp	  local CAN traffic tunnel between two virtual CAN network devices.
38a8f820a3SOliver Hartkopp	  When creating a vxcan, two vxcan devices are created as pair.
39a8f820a3SOliver Hartkopp	  When one end receives the packet it appears on its pair and vice
40a8f820a3SOliver Hartkopp	  versa. The vxcan can be used for cross namespace communication.
41a8f820a3SOliver Hartkopp
42a8f820a3SOliver Hartkopp	  In opposite to vcan loopback devices the vxcan only forwards CAN
43a8f820a3SOliver Hartkopp	  frames to its pair and does *not* provide a local echo of sent
44a8f820a3SOliver Hartkopp	  CAN frames. To disable a potential echo in af_can.c the vxcan driver
45a8f820a3SOliver Hartkopp	  announces IFF_ECHO in the interface flags. To have a clean start
46a8f820a3SOliver Hartkopp	  in each namespace the CAN GW hop counter is set to zero.
47a8f820a3SOliver Hartkopp
48a8f820a3SOliver Hartkopp	  This driver can also be built as a module.  If so, the module
49a8f820a3SOliver Hartkopp	  will be called vxcan.
50a8f820a3SOliver Hartkopp
51a1044e36SOliver Hartkoppconfig CAN_SLCAN
52a1044e36SOliver Hartkopp	tristate "Serial / USB serial CAN Adaptors (slcan)"
5321eaab6dSLinus Torvalds	depends on TTY
54a7f7f624SMasahiro Yamada	help
55a1044e36SOliver Hartkopp	  CAN driver for several 'low cost' CAN interfaces that are attached
56a1044e36SOliver Hartkopp	  via serial lines or via USB-to-serial adapters using the LAWICEL
57a1044e36SOliver Hartkopp	  ASCII protocol. The driver implements the tty linediscipline N_SLCAN.
58a1044e36SOliver Hartkopp
59a1044e36SOliver Hartkopp	  As only the sending and receiving of CAN frames is implemented, this
60a1044e36SOliver Hartkopp	  driver should work with the (serial/USB) CAN hardware from:
61c128df73SOliver Hartkopp	  www.canusb.com / www.can232.com / www.mictronics.de / www.canhack.de
62a1044e36SOliver Hartkopp
63a1044e36SOliver Hartkopp	  Userspace tools to attach the SLCAN line discipline (slcan_attach,
641eb11012SDiego Elio Pettenò	  slcand) can be found in the can-utils at the linux-can project, see
651eb11012SDiego Elio Pettenò	  https://github.com/linux-can/can-utils for details.
66a1044e36SOliver Hartkopp
67a1044e36SOliver Hartkopp	  The slcan driver supports up to 10 CAN netdevices by default which
68a1044e36SOliver Hartkopp	  can be changed by the 'maxdev=xx' module option. This driver can
69a1044e36SOliver Hartkopp	  also be built as a module. If so, the module will be called slcan.
70a1044e36SOliver Hartkopp
71df6ad5ddSVincent Mailholconfig CAN_NETLINK
726a528644SVincent Mailhol	bool "CAN device drivers with Netlink support"
73a30d5155SMarc Kleine-Budde	default y
74a7f7f624SMasahiro Yamada	help
75df6ad5ddSVincent Mailhol	  Enables the common framework for CAN device drivers. This is the
76df6ad5ddSVincent Mailhol	  standard library and provides features for the Netlink interface such
77df6ad5ddSVincent Mailhol	  as bittiming validation, support of CAN error states, device restart
78df6ad5ddSVincent Mailhol	  and others.
7939549eefSWolfgang Grandegger
806a528644SVincent Mailhol	  The additional features selected by this option will be added to the
816a528644SVincent Mailhol	  can-dev module.
826a528644SVincent Mailhol
83df6ad5ddSVincent Mailhol	  This is required by all platform and hardware CAN drivers. If you
84df6ad5ddSVincent Mailhol	  plan to use such devices or if unsure, say Y.
85df6ad5ddSVincent Mailhol
86df6ad5ddSVincent Mailholif CAN_NETLINK
876586c5d7SMarc Kleine-Budde
8839549eefSWolfgang Grandeggerconfig CAN_CALC_BITTIMING
8939549eefSWolfgang Grandegger	bool "CAN bit-timing calculation"
90a30d5155SMarc Kleine-Budde	default y
91a7f7f624SMasahiro Yamada	help
9239549eefSWolfgang Grandegger	  If enabled, CAN bit-timing parameters will be calculated for the
9339549eefSWolfgang Grandegger	  bit-rate specified via Netlink argument "bitrate" when the device
9439549eefSWolfgang Grandegger	  get started. This works fine for the most common CAN controllers
9539549eefSWolfgang Grandegger	  with standard bit-rates but may fail for exotic bit-rates or CAN
9639549eefSWolfgang Grandegger	  source clock frequencies. Disabling saves some space, but then the
9739549eefSWolfgang Grandegger	  bit-timing parameters must be specified directly using the Netlink
9839549eefSWolfgang Grandegger	  arguments "tq", "prop_seg", "phase_seg1", "phase_seg2" and "sjw".
99*0c7e1151SVincent Mailhol
100*0c7e1151SVincent Mailhol	  The additional features selected by this option will be added to the
101*0c7e1151SVincent Mailhol	  can-dev module.
102*0c7e1151SVincent Mailhol
10339549eefSWolfgang Grandegger	  If unsure, say Y.
10439549eefSWolfgang Grandegger
10568f40152SMarc Kleine-Buddeconfig CAN_AT91
10668f40152SMarc Kleine-Budde	tristate "Atmel AT91 onchip CAN controller"
1079dc8be28SChen Gang	depends on (ARCH_AT91 || COMPILE_TEST) && HAS_IOMEM
108a7f7f624SMasahiro Yamada	help
109b9e379bcSUwe Kleine-König	  This is a driver for the SoC CAN controller in Atmel's AT91SAM9263
110b9e379bcSUwe Kleine-König	  and AT91SAM9X5 processors.
11168f40152SMarc Kleine-Budde
11226821162SMarc Kleine-Buddeconfig CAN_FLEXCAN
11326821162SMarc Kleine-Budde	tristate "Support for Freescale FLEXCAN based chips"
1148dad5561SAngelo Dureghello	depends on OF || COLDFIRE || COMPILE_TEST
1158dad5561SAngelo Dureghello	depends on HAS_IOMEM
116a7f7f624SMasahiro Yamada	help
11726821162SMarc Kleine-Budde	  Say Y here if you want to support for Freescale FlexCAN.
11826821162SMarc Kleine-Budde
11926821162SMarc Kleine-Buddeconfig CAN_GRCAN
12026821162SMarc Kleine-Budde	tristate "Aeroflex Gaisler GRCAN and GRHCAN CAN devices"
12151894cbaSMarc Kleine-Budde	depends on OF && HAS_DMA && HAS_IOMEM
122a7f7f624SMasahiro Yamada	help
12326821162SMarc Kleine-Budde	  Say Y here if you want to use Aeroflex Gaisler GRCAN or GRHCAN.
12426821162SMarc Kleine-Budde	  Note that the driver supports little endian, even though little
12526821162SMarc Kleine-Budde	  endian syntheses of the cores would need some modifications on
12626821162SMarc Kleine-Budde	  the hardware level to work.
12726821162SMarc Kleine-Budde
128631eb227SIra W. Snyderconfig CAN_JANZ_ICAN3
129631eb227SIra W. Snyder	tristate "Janz VMOD-ICAN3 Intelligent CAN controller"
1306586c5d7SMarc Kleine-Budde	depends on MFD_JANZ_CMODIO
131a7f7f624SMasahiro Yamada	help
132631eb227SIra W. Snyder	  Driver for Janz VMOD-ICAN3 Intelligent CAN controller module, which
133631eb227SIra W. Snyder	  connects to a MODULbus carrier board.
134631eb227SIra W. Snyder
135631eb227SIra W. Snyder	  This driver can also be built as a module. If so, the module will be
136631eb227SIra W. Snyder	  called janz-ican3.ko.
137631eb227SIra W. Snyder
13826ad340eSHenning Collianderconfig CAN_KVASER_PCIEFD
13926ad340eSHenning Colliander	depends on PCI
14026ad340eSHenning Colliander	tristate "Kvaser PCIe FD cards"
1411d48595cSArnd Bergmann	select CRC32
14226ad340eSHenning Colliander	  help
14326ad340eSHenning Colliander	  This is a driver for the Kvaser PCI Express CAN FD family.
14426ad340eSHenning Colliander
14526ad340eSHenning Colliander	  Supported devices:
14626ad340eSHenning Colliander	    Kvaser PCIEcan 4xHS
14726ad340eSHenning Colliander	    Kvaser PCIEcan 2xHS v2
14826ad340eSHenning Colliander	    Kvaser PCIEcan HS v2
14926ad340eSHenning Colliander	    Kvaser Mini PCI Express HS v2
15026ad340eSHenning Colliander	    Kvaser Mini PCI Express 2xHS v2
15126ad340eSHenning Colliander
1520738eff1SGerhard Bertelsmannconfig CAN_SUN4I
1530738eff1SGerhard Bertelsmann	tristate "Allwinner A10 CAN controller"
1540738eff1SGerhard Bertelsmann	depends on MACH_SUN4I || MACH_SUN7I || COMPILE_TEST
155a7f7f624SMasahiro Yamada	help
1560738eff1SGerhard Bertelsmann	  Say Y here if you want to use CAN controller found on Allwinner
1570738eff1SGerhard Bertelsmann	  A10/A20 SoCs.
1580738eff1SGerhard Bertelsmann
1590738eff1SGerhard Bertelsmann	  To compile this driver as a module, choose M here: the module will
1600738eff1SGerhard Bertelsmann	  be called sun4i_can.
1610738eff1SGerhard Bertelsmann
16226821162SMarc Kleine-Buddeconfig CAN_TI_HECC
16326821162SMarc Kleine-Budde	depends on ARM
16426821162SMarc Kleine-Budde	tristate "TI High End CAN Controller"
165a7f7f624SMasahiro Yamada	help
16626821162SMarc Kleine-Budde	  Driver for TI HECC (High End CAN Controller) module found on many
16726821162SMarc Kleine-Budde	  TI devices. The device specifications are available from www.ti.com
16826821162SMarc Kleine-Budde
169b1201e44SKedareswara rao Appanaconfig CAN_XILINXCAN
170b1201e44SKedareswara rao Appana	tristate "Xilinx CAN"
171963a822bSMichal Simek	depends on ARCH_ZYNQ || ARM64 || MICROBLAZE || COMPILE_TEST
172b1201e44SKedareswara rao Appana	depends on COMMON_CLK && HAS_IOMEM
173a7f7f624SMasahiro Yamada	help
174b1201e44SKedareswara rao Appana	  Xilinx CAN driver. This driver supports both soft AXI CAN IP and
175b1201e44SKedareswara rao Appana	  Zynq CANPS IP.
176b1201e44SKedareswara rao Appana
17726821162SMarc Kleine-Buddeconfig PCH_CAN
17826821162SMarc Kleine-Budde	tristate "Intel EG20T PCH CAN controller"
17926821162SMarc Kleine-Budde	depends on PCI && (X86_32 || COMPILE_TEST)
180a7f7f624SMasahiro Yamada	help
18126821162SMarc Kleine-Budde	  This driver is for PCH CAN of Topcliff (Intel EG20T PCH) which
18226821162SMarc Kleine-Budde	  is an IOH for x86 embedded processor (Intel Atom E6xx series).
18326821162SMarc Kleine-Budde	  This driver can access CAN bus.
184b93cf3f0SOliver Hartkopp
185881ff67aSBhupesh Sharmasource "drivers/net/can/c_can/Kconfig"
1862a367c3aSWolfgang Grandeggersource "drivers/net/can/cc770/Kconfig"
1872dcb8e87SMartin Jerabeksource "drivers/net/can/ctucanfd/Kconfig"
1880c4d9c94SMarek Vasutsource "drivers/net/can/ifi_canfd/Kconfig"
18983407c7fSMarek Vasutsource "drivers/net/can/m_can/Kconfig"
19083407c7fSMarek Vasutsource "drivers/net/can/mscan/Kconfig"
1918ac8321eSStephane Grosjeansource "drivers/net/can/peak_canfd/Kconfig"
192dd3bd23eSRamesh Shanmugasundaramsource "drivers/net/can/rcar/Kconfig"
19383407c7fSMarek Vasutsource "drivers/net/can/sja1000/Kconfig"
19403fd3cf5SKurt Van Dijcksource "drivers/net/can/softing/Kconfig"
19583407c7fSMarek Vasutsource "drivers/net/can/spi/Kconfig"
19683407c7fSMarek Vasutsource "drivers/net/can/usb/Kconfig"
19703fd3cf5SKurt Van Dijck
198df6ad5ddSVincent Mailholendif #CAN_NETLINK
1996586c5d7SMarc Kleine-Budde
200ccb29637SOliver Hartkoppconfig CAN_DEBUG_DEVICES
201ccb29637SOliver Hartkopp	bool "CAN devices debugging messages"
202a7f7f624SMasahiro Yamada	help
203ccb29637SOliver Hartkopp	  Say Y here if you want the CAN device drivers to produce a bunch of
204ccb29637SOliver Hartkopp	  debug messages to the system log.  Select this if you are having
205ccb29637SOliver Hartkopp	  a problem with CAN support and want to see more of what is going
206ccb29637SOliver Hartkopp	  on.
207ccb29637SOliver Hartkopp
2086a528644SVincent Mailholendif #CAN_DEV
209