1# MCUX CAN configuration options
2
3# Copyright (c) 2019 Vestas Wind Systems A/S
4# SPDX-License-Identifier: Apache-2.0
5
6config CAN_MCUX_FLEXCAN
7	bool "NXP FlexCAN driver"
8	default y
9	depends on DT_HAS_NXP_FLEXCAN_ENABLED
10	depends on CLOCK_CONTROL
11	select PINCTRL
12	help
13	  Enable support for the NXP FlexCAN driver.
14
15if CAN_MCUX_FLEXCAN
16
17config CAN_MCUX_FLEXCAN_FD
18	bool # hidden
19	default y
20	depends on DT_HAS_NXP_FLEXCAN_FD_ENABLED && CAN_FD_MODE
21	help
22	  Enable support for CAN FD capable NXP FlexCAN devices.
23
24config CAN_MCUX_FLEXCAN_WAIT_TIMEOUT
25	int "Maximum number of wait loop iterations"
26	default 10000
27	help
28	  Maximum number of wait loop iterations for the MCUX FlexCAN HAL when entering/leaving
29	  freeze mode.
30
31config CAN_MAX_MB
32	int "Maximum number of message buffers for concurrent active instances"
33	default 16
34	depends on SOC_SERIES_S32K3 || SOC_SERIES_S32K1
35	range 1 96 if SOC_SERIES_S32K3
36	range 1 32 if SOC_SERIES_S32K1 && !SOC_S32K142W && !SOC_S32K144W
37	range 1 64 if SOC_S32K142W || SOC_S32K144W
38	help
39	  Defines maximum number of message buffers for concurrent active instances.
40
41config CAN_MAX_FILTER
42	int "Maximum number of concurrent active RX filters"
43	default 5
44	range 1 15 if SOC_SERIES_KINETIS_KE1XF || SOC_SERIES_KINETIS_K6X
45	range 1 13 if (SOC_SERIES_IMXRT10XX || SOC_SERIES_IMXRT11XX) && CAN_MCUX_FLEXCAN_FD
46	range 1 63 if SOC_SERIES_IMXRT10XX || SOC_SERIES_IMXRT11XX
47	range 1 96 if SOC_SERIES_S32K3
48	range 1 32 if SOC_SERIES_S32K1 && !SOC_S32K142W && !SOC_S32K144W
49	range 1 64 if SOC_S32K142W || SOC_S32K144W
50	help
51	  Defines maximum number of concurrent active RX filters
52
53endif # CAN_MCUX_FLEXCAN
54
55config CAN_MCUX_MCAN
56	bool "MCUX MCAN driver"
57	default y
58	depends on DT_HAS_NXP_LPC_MCAN_ENABLED
59	depends on CLOCK_CONTROL
60	select CAN_MCAN
61	select PINCTRL
62	select RESET
63	help
64	  Enable support for mcux mcan driver.
65