Skip to content

Commit 0dc2107

Browse files
AaronDotMingcongBai
authored andcommitted
FROMLIST: can: Add Loongson CAN-FD controller driver
Add support for the CAN-FD controller integrated into Loongson-2K series SoCs. The controller supports both Classic CAN and CAN FD, with up to 8 transmit buffers, hardware timestamping, error counters, and various control modes (loopback, listen-only, one-shot, non-ISO FD, etc.). The driver implements: - NAPI for RX path - TX buffer management with echo skb support - Bus error reporting and fault confinement state handling - Bit timing configuration for nominal and data phase - Secondary Sample Point (SSP) configuration for high bitrates Co-developed-by: Bingxiong Li <libingxiong@loongson.cn> Signed-off-by: Bingxiong Li <libingxiong@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/loongarch/cover.1782787997.git.zhoubinbin@loongson.cn/ Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
1 parent 7f17caa commit 0dc2107

4 files changed

Lines changed: 1712 additions & 0 deletions

File tree

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15077,6 +15077,13 @@ F: arch/loongarch/
1507715077
F: drivers/*/*loongarch*
1507815078
F: drivers/cpufreq/loongson3_cpufreq.c
1507915079

15080+
LOONGSON CAN FD DRIVER
15081+
M: Bingxiong Li <libingxiong@loongson.cn>
15082+
M: Binbin Zhou <zhoubinbin@loongson.cn>
15083+
L: linux-can@vger.kernel.org
15084+
S: Maintained
15085+
F: drivers/net/can/loongson_canfd/
15086+
1508015087
LOONGSON GPIO DRIVER
1508115088
M: Yinbo Zhu <zhuyinbo@loongson.cn>
1508215089
L: linux-gpio@vger.kernel.org

drivers/net/can/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,17 @@ config CAN_KVASER_PCIEFD
189189
Kvaser M.2 PCIe 4xCAN
190190
Kvaser PCIe 8xCAN
191191

192+
config CAN_LOONGSON_CANFD
193+
tristate "Loongson CAN-FD controller"
194+
depends on HAS_IOMEM
195+
select REGMAP_MMIO
196+
help
197+
This is a canfd driver switch for the Loongson platform,
198+
integrated with the Loongson-2K series SoCs.
199+
200+
To compile as a module, choose M here: the module will be
201+
called loongson_canfd.
202+
192203
config CAN_SLCAN
193204
tristate "Serial / USB serial CAN Adaptors (slcan)"
194205
depends on TTY

drivers/net/can/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ obj-$(CONFIG_CAN_GRCAN) += grcan.o
2727
obj-$(CONFIG_CAN_IFI_CANFD) += ifi_canfd/
2828
obj-$(CONFIG_CAN_JANZ_ICAN3) += janz-ican3.o
2929
obj-$(CONFIG_CAN_KVASER_PCIEFD) += kvaser_pciefd/
30+
obj-$(CONFIG_CAN_LOONGSON_CANFD) += loongson_canfd.o
3031
obj-$(CONFIG_CAN_MSCAN) += mscan/
3132
obj-$(CONFIG_CAN_M_CAN) += m_can/
3233
obj-$(CONFIG_CAN_PEAK_PCIEFD) += peak_canfd/

0 commit comments

Comments
 (0)