From: "Cunhao Lu" <1579567540@qq.com>
To: "Marc Kleine-Budde" <mkl@pengutronix.de>, heiko <heiko@sntech.de>
Cc: linux-can <linux-can@vger.kernel.org>,
mailhol <mailhol@kernel.org>, kernel <kernel@pengutronix.de>,
robh <robh@kernel.org>, krzk+dt <krzk+dt@kernel.org>,
conor+dt <conor+dt@kernel.org>,
devicetree <devicetree@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-rockchip <linux-rockchip@lists.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] can: rockchip: add RK3588 CAN-FD support
Date: Fri, 3 Jul 2026 13:41:59 +0800 [thread overview]
Message-ID: <tencent_358CC86827C08D8405142316F9053629D00A@qq.com> (raw)
In-Reply-To: <20260702-accelerated-shoebill-of-elevation-76f536-mkl@pengutronix.de>
Hi Marc,
> Then CAN-FD is broken. :/
>
> Maybe in a later patch we can hack something, to allow working
> configurations.
I did some more tests and found that the immediate bus-off with BRS is
related to the transmit delay compensation setting.
After setting RKCANFD_REG_TRANSMIT_DELAY_COMPENSATION to 0, i.e.
disabling TDC, CAN-FD with BRS works on RK3588 in my setup. I tested the
same command with 500 kbit/s arbitration bitrate and 1, 3 and 5 Mbit/s
data bitrate.
The 5 Mbit/s data phase test setup was:
CAN clock: 300 MHz
can0 <-> can1 directly connected
no other devices on the bus
bus termination: 60 Ohm
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 test ran for 15 minutes. The receiver reported continuous sequence
wrap-around messages, e.g.:
sequence wrap around (0)
sequence wrap around (1)
...
sequence wrap around (37218)
sequence wrap around (37219)
The interface statistics after the test were:
can0:
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped missed mcast
150667356 9528377 0 0 0 0
TX: bytes packets errors dropped carrier collsns
150667356 9528377 0 0 0 0
can1:
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped missed mcast
150667356 9528377 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
There were no bus errors and no bus-off events in this test.
> Can you update the description of the quirk for the rk3588 and add how
> to reproduce it?
With TDC disabled I cannot reproduce the BRS bus-off problem anymore.
This also looks different from RKCANFD_QUIRK_CANFD_BROKEN, so I do not
think RK3588 should use that quirk.
> Please keep it disabled for now.
Given the new test result, I plan to send v4 with the RK3588 TDC register
set to 0 and CAN-FD enabled for RK3588.
Regards,
Cunhao
next prev parent reply other threads:[~2026-07-03 5:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 9:23 [PATCH 2/3] can: rockchip: add RK3588 CAN-FD support Cunhao Lu
2026-07-02 11:11 ` Marc Kleine-Budde
2026-07-03 5:41 ` Cunhao Lu [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-07-02 12:45 Cunhao Lu
2026-07-02 2:53 Cunhao Lu
2026-07-02 8:15 ` Marc Kleine-Budde
[not found] <20260701070128.2096267-1-1579567540@qq.com>
2026-07-01 7:01 ` 1579567540
2026-07-01 9:55 ` Heiko Stübner
2026-07-01 11:07 ` Marc Kleine-Budde
2026-07-01 12:29 ` 💫.220
2026-07-01 16:02 ` Heiko Stübner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_358CC86827C08D8405142316F9053629D00A@qq.com \
--to=1579567540@qq.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mailhol@kernel.org \
--cc=mkl@pengutronix.de \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox