Skip to content

Commit ff60bfb

Browse files
can: rockchip_canfd: add driver for Rockchip CAN-FD controller
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>
1 parent 8b2f4d0 commit ff60bfb

File tree

10 files changed

+1395
-0
lines changed

10 files changed

+1395
-0
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19736,6 +19736,7 @@ R: kernel@pengutronix.de
1973619736
L: linux-can@vger.kernel.org
1973719737
S: Maintained
1973819738
F: Documentation/devicetree/bindings/net/can/rockchip,rk3568v2-canfd.yaml
19739+
F: drivers/net/can/rockchip/
1973919740

1974019741
ROCKCHIP CRYPTO DRIVERS
1974119742
M: Corentin Labbe <clabbe@baylibre.com>

drivers/net/can/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ source "drivers/net/can/m_can/Kconfig"
225225
source "drivers/net/can/mscan/Kconfig"
226226
source "drivers/net/can/peak_canfd/Kconfig"
227227
source "drivers/net/can/rcar/Kconfig"
228+
source "drivers/net/can/rockchip/Kconfig"
228229
source "drivers/net/can/sja1000/Kconfig"
229230
source "drivers/net/can/softing/Kconfig"
230231
source "drivers/net/can/spi/Kconfig"

drivers/net/can/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ obj-$(CONFIG_CAN_SLCAN) += slcan/
1010
obj-y += dev/
1111
obj-y += esd/
1212
obj-y += rcar/
13+
obj-y += rockchip/
1314
obj-y += spi/
1415
obj-y += usb/
1516
obj-y += softing/

drivers/net/can/rockchip/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
config CAN_ROCKCHIP_CANFD
4+
tristate "Rockchip CAN-FD controller"
5+
depends on OF || COMPILE_TEST
6+
select CAN_RX_OFFLOAD
7+
help
8+
Say Y here if you want to use CAN-FD controller found on
9+
Rockchip SoCs.

drivers/net/can/rockchip/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
obj-$(CONFIG_CAN_ROCKCHIP_CANFD) += rockchip_canfd.o
4+
5+
rockchip_canfd-objs :=
6+
rockchip_canfd-objs += rockchip_canfd-core.o
7+
rockchip_canfd-objs += rockchip_canfd-rx.o
8+
rockchip_canfd-objs += rockchip_canfd-timestamp.o
9+
rockchip_canfd-objs += rockchip_canfd-tx.o

0 commit comments

Comments
 (0)