^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) # Controller Area Network (CAN) network layer core configuration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) menuconfig CAN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) depends on NET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) tristate "CAN bus subsystem support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) Controller Area Network (CAN) is a slow (up to 1Mbit/s) serial
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) communications protocol. Development of the CAN bus started in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 1983 at Robert Bosch GmbH, and the protocol was officially
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) released in 1986. The CAN bus was originally mainly for automotive,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) but is now widely used in marine (NMEA2000), industrial, and medical
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) applications. More information on the CAN network protocol family
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) PF_CAN is contained in <Documentation/networking/can.rst>.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) If you want CAN support you should say Y here and also to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) specific driver for your controller(s) below.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) if CAN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) config CAN_RAW
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) tristate "Raw CAN Protocol (raw access with CAN-ID filtering)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) The raw CAN protocol option offers access to the CAN bus via
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) the BSD socket API. You probably want to use the raw socket in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) most cases where no higher level protocol is being used. The raw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) socket has several filter options e.g. ID masking / error frames.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) To receive/send raw CAN messages, use AF_CAN with protocol CAN_RAW.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) config CAN_BCM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) tristate "Broadcast Manager CAN Protocol (with content filtering)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) The Broadcast Manager offers content filtering, timeout monitoring,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) sending of RTR frames, and cyclic CAN messages without permanent user
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) interaction. The BCM can be 'programmed' via the BSD socket API and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) informs you on demand e.g. only on content updates / timeouts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) You probably want to use the bcm socket in most cases where cyclic
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) CAN messages are used on the bus (e.g. in automotive environments).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) To use the Broadcast Manager, use AF_CAN with protocol CAN_BCM.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) config CAN_GW
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) tristate "CAN Gateway/Router (with netlink configuration)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) The CAN Gateway/Router is used to route (and modify) CAN frames.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) It is based on the PF_CAN core infrastructure for msg filtering and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) msg sending and can optionally modify routed CAN frames on the fly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) CAN frames can be routed between CAN network interfaces (one hop).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) They can be modified with AND/OR/XOR/SET operations as configured
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) by the netlink configuration interface known e.g. from iptables.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) source "net/can/j1939/Kconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) config CAN_ISOTP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) tristate "ISO 15765-2:2016 CAN transport protocol"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) CAN Transport Protocols offer support for segmented Point-to-Point
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) communication between CAN nodes via two defined CAN Identifiers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) As CAN frames can only transport a small amount of data bytes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) (max. 8 bytes for 'classic' CAN and max. 64 bytes for CAN FD) this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) segmentation is needed to transport longer Protocol Data Units (PDU)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) as needed e.g. for vehicle diagnosis (UDS, ISO 14229) or IP-over-CAN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) traffic.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) This protocol driver implements data transfers according to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) ISO 15765-2:2016 for 'classic' CAN and CAN FD frame types.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) If you want to perform automotive vehicle diagnostic services (UDS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) say 'y'.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) source "drivers/net/can/Kconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) endif