can: rockchip: add RK3588 CAN support
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected] change-id 20260702-master-8c52be892a3fVersions newest first
- v6 Latest4 patches 10 repliesApplied
- v50 of 4 patches 0 repliesSuperseded
- v40 of 4 patches 0 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 0 of 4 patches | 0 replies | Superseded inferred link | |
| v2 | 0 of 4 patches | 0 replies | Superseded inferred link | |
| v1 | 0 of 3 patches | 0 replies | Superseded |
Changes in v6 from the cover letter
- Move the CAN0 assigned clock properties from the Haikou carrier board
DTS to the Tiger SoM DTSI, as suggested by Quentin.
- Collect Quentin's Tested-by tag for the RK3588 CAN controller nodes.
- Link to v5: https://lore.kernel.org/lkml/[email protected]
Patches in v6 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | dt-bindings: can: rockchip: add rk3588 CAN-FD compatibleDocumentation/ | +3 | 1 reply | |
| 2/4 | can: rockchip: add RK3588 CAN supportdrivers/ drivers/ drivers/ | +34 | 6 replies | |
| 3/4 | arm64: dts: rockchip: add CAN-FD nodes for RK3588arch/ | +39 | 0 replies | |
| 4/4 | arm64: dts: rockchip: Enable CAN controller on RK3588-Tiger-Haikouarch/ arch/ | +9 | 1 reply |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Heiko Stuebner | Krzysztof Kozlowski | Quentin Schulz |
|---|---|---|---|
| 1/4 | R-b | A-b | |
| 2/4 | T-b R-b | ||
| 3/4 | R-b T-b | ||
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v6 0/4] can: rockchip: add RK3588 CAN support
Add support for the RK3588 CAN controller.
RK3588 integrates three CAN-FD controllers that are closely related to the existing Rockchip CAN-FD IP already supported in the kernel. The RK3588 variant is not fully compatible with RK3568v2 because the RX FIFO count register field has a different layout.
This series therefore:
- extends the existing Rockchip CAN-FD binding with the rockchip,rk3588-canfd compatible
- adds a dedicated RK3588 match entry and devtype in the driver
- describes the three CAN controller nodes in rk3588-base.dtsi
- enables CAN on the RK3588 Tiger Haikou board
RK3588 encodes RX_FIFO_CNT in bits 7:5 instead of 6:4. This difference was found by comparing Rockchip's vendor kernel 6.1 CAN support for RK3568 and RK3588, and was also confirmed by runtime testing.
RK3588 uses the existing erratum 5 empty-FIFO workaround. Based on Heiko's testing, this series also enables the erratum 6 workaround for extended frames being transmitted as standard frames.
CAN-FD is enabled for RK3588. The BRS bus-off issue seen in earlier testing was caused by the transmit delay compensation setting. With RKCANFD_REG_TRANSMIT_DELAY_COMPENSATION programmed to 0 on RK3588, CAN-FD with BRS works in local testing.
Tested on an embedfire,rk3588-lubancat-5io board with can0/can1 directly connected, no other device on the bus, 60 Ohm bus termination, and a 300 MHz CAN clock. The test used 500 kbit/s arbitration bitrate and 1, 3 and 5 Mbit/s data bitrates. The 5 Mbit/s data phase test ran for 15 minutes with:
ip link set can0 type can bitrate 500000 sample-point 0.8 dbitrate 5000000 dsample-point 0.8 fd on berr-reporting on ip link set can1 type can bitrate 500000 sample-point 0.8 dbitrate 5000000 dsample-point 0.8 fd on berr-reporting on cangen can0 -I 2 -Li -Di -p 10 -f -g 1 -c32 -b
cansequence -rv can1 -f
The receiver reported continuous sequence wrap-around messages up to sequence wrap around (37219). Both interfaces reported 9528377 packets and 150667356 bytes, with 0 bus-errors, 0 error-warn, 0 error-pass and 0 bus-off events.
---
v5 -> v6:
- Move the CAN0 assigned clock properties from the Haikou carrier board
DTS to the Tiger SoM DTSI, as suggested by Quentin.
- Collect Quentin's Tested-by tag for the RK3588 CAN controller nodes.
- Link to v5: https://lore.kernel.org/lkml/[email protected]
v4 -> v5:
- collect Quentin's Reviewed-by tag for the RK3588 CAN controller nodes
- Link to v4: https://lore.kernel.org/lkml/[email protected]
v3 -> v4:
- disable TDC on RK3588 by programming
RKCANFD_REG_TRANSMIT_DELAY_COMPENSATION to 0
- drop RKCANFD_QUIRK_CANFD_BROKEN for RK3588 and enable CAN-FD support
- document successful RK3588 CAN-FD/BRS testing at 500 kbit/s
arbitration bitrate and 1, 3 and 5 Mbit/s data bitrates
- collect Krzysztof's Acked-by tag for the binding patch
- Link to v3: https://lore.kernel.org/lkml/[email protected]
v2 -> v3:
- Move the Changelog below ---
- Collect Heiko's Reviewed-by and the driver patch Tested-by tag
- Use Co-developed-by for Heiko's RK3588 contributions and add his Signed-off-by
- Link to v2: https://lore.kernel.org/lkml/[email protected]
v1 -> v2:
- use real author name
- fold the single-compatible entries into an enum, as suggested by Krzysztof
- enable the erratum 6 workaround for RK3588 based on Heiko's testing
- add Heiko's RK3588 Tiger Haikou CAN enablement patch
- keep RKCANFD_QUIRK_CANFD_BROKEN enabled for RK3588 so CAN-FD stays disabled
- document the RK3588 CAN-FD/BRS bus-off failure mode
- Link to v1: https://lore.kernel.org/lkml/[email protected]
To: Marc Kleine-Budde <[email protected]>
To: [email protected]
To: Vincent Mailhol <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Heiko Stuebner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
Cunhao Lu (3):
dt-bindings: can: rockchip: add rk3588 CAN-FD compatible
can: rockchip: add RK3588 CAN support
arm64: dts: rockchip: add CAN-FD nodes for RK3588
Heiko Stuebner (1):
arm64: dts: rockchip: Enable CAN controller on RK3588-Tiger-Haikou
.../bindings/net/can/rockchip,rk3568v2-canfd.yaml | 4 ++- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 39 ++++++++++++++++++++++ .../boot/dts/rockchip/rk3588-tiger-haikou.dts | 4 +++ arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi | 5 +++ drivers/net/can/rockchip/rockchip_canfd-core.c | 17 ++++++++++ drivers/net/can/rockchip/rockchip_canfd-rx.c | 5 ++- drivers/net/can/rockchip/rockchip_canfd.h | 14 +++++++- 7 files changed, 85 insertions(+), 3 deletions(-)
---
base-commit: 0ce37745d4bfbc493f718169c3974898ffec8ee7
change-id: 20260702-master-8c52be892a3f
Best regards,
Signature · 1 line
Cunhao Lu <[email protected]>