drivers: can: support NXP S32 CANEXCEL
This patch introduces support for NXP S32 CANEXCEL (CANXL) peripheral. CAN protocol supporting: - CAN classic - CAN FD Remote transmission request is not supported as this feature is not available on NXP S32 CANXL HAL. Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
This commit is contained in:
parent
340ed20c12
commit
cad17ff933
5 changed files with 1153 additions and 0 deletions
|
@ -36,5 +36,6 @@ zephyr_library_sources_ifdef(CONFIG_CAN_KVASER_PCI can_kvaser_pci.c)
|
|||
|
||||
zephyr_library_sources_ifdef(CONFIG_USERSPACE can_handlers.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_CAN_SHELL can_shell.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_CAN_NXP_S32_CANXL can_nxp_s32_canxl.c)
|
||||
|
||||
add_subdirectory(transceiver)
|
||||
|
|
|
@ -99,6 +99,7 @@ source "drivers/can/Kconfig.sja1000"
|
|||
source "drivers/can/Kconfig.esp32"
|
||||
source "drivers/can/Kconfig.kvaser"
|
||||
source "drivers/can/Kconfig.fake"
|
||||
source "drivers/can/Kconfig.nxp_s32"
|
||||
|
||||
source "drivers/can/transceiver/Kconfig"
|
||||
|
||||
|
|
27
drivers/can/Kconfig.nxp_s32
Normal file
27
drivers/can/Kconfig.nxp_s32
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Copyright 2022 NXP
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config CAN_NXP_S32_CANXL
|
||||
bool "NXP S32 CANXL driver"
|
||||
default y
|
||||
depends on DT_HAS_NXP_S32_CANXL_ENABLED
|
||||
help
|
||||
Enable support for NXP S32 CANXL driver.
|
||||
|
||||
if CAN_NXP_S32_CANXL
|
||||
config CAN_NXP_S32_MAX_RX
|
||||
int "Maximum number of RX descriptors"
|
||||
depends on CAN_NXP_S32_CANXL
|
||||
default 16
|
||||
range 1 128
|
||||
help
|
||||
Maximum number of RX descriptors.
|
||||
|
||||
config CAN_NXP_S32_MAX_TX
|
||||
int "Maximum number of TX descriptors"
|
||||
depends on CAN_NXP_S32_CANXL
|
||||
default 16
|
||||
range 1 128
|
||||
help
|
||||
Maximum number of TX descriptors.
|
||||
endif # CAN_NXP_S32_CANXL
|
1097
drivers/can/can_nxp_s32_canxl.c
Normal file
1097
drivers/can/can_nxp_s32_canxl.c
Normal file
File diff suppressed because it is too large
Load diff
27
dts/bindings/can/nxp,s32-canxl.yaml
Normal file
27
dts/bindings/can/nxp,s32-canxl.yaml
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Copyright 2022 NXP
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: NXP S32 CANXL controller
|
||||
|
||||
compatible: "nxp,s32-canxl"
|
||||
|
||||
include: ["can-fd-controller.yaml", "pinctrl-device.yaml"]
|
||||
|
||||
properties:
|
||||
reg:
|
||||
required: true
|
||||
|
||||
interrupts:
|
||||
required: true
|
||||
|
||||
clock-frequency:
|
||||
type: int
|
||||
required: true
|
||||
description: Module clock frequency in Hz.
|
||||
|
||||
pinctrl-0:
|
||||
required: true
|
||||
|
||||
pinctrl-names:
|
||||
required: true
|
Loading…
Add table
Add a link
Reference in a new issue