| 1 | # SPDX-License-Identifier: GPL-2.0-only |
| 2 | |
| 3 | menuconfig 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 | |
| 23 | if CAN_DEV |
| 24 | |
| 25 | config 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 | |
| 34 | config 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 | To have a clean start in each namespace the CAN GW hop counter is |
| 44 | set to zero. |
| 45 | |
| 46 | This driver can also be built as a module. If so, the module |
| 47 | will be called vxcan. |
| 48 | |
| 49 | config 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 | |
| 64 | if CAN_NETLINK |
| 65 | |
| 66 | config 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 | |
| 83 | config CAN_RX_OFFLOAD |
| 84 | bool |
| 85 | |
| 86 | config 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 | |
| 94 | config 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 | |
| 106 | config 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 | |
| 124 | config 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 | |
| 141 | config 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 | |
| 149 | config 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 | |
| 158 | config 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 | |
| 168 | config 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 | |
| 189 | config 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 | |
| 208 | config 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 | |
| 218 | config 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 | |
| 226 | config CAN_VIRTIO_CAN |
| 227 | depends on VIRTIO |
| 228 | tristate "Virtio CAN device support" |
| 229 | default n |
| 230 | help |
| 231 | Say Y here if you want to support for Virtio CAN. |
| 232 | |
| 233 | To compile this driver as a module, choose M here: the |
| 234 | module will be called virtio-can. |
| 235 | |
| 236 | If unsure, say N. |
| 237 | |
| 238 | config CAN_XILINXCAN |
| 239 | tristate "Xilinx CAN" |
| 240 | depends on ARCH_ZYNQ || ARM64 || MICROBLAZE || COMPILE_TEST |
| 241 | depends on COMMON_CLK && HAS_IOMEM |
| 242 | help |
| 243 | Xilinx CAN driver. This driver supports both soft AXI CAN IP and |
| 244 | Zynq CANPS IP. |
| 245 | |
| 246 | source "drivers/net/can/c_can/Kconfig" |
| 247 | source "drivers/net/can/cc770/Kconfig" |
| 248 | source "drivers/net/can/ctucanfd/Kconfig" |
| 249 | source "drivers/net/can/esd/Kconfig" |
| 250 | source "drivers/net/can/ifi_canfd/Kconfig" |
| 251 | source "drivers/net/can/m_can/Kconfig" |
| 252 | source "drivers/net/can/mscan/Kconfig" |
| 253 | source "drivers/net/can/peak_canfd/Kconfig" |
| 254 | source "drivers/net/can/rcar/Kconfig" |
| 255 | source "drivers/net/can/rockchip/Kconfig" |
| 256 | source "drivers/net/can/sja1000/Kconfig" |
| 257 | source "drivers/net/can/softing/Kconfig" |
| 258 | source "drivers/net/can/spi/Kconfig" |
| 259 | source "drivers/net/can/usb/Kconfig" |
| 260 | |
| 261 | endif #CAN_NETLINK |
| 262 | |
| 263 | config CAN_DEBUG_DEVICES |
| 264 | bool "CAN devices debugging messages" |
| 265 | help |
| 266 | Say Y here if you want the CAN device drivers to produce a bunch of |
| 267 | debug messages to the system log. Select this if you are having |
| 268 | a problem with CAN support and want to see more of what is going |
| 269 | on. |
| 270 | |
| 271 | endif #CAN_DEV |