162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ci
362306a36Sopenharmony_cimenuconfig CAN_DEV
462306a36Sopenharmony_ci	tristate "CAN Device Drivers"
562306a36Sopenharmony_ci	default y
662306a36Sopenharmony_ci	depends on CAN
762306a36Sopenharmony_ci	help
862306a36Sopenharmony_ci	  Controller Area Network (CAN) is serial communications protocol up to
962306a36Sopenharmony_ci	  1Mbit/s for its original release (now known as Classical CAN) and up
1062306a36Sopenharmony_ci	  to 8Mbit/s for the more recent CAN with Flexible Data-Rate
1162306a36Sopenharmony_ci	  (CAN-FD). The CAN bus was originally mainly for automotive, but is now
1262306a36Sopenharmony_ci	  widely used in marine (NMEA2000), industrial, and medical
1362306a36Sopenharmony_ci	  applications. More information on the CAN network protocol family
1462306a36Sopenharmony_ci	  PF_CAN is contained in <Documentation/networking/can.rst>.
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci	  This section contains all the CAN(-FD) device drivers including the
1762306a36Sopenharmony_ci	  virtual ones. If you own such devices or plan to use the virtual CAN
1862306a36Sopenharmony_ci	  interfaces to develop applications, say Y here.
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci	  To compile as a module, choose M here: the module will be called
2162306a36Sopenharmony_ci	  can-dev.
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ciif CAN_DEV
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciconfig CAN_VCAN
2662306a36Sopenharmony_ci	tristate "Virtual Local CAN Interface (vcan)"
2762306a36Sopenharmony_ci	help
2862306a36Sopenharmony_ci	  Similar to the network loopback devices, vcan offers a
2962306a36Sopenharmony_ci	  virtual local CAN interface.
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci	  This driver can also be built as a module.  If so, the module
3262306a36Sopenharmony_ci	  will be called vcan.
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciconfig CAN_VXCAN
3562306a36Sopenharmony_ci	tristate "Virtual CAN Tunnel (vxcan)"
3662306a36Sopenharmony_ci	help
3762306a36Sopenharmony_ci	  Similar to the virtual ethernet driver veth, vxcan implements a
3862306a36Sopenharmony_ci	  local CAN traffic tunnel between two virtual CAN network devices.
3962306a36Sopenharmony_ci	  When creating a vxcan, two vxcan devices are created as pair.
4062306a36Sopenharmony_ci	  When one end receives the packet it appears on its pair and vice
4162306a36Sopenharmony_ci	  versa. The vxcan can be used for cross namespace communication.
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci	  In opposite to vcan loopback devices the vxcan only forwards CAN
4462306a36Sopenharmony_ci	  frames to its pair and does *not* provide a local echo of sent
4562306a36Sopenharmony_ci	  CAN frames. To disable a potential echo in af_can.c the vxcan driver
4662306a36Sopenharmony_ci	  announces IFF_ECHO in the interface flags. To have a clean start
4762306a36Sopenharmony_ci	  in each namespace the CAN GW hop counter is set to zero.
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci	  This driver can also be built as a module.  If so, the module
5062306a36Sopenharmony_ci	  will be called vxcan.
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ciconfig CAN_NETLINK
5362306a36Sopenharmony_ci	bool "CAN device drivers with Netlink support"
5462306a36Sopenharmony_ci	default y
5562306a36Sopenharmony_ci	help
5662306a36Sopenharmony_ci	  Enables the common framework for CAN device drivers. This is the
5762306a36Sopenharmony_ci	  standard library and provides features for the Netlink interface such
5862306a36Sopenharmony_ci	  as bittiming validation, support of CAN error states, device restart
5962306a36Sopenharmony_ci	  and others.
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci	  The additional features selected by this option will be added to the
6262306a36Sopenharmony_ci	  can-dev module.
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci	  This is required by all platform and hardware CAN drivers. If you
6562306a36Sopenharmony_ci	  plan to use such devices or if unsure, say Y.
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ciif CAN_NETLINK
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ciconfig CAN_CALC_BITTIMING
7062306a36Sopenharmony_ci	bool "CAN bit-timing calculation"
7162306a36Sopenharmony_ci	default y
7262306a36Sopenharmony_ci	help
7362306a36Sopenharmony_ci	  If enabled, CAN bit-timing parameters will be calculated for the
7462306a36Sopenharmony_ci	  bit-rate specified via Netlink argument "bitrate" when the device
7562306a36Sopenharmony_ci	  get started. This works fine for the most common CAN controllers
7662306a36Sopenharmony_ci	  with standard bit-rates but may fail for exotic bit-rates or CAN
7762306a36Sopenharmony_ci	  source clock frequencies. Disabling saves some space, but then the
7862306a36Sopenharmony_ci	  bit-timing parameters must be specified directly using the Netlink
7962306a36Sopenharmony_ci	  arguments "tq", "prop_seg", "phase_seg1", "phase_seg2" and "sjw".
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci	  The additional features selected by this option will be added to the
8262306a36Sopenharmony_ci	  can-dev module.
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_ci	  If unsure, say Y.
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ciconfig CAN_RX_OFFLOAD
8762306a36Sopenharmony_ci	bool
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ciconfig CAN_AT91
9062306a36Sopenharmony_ci	tristate "Atmel AT91 onchip CAN controller"
9162306a36Sopenharmony_ci	depends on (ARCH_AT91 || COMPILE_TEST) && HAS_IOMEM
9262306a36Sopenharmony_ci	help
9362306a36Sopenharmony_ci	  This is a driver for the SoC CAN controller in Atmel's AT91SAM9263
9462306a36Sopenharmony_ci	  and AT91SAM9X5 processors.
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ciconfig CAN_BXCAN
9762306a36Sopenharmony_ci	tristate "STM32 Basic Extended CAN (bxCAN) devices"
9862306a36Sopenharmony_ci	depends on ARCH_STM32 || COMPILE_TEST
9962306a36Sopenharmony_ci	depends on HAS_IOMEM
10062306a36Sopenharmony_ci	select CAN_RX_OFFLOAD
10162306a36Sopenharmony_ci	help
10262306a36Sopenharmony_ci	  Say yes here to build support for the STMicroelectronics STM32 basic
10362306a36Sopenharmony_ci	  extended CAN Controller (bxCAN).
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ci	  This driver can also be built as a module. If so, the module
10662306a36Sopenharmony_ci	  will be called bxcan.
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ciconfig CAN_CAN327
10962306a36Sopenharmony_ci	tristate "Serial / USB serial ELM327 based OBD-II Interfaces (can327)"
11062306a36Sopenharmony_ci	depends on TTY
11162306a36Sopenharmony_ci	select CAN_RX_OFFLOAD
11262306a36Sopenharmony_ci	help
11362306a36Sopenharmony_ci	  CAN driver for several 'low cost' OBD-II interfaces based on the
11462306a36Sopenharmony_ci	  ELM327 OBD-II interpreter chip.
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ci	  This is a best effort driver - the ELM327 interface was never
11762306a36Sopenharmony_ci	  designed to be used as a standalone CAN interface. However, it can
11862306a36Sopenharmony_ci	  still be used for simple request-response protocols (such as OBD II),
11962306a36Sopenharmony_ci	  and to monitor broadcast messages on a bus (such as in a vehicle).
12062306a36Sopenharmony_ci
12162306a36Sopenharmony_ci	  Please refer to the documentation for information on how to use it:
12262306a36Sopenharmony_ci	  Documentation/networking/device_drivers/can/can327.rst
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ci	  If this driver is built as a module, it will be called can327.
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ciconfig CAN_FLEXCAN
12762306a36Sopenharmony_ci	tristate "Support for Freescale FLEXCAN based chips"
12862306a36Sopenharmony_ci	depends on OF || COLDFIRE || COMPILE_TEST
12962306a36Sopenharmony_ci	depends on HAS_IOMEM
13062306a36Sopenharmony_ci	select CAN_RX_OFFLOAD
13162306a36Sopenharmony_ci	help
13262306a36Sopenharmony_ci	  Say Y here if you want to support for Freescale FlexCAN.
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ciconfig CAN_GRCAN
13562306a36Sopenharmony_ci	tristate "Aeroflex Gaisler GRCAN and GRHCAN CAN devices"
13662306a36Sopenharmony_ci	depends on OF && HAS_DMA && HAS_IOMEM
13762306a36Sopenharmony_ci	help
13862306a36Sopenharmony_ci	  Say Y here if you want to use Aeroflex Gaisler GRCAN or GRHCAN.
13962306a36Sopenharmony_ci	  Note that the driver supports little endian, even though little
14062306a36Sopenharmony_ci	  endian syntheses of the cores would need some modifications on
14162306a36Sopenharmony_ci	  the hardware level to work.
14262306a36Sopenharmony_ci
14362306a36Sopenharmony_ciconfig CAN_JANZ_ICAN3
14462306a36Sopenharmony_ci	tristate "Janz VMOD-ICAN3 Intelligent CAN controller"
14562306a36Sopenharmony_ci	depends on MFD_JANZ_CMODIO
14662306a36Sopenharmony_ci	help
14762306a36Sopenharmony_ci	  Driver for Janz VMOD-ICAN3 Intelligent CAN controller module, which
14862306a36Sopenharmony_ci	  connects to a MODULbus carrier board.
14962306a36Sopenharmony_ci
15062306a36Sopenharmony_ci	  This driver can also be built as a module. If so, the module will be
15162306a36Sopenharmony_ci	  called janz-ican3.ko.
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ciconfig CAN_KVASER_PCIEFD
15462306a36Sopenharmony_ci	depends on PCI
15562306a36Sopenharmony_ci	tristate "Kvaser PCIe FD cards"
15662306a36Sopenharmony_ci	help
15762306a36Sopenharmony_ci	  This is a driver for the Kvaser PCI Express CAN FD family.
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ci	  Supported devices:
16062306a36Sopenharmony_ci	    Kvaser PCIEcan 4xHS
16162306a36Sopenharmony_ci	    Kvaser PCIEcan 2xHS v2
16262306a36Sopenharmony_ci	    Kvaser PCIEcan HS v2
16362306a36Sopenharmony_ci	    Kvaser PCIEcan 1xCAN v3
16462306a36Sopenharmony_ci	    Kvaser PCIEcan 2xCAN v3
16562306a36Sopenharmony_ci	    Kvaser PCIEcan 4xCAN v2
16662306a36Sopenharmony_ci	    Kvaser Mini PCI Express HS v2
16762306a36Sopenharmony_ci	    Kvaser Mini PCI Express 2xHS v2
16862306a36Sopenharmony_ci	    Kvaser Mini PCI Express 1xCAN v3
16962306a36Sopenharmony_ci	    Kvaser Mini PCI Express 2xCAN v3
17062306a36Sopenharmony_ci
17162306a36Sopenharmony_ciconfig CAN_SLCAN
17262306a36Sopenharmony_ci	tristate "Serial / USB serial CAN Adaptors (slcan)"
17362306a36Sopenharmony_ci	depends on TTY
17462306a36Sopenharmony_ci	help
17562306a36Sopenharmony_ci	  CAN driver for several 'low cost' CAN interfaces that are attached
17662306a36Sopenharmony_ci	  via serial lines or via USB-to-serial adapters using the LAWICEL
17762306a36Sopenharmony_ci	  ASCII protocol. The driver implements the tty linediscipline N_SLCAN.
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ci	  As only the sending and receiving of CAN frames is implemented, this
18062306a36Sopenharmony_ci	  driver should work with the (serial/USB) CAN hardware from:
18162306a36Sopenharmony_ci	  www.canusb.com / www.can232.com / www.mictronics.de / www.canhack.de
18262306a36Sopenharmony_ci
18362306a36Sopenharmony_ci	  Userspace tools to attach the SLCAN line discipline (slcan_attach,
18462306a36Sopenharmony_ci	  slcand) can be found in the can-utils at the linux-can project, see
18562306a36Sopenharmony_ci	  https://github.com/linux-can/can-utils for details.
18662306a36Sopenharmony_ci
18762306a36Sopenharmony_ci	  The slcan driver supports up to 10 CAN netdevices by default which
18862306a36Sopenharmony_ci	  can be changed by the 'maxdev=xx' module option. This driver can
18962306a36Sopenharmony_ci	  also be built as a module. If so, the module will be called slcan.
19062306a36Sopenharmony_ci
19162306a36Sopenharmony_ciconfig CAN_SUN4I
19262306a36Sopenharmony_ci	tristate "Allwinner A10 CAN controller"
19362306a36Sopenharmony_ci	depends on MACH_SUN4I || MACH_SUN7I || (RISCV && ARCH_SUNXI) || COMPILE_TEST
19462306a36Sopenharmony_ci	help
19562306a36Sopenharmony_ci	  Say Y here if you want to use CAN controller found on Allwinner
19662306a36Sopenharmony_ci	  A10/A20/D1 SoCs.
19762306a36Sopenharmony_ci
19862306a36Sopenharmony_ci	  To compile this driver as a module, choose M here: the module will
19962306a36Sopenharmony_ci	  be called sun4i_can.
20062306a36Sopenharmony_ci
20162306a36Sopenharmony_ciconfig CAN_TI_HECC
20262306a36Sopenharmony_ci	depends on ARM
20362306a36Sopenharmony_ci	tristate "TI High End CAN Controller"
20462306a36Sopenharmony_ci	select CAN_RX_OFFLOAD
20562306a36Sopenharmony_ci	help
20662306a36Sopenharmony_ci	  Driver for TI HECC (High End CAN Controller) module found on many
20762306a36Sopenharmony_ci	  TI devices. The device specifications are available from www.ti.com
20862306a36Sopenharmony_ci
20962306a36Sopenharmony_ciconfig CAN_XILINXCAN
21062306a36Sopenharmony_ci	tristate "Xilinx CAN"
21162306a36Sopenharmony_ci	depends on ARCH_ZYNQ || ARM64 || MICROBLAZE || COMPILE_TEST
21262306a36Sopenharmony_ci	depends on COMMON_CLK && HAS_IOMEM
21362306a36Sopenharmony_ci	help
21462306a36Sopenharmony_ci	  Xilinx CAN driver. This driver supports both soft AXI CAN IP and
21562306a36Sopenharmony_ci	  Zynq CANPS IP.
21662306a36Sopenharmony_ci
21762306a36Sopenharmony_cisource "drivers/net/can/c_can/Kconfig"
21862306a36Sopenharmony_cisource "drivers/net/can/cc770/Kconfig"
21962306a36Sopenharmony_cisource "drivers/net/can/ctucanfd/Kconfig"
22062306a36Sopenharmony_cisource "drivers/net/can/ifi_canfd/Kconfig"
22162306a36Sopenharmony_cisource "drivers/net/can/m_can/Kconfig"
22262306a36Sopenharmony_cisource "drivers/net/can/mscan/Kconfig"
22362306a36Sopenharmony_cisource "drivers/net/can/peak_canfd/Kconfig"
22462306a36Sopenharmony_cisource "drivers/net/can/rcar/Kconfig"
22562306a36Sopenharmony_cisource "drivers/net/can/sja1000/Kconfig"
22662306a36Sopenharmony_cisource "drivers/net/can/softing/Kconfig"
22762306a36Sopenharmony_cisource "drivers/net/can/spi/Kconfig"
22862306a36Sopenharmony_cisource "drivers/net/can/usb/Kconfig"
22962306a36Sopenharmony_ci
23062306a36Sopenharmony_ciendif #CAN_NETLINK
23162306a36Sopenharmony_ci
23262306a36Sopenharmony_ciconfig CAN_DEBUG_DEVICES
23362306a36Sopenharmony_ci	bool "CAN devices debugging messages"
23462306a36Sopenharmony_ci	help
23562306a36Sopenharmony_ci	  Say Y here if you want the CAN device drivers to produce a bunch of
23662306a36Sopenharmony_ci	  debug messages to the system log.  Select this if you are having
23762306a36Sopenharmony_ci	  a problem with CAN support and want to see more of what is going
23862306a36Sopenharmony_ci	  on.
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_ciendif #CAN_DEV
241