Commit Graph

40 Commits

Author SHA1 Message Date
The Nguyen 95cc5f53b8 drivers: can: initial support for Renesas RA CANFD
Add support for CAN driver running on Renesas RA CANFD

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-10-25 08:55:17 +02:00
Gerard Marull-Paretas cdcb05527d drivers: can: nrf: add driver
Add driver for the Nordic CAN peripheral, based on Bosch MCAN IP.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-30 05:20:50 -07:00
Andriy Gelman c7dab3df08 drivers: can: Add xmc4xxx CAN support
Adds CAN drivers for XMC4xxx SoCs.

XMC4xxx has multiple CAN nodes. The nodes share a common clock and
a message object pool.

The CAN nodes do not have a loopback mode. Instead there is an
internal bus which can be used to exchange messages between
nodes on the SoC. For this reason tests/samples which rely on the
loopback feature have been disabled.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-01-30 19:06:06 +01:00
Henrik Brix Andersen fe74ffe2d5 drivers: can: drop POSIX from the native Linux SocketCAN driver name
Rename the native Linux SocketCAN driver to reflect that it can can now be
used in both native_posix and native_sim (with or without an embedded
C-library).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-12 14:28:26 +00:00
Henrik Brix Andersen c86f5c0f61 drivers: can: native_posix_linux: add embedded libc support
Add support for compiling the native POSIX Linux (SocketCAN) driver with an
embedded C-library.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-10 09:24:30 +01:00
cyliang tw b59810650d drivers: can: support for Nuvoton numaker series
Add Nuvoton numaker series can-fd controller based on mcan.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-10-24 09:31:47 -05:00
Andriy Gelman 31bef35897 drivers: can: mcp251xfd: Add driver
This continue PR #31270. The updated changes are:
- Updated to work with latest zephyr
- Inplace reads/writes of registers
- Batch read of RX messages when multiple messages can be read
- FIFO abstraction of RX/TEF queues
- Handle ivmif errors
- Use READ_CRC for register reads
- Use bitmasks instead of bitfield members
- Rename mcp25xxfd to mcp251xfd
- General cleanups

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-10-01 09:20:37 +03:00
Abram Early 33277f9b48 drivers: can: Implement MCP25xxFD driver
Implementation for Microchip MCP2517FD/MCP2518FD SPI based CAN-FD
controller.

Signed-off-by: Abram Early <abram.early@gmail.com>
2023-10-01 09:20:37 +03:00
Henrik Brix Andersen 9bd62f16b6 drivers: can: add tcan4x5x CAN controller driver
Add driver for the TI TCAN4x5x series of CAN controllers. These CAN
controllers are based on the Bosch M_CAN IP and interfaced via an SPI bus.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-09-11 19:55:44 +02:00
Henrik Brix Andersen de172f88d0 drivers: can: stm32h7: fdcan: rename driver to match reference manuals
Rename the STM32H7 FDCAN driver Kconfig symbol and implementation file to
match the naming used in the ST reference manuals.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-08-16 13:03:00 +02:00
Henrik Brix Andersen 8410e9ab85 drivers: can: stm32: fdcan: rename driver to match reference manuals
Rename the STM32 FDCAN driver Kconfig symbol and implementation file to
match the naming used in the ST reference manuals.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-08-16 13:03:00 +02:00
Henrik Brix Andersen 913e59c5ea drivers: can: stm32: bxcan: rename driver to match reference manuals
Rename the STM32 bxCAN driver DTS compatible, Kconfig symbol, and
implementation file to match the naming used in the ST reference manuals.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-08-16 13:03:00 +02:00
Daniel Leung 26ecaba4af drivers: syscalls: use zephyr_syscall_header
This adds a few line use zephyr_syscall_header() to include
headers containing syscall function prototypes.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-06-17 07:57:45 -04:00
Kamil Serwus 632704e04b sam: can: CAN driver for SAM0 socs
Driver was based on can_sam. SAMC21 has only 1 interrupt for one
can "output", so can interrupt has to executes two lines of
interrupts.
CAN is configured to use OSC48M clock via GLCK7. GLCK7 is set
by divider configured from dts.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>
2023-05-22 08:03:58 +00:00
Cong Nguyen Huu cad17ff933 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>
2023-04-29 12:23:40 +02:00
Henrik Brix Andersen f30a5969d0 drivers: can: make the fake CAN driver generally available
Make the fake CAN controller driver available for use in tests outside of
the CAN shell test.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-11-02 08:19:33 -07:00
Henrik Brix Andersen 58e12726bf drivers: can: add driver for the Kvaser PCIcan CAN controller PCI card
Add driver for the Kvaser PCIcan CAN controller PCI card for use with QEMU.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-11-01 15:22:31 -04:00
Martin Jäger 77e4c6515a drivers: can: native_posix_linux: initial implementation
This driver provides an interface to SocketCAN interfaces of the Linux
system running a Zephyr application with the native_posix board. These
interfaces may be virtual or actual CAN buses.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-09-09 10:08:59 +02:00
Henrik Brix Andersen aeb9fd68e7 drivers: can: add ESP32 TWAI CAN controller driver
Add ESP32 TWAI CAN controller driver. The TWAI is register-compatible with
the NXP SJA1000 CAN controller.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-07-30 17:32:04 +01:00
Henrik Brix Andersen 491e831436 drivers: can: add NXP SJA1000 common driver backend
Add a common driver backend for NXP SJA1000 compatible CAN controllers.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-07-30 17:32:04 +01:00
Henrik Brix Andersen d22a9909a1 drivers: net: canbus: move CAN bus network driver to drivers/net
Move the CAN bus network driver from drivers/can to drivers/net as it
implements a network driver, not a CAN controller driver.

Use a separate Kconfig for enabling the CAN bus network driver instead of
piggybacking on the SocketCAN Kconfig. This allows for other
(e.g. out-of-tree) SocketCAN transports.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-13 10:34:51 +02:00
Alexander Wachter e24b087918 drivers: can: socketCAN: Move socket code to own file
Move the code for socket instanciation from each driver
to a generic driver, that makes an instance of a socketCAN
net device for the chosen node.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-04-08 09:31:51 +02:00
Henrik Brix Andersen 0783b51ee1 drivers: can: add generic GPIO controlled CAN transceiver driver
Add generic driver for GPIO controlled CAN transceivers.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-15 14:32:29 -05:00
Henrik Brix Andersen e9c9caa80d net: remove unmaintained 6LoCAN implementation
Remove the unmaintained, experimental 6LoCAN (IPv6 over CAN bus)
implementation.

Fixes: #42559

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-09 18:07:31 +01:00
Jeremy Wood 1caa7f6cb9 drivers: can: m_can variant for STM32H7
* New m_can driver variant for STM32H7, as it uses the complete m_can
register set.
* Fix definitions for CAN_MCAN_RXF0S_F0FL, CAN_MCAN_TXEFC_EFSA_POS.

Signed-off-by: Jeremy Wood <jeremy@bcdevices.com>
2022-01-19 16:07:54 -05:00
Alexander Wachter 6e5c8a339d drivers: can: Add frontend for Atmel SAM M_CAN controller
This commit adds a frontend for the generic Bosch m_can driver
for Atmel SAM series.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-01-18 10:39:55 -05:00
Henrik Brix Andersen 93c6b7413b drivers: can: add NXP LPC MCAN front-end for the Bosch MCAN driver
Add a NXP LPC MCAN-specific front-end for the generic Bosch MCAN
driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-01-10 12:00:20 +01:00
Daniel Leung a062463d7b drivers: can: build as static library
Instead of putting object files inside libzephyr.a,
simply build a separate static library as most other
driver types are doing this already.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-08-17 06:06:03 -04:00
Julien Massot 3ced1ddb85 drivers: can: Add Renesas R-Car driver
This driver is for classic CAN, it makes use of CAN interface
in FIFO mode.

This driver support Standard ID as well as Extended ID.

Tested on H3ULCB, Ebisu platform, with external adapter and
in loopback mode.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-06-07 12:06:21 +02:00
Alexander Wachter 1c50ef6c43 drivers: can: Implement Bosch M_CAN driver
Implementation of the Bosch M_CAN IP driver.
This driver is just the base for a specific SoC implementation.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2021-05-07 12:36:10 -05:00
Alexander Wachter 35f01673ac net: l2: 6LoCAN implementation
This commit is an implementation of 6LoCAN, a 6Lo adaption layer for
Controller Area Networks. 6LoCAN is not yet standardised.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-08-08 13:25:01 +03:00
Alexander Wachter 75f3e17b45 drivers: can: Add CAN shell
Implement a CAN shell. With this shell you can send messages,
attach and tetach filters.
Messages that match the attached filters are printed to the shell.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-07-29 10:27:54 +03:00
Henrik Brix Andersen 652fdfe3a1 drivers: can: add support for the NXP Kinetis FlexCAN controller
Add MCUX driver shim for the NXP Kinetis FlexCAN CAN bus controller.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-06-24 14:33:46 -05:00
Alexander Wachter b0bc68e85e drivers: can: rename drivers to can_<dev name>
The filenames of the can drivers were not consisten.
Changed them to can_<dev name>

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-05-12 16:54:49 -04:00
Alexander Wachter 0e807c3f54 drivers: can: Add loopback driver
This commit implements a CAN loopback device. This device is used
for testing when no CAN controller is available on the hardware.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-05-12 16:54:49 -04:00
Alexander Wachter 7ddbade257 drivers: can: rework can_attach_msgq
can_attach_msgq can be implemented as a wrapper of can_attach_isr.
This is implemented as a common function for all drives and reduces
the complexity of the specific drivers. Since this is common to
multi instances of drivers too, it is removed from the API struct.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-05-12 16:54:49 -04:00
Karsten Koenig 35b9308488 drivers: can: mcp2515: Add driver for MCP2515 CAN controller
The MCP2515 is a CAN controller that can be connected via SPI to an
host MCU. This driver adds support for the MCP2515 as a new driver in
the CAN subsystem.
As it is a SPI peripheral it uses a thread for its interrupt
handling and the received message filtering is done inside this
interrupt thread, as the MCP2515 filter capabilities are not sufficient
for the Zephyr CAN interface.
The driver was validated with an external CAN logger and the adjusted
CAN sample application.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-04-17 16:12:30 -04:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Alexander Wachter 2976ac351d drivers: can: Add CAN driver support for STM32
This commit adds low level driver support for STM32 micro controllers.
It is tested on stm32f072b in loopback and normal mode.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-05-19 20:19:30 +02:00
Alexander Wachter d3101b1fa4 drivers: can: Add syscall handlers for CAN API
This commit adds generic syscall handlers for the CAN API

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-05-19 20:19:30 +02:00