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