xref: /linux/drivers/net/can/Kconfig (revision fab183d632628381b466a41479489541ac0e29a0)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
26a528644SVincent Mailhol
36a528644SVincent Mailholmenuconfig CAN_DEV
44650ff58SOliver Hartkopp	tristate "CAN Device Drivers"
56a528644SVincent Mailhol	default y
6d7786af5SVincent Mailhol	depends on CAN
76a528644SVincent Mailhol	help
86a528644SVincent Mailhol	  Controller Area Network (CAN) is serial communications protocol up to
96a528644SVincent Mailhol	  1Mbit/s for its original release (now known as Classical CAN) and up
106a528644SVincent Mailhol	  to 8Mbit/s for the more recent CAN with Flexible Data-Rate
116a528644SVincent Mailhol	  (CAN-FD). The CAN bus was originally mainly for automotive, but is now
126a528644SVincent Mailhol	  widely used in marine (NMEA2000), industrial, and medical
136a528644SVincent Mailhol	  applications. More information on the CAN network protocol family
146a528644SVincent Mailhol	  PF_CAN is contained in <Documentation/networking/can.rst>.
156a528644SVincent Mailhol
166a528644SVincent Mailhol	  This section contains all the CAN(-FD) device drivers including the
176a528644SVincent Mailhol	  virtual ones. If you own such devices or plan to use the virtual CAN
186a528644SVincent Mailhol	  interfaces to develop applications, say Y here.
196a528644SVincent Mailhol
204650ff58SOliver Hartkopp	  To compile as a module, choose M here: the module will be called
214650ff58SOliver Hartkopp	  can-dev.
224650ff58SOliver Hartkopp
234650ff58SOliver Hartkoppif CAN_DEV
24ccb29637SOliver Hartkopp
25ccb29637SOliver Hartkoppconfig CAN_VCAN
26ccb29637SOliver Hartkopp	tristate "Virtual Local CAN Interface (vcan)"
27a7f7f624SMasahiro Yamada	help
28ccb29637SOliver Hartkopp	  Similar to the network loopback devices, vcan offers a
29ccb29637SOliver Hartkopp	  virtual local CAN interface.
30ccb29637SOliver Hartkopp
31ccb29637SOliver Hartkopp	  This driver can also be built as a module.  If so, the module
32ccb29637SOliver Hartkopp	  will be called vcan.
33ccb29637SOliver Hartkopp
34a8f820a3SOliver Hartkoppconfig CAN_VXCAN
35a8f820a3SOliver Hartkopp	tristate "Virtual CAN Tunnel (vxcan)"
36a7f7f624SMasahiro Yamada	help
37a8f820a3SOliver Hartkopp	  Similar to the virtual ethernet driver veth, vxcan implements a
38a8f820a3SOliver Hartkopp	  local CAN traffic tunnel between two virtual CAN network devices.
39a8f820a3SOliver Hartkopp	  When creating a vxcan, two vxcan devices are created as pair.
40a8f820a3SOliver Hartkopp	  When one end receives the packet it appears on its pair and vice
41a8f820a3SOliver Hartkopp	  versa. The vxcan can be used for cross namespace communication.
42a8f820a3SOliver Hartkopp
43*79adf48fSAlexander Hölzl	  To have a clean start in each namespace the CAN GW hop counter is
44*79adf48fSAlexander Hölzl	  set to zero.
45a8f820a3SOliver Hartkopp
46a8f820a3SOliver Hartkopp	  This driver can also be built as a module.  If so, the module
47a8f820a3SOliver Hartkopp	  will be called vxcan.
48a8f820a3SOliver Hartkopp
49df6ad5ddSVincent Mailholconfig CAN_NETLINK
506a528644SVincent Mailhol	bool "CAN device drivers with Netlink support"
51a30d5155SMarc Kleine-Budde	default y
52a7f7f624SMasahiro Yamada	help
53df6ad5ddSVincent Mailhol	  Enables the common framework for CAN device drivers. This is the
54df6ad5ddSVincent Mailhol	  standard library and provides features for the Netlink interface such
55df6ad5ddSVincent Mailhol	  as bittiming validation, support of CAN error states, device restart
56df6ad5ddSVincent Mailhol	  and others.
5739549eefSWolfgang Grandegger
586a528644SVincent Mailhol	  The additional features selected by this option will be added to the
596a528644SVincent Mailhol	  can-dev module.
606a528644SVincent Mailhol
61df6ad5ddSVincent Mailhol	  This is required by all platform and hardware CAN drivers. If you
62df6ad5ddSVincent Mailhol	  plan to use such devices or if unsure, say Y.
63df6ad5ddSVincent Mailhol
64df6ad5ddSVincent Mailholif CAN_NETLINK
656586c5d7SMarc Kleine-Budde
6639549eefSWolfgang Grandeggerconfig CAN_CALC_BITTIMING
6739549eefSWolfgang Grandegger	bool "CAN bit-timing calculation"
68a30d5155SMarc Kleine-Budde	default y
69a7f7f624SMasahiro Yamada	help
7039549eefSWolfgang Grandegger	  If enabled, CAN bit-timing parameters will be calculated for the
7139549eefSWolfgang Grandegger	  bit-rate specified via Netlink argument "bitrate" when the device
7239549eefSWolfgang Grandegger	  get started. This works fine for the most common CAN controllers
7339549eefSWolfgang Grandegger	  with standard bit-rates but may fail for exotic bit-rates or CAN
7439549eefSWolfgang Grandegger	  source clock frequencies. Disabling saves some space, but then the
7539549eefSWolfgang Grandegger	  bit-timing parameters must be specified directly using the Netlink
7639549eefSWolfgang Grandegger	  arguments "tq", "prop_seg", "phase_seg1", "phase_seg2" and "sjw".
770c7e1151SVincent Mailhol
780c7e1151SVincent Mailhol	  The additional features selected by this option will be added to the
790c7e1151SVincent Mailhol	  can-dev module.
800c7e1151SVincent Mailhol
8139549eefSWolfgang Grandegger	  If unsure, say Y.
8239549eefSWolfgang Grandegger
83bfe0092dSVincent Mailholconfig CAN_RX_OFFLOAD
84bfe0092dSVincent Mailhol	bool
85bfe0092dSVincent Mailhol
8668f40152SMarc Kleine-Buddeconfig CAN_AT91
8768f40152SMarc Kleine-Budde	tristate "Atmel AT91 onchip CAN controller"
889dc8be28SChen Gang	depends on (ARCH_AT91 || COMPILE_TEST) && HAS_IOMEM
89137f59d5SMarc Kleine-Budde	select CAN_RX_OFFLOAD
90a7f7f624SMasahiro Yamada	help
91b9e379bcSUwe Kleine-König	  This is a driver for the SoC CAN controller in Atmel's AT91SAM9263
92b9e379bcSUwe Kleine-König	  and AT91SAM9X5 processors.
9368f40152SMarc Kleine-Budde
94f00647d8SDario Binacchiconfig CAN_BXCAN
95f00647d8SDario Binacchi	tristate "STM32 Basic Extended CAN (bxCAN) devices"
964920bdedSGeert Uytterhoeven	depends on ARCH_STM32 || COMPILE_TEST
97f00647d8SDario Binacchi	depends on HAS_IOMEM
98f00647d8SDario Binacchi	select CAN_RX_OFFLOAD
99f00647d8SDario Binacchi	help
100f00647d8SDario Binacchi	  Say yes here to build support for the STMicroelectronics STM32 basic
101f00647d8SDario Binacchi	  extended CAN Controller (bxCAN).
102f00647d8SDario Binacchi
103f00647d8SDario Binacchi	  This driver can also be built as a module. If so, the module
104f00647d8SDario Binacchi	  will be called bxcan.
105f00647d8SDario Binacchi
10643da2f07SMax Staudtconfig CAN_CAN327
10743da2f07SMax Staudt	tristate "Serial / USB serial ELM327 based OBD-II Interfaces (can327)"
10843da2f07SMax Staudt	depends on TTY
10943da2f07SMax Staudt	select CAN_RX_OFFLOAD
11043da2f07SMax Staudt	help
11143da2f07SMax Staudt	  CAN driver for several 'low cost' OBD-II interfaces based on the
11243da2f07SMax Staudt	  ELM327 OBD-II interpreter chip.
11343da2f07SMax Staudt
11443da2f07SMax Staudt	  This is a best effort driver - the ELM327 interface was never
11543da2f07SMax Staudt	  designed to be used as a standalone CAN interface. However, it can
11643da2f07SMax Staudt	  still be used for simple request-response protocols (such as OBD II),
11743da2f07SMax Staudt	  and to monitor broadcast messages on a bus (such as in a vehicle).
11843da2f07SMax Staudt
11943da2f07SMax Staudt	  Please refer to the documentation for information on how to use it:
12043da2f07SMax Staudt	  Documentation/networking/device_drivers/can/can327.rst
12143da2f07SMax Staudt
12243da2f07SMax Staudt	  If this driver is built as a module, it will be called can327.
12343da2f07SMax Staudt
124816cf430SVincent Mailholconfig CAN_DUMMY
125816cf430SVincent Mailhol	tristate "Dummy CAN"
126816cf430SVincent Mailhol	help
127816cf430SVincent Mailhol	  A dummy CAN module supporting Classical CAN, CAN FD and CAN XL. It
128816cf430SVincent Mailhol	  exposes bittiming values which can be configured through the netlink
129816cf430SVincent Mailhol	  interface.
130816cf430SVincent Mailhol
131816cf430SVincent Mailhol	  The module will simply echo any frame sent to it. If debug messages
132816cf430SVincent Mailhol	  are activated, it prints all the CAN bittiming information in the
133816cf430SVincent Mailhol	  kernel log. Aside from that it does nothing.
134816cf430SVincent Mailhol
135816cf430SVincent Mailhol	  This is convenient for testing the CAN netlink interface. Most of the
136816cf430SVincent Mailhol	  users will never need this. If unsure, say NO.
137816cf430SVincent Mailhol
138816cf430SVincent Mailhol	  To compile this driver as a module, choose M here: the module will be
139816cf430SVincent Mailhol	  called dummy-can.
140816cf430SVincent Mailhol
14126821162SMarc Kleine-Buddeconfig CAN_FLEXCAN
14226821162SMarc Kleine-Budde	tristate "Support for Freescale FLEXCAN based chips"
1438dad5561SAngelo Dureghello	depends on OF || COLDFIRE || COMPILE_TEST
1448dad5561SAngelo Dureghello	depends on HAS_IOMEM
145bfe0092dSVincent Mailhol	select CAN_RX_OFFLOAD
146a7f7f624SMasahiro Yamada	help
14726821162SMarc Kleine-Budde	  Say Y here if you want to support for Freescale FlexCAN.
14826821162SMarc Kleine-Budde
14926821162SMarc Kleine-Buddeconfig CAN_GRCAN
15026821162SMarc Kleine-Budde	tristate "Aeroflex Gaisler GRCAN and GRHCAN CAN devices"
15151894cbaSMarc Kleine-Budde	depends on OF && HAS_DMA && HAS_IOMEM
152a7f7f624SMasahiro Yamada	help
15326821162SMarc Kleine-Budde	  Say Y here if you want to use Aeroflex Gaisler GRCAN or GRHCAN.
15426821162SMarc Kleine-Budde	  Note that the driver supports little endian, even though little
15526821162SMarc Kleine-Budde	  endian syntheses of the cores would need some modifications on
15626821162SMarc Kleine-Budde	  the hardware level to work.
15726821162SMarc Kleine-Budde
158631eb227SIra W. Snyderconfig CAN_JANZ_ICAN3
159631eb227SIra W. Snyder	tristate "Janz VMOD-ICAN3 Intelligent CAN controller"
1606586c5d7SMarc Kleine-Budde	depends on MFD_JANZ_CMODIO
161a7f7f624SMasahiro Yamada	help
162631eb227SIra W. Snyder	  Driver for Janz VMOD-ICAN3 Intelligent CAN controller module, which
163631eb227SIra W. Snyder	  connects to a MODULbus carrier board.
164631eb227SIra W. Snyder
165631eb227SIra W. Snyder	  This driver can also be built as a module. If so, the module will be
166631eb227SIra W. Snyder	  called janz-ican3.ko.
167631eb227SIra W. Snyder
16826ad340eSHenning Collianderconfig CAN_KVASER_PCIEFD
16926ad340eSHenning Colliander	depends on PCI
17026ad340eSHenning Colliander	tristate "Kvaser PCIe FD cards"
1710d1b337bSJimmy Assarsson	select NET_DEVLINK
17226ad340eSHenning Colliander	help
17326ad340eSHenning Colliander	  This is a driver for the Kvaser PCI Express CAN FD family.
17426ad340eSHenning Colliander
17526ad340eSHenning Colliander	  Supported devices:
17626ad340eSHenning Colliander	    Kvaser PCIEcan 4xHS
17726ad340eSHenning Colliander	    Kvaser PCIEcan 2xHS v2
17826ad340eSHenning Colliander	    Kvaser PCIEcan HS v2
179f33ad677SJimmy Assarsson	    Kvaser PCIEcan 1xCAN v3
180f33ad677SJimmy Assarsson	    Kvaser PCIEcan 2xCAN v3
181f33ad677SJimmy Assarsson	    Kvaser PCIEcan 4xCAN v2
18226ad340eSHenning Colliander	    Kvaser Mini PCI Express HS v2
18326ad340eSHenning Colliander	    Kvaser Mini PCI Express 2xHS v2
184f33ad677SJimmy Assarsson	    Kvaser Mini PCI Express 1xCAN v3
185f33ad677SJimmy Assarsson	    Kvaser Mini PCI Express 2xCAN v3
18685216f56SJimmy Assarsson	    Kvaser M.2 PCIe 4xCAN
1879b221ba4SMartin Jocić	    Kvaser PCIe 8xCAN
18826ad340eSHenning Colliander
189c4e54b06SDario Binacchiconfig CAN_SLCAN
190c4e54b06SDario Binacchi	tristate "Serial / USB serial CAN Adaptors (slcan)"
191c4e54b06SDario Binacchi	depends on TTY
192c4e54b06SDario Binacchi	help
193c4e54b06SDario Binacchi	  CAN driver for several 'low cost' CAN interfaces that are attached
194c4e54b06SDario Binacchi	  via serial lines or via USB-to-serial adapters using the LAWICEL
195c4e54b06SDario Binacchi	  ASCII protocol. The driver implements the tty linediscipline N_SLCAN.
196c4e54b06SDario Binacchi
197c4e54b06SDario Binacchi	  As only the sending and receiving of CAN frames is implemented, this
198c4e54b06SDario Binacchi	  driver should work with the (serial/USB) CAN hardware from:
199c4e54b06SDario Binacchi	  www.canusb.com / www.can232.com / www.mictronics.de / www.canhack.de
200c4e54b06SDario Binacchi
201c4e54b06SDario Binacchi	  Userspace tools to attach the SLCAN line discipline (slcan_attach,
202c4e54b06SDario Binacchi	  slcand) can be found in the can-utils at the linux-can project, see
203c4e54b06SDario Binacchi	  https://github.com/linux-can/can-utils for details.
204c4e54b06SDario Binacchi
20558b34cd6SMans Rullgard	  This driver can also be built as a module. If so, the module
20658b34cd6SMans Rullgard	  will be called slcan.
207c4e54b06SDario Binacchi
2080738eff1SGerhard Bertelsmannconfig CAN_SUN4I
2090738eff1SGerhard Bertelsmann	tristate "Allwinner A10 CAN controller"
2101f223208SJohn Watts	depends on MACH_SUN4I || MACH_SUN7I || (RISCV && ARCH_SUNXI) || COMPILE_TEST
211a7f7f624SMasahiro Yamada	help
2120738eff1SGerhard Bertelsmann	  Say Y here if you want to use CAN controller found on Allwinner
2138abb9525SJohn Watts	  A10/A20/D1 SoCs.
2140738eff1SGerhard Bertelsmann
2150738eff1SGerhard Bertelsmann	  To compile this driver as a module, choose M here: the module will
2160738eff1SGerhard Bertelsmann	  be called sun4i_can.
2170738eff1SGerhard Bertelsmann
21826821162SMarc Kleine-Buddeconfig CAN_TI_HECC
2190e7896b9SVincent Mailhol	depends on ARM || COMPILE_TEST
22026821162SMarc Kleine-Budde	tristate "TI High End CAN Controller"
221bfe0092dSVincent Mailhol	select CAN_RX_OFFLOAD
222a7f7f624SMasahiro Yamada	help
22326821162SMarc Kleine-Budde	  Driver for TI HECC (High End CAN Controller) module found on many
22426821162SMarc Kleine-Budde	  TI devices. The device specifications are available from www.ti.com
22526821162SMarc Kleine-Budde
226083082a4SMatias Ezequiel Vara Larsenconfig CAN_VIRTIO_CAN
227083082a4SMatias Ezequiel Vara Larsen	depends on VIRTIO
228083082a4SMatias Ezequiel Vara Larsen	tristate "Virtio CAN device support"
229083082a4SMatias Ezequiel Vara Larsen	default n
230083082a4SMatias Ezequiel Vara Larsen	help
231083082a4SMatias Ezequiel Vara Larsen	  Say Y here if you want to support for Virtio CAN.
232083082a4SMatias Ezequiel Vara Larsen
233083082a4SMatias Ezequiel Vara Larsen	  To compile this driver as a module, choose M here: the
234083082a4SMatias Ezequiel Vara Larsen	  module will be called virtio-can.
235083082a4SMatias Ezequiel Vara Larsen
236083082a4SMatias Ezequiel Vara Larsen	  If unsure, say N.
237083082a4SMatias Ezequiel Vara Larsen
238b1201e44SKedareswara rao Appanaconfig CAN_XILINXCAN
239b1201e44SKedareswara rao Appana	tristate "Xilinx CAN"
240963a822bSMichal Simek	depends on ARCH_ZYNQ || ARM64 || MICROBLAZE || COMPILE_TEST
241b1201e44SKedareswara rao Appana	depends on COMMON_CLK && HAS_IOMEM
242a7f7f624SMasahiro Yamada	help
243b1201e44SKedareswara rao Appana	  Xilinx CAN driver. This driver supports both soft AXI CAN IP and
244b1201e44SKedareswara rao Appana	  Zynq CANPS IP.
245b1201e44SKedareswara rao Appana
246881ff67aSBhupesh Sharmasource "drivers/net/can/c_can/Kconfig"
2472a367c3aSWolfgang Grandeggersource "drivers/net/can/cc770/Kconfig"
2482dcb8e87SMartin Jerabeksource "drivers/net/can/ctucanfd/Kconfig"
2499721866fSStefan Mätjesource "drivers/net/can/esd/Kconfig"
2500c4d9c94SMarek Vasutsource "drivers/net/can/ifi_canfd/Kconfig"
25183407c7fSMarek Vasutsource "drivers/net/can/m_can/Kconfig"
25283407c7fSMarek Vasutsource "drivers/net/can/mscan/Kconfig"
2538ac8321eSStephane Grosjeansource "drivers/net/can/peak_canfd/Kconfig"
254dd3bd23eSRamesh Shanmugasundaramsource "drivers/net/can/rcar/Kconfig"
255ff60bfbaSMarc Kleine-Buddesource "drivers/net/can/rockchip/Kconfig"
25683407c7fSMarek Vasutsource "drivers/net/can/sja1000/Kconfig"
25703fd3cf5SKurt Van Dijcksource "drivers/net/can/softing/Kconfig"
25883407c7fSMarek Vasutsource "drivers/net/can/spi/Kconfig"
25983407c7fSMarek Vasutsource "drivers/net/can/usb/Kconfig"
26003fd3cf5SKurt Van Dijck
261df6ad5ddSVincent Mailholendif #CAN_NETLINK
2626586c5d7SMarc Kleine-Budde
263ccb29637SOliver Hartkoppconfig CAN_DEBUG_DEVICES
264ccb29637SOliver Hartkopp	bool "CAN devices debugging messages"
265a7f7f624SMasahiro Yamada	help
266ccb29637SOliver Hartkopp	  Say Y here if you want the CAN device drivers to produce a bunch of
267ccb29637SOliver Hartkopp	  debug messages to the system log.  Select this if you are having
268ccb29637SOliver Hartkopp	  a problem with CAN support and want to see more of what is going
269ccb29637SOliver Hartkopp	  on.
270ccb29637SOliver Hartkopp
2716a528644SVincent Mailholendif #CAN_DEV
272