[PATCH can-next v2 0/4] Add support for the SpacemiT K1 CAN0 controller
From: Liu Changjie
Date: Wed Dec 02 2026 - 09:56:48 EST
The application processor CAN0 on SpacemiT K1 uses the FlexCAN
interrupt and mailbox paths. The K1 binding describes its two clocks
and reset line. The SoC device tree change was submitted separately.
Changes in v2:
- Order the required K1 properties as clocks, clock-names, resets.
- Use 32-bit register writes for ECC RAM initialization on all ECC
variants. Rename the helper to flexcan_memset() and drop the K1 quirk.
- Use a managed optional exclusive reset and drop the K1-only check.
- Add the K1 hardware features to the flexcan.h table in patch 4.
v1 cover:
https://lists.infradead.org/pipermail/linux-riscv/2026-November/105417.html
v1 patches start here:
https://lists.infradead.org/pipermail/linux-riscv/2026-November/105418.html
After a power cycle, the revised driver bound to CAN0 on an Orange Pi
RV2. With a ZLG USBCANFD-200U as the peer, the board sent and received
54 Classical CAN frames per direction at 500 kbit/s and 192 CAN FD
frames per direction at 1/5 Mbit/s. All frames matched, including the
FD cases with and without BRS.
Frédéric Mahé tested v1 on a Banana Pi BPI-F3 with v7.4-rc5. Internal
loopback returned 100/100 Classical CAN frames and 100/100 CAN FD
frames. The board had no external transceiver for that test.
https://lore.kernel.org/r/20261201181104.1436476-2-frederic.mahe@xxxxxxxx
Codex assisted with the patches, changelogs and local testing.
Gemini Carbon assisted with a preliminary review of the first three revised patches.
---
Liu Changjie (4):
dt-bindings: can: flexcan: document the SpacemiT K1 controller
can: flexcan: use 32-bit writes to initialize ECC RAM
can: flexcan: add support for SpacemiT K1 CAN0
can: flexcan: document SpacemiT K1 hardware features
.../devicetree/bindings/net/can/fsl,flexcan.yaml | 21 +++++++++++++++-
drivers/net/can/flexcan/flexcan-core.c | 28 ++++++++++++++++++++--
drivers/net/can/flexcan/flexcan.h | 1 +
3 files changed, 47 insertions(+), 3 deletions(-)
---
base-commit: 573af801552999954caa8347e4490b04cf4763f0
change-id: 20261202-can0-v2-f6703496f108
Best regards,
--
Liu Changjie <liucj1228@xxxxxxxxxxx>