1# CAN configuration options
2
3# Copyright (c) 2018 Alexander Wachter
4# SPDX-License-Identifier: Apache-2.0
5
6#
7# CAN options
8#
9menuconfig CAN
10	bool "Controller Area Network (CAN) drivers"
11	help
12	  Enable CAN Driver Configuration
13
14if CAN
15
16module = CAN
17module-str = CAN
18source "subsys/logging/Kconfig.template.log_config"
19
20config CAN_INIT_PRIORITY
21	int "CAN driver init priority"
22	default 80
23	help
24	  CAN driver device initialization priority.
25
26config CAN_SHELL
27	bool "CAN shell"
28	depends on SHELL
29	select POLL
30	help
31	  Enable CAN Shell for testing.
32
33if CAN_SHELL
34
35config CAN_SHELL_TX_QUEUE_SIZE
36	int "CAN shell transmit queue size"
37	default 5
38	range 1 256
39	help
40	  Maximum number of events in the CAN shell transmit queue.
41
42config CAN_SHELL_RX_QUEUE_SIZE
43	int "CAN shell receive queue size"
44	default 5
45	range 1 256
46	help
47	  Maximum number of CAN frames in the CAN shell receive queue.
48
49endif # CAN_SHELL
50
51config CAN_STATS
52	bool "CAN controller device statistics"
53	depends on STATS
54	help
55	  Enable CAN controller device statistics.
56
57config CAN_ACCEPT_RTR
58	bool "Accept Remote Transmission Requests (RTR) frames"
59	help
60	  Accept incoming Remote Transmission Request (RTR) frames matching CAN RX filters. Unless
61	  enabled, all incoming Remote Transmission Request (RTR) frames are rejected at the driver
62	  level.
63
64config CAN_FD_MODE
65	bool "CAN FD"
66	help
67	  Enable CAN FD support. Not all CAN controllers support CAN FD.
68
69config CAN_RX_TIMESTAMP
70	bool "Receiving timestamps"
71	help
72	  This option enables a timestamp value of the CAN free running timer.
73	  The value is incremented every bit time and starts when the controller
74	  is initialized. Not all CAN controllers support timestamps.
75
76config CAN_AUTO_BUS_OFF_RECOVERY
77	bool "Automatic recovery from bus-off"
78	default y
79	help
80	  This option enables the automatic bus-off recovery according to
81	  ISO 11898-1 (recovery after 128 occurrences of 11 consecutive
82	  recessive bits). When this option is enabled, the recovery API is not
83	  available.
84
85config CAN_QEMU_IFACE_NAME
86	string "SocketCAN interface name for QEMU"
87	default ""
88	depends on QEMU_TARGET
89	help
90	  The SocketCAN interface name for QEMU. This value, if set, is given as "if" parameter to
91	  the "-object can-host-socketcan" qemu command line option. The CAN interface must be
92	  configured before starting QEMU.
93
94source "drivers/can/Kconfig.sam"
95source "drivers/can/Kconfig.sam0"
96source "drivers/can/Kconfig.stm32"
97source "drivers/can/Kconfig.mcux"
98source "drivers/can/Kconfig.mcp2515"
99source "drivers/can/Kconfig.mcan"
100source "drivers/can/Kconfig.rcar"
101source "drivers/can/Kconfig.numaker"
102source "drivers/can/Kconfig.loopback"
103source "drivers/can/Kconfig.native_linux"
104source "drivers/can/Kconfig.sja1000"
105source "drivers/can/Kconfig.esp32"
106source "drivers/can/Kconfig.kvaser"
107source "drivers/can/Kconfig.fake"
108source "drivers/can/Kconfig.nxp_s32"
109source "drivers/can/Kconfig.tcan4x5x"
110source "drivers/can/Kconfig.mcp251xfd"
111source "drivers/can/Kconfig.xmc4xxx"
112
113source "drivers/can/transceiver/Kconfig"
114
115endif # CAN
116