xref: /openbmc/linux/drivers/net/can/Kconfig (revision 2d99a7ec)
1# SPDX-License-Identifier: GPL-2.0-only
2
3menuconfig CAN_DEV
4	tristate "CAN Device Drivers"
5	default y
6	depends on CAN
7	help
8	  Controller Area Network (CAN) is serial communications protocol up to
9	  1Mbit/s for its original release (now known as Classical CAN) and up
10	  to 8Mbit/s for the more recent CAN with Flexible Data-Rate
11	  (CAN-FD). The CAN bus was originally mainly for automotive, but is now
12	  widely used in marine (NMEA2000), industrial, and medical
13	  applications. More information on the CAN network protocol family
14	  PF_CAN is contained in <Documentation/networking/can.rst>.
15
16	  This section contains all the CAN(-FD) device drivers including the
17	  virtual ones. If you own such devices or plan to use the virtual CAN
18	  interfaces to develop applications, say Y here.
19
20	  To compile as a module, choose M here: the module will be called
21	  can-dev.
22
23if CAN_DEV
24
25config CAN_VCAN
26	tristate "Virtual Local CAN Interface (vcan)"
27	help
28	  Similar to the network loopback devices, vcan offers a
29	  virtual local CAN interface.
30
31	  This driver can also be built as a module.  If so, the module
32	  will be called vcan.
33
34config CAN_VXCAN
35	tristate "Virtual CAN Tunnel (vxcan)"
36	help
37	  Similar to the virtual ethernet driver veth, vxcan implements a
38	  local CAN traffic tunnel between two virtual CAN network devices.
39	  When creating a vxcan, two vxcan devices are created as pair.
40	  When one end receives the packet it appears on its pair and vice
41	  versa. The vxcan can be used for cross namespace communication.
42
43	  In opposite to vcan loopback devices the vxcan only forwards CAN
44	  frames to its pair and does *not* provide a local echo of sent
45	  CAN frames. To disable a potential echo in af_can.c the vxcan driver
46	  announces IFF_ECHO in the interface flags. To have a clean start
47	  in each namespace the CAN GW hop counter is set to zero.
48
49	  This driver can also be built as a module.  If so, the module
50	  will be called vxcan.
51
52config CAN_NETLINK
53	bool "CAN device drivers with Netlink support"
54	default y
55	help
56	  Enables the common framework for CAN device drivers. This is the
57	  standard library and provides features for the Netlink interface such
58	  as bittiming validation, support of CAN error states, device restart
59	  and others.
60
61	  The additional features selected by this option will be added to the
62	  can-dev module.
63
64	  This is required by all platform and hardware CAN drivers. If you
65	  plan to use such devices or if unsure, say Y.
66
67if CAN_NETLINK
68
69config CAN_CALC_BITTIMING
70	bool "CAN bit-timing calculation"
71	default y
72	help
73	  If enabled, CAN bit-timing parameters will be calculated for the
74	  bit-rate specified via Netlink argument "bitrate" when the device
75	  get started. This works fine for the most common CAN controllers
76	  with standard bit-rates but may fail for exotic bit-rates or CAN
77	  source clock frequencies. Disabling saves some space, but then the
78	  bit-timing parameters must be specified directly using the Netlink
79	  arguments "tq", "prop_seg", "phase_seg1", "phase_seg2" and "sjw".
80
81	  The additional features selected by this option will be added to the
82	  can-dev module.
83
84	  If unsure, say Y.
85
86config CAN_RX_OFFLOAD
87	bool
88
89config CAN_AT91
90	tristate "Atmel AT91 onchip CAN controller"
91	depends on (ARCH_AT91 || COMPILE_TEST) && HAS_IOMEM
92	help
93	  This is a driver for the SoC CAN controller in Atmel's AT91SAM9263
94	  and AT91SAM9X5 processors.
95
96config CAN_CAN327
97	tristate "Serial / USB serial ELM327 based OBD-II Interfaces (can327)"
98	depends on TTY
99	select CAN_RX_OFFLOAD
100	help
101	  CAN driver for several 'low cost' OBD-II interfaces based on the
102	  ELM327 OBD-II interpreter chip.
103
104	  This is a best effort driver - the ELM327 interface was never
105	  designed to be used as a standalone CAN interface. However, it can
106	  still be used for simple request-response protocols (such as OBD II),
107	  and to monitor broadcast messages on a bus (such as in a vehicle).
108
109	  Please refer to the documentation for information on how to use it:
110	  Documentation/networking/device_drivers/can/can327.rst
111
112	  If this driver is built as a module, it will be called can327.
113
114config CAN_FLEXCAN
115	tristate "Support for Freescale FLEXCAN based chips"
116	depends on OF || COLDFIRE || COMPILE_TEST
117	depends on HAS_IOMEM
118	select CAN_RX_OFFLOAD
119	help
120	  Say Y here if you want to support for Freescale FlexCAN.
121
122config CAN_GRCAN
123	tristate "Aeroflex Gaisler GRCAN and GRHCAN CAN devices"
124	depends on OF && HAS_DMA && HAS_IOMEM
125	help
126	  Say Y here if you want to use Aeroflex Gaisler GRCAN or GRHCAN.
127	  Note that the driver supports little endian, even though little
128	  endian syntheses of the cores would need some modifications on
129	  the hardware level to work.
130
131config CAN_JANZ_ICAN3
132	tristate "Janz VMOD-ICAN3 Intelligent CAN controller"
133	depends on MFD_JANZ_CMODIO
134	help
135	  Driver for Janz VMOD-ICAN3 Intelligent CAN controller module, which
136	  connects to a MODULbus carrier board.
137
138	  This driver can also be built as a module. If so, the module will be
139	  called janz-ican3.ko.
140
141config CAN_KVASER_PCIEFD
142	depends on PCI
143	tristate "Kvaser PCIe FD cards"
144	select CRC32
145	  help
146	  This is a driver for the Kvaser PCI Express CAN FD family.
147
148	  Supported devices:
149	    Kvaser PCIEcan 4xHS
150	    Kvaser PCIEcan 2xHS v2
151	    Kvaser PCIEcan HS v2
152	    Kvaser Mini PCI Express HS v2
153	    Kvaser Mini PCI Express 2xHS v2
154
155config CAN_SLCAN
156	tristate "Serial / USB serial CAN Adaptors (slcan)"
157	depends on TTY
158	help
159	  CAN driver for several 'low cost' CAN interfaces that are attached
160	  via serial lines or via USB-to-serial adapters using the LAWICEL
161	  ASCII protocol. The driver implements the tty linediscipline N_SLCAN.
162
163	  As only the sending and receiving of CAN frames is implemented, this
164	  driver should work with the (serial/USB) CAN hardware from:
165	  www.canusb.com / www.can232.com / www.mictronics.de / www.canhack.de
166
167	  Userspace tools to attach the SLCAN line discipline (slcan_attach,
168	  slcand) can be found in the can-utils at the linux-can project, see
169	  https://github.com/linux-can/can-utils for details.
170
171	  The slcan driver supports up to 10 CAN netdevices by default which
172	  can be changed by the 'maxdev=xx' module option. This driver can
173	  also be built as a module. If so, the module will be called slcan.
174
175config CAN_SUN4I
176	tristate "Allwinner A10 CAN controller"
177	depends on MACH_SUN4I || MACH_SUN7I || COMPILE_TEST
178	help
179	  Say Y here if you want to use CAN controller found on Allwinner
180	  A10/A20 SoCs.
181
182	  To compile this driver as a module, choose M here: the module will
183	  be called sun4i_can.
184
185config CAN_TI_HECC
186	depends on ARM
187	tristate "TI High End CAN Controller"
188	select CAN_RX_OFFLOAD
189	help
190	  Driver for TI HECC (High End CAN Controller) module found on many
191	  TI devices. The device specifications are available from www.ti.com
192
193config CAN_XILINXCAN
194	tristate "Xilinx CAN"
195	depends on ARCH_ZYNQ || ARM64 || MICROBLAZE || COMPILE_TEST
196	depends on COMMON_CLK && HAS_IOMEM
197	help
198	  Xilinx CAN driver. This driver supports both soft AXI CAN IP and
199	  Zynq CANPS IP.
200
201source "drivers/net/can/c_can/Kconfig"
202source "drivers/net/can/cc770/Kconfig"
203source "drivers/net/can/ctucanfd/Kconfig"
204source "drivers/net/can/ifi_canfd/Kconfig"
205source "drivers/net/can/m_can/Kconfig"
206source "drivers/net/can/mscan/Kconfig"
207source "drivers/net/can/peak_canfd/Kconfig"
208source "drivers/net/can/rcar/Kconfig"
209source "drivers/net/can/sja1000/Kconfig"
210source "drivers/net/can/softing/Kconfig"
211source "drivers/net/can/spi/Kconfig"
212source "drivers/net/can/usb/Kconfig"
213
214endif #CAN_NETLINK
215
216config CAN_DEBUG_DEVICES
217	bool "CAN devices debugging messages"
218	help
219	  Say Y here if you want the CAN device drivers to produce a bunch of
220	  debug messages to the system log.  Select this if you are having
221	  a problem with CAN support and want to see more of what is going
222	  on.
223
224endif #CAN_DEV
225