Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: rockchip: support CAN1-CAN2-UART4 adapter for RK3588 Jaguar + enable CAN0
@ 2026-07-30 13:18 Quentin Schulz
  2026-07-30 13:18 ` [PATCH 1/2] arm64: dts: rockchip: enable CAN0 on RK3588 Jaguar Quentin Schulz
  2026-07-30 13:18 ` [PATCH 2/2] arm64: dts: rockchip: support CAN1-CAN2-UART4 adapter for " Quentin Schulz
  0 siblings, 2 replies; 6+ messages in thread
From: Quentin Schulz @ 2026-07-30 13:18 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
  Cc: Cunhao Lu, Marc Kleine-Budde, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, Quentin Schulz

This depends on the RK3588 CAN driver support series: 
https://lore.kernel.org/linux-rockchip/tencent_76C8BC251C8C3C068C23BAF859351DD3300A@qq.com/
I send this series early to try to prove that CAN2 also works on RK3588
as Cunhao Lu stated they only tested CAN0<->CAN1 loop. I cannot test
CAN-FD as neither Rk3588 Jaguar nor the Haikou carrierboard for RK3588
Tiger have CAN-FD-able transceivers according to their datasheets.

RK3588 Jaguar exposes three CAN busses. CAN0 on the P5 connector on the
SBC itself. CAN1 and CAN2 via the proprietary Mezzanine connector which
are then exposed via the CAN1-CAN2-UART4 Mezzanine adapter.

Enable the three CAN busses. This was tested with

ip link set canX up type can bitrate 1000000
ip link set canY up type can bitrate 1000000
cansequence canX -p
cansequence canY -r -q -v

with canX being one of the three RK3588 CAN controllers and canY being a
USB-CAN Theobroma Systems Seal device. 200k+ iterations in both
directions without an issue reported by cansequence. I hit the same
issue as reported by Cunaho Lu here:
https://lore.kernel.org/linux-rockchip/tencent_D802EB485A801362BF9F54130C0D990C6206@qq.com/
Namely a bunch of:
rockchip_canfd fea60000.can can0: rkcanfd_tx_tail_is_eff: echo_skb[0]=NULL tx_head=0x00060f7d tx_tail=0x00060f7c

Add support for the CAN1-CAN2-UART4 adapter.

RS232 UART was tested with:
- 1 256-character transfer sent to USB adapter (and checked),
- 1 256-character transfer received from USB adapter (and checked),
done 100 times for each baudrate among 9600, 19200, 38400, 57600, 115200
and 230400.

When the first transfer after a change of baudrate happens in the
direction "to USB", the first (few) characters are missing, when
switching from 57600 to 115200. It doesn't happen when the first
transfer after a change of baudrate happens in the direction "from USB".
I have not investigated this issue, maybe a script issue.

My script is:

for baud in 9600 19200 38400 57600 115200 230400; do
  ./test-serial.py --baudrate $baud -n 100 -B /dev/ttyS4 /dev/ttyUSB0
done
for baud in 9600 19200 38400 57600 115200 230400; do
  ./test-serial.py --baudrate $baud -n 100 -B /dev/ttyUSB0 /dev/ttyS4
done

test-serial.py is
https://git.embedded.cherry.de/som-tools.git/tree/testing/serial/test-serial.py

Another way is:

./test-serial.py -n 100 -B --min-baudrate 9600 --max-baudrate 250000 \
		-F baudrate /dev/ttyS4 /dev/ttyUSB0
./test-serial.py -n 100 -B --min-baudrate 9600 --max-baudrate 250000 \
		-F baudrate /dev/ttyUSB0 /dev/ttyS4

The latter will work just fine, the former will have issues mostly with
baudrates 230400 and 115200.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Quentin Schulz (2):
      arm64: dts: rockchip: enable CAN0 on RK3588 Jaguar
      arm64: dts: rockchip: support CAN1-CAN2-UART4 adapter for RK3588 Jaguar

 arch/arm64/boot/dts/rockchip/Makefile              |  4 ++++
 .../rockchip/rk3588-jaguar-can1-can2-uart4.dtso    | 27 ++++++++++++++++++++++
 arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts     | 16 +++++++++++++
 3 files changed, 47 insertions(+)
---
base-commit: 942a6a4d3a94f24d39dd4dc2664c950972d66c59
change-id: 20260730-jaguar-can-9e36be67dec2

Best regards,
--  
Quentin Schulz <quentin.schulz@cherry.de>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-30 13:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30 13:18 [PATCH 0/2] arm64: dts: rockchip: support CAN1-CAN2-UART4 adapter for RK3588 Jaguar + enable CAN0 Quentin Schulz
2026-07-30 13:18 ` [PATCH 1/2] arm64: dts: rockchip: enable CAN0 on RK3588 Jaguar Quentin Schulz
2026-07-30 13:34   ` sashiko-bot
2026-07-30 13:18 ` [PATCH 2/2] arm64: dts: rockchip: support CAN1-CAN2-UART4 adapter for " Quentin Schulz
2026-07-30 13:35   ` sashiko-bot
2026-07-30 13:44     ` Quentin Schulz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox