Skip to content

Commit

Permalink
can: rockchip_canfd: add driver for Rockchip CAN-FD controller
Browse files Browse the repository at this point in the history
Add driver for the Rockchip CAN-FD controller.

The IP core on the rk3568v2 SoC has 12 documented errata. Corrections
for these errata will be added in the upcoming patches.

Since several workarounds are required for the TX path, only add the
base driver that only implements the RX path.

Although the RX path implements CAN-FD support, it's not activated in
ctrlmode_supported, as the IP core in the rk3568v2 has problems with
receiving or sending certain CAN-FD frames.

Tested-by: Alibek Omarov <a1ba.omarov@gmail.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20240904-rockchip-canfd-v5-4-8ae22bcb27cc@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Marc Kleine-Budde committed Sep 4, 2024
1 parent 8b2f4d0 commit ff60bfb
Show file tree
Hide file tree
Showing 10 changed files with 1,395 additions and 0 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -19736,6 +19736,7 @@ R: kernel@pengutronix.de
L: linux-can@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/net/can/rockchip,rk3568v2-canfd.yaml
F: drivers/net/can/rockchip/

ROCKCHIP CRYPTO DRIVERS
M: Corentin Labbe <clabbe@baylibre.com>
Expand Down
1 change: 1 addition & 0 deletions drivers/net/can/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ source "drivers/net/can/m_can/Kconfig"
source "drivers/net/can/mscan/Kconfig"
source "drivers/net/can/peak_canfd/Kconfig"
source "drivers/net/can/rcar/Kconfig"
source "drivers/net/can/rockchip/Kconfig"
source "drivers/net/can/sja1000/Kconfig"
source "drivers/net/can/softing/Kconfig"
source "drivers/net/can/spi/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/net/can/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ obj-$(CONFIG_CAN_SLCAN) += slcan/
obj-y += dev/
obj-y += esd/
obj-y += rcar/
obj-y += rockchip/
obj-y += spi/
obj-y += usb/
obj-y += softing/
Expand Down
9 changes: 9 additions & 0 deletions drivers/net/can/rockchip/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: GPL-2.0

config CAN_ROCKCHIP_CANFD
tristate "Rockchip CAN-FD controller"
depends on OF || COMPILE_TEST
select CAN_RX_OFFLOAD
help
Say Y here if you want to use CAN-FD controller found on
Rockchip SoCs.
9 changes: 9 additions & 0 deletions drivers/net/can/rockchip/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_CAN_ROCKCHIP_CANFD) += rockchip_canfd.o

rockchip_canfd-objs :=
rockchip_canfd-objs += rockchip_canfd-core.o
rockchip_canfd-objs += rockchip_canfd-rx.o
rockchip_canfd-objs += rockchip_canfd-timestamp.o
rockchip_canfd-objs += rockchip_canfd-tx.o
Loading

0 comments on commit ff60bfb

Please sign in to comment.