Odroid M1 Rockchip CANBUS problems (solved)

Post Reply
chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Odroid M1 Rockchip CANBUS problems (solved)

Post by chron0 »

I am currently trying to set up an Odroid M1 as the host system for a new Voron 2.4 3D Printer instead of a Pi. I've done so succesfully in the past with another Odroid, see https://apollo.open-resource.org/missio ... components

One of the new features with Klipper is CAN bus communication with the toolhead. The documentation in the wiki about CAN is basically sparse to non-existant about rockchips built-in CAN port but I put a SN65HVD230 to the RX/TX (27+28) ports, as indicated on https://wiki.odroid.com/_detail/odroid- ... connectors

I've changed this in config.ini:

Code: Select all

[generic]
overlay_resize=16384
overlay_profile=
overlays="i2c0 can0 spi0"

[overlay_custom]
overlays="i2c0 can0"
I do seem to get the interface:

Code: Select all

can0: flags=128<NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 128  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 55  
but when I try to configure or bring it up:

Code: Select all

v0r0n /boot # ifconfig can0 up
SIOCSIFFLAGS: Invalid argument
while this comes up in dmesg:

Code: Select all

[151070.445007] rockchip_canfd fe570000.can can0: incorrect/missing data bit-timing
[151087.471996] rockchip_canfd fe570000.can can0: bitrate error 0.3%
[151087.472020] rockchip_canfd fe570000.can can0: incorrect/missing data bit-timing
[151087.472024] A link change request failed with some changes committed already. Interface can0 may have been left with an inconsistent configuration, please check.
[151222.639189] rockchip_canfd fe570000.can can0: incorrect/missing data bit-timing
[152310.589295] rockchip_canfd fe570000.can can0: incorrect/missing data bit-timing
@tobetter or anyone else having any ideas what I could be doing wrong here or what is still missing?
Because I think it would really be awesome to be able to use the rockchips native CAN bus implementation, instead of going over USB or SPI/HAT bridges...
Last edited by chron0 on Mon Sep 26, 2022 5:18 am, edited 6 times in total.

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS

Post by joerg »

Have you done like in wiki before ifconfig can0 up?
ip link set can0 type can bitrate 125000 loopback on

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS

Post by chron0 »

Code: Select all

v0r0n /boot # ip link set can0 type can bitrate 125000 loopback on
v0r0n /boot # ifconfig can0 up
SIOCSIFFLAGS: Invalid argument
dmesg:

Code: Select all

[153394.319396] rockchip_canfd fe570000.can can0: incorrect/missing data bit-timing
for reference, I have a USB connected candlelight from linux-automation, that uses gs_usb on can1 and seems to be working:

Code: Select all

v0r0n /boot # ip -details -statistic link show can1
5: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 128
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can state ERROR-PASSIVE restart-ms 0 
	  bitrate 500000 sample-point 0.875 
	  tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
	  gs_usb: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
	  clock 48000000 
	  re-started bus-errors arbit-lost error-warn error-pass bus-off
	  0          0          0          3          639402010  0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
    RX:  bytes   packets errors dropped  missed   mcast           
    5115216168 639402021      0       2       0       0 
    TX:  bytes   packets errors dropped carrier collsns           
             3         3      0       2       0       0 
v0r0n /boot # ip -details -statistic link show can0
3: can0: <NOARP,ECHO> mtu 72 qdisc noop state DOWN mode DEFAULT group default qlen 128
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can <LOOPBACK,FD> state STOPPED (berr-counter tx 0 rx 0) restart-ms 0 
	  bitrate 125000 sample-point 0.870 
	  tq 148 prop-seg 23 phase-seg1 23 phase-seg2 7 sjw 1
	  rockchip_canfd: tseg1 1..128 tseg2 1..128 sjw 1..128 brp 1..256 brp-inc 2
	  rockchip_canfd: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..256 dbrp-inc 2
	  clock 148500000 
	  re-started bus-errors arbit-lost error-warn error-pass bus-off
	  0          0          0          0          0          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
    RX:  bytes packets errors dropped  missed   mcast           
             0       0      0       0       0       0 
    TX:  bytes packets errors dropped carrier collsns           
             0       0      0       0       0       0 
Last edited by chron0 on Tue Aug 30, 2022 8:40 pm, edited 1 time in total.

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS

Post by joerg »

It seems that the kernel config is different as on my N2. From https://www.kernel.org/doc/Documentatio ... ng/can.txt

Code: Select all

  6.5.2 Setting the CAN bit-timing

  The CAN bit-timing parameters can always be defined in a hardware
  independent format as proposed in the Bosch CAN 2.0 specification
  specifying the arguments "tq", "prop_seg", "phase_seg1", "phase_seg2"
  and "sjw":

    $ ip link set canX type can tq 125 prop-seg 6 \
				phase-seg1 7 phase-seg2 2 sjw 1

  If the kernel option CONFIG_CAN_CALC_BITTIMING is enabled, CIA
  recommended CAN bit-timing parameters will be calculated if the bit-
  rate is specified with the argument "bitrate":
These users thanked the author joerg for the post:
chron0 (Tue Aug 30, 2022 8:56 pm)

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS

Post by chron0 »

oh great, I'll have a look at CONFIG_CAN_CALC_BITTIMING in the 4.19 tree for the M1 then, thx

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS

Post by chron0 »

Code: Select all

  │ ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │  
  │ │                         < > Virtual Local CAN Interface (vcan)                                                          │ │  
  │ │                         < > Virtual CAN Tunnel (vxcan)                                                                  │ │  
  │ │                         <M> Serial / USB serial CAN Adaptors (slcan)                                                    │ │  
  │ │                         <M> Platform CAN drivers with Netlink support                                                   │ │  
  │ │                         [*]   CAN bit-timing calculation                                                                │ │  
  │ │                         < >   Aeroflex Gaisler GRCAN and GRHCAN CAN devices                                             │ │  
  │ │                         < >   Xilinx CAN                                                                                │ │  
  │ │                         < >   Bosch C_CAN/D_CAN devices  ----                                                           │ │  
  │ │                         < >   Bosch CC770 and Intel AN82527 devices  ----                                               │ │  
  │ │                         < >   IFI CAN_FD IP                                                                             │ │  
  │ │                         < >   Bosch M_CAN devices                                                                       │ │  
  │ │                         < >   PEAK-System PCAN-PCIe FD cards                                                            │ │  
  │ │                         <M>   Rockchip CAN controller                                                                   │ │  
  │ │                         <M>   Rockchip CANFD controller                                                                 │ │  
  │ │                         < >   Philips/NXP SJA1000 devices  ----                                                         │ │  
  │ │                         < >   Softing Gmbh CAN generic support                                                          │ │  
  │ │                               CAN SPI interfaces  --->                                                                  │ │  
  │ │                               CAN USB interfaces  --->                                                                  │ │  
  │ │                         [ ] CAN devices debugging messages                                                              │ 
  
hmm, it's enabled - would you recommend to disable it?

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS

Post by chron0 »

Code: Select all

v0r0n /boot # lsmod
Module                  Size  Used by
rockchip_can           16384  0
can_raw                16384  2
can                    20480  1 can_raw
cfg80211              241664  0
rfkill                 16384  1 cfg80211
gs_usb                 16384  0
rockchip_canfd         16384  0
can_dev                20480  3 rockchip_can,gs_usb,rockchip_canfd

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by joerg »

Oh I'm not sure. Looking on the mainline kernel of N2, there it is also enabled.
Have you tried this from kernel documentation?
ip link set can0 type can tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

tried exactly this:

Code: Select all

V0R0N /home/klipper # ip link set can0 type can tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
V0R0N /home/klipper # ifconfig can0
can0: flags=128<NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 55  

V0R0N /home/klipper # ifconfig can0 up
SIOCSIFFLAGS: Invalid argument
I have enabled kernel can debug so:

Code: Select all

[ 1112.863634] rockchip_canfd fe570000.can can0: rockchip_canfd_get_berr_counter RX_ERR_CNT=0x00000000, TX_ERR_CNT=0x00000000
[ 1112.864254] rockchip_canfd fe570000.can can0: rockchip_canfd_set_bittiming NBTP=0x0008010c, DBTP=0x003fffff, TDCR=0x00000000
[ 1125.929273] rockchip_canfd fe570000.can can0: incorrect/missing data bit-timing
what about the SN65HVD230? I had no success without it being attached and I was hoping it was an issue because of that. But it is attached now (but perhaps I screwed up TX/RX) - so the question is, could that make a difference if the odroid cannot properly talk to the SN65HVD230?

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by joerg »

Sorry, I have no more ideas. The SN65HVD230 should be more or less passive. Only drive the lines CAN_L and CAN_H. It should not have any affect to this error, I think.
These users thanked the author joerg for the post:
chron0 (Wed Aug 31, 2022 1:41 am)

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

Thank you Joerg, i tend to agree and think that might be an issue in the kernel driver itself for this rockchip. After all it's a new implementation and so far I have not seen anyone use CAN on the Odroid M1 directly...

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by joerg »

I see. I have already ordered a canbus driver (TJA1051) for my experiments (to use it with a STM32 Blue Pill). When I have it I can give it a try with the M1.

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

Oh I look forward to that, because it seems to me, we are currently the only 2 persons on the planet trying to get CAN working on the M1 :)

steve.jeong
Posts: 99
Joined: Wed Dec 01, 2021 10:18 am
languages_spoken: english
Has thanked: 14 times
Been thanked: 22 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by steve.jeong »

Please share the result of uname -a

[edit]
When I tested can0 with SN65HVD230 on the basis of Linux gnome-desktop 4.19.219-odroid-arm64 #1 SMP Sat, 20 Aug 2022 01:39:25 +0000 aarch64 aarch64 aarch64 GNU/Linux,
There is no problem with can communication.

Next is can0 info.

ip -d link show can0

Code: Select all

3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc fq_codel state UP mode DEFAULT group default qlen 10
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 
          bitrate 125000 sample-point 0.833 
          tq 444 prop-seg 7 phase-seg1 7 phase-seg2 3 sjw 1
          rockchip_can: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..128 brp-inc 2
          clock 148500000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
I used

Code: Select all

#!/bin/bash

sudo ifconfig can0 down
sudo ip link set can0 type can bitrate 125000
sudo ifconfig can0 up
These users thanked the author steve.jeong for the post:
chron0 (Wed Aug 31, 2022 7:30 pm)

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

Code: Select all

V0R0N ~ # uname -a
Linux V0R0N 4.19.219-odroid-arm64 #46 SMP Tue Aug 30 12:13:17 UTC 2022 aarch64 GNU/Linux
My kernel src HEAD is at one of your commits steve :)

Code: Select all

commit 96391fef0ebf270d1e015ce61a28cb08b3628725 (grafted, HEAD -> odroidm1-4.19.y, origin/odroidm1-4.19.y)
Author: steve.jeong
Date:   Tue Jun 14 14:23:18 2022 +0900

    ODROID-M1: dtb/dtbo: Add mcp2515 (can module)
    
    mcp2515 clock 16M -> 8M
    
    solved the one-bit time that came out twice as long
CAN Info:

Code: Select all

V0R0N ~ # ip -d link show can0
3: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can <FD> state STOPPED (berr-counter tx 0 rx 0) restart-ms 0 
	  bitrate 515625 sample-point 0.875 
	  tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
	  rockchip_canfd: tseg1 1..128 tseg2 1..128 sjw 1..128 brp 1..256 brp-inc 2
	  rockchip_canfd: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..256 dbrp-inc 2
	  clock 148500000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 

Code: Select all

V0R0N ~ # ifconfig can0 down
V0R0N ~ # ip link set can0 type can bitrate 125000
V0R0N ~ # ifconfig can0 up
SIOCSIFFLAGS: Invalid argument
which gives in dmesg:

Code: Select all

[68622.726942] rockchip_canfd fe570000.can can0: rockchip_canfd_get_berr_counter RX_ERR_CNT=0x00000000, TX_ERR_CNT=0x00000000
[68622.727271] rockchip_canfd fe570000.can can0: rockchip_canfd_get_berr_counter RX_ERR_CNT=0x00000000, TX_ERR_CNT=0x00000000
[68673.634316] rockchip_canfd fe570000.can can0: rockchip_canfd_get_berr_counter RX_ERR_CNT=0x00000000, TX_ERR_CNT=0x00000000
[68673.635214] rockchip_canfd fe570000.can can0: rockchip_canfd_set_bittiming NBTP=0x000a062d, DBTP=0x003fffff, TDCR=0x00000000
[68678.627104] rockchip_canfd fe570000.can can0: incorrect/missing data bit-timing
Ok. Since i have no reason to believe that you didnt test it and if we assume that it is unlikely that only the CAN portion in the rockchip
woud be DOA while the rest is working, I would conclude that I am doing something wrong here.

Here a some things I am not sure about:

* config.ini - Are my settings for the can overlay correct in config.ini? (Edit: see original top post)
* DTBs

I've compiled this kernel myself and boot the resulting vmlinux and have the modules deployed in the FS. This is working so far.
But I have no idea how to deal with dtb files. As of now I still have the original hardkernel dtbs copied from the ubuntu image
in my /boot. Could that be the issue?

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

*sigh - I found it. Big thanks to steve for coming in and giving me enough confidence that it SHOULD work and was tested, so the problem must be layer8 on my side.

SOLUTION:

If you compile your own kernel, you MUST also supply the rk3568-odroid-m1.dtb and all dtbo files in the overlays folder.
The device tree is tied hard to the compiled kernel and you cannot really mix around there, otherwise you get issues just like this one.

So after the usual make; make modules; make modules_install you also need: make dtbs; make dtbs_install
To make it easier, I installed them into a separate path to unclutter: make dtbs_install INSTALL_DTBS_PATH=deploy

After transferring all new device tree files into the /boot folder on the M1 and doing a reboot it is working now:

Code: Select all

V0R0N ~ # ifconfig can0 down
V0R0N ~ # ip link set can0 type can bitrate 125000
V0R0N ~ # ifconfig can0 up
No more errors here *yay

Code: Select all

[  137.600142] rockchip_can fe570000.can can0: rockchip_can_get_berr_counter
[  142.960883] rockchip_can fe570000.can can0: setting BITTIMING=0x0000202d  brp: 66 bitrate:125000
[  142.960901] rockchip_can fe570000.can can0: rockchip_can_start
[  142.960913] rockchip_can fe570000.can can0: rockchip_can_open
[  142.961022] rockchip_can fe570000.can can0: rockchip_can_get_berr_counter
[  142.961095] IPv6: ADDRCONF(NETDEV_UP): can0: link is not ready
[  142.961872] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
[  142.962000] rockchip_can fe570000.can can0: rockchip_can_get_berr_counter
Obvious difference here is: It picked up rockchip_can instead of rockchip_canfd like it did before.

Code: Select all

V0R0N ~ # ip -details -statistic link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 
	  bitrate 125000 sample-point 0.833 
	  tq 444 prop-seg 7 phase-seg1 7 phase-seg2 3 sjw 1
	  rockchip_can: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..128 brp-inc 2
	  clock 148500000 
	  re-started bus-errors arbit-lost error-warn error-pass bus-off
	  0          0          0          0          0          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
    RX:  bytes packets errors dropped  missed   mcast           
             0       0      0       0       0       0 
    TX:  bytes packets errors dropped carrier collsns           
             0       0      0       0       0       0 
@Steve: I am still not confident about the way config.ini is used and how to pick the overlays. How do i properly write a config.ini in order to
get these loaded:

* uart0
* uart1
* i2c0
* spi0
* can0

I also suggest it would be good to add a CANbus section to the M1 wiki page since there is little to no info about it really :)
Last edited by chron0 on Thu Sep 01, 2022 5:04 pm, edited 1 time in total.
These users thanked the author chron0 for the post (total 2):
joerg (Thu Sep 01, 2022 12:05 am) • odroid (Thu Sep 01, 2022 9:01 am)

steve.jeong
Posts: 99
Joined: Wed Dec 01, 2021 10:18 am
languages_spoken: english
Has thanked: 14 times
Been thanked: 22 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by steve.jeong »

chron0 wrote:
Wed Aug 31, 2022 7:28 pm
So after the usual make; make modules; make modules_install you also need: make dtbs; make dtbs_install
To make it easier, I installed them into a separate path to unclutter: make dtbs_install INSTALL_DTBS_PATH=deploy
The kernel install manual is here.
http://docs.linuxfactory.or.kr/guides/c ... ml#install

You can also update kernel without having to build it yourself.
apt update && apt upgrade -y
@Steve: I am still not confident about the way config.ini is used and how to pick the overlays. How do i properly write a config.ini in order to
get these loaded:

* uart0
* uart1
* i2c0
* spi0
* can0
edit /boot/config.ini

Code: Select all

[generic]
overlay_resize=16384
overlay_profile=
overlays="uart0 uart1 i2c0 spi0 can0"

[overlay_custom]
overlays="i2c0 i2c1"

[overlay_hktft32]
overlays="hktft32 ads7846"
"dtb overlay" means overwriting the device tree.
Parameters that are added later overwrite dt. Some use the same pin, so be careful.
I also suggest it would be good to add a CANbus section to the M1 wiki page since there is little to no info about it really :)
I will reflect it as soon as possible.
These users thanked the author steve.jeong for the post:
chron0 (Thu Sep 01, 2022 3:26 pm)

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems (solved)

Post by chron0 »

You can also update kernel without having to build it yourself. apt update && apt upgrade -y
No :) I really can't, since I am using gentoo on my odroids, so I always have to adapt and rev-eng from the images you provide.
This has been fairly successful over the years and most of my odroids are still in active usage, I am very happy with all of them,
well, maybe except for the XU4. If the N2 would have had onboard rtc battery and nvme (like the M1) it would have been
the greatest Odroid ever so far :)

This gives me a very lean and unbloated system in the end, with boot times as short as possible.

Image

So, to make things simpler and avoid confusion, I only put this into my config.ini:

Code: Select all

[generic]
overlay_resize=16384
overlay_profile=
overlays="uart0 uart1 i2c0 spi0 can0"
I dont need to add the custom or other sections like in the example, do I?

This seems to do the trick, the uarts and i2c0 are there as well as can0, I only get some weird dmesg regarding spi:

Code: Select all

[    0.179649] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-none-smt
[    0.179685] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-none-smt
[    0.179709] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-up-drv-level-2
[    0.179729] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-up-drv-level-2
[    0.179751] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-up-drv-level-1
[    0.179771] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-up-drv-level-1
[    0.179792] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-none-drv-level-3
[    0.179811] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-none-drv-level-3
[    0.179833] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-none-drv-level-2
[    0.179853] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-none-drv-level-2
[    0.179873] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-none-drv-level-1
[    0.179892] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-none-drv-level-1
[    0.179913] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-none
[    0.179931] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-none
[    0.179951] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-up
[    0.179969] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-up
Not sure if that is a big problem or just noise, I dont have any spi use case to test out immediately anyways,
just thought I'd mention it. Also hinting at https://github.com/hardkernel/linux/issues/427 :)

In any case, the specific issue about the M1 native can has been solved, so again big thanks to
Joerg and Steve for jumping in to get me sorted here.

steve.jeong
Posts: 99
Joined: Wed Dec 01, 2021 10:18 am
languages_spoken: english
Has thanked: 14 times
Been thanked: 22 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems (solved)

Post by steve.jeong »

chron0 wrote:
Thu Sep 01, 2022 3:50 pm
So, to make things simpler and avoid confusion, I only put this into my config.ini:

Code: Select all

[generic]
overlay_resize=16384
overlay_profile=
overlays="uart0 uart1 i2c0 spi0 can0"
I dont need to add the custom or other sections like in the example, do I?
Yes, it is.
This seems to do the trick, the uarts and i2c0 are there as well as can0, I only get some weird dmesg regarding spi:

Code: Select all

[    0.179649] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-none-smt
[    0.179685] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-none-smt
[    0.179709] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-up-drv-level-2
[    0.179729] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-up-drv-level-2
[    0.179751] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-up-drv-level-1
[    0.179771] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-up-drv-level-1
[    0.179792] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-none-drv-level-3
[    0.179811] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-none-drv-level-3
[    0.179833] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-none-drv-level-2
[    0.179853] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-none-drv-level-2
[    0.179873] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-none-drv-level-1
[    0.179892] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-none-drv-level-1
[    0.179913] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-none
[    0.179931] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-none
[    0.179951] spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-up
[    0.179969] spi_master spi0: Failed to create SPI device for /spi@fe610000/pcfg-pull-up
Not sure if that is a big problem or just noise, I dont have any spi use case to test out immediately anyways,
just thought I'd mention it.
The kernel git repo has not yet been merged, but this message has been resolved.

Code: Select all

commit e9d1fd37176c04c6650ee37e2c791d46a8f800f1
Author: steve.jeong <jkhpro1003@gmail.com>
Date:   Tue Aug 23 15:33:25 2022 +0900

    ODROID-M1: trouble shoot error of mcp2515.
    
    spi_master spi0: cannot find modalias for /spi@fe610000/pcfg-pull-none
    ... 
    
    Signed-off-by: steve.jeong <jkhpro1003@gmail.com>
    Change-Id: I0b78d575533d29e8d122100c2e41efd4490f6996

diff --git a/arch/arm64/boot/dts/rockchip/overlays/odroidm1/mcp2515.dts b/arch/arm64/boot/dts/rockchip/overlays/odroidm1/mcp2515.dts
index dde260c34ec7..0a35ce7c9d48 100644
--- a/arch/arm64/boot/dts/rockchip/overlays/odroidm1/mcp2515.dts
+++ b/arch/arm64/boot/dts/rockchip/overlays/odroidm1/mcp2515.dts
@@ -4,36 +4,18 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/rockchip.h>
 #include <dt-bindings/interrupt-controller/irq.h>
-#include "../../rk3568-pinctrl.dtsi"
 
 / { 
    fragment@0 {
        target = <&spi0>;
 
        __overlay__ {
-           pinctrl-0 = <&spi0m1_cs0 &spi0m1_pins>;
-           pinctrl-1 = <&spi0m1_cs0 &spi0m1_pins_hs>;
-           num_chipselect = <2>;
-
-           cs-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_LOW>,
-               <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
-           status = "okay";
+           num_chipselect = <1>;
+           cs-gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
        };
    };  
 
    fragment@1 {
-       target = <&pinctrl>;
-
-       __overlay__ {
-           can_pins {
-               mcp2515_can0: mcp2515_can0 {
-                   rockchip,pins = <RK_GPIO0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
-               };
-           };
-       };
-   };
-
-   fragment@2 {
        target-path = "/";

        __overlay__ {
@@ -45,11 +27,12 @@
        };
    };

-   fragment@3 {
+   fragment@2 {
        target = <&spi0>;

        __overlay__ {
            /* needed to avoid dtc warning */
+               status = "okay";
            #address-cells = <1>;
            #size-cells = <0>;

@@ -57,7 +40,7 @@
                compatible = "microchip,mcp2515";
                pinctrl-names = "default";
                pinctrl-0 = <&mcp2515_can0>;
-               reg = <1>;
+               reg = <0>;
                clocks = <&can0_clk>;
                interrupt-parent = <&gpio0>;
                interrupts = <RK_PC0 IRQ_TYPE_EDGE_FALLING>;
diff --git a/arch/arm64/boot/dts/rockchip/overlays/odroidm1/spi0.dts b/arch/arm64/boot/dts/rockchip/overlays/odroidm1/spi0.dts
index 159b526b3221..e512300ffccd 100644
--- a/arch/arm64/boot/dts/rockchip/overlays/odroidm1/spi0.dts
+++ b/arch/arm64/boot/dts/rockchip/overlays/odroidm1/spi0.dts
@@ -1,17 +1,14 @@
 /dts-v1/;
 /plugin/;

-#include "../../rk3568-pinctrl.dtsi"
-
 / {
    fragment@0 {
        target = <&spi0>;

        __overlay__ {
            status = "okay";
-
-           pinctrl-0 = <&spi0m1_cs0 &spi0m1_pins>;
-           pinctrl-1 = <&spi0m1_cs0 &spi0m1_pins_hs>;
+           #address-cells = <1>;
+           #size-cells = <0>;

            spidev: spidev@0 {
                status = "okay";
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 78977aa76c49..76f7ee697903 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -212,6 +212,16 @@
    pinctrl-0 = <&fspi_pins>;
 };

+&spi0 {
+   status = "disabled";
+
+   pinctrl-0 = <&spi0m1_pins>;
+   pinctrl-1 = <&spi0m1_pins_hs>;
+   num_chipselect = <1>;
+
+   cs-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_LOW>;
+};
+
 &uart1 {
    status = "disabled";
    dma-names = "tx", "rx";
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-odroid.dtsi
index 744ad6b3c7e4..621ff4d776d5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid.dtsi
@@ -102,6 +102,11 @@
 };

 &pinctrl {
+   can_pins {
+       mcp2515_can0: mcp2515_can0 {
+           rockchip,pins = <RK_GPIO0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
+       };
+   };
    ethernet {
        ethernet_irq: ethernet-irq {
            rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
These users thanked the author steve.jeong for the post:
chron0 (Thu Sep 01, 2022 5:08 pm)

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems (solved)

Post by chron0 »

The kernel git repo has not yet been merged, but this message has been resolved.
Ah great.

EDIT: I've pulled again and found your latest commit already in the tree commit e9d1fd37176c04c6650ee37e2c791d46a8f800f1 (HEAD -> odroidm1-4.19.y, origin/odroidm1-4.19.y) and can confirm
that the spi errors/warnings are all gone.


Also note: I've updated my linaro toolchain to gcc-linaro-11.3.1-2022.06-x86_64_aarch64-linux-gnu and kernel compiled and booted without a problem as well, 7.4 really seems a little old these days :)

Code: Select all

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x412fd050]
[    0.000000] Linux version 4.19.219-odroid-arm64 (chrono@phoenix) (gcc version 11.3.1 20220604 [releases/gcc-11 revision 591c0f4b92548e3ae2e8173f4f93984b1c7f62bb] (GCC), GNU ld (Linaro_Binutils-2022.06) 2.37.20220122) #49 SMP Thu Sep 1 14:12:38 UTC 2022
[    0.000000] Machine model: Hardkernel ODROID-M1
[    0.000000] earlycon: uart8250 at MMIO32 0x00000000fe660000 (options '')
[    0.000000] bootconsole [uart8250] enabled
[    0.000000] OF: fdt: Reserved memory: failed to reserve memory for node 'drm-cubic-lut@00000000': base 0x0000000000000000, size 0 MiB
[    0.000000] cma: Reserved 16 MiB at 0x00000000e8c00000
[    0.000000] On node 0 totalpages: 1968203
[    0.000000]   DMA32 zone: 14938 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 955975 pages, LIFO batch:63
[    0.000000]   Normal zone: 16382 pages used for memmap
[    0.000000]   Normal zone: 1012228 pages, LIFO batch:63
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 21 pages/cpu s48600 r8192 d29224 u86016
[    0.000000] pcpu-alloc: s48600 r8192 d29224 u86016 alloc=21*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] Speculative Store Bypass Disable mitigation not required
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 1936883
[    0.000000] Kernel command line: root=/dev/nvme0n1p3 rootfstype=ext4 rootwait console=tty1 earlycon=uart8250,mmio32,0xfe660000 pci=nomsi fsck.mode=force fsck.repair=yes mtdparts=sfc_nor:0x20000@0xe0000(env),0x200000@0x100000(uboot),0x100000@0x300000(splash),0xc00000@0x400000(firmware) console=tty1 
[    0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
[    0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0xe4c00000-0xe8c00000] (64MB)
[    0.000000] Memory: 7633236K/7872812K available (8446K kernel code, 556K rwdata, 1764K rodata, 704K init, 449K bss, 223192K reserved, 16384K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: Distributor has no Range Selector support
[    0.000000] GICv3: no VLPI support, no direct LPI support
[    0.000000] ITS [mem 0xfd440000-0xfd45ffff]
[    0.000000] ITS@0x00000000fd440000: allocated 8192 Devices @ee2a0000 (indirect, esz 8, psz 64K, shr 0)
[    0.000000] ITS@0x00000000fd440000: allocated 32768 Interrupt Collections @ee2b0000 (flat, esz 2, psz 64K, shr 0)
[    0.000000] ITS: using cache flushing for cmd queue
[    0.000000] GIC: using LPI property table @0x000000000a520000
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000fd460000
[    0.000000] CPU0: Booted with LPIs enabled, memory probably corrupted
[    0.000000] CPU0: Failed to disable LPIs
[    0.000000] random: random: get_random_bytes called from 0xffffff8008a80b58 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000005] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.001932] Console: colour dummy device 80x25
[    0.002358] console [tty1] enabled
[    0.002681] bootconsole [uart8250] disabled
[    0.003116] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=80000)
[    0.003136] pid_max: default: 32768 minimum: 301
[    0.003321] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.003376] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.004692] ASID allocator initialised with 32768 entries
[    0.004810] rcu: Hierarchical SRCU implementation.
[    0.005159] Platform MSI: interrupt-controller@fd440000 domain created
[    0.005610] PCI/MSI: /interrupt-controller@fd400000/interrupt-controller@fd440000 domain created
[    0.006210] smp: Bringing up secondary CPUs ...
[    0.006781] Detected VIPT I-cache on CPU1
[    0.006816] GICv3: CPU1: found redistributor 100 region 0:0x00000000fd480000
[    0.006825] CPU1: Booted with LPIs enabled, memory probably corrupted
[    0.006829] CPU1: Failed to disable LPIs
[    0.006862] CPU1: Booted secondary processor 0x0000000100 [0x412fd050]
[    0.007483] Detected VIPT I-cache on CPU2
[    0.007512] GICv3: CPU2: found redistributor 200 region 0:0x00000000fd4a0000
[    0.007520] CPU2: Booted with LPIs enabled, memory probably corrupted
[    0.007524] CPU2: Failed to disable LPIs
[    0.007547] CPU2: Booted secondary processor 0x0000000200 [0x412fd050]
[    0.008161] Detected VIPT I-cache on CPU3
[    0.008187] GICv3: CPU3: found redistributor 300 region 0:0x00000000fd4c0000
[    0.008195] CPU3: Booted with LPIs enabled, memory probably corrupted
[    0.008198] CPU3: Failed to disable LPIs
[    0.008219] CPU3: Booted secondary processor 0x0000000300 [0x412fd050]
[    0.008316] smp: Brought up 1 node, 4 CPUs
[    0.008436] SMP: Total of 4 processors activated.
[    0.008451] CPU features: detected: GIC system register CPU interface
[    0.008462] CPU features: detected: Privileged Access Never
[    0.008473] CPU features: detected: LSE atomic instructions
[    0.008483] CPU features: detected: User Access Override
[    0.008493] CPU features: detected: 32-bit EL0 Support
[    0.008503] CPU features: detected: RAS Extension Support
[    0.008953] CPU: All CPU(s) started at EL2
[    0.009008] alternatives: patching kernel code
[    0.014421] devtmpfs: initialized
[    0.036222] Registered cp15_barrier emulation handler
[    0.036259] Registered setend emulation handler
[    0.036531] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370867519511994 ns
[    0.036562] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.037147] pinctrl core: initialized pinctrl subsystem
[    0.037381] regulator-dummy: no parameters
[    0.037740] NET: Registered protocol family 16
[    0.040943] cpuidle: using governor menu
[    0.041162] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.042095] DMA: preallocated 256 KiB pool for atomic allocations
[    0.069141] rockchip-gpio fdd60000.gpio: probed gpio0 (fdd60000.gpio)
[    0.069698] rockchip-gpio fe740000.gpio: probed gpio1 (fe740000.gpio)
[    0.070296] rockchip-gpio fe750000.gpio: probed gpio2 (fe750000.gpio)
[    0.070838] rockchip-gpio fe760000.gpio: probed gpio3 (fe760000.gpio)
[    0.071376] rockchip-gpio fe770000.gpio: probed gpio4 (fe770000.gpio)
[    0.071461] rockchip-pinctrl pinctrl: probed pinctrl
[    0.077440] cryptd: max_cpu_qlen set to 1000
[    0.078277] dc_12v: 12000 mV 
[    0.078396] reg-fixed-voltage dc-12v: dc_12v supplying 12000000uV
[    0.078509] reg-fixed-voltage vcc3v3-sys: Looking up vin-supply from device tree
[    0.078519] vcc3v3_sys: supplied by dc_12v
[    0.078542] dc_12v: could not add device link regulator.2 err -2
[    0.078548] vcc3v3_sys: 3300 mV 
[    0.078656] reg-fixed-voltage vcc3v3-sys: vcc3v3_sys supplying 3300000uV
[    0.078754] reg-fixed-voltage vcc5v0-sys: Looking up vin-supply from device tree
[    0.078763] vcc5v0_sys: supplied by dc_12v
[    0.078782] dc_12v: could not add device link regulator.3 err -2
[    0.078788] vcc5v0_sys: 5000 mV 
[    0.078895] reg-fixed-voltage vcc5v0-sys: vcc5v0_sys supplying 5000000uV
[    0.078995] reg-fixed-voltage vcc5v0-usb: Looking up vin-supply from device tree
[    0.079004] vcc5v0_usb: supplied by dc_12v
[    0.079022] dc_12v: could not add device link regulator.4 err -2
[    0.079027] vcc5v0_usb: 5000 mV 
[    0.079136] reg-fixed-voltage vcc5v0-usb: vcc5v0_usb supplying 5000000uV
[    0.079358] reg-fixed-voltage vcc5v0-host-regulator: Looking up vin-supply from device tree
[    0.079368] vcc5v0_host: supplied by vcc5v0_usb
[    0.079386] vcc5v0_usb: could not add device link regulator.5 err -2
[    0.079396] vcc5v0_host: 5000 mV 
[    0.079509] reg-fixed-voltage vcc5v0-host-regulator: vcc5v0_host supplying 5000000uV
[    0.079671] vcc5v0_otg: 5000 mV 
[    0.079820] reg-fixed-voltage vcc5v0-otg-regulator: Looking up vin-supply from device tree
[    0.079830] vcc5v0_otg: supplied by vcc5v0_usb
[    0.079862] reg-fixed-voltage vcc5v0-otg-regulator: vcc5v0_otg supplying 5000000uV
[    0.079974] reg-fixed-voltage pcie30-avdd0v9: Looking up vin-supply from device tree
[    0.079982] pcie30_avdd0v9: supplied by vcc3v3_sys
[    0.080001] vcc3v3_sys: could not add device link regulator.7 err -2
[    0.080007] pcie30_avdd0v9: 900 mV 
[    0.080107] reg-fixed-voltage pcie30-avdd0v9: pcie30_avdd0v9 supplying 900000uV
[    0.080206] reg-fixed-voltage pcie30-avdd1v8: Looking up vin-supply from device tree
[    0.080216] pcie30_avdd1v8: supplied by vcc3v3_sys
[    0.080234] vcc3v3_sys: could not add device link regulator.8 err -2
[    0.080240] pcie30_avdd1v8: 1800 mV 
[    0.080347] reg-fixed-voltage pcie30-avdd1v8: pcie30_avdd1v8 supplying 1800000uV
[    0.080471] vcc3v3_pcie: 3300 mV 
[    0.080580] reg-fixed-voltage gpio-regulator: Looking up vin-supply from device tree
[    0.080589] vcc3v3_pcie: supplied by dc_12v
[    0.080617] reg-fixed-voltage gpio-regulator: vcc3v3_pcie supplying 3300000uV
[    0.081281] rockchip-pm-domain fdd90000.power-management:power-controller: Looking up pd_vpu-supply from device tree
[    0.081300] rockchip-pm-domain fdd90000.power-management:power-controller: Looking up pd_vpu-supply property in node /power-management@fdd90000/power-controller failed
[    0.081339] rk_iommu fdea0800.iommu: version = 2
[    0.081874] rockchip-pm-domain fdd90000.power-management:power-controller: Looking up pd_rga-supply from device tree
[    0.081892] rockchip-pm-domain fdd90000.power-management:power-controller: Looking up pd_rga-supply property in node /power-management@fdd90000/power-controller failed
[    0.081929] rk_iommu fded0480.iommu: version = 2
[    0.082317] rk_iommu fdee0800.iommu: version = 2
[    0.082599] rk_iommu fdef0800.iommu: version = 2
[    0.082869] rockchip-pm-domain fdd90000.power-management:power-controller: Looking up pd_rkvenc-supply from device tree
[    0.082886] rockchip-pm-domain fdd90000.power-management:power-controller: Looking up pd_rkvenc-supply property in node /power-management@fdd90000/power-controller failed
[    0.082921] rk_iommu fdf40f00.iommu: version = 2
[    0.083265] rockchip-pm-domain fdd90000.power-management:power-controller: Looking up pd_rkvdec-supply from device tree
[    0.083282] rockchip-pm-domain fdd90000.power-management:power-controller: Looking up pd_rkvdec-supply property in node /power-management@fdd90000/power-controller failed
[    0.083319] rk_iommu fdf80800.iommu: version = 2
[    0.083574] rk_iommu fe043e00.iommu: version = 2
[    0.084347] SCSI subsystem initialized
[    0.084541] usbcore: registered new interface driver usbfs
[    0.084599] usbcore: registered new interface driver hub
[    0.084652] usbcore: registered new device driver usb
[    0.084748] media: Linux media interface: v0.10
[    0.084790] videodev: Linux video capture interface: v2.00
[    0.084837] pps_core: LinuxPPS API ver. 1 registered
[    0.084850] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.085164] arm-scmi firmware:scmi: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0
[    0.087752] rockchip-cpuinfo cpuinfo: SoC		: 35682000
[    0.087777] rockchip-cpuinfo cpuinfo: Serial		: 9a2596dea1b130e2
[    0.088329] clocksource: Switched to clocksource arch_sys_counter
[    0.098258] NET: Registered protocol family 2
[    0.098730] IP idents hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.102382] tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes)
[    0.102492] TCP established hash table entries: 65536 (order: 7, 524288 bytes)
[    0.103010] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[    0.103900] TCP: Hash tables configured (established 65536 bind 65536)
[    0.104032] UDP hash table entries: 4096 (order: 5, 131072 bytes)
[    0.104188] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes)
[    0.104495] NET: Registered protocol family 1
[    0.104754] PCI: CLS 0 bytes, default 64
[    0.105501] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    0.107748] Initialise system trusted keyrings
[    0.107918] workingset: timestamp_bits=61 max_order=21 bucket_order=0
[    0.112954] fuse init (API version 7.27)
[    0.114840] NET: Registered protocol family 38
[    0.114880] Key type asymmetric registered
[    0.114893] Asymmetric key parser 'x509' registered
[    0.114937] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.114956] io scheduler noop registered
[    0.114967] io scheduler deadline registered
[    0.115170] io scheduler cfq registered (default)
[    0.115187] io scheduler mq-deadline registered
[    0.115199] io scheduler kyber registered
[    0.117861] phy phy-fe8a0000.usb2-phy.0: Looking up phy-supply from device tree
[    0.117881] vcc5v0_host: could not add device link phy-fe8a0000.usb2-phy.0 err -2
[    0.117891] phy phy-fe8a0000.usb2-phy.0: Linked as a consumer to regulator.5
[    0.118020] phy phy-fe8a0000.usb2-phy.1: Looking up phy-supply from device tree
[    0.118031] phy phy-fe8a0000.usb2-phy.1: Looking up phy-supply property in node /usb2-phy@fe8a0000/otg-port failed
[    0.118136] phy phy-fe8a0000.usb2-phy.1: Looking up vbus-supply from device tree
[    0.118161] phy phy-fe8a0000.usb2-phy.1: Linked as a consumer to regulator.6
[    0.119686] extcon extcon1: failed to create extcon usb2-phy link
[    0.119747] phy phy-fe8b0000.usb2-phy.2: Looking up phy-supply from device tree
[    0.119762] vcc5v0_host: could not add device link phy-fe8b0000.usb2-phy.2 err -2
[    0.119772] phy phy-fe8b0000.usb2-phy.2: Linked as a consumer to regulator.5
[    0.119890] phy phy-fe8b0000.usb2-phy.3: Looking up phy-supply from device tree
[    0.119903] vcc5v0_host: could not add device link phy-fe8b0000.usb2-phy.3 err -2
[    0.119911] phy phy-fe8b0000.usb2-phy.3: Linked as a consumer to regulator.5
[    0.120014] phy phy-fe8b0000.usb2-phy.3: Looking up vbus-supply from device tree
[    0.120024] phy phy-fe8b0000.usb2-phy.3: Looking up vbus-supply property in node /usb2-phy@fe8b0000/otg-port failed
[    0.120042] phy phy-fe8b0000.usb2-phy.3: No vbus specified for otg port
[    0.121764] phy phy-fe850000.video-phy.4: Looking up phy-supply from device tree
[    0.121778] phy phy-fe850000.video-phy.4: Looking up phy-supply property in node /video-phy@fe850000 failed
[    0.123489] phy phy-fe820000.phy.5: Looking up phy-supply from device tree
[    0.123501] phy phy-fe820000.phy.5: Looking up phy-supply property in node /phy@fe820000 failed
[    0.123875] phy phy-fe830000.phy.6: Looking up phy-supply from device tree
[    0.123886] phy phy-fe830000.phy.6: Looking up phy-supply property in node /phy@fe830000 failed
[    0.124218] phy phy-fe840000.phy.7: Looking up phy-supply from device tree
[    0.124228] phy phy-fe840000.phy.7: Looking up phy-supply property in node /phy@fe840000 failed
[    0.125162] phy phy-fe8c0000.phy.8: Looking up phy-supply from device tree
[    0.125173] phy phy-fe8c0000.phy.8: Looking up phy-supply property in node /phy@fe8c0000 failed
[    0.127707] rk-pcie 3c0800000.pcie: Looking up vpcie3v3-supply from device tree
[    0.127747] rk-pcie 3c0800000.pcie: Linked as a consumer to regulator.9
[    0.127835] mpp_service mpp-srv: 96391fef0 author: steve.jeong 2022-07-05 ODROID-M1: dtb/dtbo: Add mcp2515 (can module)
[    0.127862] mpp_service mpp-srv: probe start
[    0.128609] iommu: Adding device fdf40000.rkvenc to group 4
[    0.128645] mpp_rkvenc fdf40000.rkvenc: Linked as a consumer to fdf40f00.iommu
[    0.128860] mpp_rkvenc fdf40000.rkvenc: probing start
[    0.129303] mpp_rkvenc fdf40000.rkvenc: Looking up venc-supply from device tree
[    0.129320] mpp_rkvenc fdf40000.rkvenc: venc regulator not ready, retry
[    0.129339] rkvenc_init:1199: failed to add venc devfreq
[    0.129636] mpp_rkvenc fdf40000.rkvenc: probing finish
[    0.130517] iommu: Adding device fdea0400.vdpu to group 0
[    0.130552] mpp_vdpu2 fdea0400.vdpu: Linked as a consumer to fdea0800.iommu
[    0.130730] mpp_vdpu2 fdea0400.vdpu: probe device
[    0.131269] mpp_vdpu2 fdea0400.vdpu: probing finish
[    0.131750] iommu: Adding device fdee0000.vepu to group 2
[    0.131785] mpp_vepu2 fdee0000.vepu: Linked as a consumer to fdee0800.iommu
[    0.131987] mpp_vepu2 fdee0000.vepu: probe device
[    0.132496] mpp_vepu2 fdee0000.vepu: probing finish
[    0.132934] iommu: Adding device fdef0000.iep to group 3
[    0.132967] mpp-iep2 fdef0000.iep: Linked as a consumer to fdef0800.iommu
[    0.133128] mpp-iep2 fdef0000.iep: probe device
[    0.133236] rk-pcie 3c0800000.pcie: missing legacy IRQ resource
[    0.133265] rk-pcie 3c0800000.pcie: Missing *config* reg space
[    0.133286] rk-pcie 3c0800000.pcie: host bridge /pcie@fe280000 ranges:
[    0.133306] rk-pcie 3c0800000.pcie: Parsing ranges property...
[    0.133322] rk-pcie 3c0800000.pcie:   err 0x380000000..0x3807fffff -> 0x80000000
[    0.133346] rk-pcie 3c0800000.pcie:    IO 0x380800000..0x3808fffff -> 0x80800000
[    0.133369] rk-pcie 3c0800000.pcie:   MEM 0x380900000..0x3bfffffff -> 0x80900000
[    0.133604] mpp-iep2 fdef0000.iep: allocate roi buffer failed
[    0.133763] mpp-iep2 fdef0000.iep: probing finish
[    0.134214] iommu: Adding device fded0000.jpegd to group 1
[    0.134249] mpp_jpgdec fded0000.jpegd: Linked as a consumer to fded0480.iommu
[    0.134411] mpp_jpgdec fded0000.jpegd: probe device
[    0.134925] mpp_jpgdec fded0000.jpegd: probing finish
[    0.135449] iommu: Adding device fdf80200.rkvdec to group 5
[    0.135484] mpp_rkvdec2 fdf80200.rkvdec: Linked as a consumer to fdf80800.iommu
[    0.135724] mpp_rkvdec2 fdf80200.rkvdec: probing start
[    0.135874] mpp_rkvdec2 fdf80200.rkvdec: 16 task capacity link mode detected
[    0.136216] mpp_rkvdec2 fdf80200.rkvdec: shared_niu_a is not found!
[    0.136234] rkvdec2_init:661: No niu aclk reset resource define
[    0.136252] mpp_rkvdec2 fdf80200.rkvdec: shared_niu_h is not found!
[    0.136265] rkvdec2_init:664: No niu hclk reset resource define
[    0.136443] mpp_rkvdec2 fdf80200.rkvdec: sram_start 0x00000000fdcc0000
[    0.136462] mpp_rkvdec2 fdf80200.rkvdec: rcb_iova 0x0000000010000000
[    0.136475] mpp_rkvdec2 fdf80200.rkvdec: sram_size 45056
[    0.136488] mpp_rkvdec2 fdf80200.rkvdec: rcb_size 65536
[    0.136504] mpp_rkvdec2 fdf80200.rkvdec: min_width 512
[    0.136567] mpp_rkvdec2 fdf80200.rkvdec: link mode probe finish
[    0.136636] mpp_rkvdec2 fdf80200.rkvdec: probing finish
[    0.136917] mpp_service mpp-srv: probe success
[    0.143192] dma-pl330 fe530000.dmac: Loaded driver for PL330 DMAC-241330
[    0.143224] dma-pl330 fe530000.dmac: 	DBUFF-128x8bytes Num_Chans-8 Num_Peri-32 Num_Events-16
[    0.145756] dma-pl330 fe550000.dmac: Loaded driver for PL330 DMAC-241330
[    0.145781] dma-pl330 fe550000.dmac: 	DBUFF-128x8bytes Num_Chans-8 Num_Peri-32 Num_Events-16
[    0.146716] rockchip-system-monitor rockchip-system-monitor: system monitor probe
[    0.147597] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[    0.148203] fdd50000.serial: ttyS1 at MMIO 0xfdd50000 (irq = 17, base_baud = 1500000) is a 16550A
[    0.149068] fe650000.serial: ttyS0 at MMIO 0xfe650000 (irq = 60, base_baud = 1500000) is a 16550A
[    0.151530] gpiomem-rk3568 fd660000.rk3568-gpiomem: Initialised: Registers at 0xfd660000
[    0.151533] random: fast init done
[    0.151828] random: crng init done
[    0.152005] iommu: Adding device fe040000.vop to group 6
[    0.152044] rockchip-vop2 fe040000.vop: Linked as a consumer to fe043e00.iommu
[    0.155945] rockchip-drm display-subsystem: Linked as a consumer to fe040000.vop
[    0.157051] rockchip-drm display-subsystem: Linked as a consumer to fe0a0000.hdmi
[    0.158839] rockchip-drm display-subsystem: defer getting devfreq
[    0.159122] rockchip-vop2 fe040000.vop: [drm:0xffffff80084b8bc0] vp0 assign plane mask: 0x3f, primary plane phy id: 4
[    0.159150] rockchip-vop2 fe040000.vop: [drm:0xffffff80084b8bc0] vp1 assign plane mask: 0x0, primary plane phy id: -1
[    0.159173] rockchip-vop2 fe040000.vop: [drm:0xffffff80084b8bc0] vp2 assign plane mask: 0x0, primary plane phy id: -1
[    0.159383] [drm] unsupported AFBC format[3432564e]
[    0.159442] [drm] failed to init overlay plane Cluster0-win1
[    0.159503] [drm] failed to init overlay plane Cluster1-win1
[    0.159629] rockchip-drm display-subsystem: bound fe040000.vop (ops 0xffffff8008944ed0)
[    0.159795] dwhdmi-rockchip fe0a0000.hdmi: Detected HDMI TX controller v2.11a with HDCP (DWC HDMI 2.0 TX PHY)
[    0.160387] dwhdmi-rockchip fe0a0000.hdmi: registered DesignWare HDMI I2C bus driver
[    0.160795] dwhdmi-rockchip fe0a0000.hdmi: failed to create debugfs dir!
[    0.160987] rockchip-drm display-subsystem: bound fe0a0000.hdmi (ops 0xffffff8008948fe0)
[    0.161011] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    0.161024] [drm] No driver support for vblank timestamp query.
[    0.161230] get_framebuffer_by_node: failed to get logo,offset
[    0.161251] rockchip-drm display-subsystem: can't not find any loader display
[    0.161270] rockchip-drm display-subsystem: failed to show loader logo
[    0.161327] [drm] Cannot find any crtc or sizes
[    0.161458] [drm] Cannot find any crtc or sizes
[    0.162018] [drm] Initialized rockchip 2.0.0 20140818 for display-subsystem on minor 0
[    0.164723] rockchip-pm-domain fdd90000.power-management:power-controller: Looking up pd_gpu-supply from device tree
[    0.164743] rockchip-pm-domain fdd90000.power-management:power-controller: Looking up pd_gpu-supply property in node /power-management@fdd90000/power-controller failed
[    0.164797] mali fde60000.gpu: Kernel DDK version g7p1-01bet0
[    0.164870] mali fde60000.gpu: Looking up mali-supply from device tree
[    0.164875] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.164911] mali fde60000.gpu: Device initialization Deferred
[    0.165564] brd: module loaded
[    0.170142] loop: module loaded
[    0.173582] libphy: Fixed MDIO Bus: probed
[    0.175496] dwc3 fcc00000.dwc3: Failed to get clk 'ref': -2
[    0.179563] dwc3 fd000000.dwc3: Failed to get clk 'ref': -2
[    0.183536] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.183557] ehci-pci: EHCI PCI platform driver
[    0.183618] ehci-platform: EHCI generic platform driver
[    0.185863] ehci-platform fd800000.usb: EHCI Host Controller
[    0.185905] ehci-platform fd800000.usb: new USB bus registered, assigned bus number 1
[    0.186147] ehci-platform fd800000.usb: irq 12, io mem 0xfd800000
[    0.198367] ehci-platform fd800000.usb: USB 2.0 started, EHCI 1.00
[    0.198553] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.198576] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.198592] usb usb1: Product: EHCI Host Controller
[    0.198605] usb usb1: Manufacturer: Linux 4.19.219-odroid-arm64 ehci_hcd
[    0.198619] usb usb1: SerialNumber: fd800000.usb
[    0.199170] hub 1-0:1.0: USB hub found
[    0.199217] hub 1-0:1.0: 1 port detected
[    0.201803] ehci-platform fd880000.usb: EHCI Host Controller
[    0.201841] ehci-platform fd880000.usb: new USB bus registered, assigned bus number 2
[    0.202078] ehci-platform fd880000.usb: irq 14, io mem 0xfd880000
[    0.215032] ehci-platform fd880000.usb: USB 2.0 started, EHCI 1.00
[    0.215199] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.215221] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.215237] usb usb2: Product: EHCI Host Controller
[    0.215251] usb usb2: Manufacturer: Linux 4.19.219-odroid-arm64 ehci_hcd
[    0.215264] usb usb2: SerialNumber: fd880000.usb
[    0.215748] hub 2-0:1.0: USB hub found
[    0.215794] hub 2-0:1.0: 1 port detected
[    0.216567] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.216584] ohci-platform: OHCI generic platform driver
[    0.216814] ohci-platform fd840000.usb: Generic Platform OHCI controller
[    0.216854] ohci-platform fd840000.usb: new USB bus registered, assigned bus number 3
[    0.217004] ohci-platform fd840000.usb: irq 13, io mem 0xfd840000
[    0.275846] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 4.19
[    0.275870] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.275887] usb usb3: Product: Generic Platform OHCI controller
[    0.275901] usb usb3: Manufacturer: Linux 4.19.219-odroid-arm64 ohci_hcd
[    0.275915] usb usb3: SerialNumber: fd840000.usb
[    0.276416] hub 3-0:1.0: USB hub found
[    0.276464] hub 3-0:1.0: 1 port detected
[    0.277003] ohci-platform fd8c0000.usb: Generic Platform OHCI controller
[    0.277039] ohci-platform fd8c0000.usb: new USB bus registered, assigned bus number 4
[    0.277186] ohci-platform fd8c0000.usb: irq 15, io mem 0xfd8c0000
[    0.335834] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 4.19
[    0.335858] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.335874] usb usb4: Product: Generic Platform OHCI controller
[    0.335888] usb usb4: Manufacturer: Linux 4.19.219-odroid-arm64 ohci_hcd
[    0.335901] usb usb4: SerialNumber: fd8c0000.usb
[    0.336398] hub 4-0:1.0: USB hub found
[    0.336445] hub 4-0:1.0: 1 port detected
[    0.338058] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
[    0.338100] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 5
[    0.338528] xhci-hcd xhci-hcd.3.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x0000011002010010
[    0.338592] xhci-hcd xhci-hcd.3.auto: irq 71, io mem 0xfcc00000
[    0.338755] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.338777] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.338793] usb usb5: Product: xHCI Host Controller
[    0.338806] usb usb5: Manufacturer: Linux 4.19.219-odroid-arm64 xhci-hcd
[    0.338820] usb usb5: SerialNumber: xhci-hcd.3.auto
[    0.339308] hub 5-0:1.0: USB hub found
[    0.339358] hub 5-0:1.0: 1 port detected
[    0.339731] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
[    0.339760] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 6
[    0.339787] xhci-hcd xhci-hcd.3.auto: Host supports USB 3.0 SuperSpeed
[    0.339863] usb usb6: We don't know the algorithms for LPM for this host, disabling LPM.
[    0.339986] usb usb6: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.19
[    0.340008] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.340023] usb usb6: Product: xHCI Host Controller
[    0.340036] usb usb6: Manufacturer: Linux 4.19.219-odroid-arm64 xhci-hcd
[    0.340049] usb usb6: SerialNumber: xhci-hcd.3.auto
[    0.340527] hub 6-0:1.0: USB hub found
[    0.340579] hub 6-0:1.0: 1 port detected
[    0.341093] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[    0.341129] xhci-hcd xhci-hcd.4.auto: new USB bus registered, assigned bus number 7
[    0.341491] xhci-hcd xhci-hcd.4.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x0000011002010010
[    0.341556] xhci-hcd xhci-hcd.4.auto: irq 72, io mem 0xfd000000
[    0.341742] usb usb7: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.341764] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.341780] usb usb7: Product: xHCI Host Controller
[    0.341793] usb usb7: Manufacturer: Linux 4.19.219-odroid-arm64 xhci-hcd
[    0.341807] usb usb7: SerialNumber: xhci-hcd.4.auto
[    0.342294] hub 7-0:1.0: USB hub found
[    0.342342] hub 7-0:1.0: 1 port detected
[    0.342698] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[    0.342726] xhci-hcd xhci-hcd.4.auto: new USB bus registered, assigned bus number 8
[    0.342753] xhci-hcd xhci-hcd.4.auto: Host supports USB 3.0 SuperSpeed
[    0.342828] usb usb8: We don't know the algorithms for LPM for this host, disabling LPM.
[    0.342959] usb usb8: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.19
[    0.342981] usb usb8: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.342997] usb usb8: Product: xHCI Host Controller
[    0.343010] usb usb8: Manufacturer: Linux 4.19.219-odroid-arm64 xhci-hcd
[    0.343024] usb usb8: SerialNumber: xhci-hcd.4.auto
[    0.343505] hub 8-0:1.0: USB hub found
[    0.343550] hub 8-0:1.0: 1 port detected
[    0.344308] .. rk pwm remotectl v2.0 init
[    0.344556] input: fdd70030.pwm as /devices/platform/fdd70030.pwm/input/input0
[    0.344886] remotectl-pwm fdd70030.pwm: pwm version is 0x2130000
[    0.344971] remotectl-pwm fdd70030.pwm: Controller support pwrkey capture
[    0.345871] i2c /dev entries driver
[    0.347879] fan53555-regulator 3-001c: FAN53555 Option[12] Rev[15] Detected!
[    0.348387] vdd_cpu: override max_uV, 1390000 -> 1387500
[    0.349657] fan53555-regulator 3-001c: Looking up vin-supply from device tree
[    0.349671] vdd_cpu: supplied by vcc5v0_sys
[    0.349694] vcc5v0_sys: could not add device link regulator.10 err -2
[    0.351995] vdd_cpu: 712 <--> 1387 mV at 1025 mV 
[    0.353917] rk808 3-0020: chip id: 0x8090
[    0.353973] rk808 3-0020: No cache defaults, reading back from HW
[    0.377645] rk808 3-0020: source: on=0x40, off=0x80
[    0.377668] rk808 3-0020: support dcdc3 fb mode:-22, 1
[    0.378026] rk808 3-0020: support pmic reset mode:0,0
[    0.382974] rk808-regulator rk808-regulator: there is no dvs0 gpio
[    0.383016] rk808-regulator rk808-regulator: there is no dvs1 gpio
[    0.383092] rk808 3-0020: Looking up vcc1-supply from device tree
[    0.383106] vdd_logic: supplied by vcc3v3_sys
[    0.383125] vcc3v3_sys: could not add device link regulator.11 err -2
[    0.383143] vdd_logic: 500 <--> 1350 mV at 900 mV 
[    0.383348] rk808 3-0020: Looking up vcc2-supply from device tree
[    0.383359] vdd_gpu: supplied by vcc3v3_sys
[    0.383376] vcc3v3_sys: could not add device link regulator.12 err -2
[    0.383392] vdd_gpu: 500 <--> 1350 mV at 900 mV 
[    0.383562] rk808 3-0020: Looking up vcc3-supply from device tree
[    0.383572] vcc_ddr: supplied by vcc3v3_sys
[    0.383590] vcc3v3_sys: could not add device link regulator.13 err -2
[    0.383600] vcc_ddr: at 500 mV 
[    0.383777] rk808 3-0020: Looking up vcc4-supply from device tree
[    0.383787] vdd_npu: supplied by vcc3v3_sys
[    0.383804] vcc3v3_sys: could not add device link regulator.14 err -2
[    0.384186] vdd_npu: 500 <--> 1350 mV at 900 mV 
[    0.384377] rk808 3-0020: Looking up vcc9-supply from device tree
[    0.384388] vcc_1v8: supplied by vcc3v3_sys
[    0.384406] vcc3v3_sys: could not add device link regulator.15 err -2
[    0.384417] vcc_1v8: 1800 mV 
[    0.384593] rk808 3-0020: Looking up vcc5-supply from device tree
[    0.384603] vdda0v9_image: supplied by vcc3v3_sys
[    0.384621] vcc3v3_sys: could not add device link regulator.16 err -2
[    0.385500] vdda0v9_image: 900 mV 
[    0.385671] rk808 3-0020: Looking up vcc5-supply from device tree
[    0.385681] vdda_0v9: supplied by vcc3v3_sys
[    0.385699] vcc3v3_sys: could not add device link regulator.17 err -2
[    0.385711] vdda_0v9: 900 mV 
[    0.385880] rk808 3-0020: Looking up vcc5-supply from device tree
[    0.385890] vdda0v9_pmu: supplied by vcc3v3_sys
[    0.385908] vcc3v3_sys: could not add device link regulator.18 err -2
[    0.385921] vdda0v9_pmu: 900 mV 
[    0.386090] rk808 3-0020: Looking up vcc6-supply from device tree
[    0.386100] vccio_acodec: supplied by vcc3v3_sys
[    0.386118] vcc3v3_sys: could not add device link regulator.19 err -2
[    0.386993] vccio_acodec: 3300 mV 
[    0.387171] rk808 3-0020: Looking up vcc6-supply from device tree
[    0.387181] vccio_sd: supplied by vcc3v3_sys
[    0.387200] vcc3v3_sys: could not add device link regulator.20 err -2
[    0.387216] vccio_sd: 1800 <--> 3300 mV at 3300 mV 
[    0.387390] rk808 3-0020: Looking up vcc6-supply from device tree
[    0.387401] vcc3v3_pmu: supplied by vcc3v3_sys
[    0.387419] vcc3v3_sys: could not add device link regulator.21 err -2
[    0.387431] vcc3v3_pmu: 3300 mV 
[    0.387604] rk808 3-0020: Looking up vcc7-supply from device tree
[    0.387614] vcca_1v8: supplied by vcc3v3_sys
[    0.387632] vcc3v3_sys: could not add device link regulator.22 err -2
[    0.387645] vcca_1v8: 1800 mV 
[    0.387822] rk808 3-0020: Looking up vcc7-supply from device tree
[    0.387832] vcca1v8_pmu: supplied by vcc3v3_sys
[    0.387851] vcc3v3_sys: could not add device link regulator.23 err -2
[    0.387863] vcca1v8_pmu: 1800 mV 
[    0.388043] rk808 3-0020: Looking up vcc7-supply from device tree
[    0.388053] vcca1v8_image: supplied by vcc3v3_sys
[    0.388072] vcc3v3_sys: could not add device link regulator.24 err -2
[    0.388953] vcca1v8_image: 1800 mV 
[    0.389129] rk808 3-0020: Looking up vcc9-supply from device tree
[    0.389140] vcc_3v3: supplied by vcc3v3_sys
[    0.389158] vcc3v3_sys: could not add device link regulator.25 err -2
[    0.389167] vcc_3v3: at 3300 mV 
[    0.389323] rk808 3-0020: Looking up vcc8-supply from device tree
[    0.389334] vcc3v3_sd: supplied by vcc3v3_sys
[    0.389352] vcc3v3_sys: could not add device link regulator.26 err -2
[    0.389361] vcc3v3_sd: at 3300 mV 
[    0.392883] input: rk805 pwrkey as /devices/platform/fdd40000.i2c/i2c-3/3-0020/rk805-pwrkey/input/input1
[    0.399137] rk808-rtc rk808-rtc: registered as rtc0
[    0.400861] rk808-rtc rk808-rtc: setting system clock to 2022-09-01 14:18:20 UTC (1662041900)
[    0.403052] rockchip-iodomain fdc20000.syscon:io-domains: Looking up pmuio1-supply from device tree
[    0.403065] rockchip-iodomain fdc20000.syscon:io-domains: Looking up pmuio1-supply property in node /syscon@fdc20000/io-domains failed
[    0.403104] rockchip-iodomain fdc20000.syscon:io-domains: Looking up pmuio2-supply from device tree
[    0.403140] rockchip-iodomain fdc20000.syscon:io-domains: Linked as a consumer to regulator.21
[    0.403188] rockchip-iodomain fdc20000.syscon:io-domains: pmuio2(3300000 uV) supplied by vcc3v3_pmu
[    0.403209] rockchip-iodomain fdc20000.syscon:io-domains: Looking up vccio1-supply from device tree
[    0.403238] rockchip-iodomain fdc20000.syscon:io-domains: Linked as a consumer to regulator.19
[    0.403273] rockchip-iodomain fdc20000.syscon:io-domains: vccio1(3300000 uV) supplied by vccio_acodec
[    0.403293] rockchip-iodomain fdc20000.syscon:io-domains: Looking up vccio2-supply from device tree
[    0.403304] rockchip-iodomain fdc20000.syscon:io-domains: Looking up vccio2-supply property in node /syscon@fdc20000/io-domains failed
[    0.403325] rockchip-iodomain fdc20000.syscon:io-domains: Looking up vccio3-supply from device tree
[    0.403353] rockchip-iodomain fdc20000.syscon:io-domains: Linked as a consumer to regulator.20
[    0.403390] rockchip-iodomain fdc20000.syscon:io-domains: vccio3(3300000 uV) supplied by vccio_sd
[    0.403409] rockchip-iodomain fdc20000.syscon:io-domains: Looking up vccio4-supply from device tree
[    0.403436] rockchip-iodomain fdc20000.syscon:io-domains: Linked as a consumer to regulator.15
[    0.403470] rockchip-iodomain fdc20000.syscon:io-domains: vccio4(1800000 uV) supplied by vcc_1v8
[    0.403494] rockchip-iodomain fdc20000.syscon:io-domains: Looking up vccio5-supply from device tree
[    0.403524] rockchip-iodomain fdc20000.syscon:io-domains: Linked as a consumer to regulator.25
[    0.403561] rockchip-iodomain fdc20000.syscon:io-domains: vccio5(3300000 uV) supplied by vcc_3v3
[    0.403580] rockchip-iodomain fdc20000.syscon:io-domains: Looking up vccio6-supply from device tree
[    0.403619] rockchip-iodomain fdc20000.syscon:io-domains: vccio6(3300000 uV) supplied by vcc_3v3
[    0.403638] rockchip-iodomain fdc20000.syscon:io-domains: Looking up vccio7-supply from device tree
[    0.403679] rockchip-iodomain fdc20000.syscon:io-domains: vccio7(3300000 uV) supplied by vcc_3v3
[    0.405832] rockchip-thermal fe710000.tsadc: tsadc is probed successfully!
[    0.406925] cpu cpu0: leakage=20
[    0.406984] cpu cpu0: pvtm = 85440, from nvmem
[    0.407004] cpu cpu0: pvtm-volt-sel=1
[    0.407238] cpu cpu0: Looking up cpu-supply from device tree
[    0.407749] cpu cpu0: Linked as a consumer to regulator.10
[    0.407770] cpu cpu0: Dropping the link to regulator.10
[    0.407869] cpu cpu0: Looking up cpu-supply from device tree
[    0.408365] cpu cpu0: Linked as a consumer to regulator.10
[    0.408587] cpu cpu0: avs=0
[    0.408676] cpu cpu0: l=0 h=2147483647 hyst=5000 l_limit=0 h_limit=0 h_table=0
[    0.412125] cpu cpu0: failed to find power_model node
[    0.413171] sdhci: Secure Digital Host Controller Interface driver
[    0.413188] sdhci: Copyright(c) Pierre Ossman
[    0.413199] Synopsys Designware Multimedia Card Interface Driver
[    0.414185] dwmmc_rockchip fe2b0000.dwmmc: IDMAC supports 32-bit address mode.
[    0.414324] dwmmc_rockchip fe2b0000.dwmmc: Using internal DMA controller.
[    0.414348] dwmmc_rockchip fe2b0000.dwmmc: Version ID is 270a
[    0.414415] dwmmc_rockchip fe2b0000.dwmmc: DW MMC controller at irq 47,32 bit host data width,256 deep fifo
[    0.414455] dwmmc_rockchip fe2b0000.dwmmc: Looking up vmmc-supply from device tree
[    0.414506] dwmmc_rockchip fe2b0000.dwmmc: Linked as a consumer to regulator.26
[    0.414527] dwmmc_rockchip fe2b0000.dwmmc: Looking up vqmmc-supply from device tree
[    0.414563] dwmmc_rockchip fe2b0000.dwmmc: Linked as a consumer to regulator.20
[    0.429012] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 400000Hz, actual 375000HZ div = 0)
[    0.442036] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.444108] sdhci-dwcmshc fe310000.sdhci: Looking up vmmc-supply from device tree
[    0.444125] sdhci-dwcmshc fe310000.sdhci: Looking up vmmc-supply property in node /sdhci@fe310000 failed
[    0.444175] sdhci-dwcmshc fe310000.sdhci: Looking up vqmmc-supply from device tree
[    0.444187] sdhci-dwcmshc fe310000.sdhci: Looking up vqmmc-supply property in node /sdhci@fe310000 failed
[    0.444219] mmc0: Unknown controller version (5). You may experience problems.
[    0.476564] mmc0: SDHCI controller on fe310000.sdhci [fe310000.sdhci] using ADMA
[    0.479654] hidraw: raw HID events driver (C) Jiri Kosina
[    0.480321] usbcore: registered new interface driver usbhid
[    0.480353] usbhid: USB HID core driver
[    0.480950] rockchip,bus bus-npu: Looking up bus-supply from device tree
[    0.481022] rockchip,bus bus-npu: Linked as a consumer to regulator.11
[    0.481077] rockchip,bus bus-npu: Failed to get leakage
[    0.481182] rockchip,bus bus-npu: pvtm = 85440, from nvmem
[    0.481227] rockchip,bus bus-npu: pvtm-volt-sel=1
[    0.481412] rockchip,bus bus-npu: avs=0
[    0.484046] rksfc_base v1.1 2016-01-08
[    0.485241] rksfc fe300000.sfc: rksfc_probe clk rate = 99000000
[    0.485530] rkflash_dev_init enter
[    0.485572] sfc nor id: c2 25 38
[    0.486218] rkflash[1] init success
[    0.486669] 4 cmdlinepart partitions found on MTD device sfc_nor
[    0.486703] Creating 4 MTD partitions on "sfc_nor":
[    0.486736] 0x0000000e0000-0x000000100000 : "env"
[    0.488622] 0x000000100000-0x000000300000 : "uboot"
[    0.490652] 0x000000300000-0x000000400000 : "splash"
[    0.491082] 0x000000400000-0x000001000000 : "firmware"
[    0.491487] sfc_nor_mtd_init register mtd succuss
[    0.491495] rkflash_dev_init device register as mtd dev, ret= 0
[    0.491728] Initializing XFRM netlink socket
[    0.491974] NET: Registered protocol family 10
[    0.492497] Segment Routing with IPv6
[    0.492536] NET: Registered protocol family 17
[    0.492549] NET: Registered protocol family 15
[    0.493005] Loading compiled-in X.509 certificates
[    0.493614] rga2: Driver loaded successfully ver:3.2.63318
[    0.493839] rga2: Module initialized.
[    0.494251] mali fde60000.gpu: Kernel DDK version g7p1-01bet0
[    0.494310] mali fde60000.gpu: Looking up mali-supply from device tree
[    0.494336] mali fde60000.gpu: Linked as a consumer to regulator.12
[    0.494344] mali fde60000.gpu: Looking up shadercores-supply from device tree
[    0.494351] mali fde60000.gpu: Looking up shadercores-supply property in node /gpu@fde60000 failed
[    0.494386] mali fde60000.gpu: Looking up mali-supply from device tree
[    0.494397] vdd_gpu: could not add device link fde60000.gpu err -17
[    0.494401] mali fde60000.gpu: Looking up shadercores-supply from device tree
[    0.494406] mali fde60000.gpu: Looking up shadercores-supply property in node /gpu@fde60000 failed
[    0.494417] mali fde60000.gpu: dev_pm_opp_set_regulators: no regulator (shadercores) found: -19
[    0.494472] mali fde60000.gpu: leakage=6
[    0.494504] mali fde60000.gpu: pvtm = 85440, from nvmem
[    0.494573] mali fde60000.gpu: avs=0
[    0.494588] W : [File] : drivers/gpu/arm/bifrost/platform/rk/mali_kbase_config_rk.c; [Line] : 112; [Func] : kbase_platform_rk_init(); power-off-delay-ms not available.
[    0.494868] mali fde60000.gpu: GPU identified as 0x2 arch 7.4.0 r1p0 status 0
[    0.494925] mali fde60000.gpu: No priority control manager is configured
[    0.494935] mali fde60000.gpu: No memory group manager is configured
[    0.495377] rk_gmac-dwmac fe2a0000.ethernet: Looking up phy-supply from device tree
[    0.495390] rk_gmac-dwmac fe2a0000.ethernet: Looking up phy-supply property in node /ethernet@fe2a0000 failed
[    0.495421] rk_gmac-dwmac fe2a0000.ethernet: no regulator found
[    0.495440] rk_gmac-dwmac fe2a0000.ethernet: clock input or output? (output).
[    0.495449] rk_gmac-dwmac fe2a0000.ethernet: TX delay(0x4f).
[    0.495455] rk_gmac-dwmac fe2a0000.ethernet: RX delay(0x2d).
[    0.495464] rk_gmac-dwmac fe2a0000.ethernet: integrated PHY? (no).
[    0.495634] mali fde60000.gpu: l=-2147483648 h=2147483647 hyst=0 l_limit=0 h_limit=0 h_table=0
[    0.495935] mali fde60000.gpu: Probed as mali0
[    0.500495] rk_gmac-dwmac fe2a0000.ethernet: init for RGMII
[    0.500755] rk_gmac-dwmac fe2a0000.ethernet: User ID: 0x30, Synopsys ID: 0x51
[    0.500766] rk_gmac-dwmac fe2a0000.ethernet: 	DWMAC4/5
[    0.500775] rk_gmac-dwmac fe2a0000.ethernet: DMA HW capability register supported
[    0.500784] rk_gmac-dwmac fe2a0000.ethernet: RX Checksum Offload Engine supported
[    0.500791] rk_gmac-dwmac fe2a0000.ethernet: TX Checksum insertion supported
[    0.500797] rk_gmac-dwmac fe2a0000.ethernet: Wake-Up On Lan supported
[    0.500821] rk_gmac-dwmac fe2a0000.ethernet: TSO supported
[    0.500828] rk_gmac-dwmac fe2a0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    0.500888] rk_gmac-dwmac fe2a0000.ethernet: rk_get_eth_addr: mac address: 00:1e:06:51:0b:e3
[    0.500906] rk_gmac-dwmac fe2a0000.ethernet: device MAC address 00:1e:06:51:0b:e3
[    0.500915] rk_gmac-dwmac fe2a0000.ethernet: TSO feature enabled
[    0.631900] libphy: stmmac: probed
[    0.638533] rockchip-pm rockchip-suspend: not set pwm-regulator-config
[    0.640753] I : [File] : drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c; [Line] : 413; [Func] : mali_module_init(); svn_rev_string_from_arm of this mali_ko is '', rk_ko_ver is '5', built at '14:10:55', on 'Sep  1 2022'.
[    0.641591] Mali: 
[    0.641595] Mali device driver loaded
[    0.699807] devfreq fde60000.gpu: Couldn't update frequency transition information.
[    0.751821] usb 3-1: new full-speed USB device number 2 using ohci-platform
[    0.788479] usb 4-1: new full-speed USB device number 2 using ohci-platform
[    0.871910] usb 5-1: new full-speed USB device number 2 using xhci-hcd
[    0.984139] usb 3-1: New USB device found, idVendor=17ef, idProduct=6047, bcdDevice= 3.00
[    0.984172] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    0.984192] usb 3-1: Product: ThinkPad Compact USB Keyboard with TrackPoint
[    0.984211] usb 3-1: Manufacturer: Lenovo
[    0.992926] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/fd840000.usb/usb3/3-1/3-1:1.0/0003:17EF:6047.0001/input/input2
[    1.014190] usb 5-1: New USB device found, idVendor=1d50, idProduct=606f, bcdDevice= 0.00
[    1.014239] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.014269] usb 5-1: Product: candleLight USB to CAN adapter
[    1.014296] usb 5-1: Manufacturer: bytewerk
[    1.014321] usb 5-1: SerialNumber: 003A00204243570D20303533
[    1.020509] usb 4-1: New USB device found, idVendor=0eef, idProduct=0005, bcdDevice= 2.00
[    1.020538] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.020552] usb 4-1: Product: WS170120
[    1.020565] usb 4-1: Manufacturer: WaveShare
[    1.020577] usb 4-1: SerialNumber: WaveShare ws170120
[    1.050072] hid-generic 0003:17EF:6047.0001: input,hidraw0: USB HID v1.00 Keyboard [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-fd840000.usb-1/input0
[    1.059039] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Mouse as /devices/platform/fd840000.usb/usb3/3-1/3-1:1.1/0003:17EF:6047.0002/input/input3
[    1.059514] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Consumer Control as /devices/platform/fd840000.usb/usb3/3-1/3-1:1.1/0003:17EF:6047.0002/input/input4
[    1.115589] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/fd840000.usb/usb3/3-1/3-1:1.1/0003:17EF:6047.0002/input/input5
[    1.116355] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/fd840000.usb/usb3/3-1/3-1:1.1/0003:17EF:6047.0002/input/input6
[    1.117022] input: Lenovo ThinkPad Compact USB Keyboard with TrackPoint as /devices/platform/fd840000.usb/usb3/3-1/3-1:1.1/0003:17EF:6047.0002/input/input7
[    1.118181] hid-generic 0003:17EF:6047.0002: input,hiddev96,hidraw1: USB HID v1.00 Mouse [Lenovo ThinkPad Compact USB Keyboard with TrackPoint] on usb-fd840000.usb-1/input1
[    1.145098] rk-pcie 3c0800000.pcie: PCIe Linking... LTSSM is 0x0
[    1.385817] Waiting for root device /dev/nvme0n1p3...
[    2.265183] rk-pcie 3c0800000.pcie: PCIe Link up, LTSSM is 0x30011
[    2.265571] rk-pcie 3c0800000.pcie: PCI host bridge to bus 0002:20
[    2.265618] pci_bus 0002:20: root bus resource [bus 20-2f]
[    2.265657] pci_bus 0002:20: root bus resource [??? 0x380000000-0x3807fffff flags 0x0] (bus address [0x80000000-0x807fffff])
[    2.265702] pci_bus 0002:20: root bus resource [io  0x0000-0xfffff] (bus address [0x80800000-0x808fffff])
[    2.265744] pci_bus 0002:20: root bus resource [mem 0x380900000-0x3bfffffff] (bus address [0x80900000-0xbfffffff])
[    2.265779] pci_bus 0002:20: scanning bus
[    2.265858] pci 0002:20:00.0: [1d87:3566] type 01 class 0x060400
[    2.265917] pci 0002:20:00.0: reg 0x10: [mem 0x00000000-0x3fffffff 64bit]
[    2.265938] pci 0002:20:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
[    2.266036] pci 0002:20:00.0: supports D1 D2
[    2.266048] pci 0002:20:00.0: PME# supported from D0 D1 D3hot
[    2.266063] pci 0002:20:00.0: PME# disabled
[    2.266131] PCI: OF: /pcie@fe280000: msi-map, using mask ffffffff, rid-base: 00002000, out-base: 00002000, length: 00001000, rid: 00002000 -> 00002000
[    2.277859] pci_bus 0002:20: fixups for bus
[    2.277876] pci 0002:20:00.0: scanning [bus 00-00] behind bridge, pass 0
[    2.277882] pci 0002:20:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.277913] pci 0002:20:00.0: scanning [bus 00-00] behind bridge, pass 1
[    2.278037] pci_bus 0002:21: scanning bus
[    2.278155] pci 0002:21:00.0: [144d:a809] type 00 class 0x010802
[    2.278470] pci 0002:21:00.0: reg 0x10: [mem 0x00000000-0x00003fff 64bit]
[    2.279582] pci 0002:21:00.0: 4.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x2 link at 0002:20:00.0 (capable of 31.504 Gb/s with 8 GT/s x4 link)
[    2.279654] PCI: OF: /pcie@fe280000: msi-map, using mask ffffffff, rid-base: 00002000, out-base: 00002000, length: 00001000, rid: 00002100 -> 00002100
[    2.313664] pci_bus 0002:21: fixups for bus
[    2.313688] pci_bus 0002:21: bus scan returning with max=21
[    2.313708] pci_bus 0002:21: busn_res: [bus 21-2f] end is updated to 21
[    2.313730] pci_bus 0002:20: bus scan returning with max=21
[    2.313976] pci 0002:20:00.0: BAR 0: no space for [mem size 0x40000000 64bit]
[    2.314033] pci 0002:20:00.0: BAR 0: failed to assign [mem size 0x40000000 64bit]
[    2.314075] pci 0002:20:00.0: BAR 8: assigned [mem 0x380900000-0x3809fffff]
[    2.314112] pci 0002:20:00.0: BAR 6: assigned [mem 0x380a00000-0x380a0ffff pref]
[    2.314163] pci 0002:21:00.0: BAR 0: assigned [mem 0x380900000-0x380903fff 64bit]
[    2.314286] pci 0002:20:00.0: PCI bridge to [bus 21]
[    2.314321] pci 0002:20:00.0:   bridge window [mem 0x380900000-0x3809fffff]
[    2.314827] pcieport 0002:20:00.0: assign IRQ: got 99
[    2.315340] pcieport 0002:20:00.0: Signaling PME with IRQ 99
[    2.317322] nvme 0002:21:00.0: assign IRQ: got 99
[    2.317808] nvme nvme0: pci function 0002:21:00.0
[    2.317893] nvme 0002:21:00.0: enabling device (0000 -> 0002)
[    2.317924] nvme 0002:21:00.0: enabling bus mastering
[    2.424622] nvme nvme0: Shutdown timeout set to 8 seconds
[    2.482433] nvme nvme0: allocated 64 MiB host memory buffer.
[    2.569384]  nvme0n1: p1 p2 p3
[    2.588368] EXT4-fs (nvme0n1p3): mounted filesystem with ordered data mode. Opts: (null)
[    2.588421] VFS: Mounted root (ext4 filesystem) readonly on device 259:3.
[    2.589556] devtmpfs: mounted
[    2.589751] Freeing unused kernel memory: 704K
[    2.595174] Run /sbin/init as init process
[    4.916291] CAN device driver interface
[    5.032029] gs_usb 5-1:1.0: Configuring for 1 interfaces
[    5.033861] usbcore: registered new interface driver gs_usb
[    5.742739] EXT4-fs (nvme0n1p3): re-mounted. Opts: (null)
[    5.975768] Adding 8388604k swap on /dev/nvme0n1p2.  Priority:-2 extents:1 across:8388604k SS
[    6.670682] elogind-daemon[1058]: New seat seat0.
[    6.673751] elogind-daemon[1058]: Watching system buttons on /dev/input/event2 (Lenovo ThinkPad Compact USB Keyboard with TrackPoint)
[    6.674243] elogind-daemon[1058]: Watching system buttons on /dev/input/event4 (Lenovo ThinkPad Compact USB Keyboard with TrackPoint Consumer Control)
[    6.674602] elogind-daemon[1058]: Watching system buttons on /dev/input/event1 (rk805 pwrkey)
[    6.674912] elogind-daemon[1058]: Watching system buttons on /dev/input/event0 (fdd70030.pwm)
[    8.539120] RTL8211F Gigabit Ethernet stmmac-0:00: attached PHY driver [RTL8211F Gigabit Ethernet] (mii_bus:phy_addr=stmmac-0:00, irq=98)
[    8.552651] dwmac4: Master AXI performs any burst length
[    8.552695] rk_gmac-dwmac fe2a0000.ethernet eth0: No Safety Features support found
[    8.552733] rk_gmac-dwmac fe2a0000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[    8.553862] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.811976] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    8.817553] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    8.818078] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    8.818086] cfg80211: failed to load regulatory.db
[   11.949316] rk_gmac-dwmac fe2a0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
I also had to patch these CAN driver files to get rid of the "kernel tainted" issue:

Code: Select all

diff --git a/drivers/net/can/rockchip/rockchip_can.c b/drivers/net/can/rockchip/rockchip_can.c
index e262403fb..e6c7b7508 100644
--- a/drivers/net/can/rockchip/rockchip_can.c
+++ b/drivers/net/can/rockchip/rockchip_can.c
@@ -810,4 +810,4 @@ module_platform_driver(rockchip_can_driver);
 
 MODULE_AUTHOR("Andy Yan <andy.yan@rock-chips.com>");
 MODULE_DESCRIPTION("Rockchip CAN Drivers");
-MODULE_LICENSE("GPL v2");
+MODULE_LICENSE("GPL");
diff --git a/drivers/net/can/rockchip/rockchip_canfd.c b/drivers/net/can/rockchip/rockchip_canfd.c
index 69ca9cd9d..4ff6b825c 100644
--- a/drivers/net/can/rockchip/rockchip_canfd.c
+++ b/drivers/net/can/rockchip/rockchip_canfd.c
@@ -1039,4 +1039,4 @@ module_platform_driver(rockchip_canfd_driver);
 
 MODULE_AUTHOR("Elaine Zhang <zhangqing@rock-chips.com>");
 MODULE_DESCRIPTION("Rockchip CANFD Drivers");
-MODULE_LICENSE("GPL v2");
+MODULE_LICENSE("GPL");
Now the only thing missing is the rockchips cpu temp for monitoring, but since that is getting really OT, I'll just wait and hope someone looks at the GH issue mentioned above. Thanks again Steve. Much appreciated!

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems (solved)

Post by chron0 »

@steve:

not sure if it's solved yet. In your tests, have your actually tried to use the socketcan interface and communicated with another device?
The whole Odroid freezes, once I start to try to query for devices on the bus. This does not happen if i disable can0 in config.ini and only
use my usb attached candlelight interface.

steve.jeong
Posts: 99
Joined: Wed Dec 01, 2021 10:18 am
languages_spoken: english
Has thanked: 14 times
Been thanked: 22 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems (solved)

Post by steve.jeong »

chron0 wrote:
Mon Sep 12, 2022 4:43 am
@steve:

not sure if it's solved yet. In your tests, have your actually tried to use the socketcan interface and communicated with another device?
The whole Odroid freezes, once I start to try to query for devices on the bus. This does not happen if i disable can0 in config.ini and only
use my usb attached candlelight interface.
I tested it by connecting with odroidc4 (mcp2515).
"whole freeze" is a phenomenon I've never seen before.

As far as I know, there will be no problem as long as the bitrate is correct.

Can you take a picture of the waveform of the bus when communicating CAN except for the M1 board in your can system?
If so, please share the waveform.
If it's difficult, please explain the your environment. I'll test it if I can copy it.

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

@steve: which transceiver did you use on the M1? I have been testing for a couple of hours now and seem to have gotten a little further:

it seems with full debugging kernel options on, I still maintain some bare shell functionality and could get some dmesgs, network
is dead, nothing else works anymore, kernel is basically stuck there:

Image

I also see this crazy amount of bus errors going up:

Image

@Steve: You can also see my test setup here, to get more details:

https://odysee.com/@Apollo-NG:2/odysee- ... 4G6Z&t=833

I got it to find the other device on the bus one time and thought I got it - but then it immediately broke down again:

I am not sure if those waveshare "SN65HVD230" are the issue here, but I doubt thats original TI silicon on them. I'm ordering
a set of original TI and NXP transceivers to make sure that isnt the issue, but the rockchip can driver still seems rather
unstable atm :/

This is what it should look like when I use the candlelight USB can adapter:

Image

But the bus doesnt really matter since it happens even without a transceiver being connected or with a transceiver but no device on the bus with the rockchip
can interface :/

@Steve: do the can drivers for rockchip require MSI enabled? the dmesg errors look a bit like cpu deadlocks and interrupt foo. IIRC the original boot.scr
included pci=nomsi and I have carried this over to my install as well - but it doesnt like to boot without nomsi anyways.

another weird thing is the MTU on the rockchip interface, it jumps to 604 when brought up, and I cant really change it either.
CAN spec says MTU should be 16:

Code: Select all

can1: flags=193<UP,RUNNING,NOARP>  mtu 604
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 256  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 56  

steve.jeong
Posts: 99
Joined: Wed Dec 01, 2021 10:18 am
languages_spoken: english
Has thanked: 14 times
Been thanked: 22 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by steve.jeong »

chron0 wrote:
Mon Sep 19, 2022 5:10 am
@steve: which transceiver did you use on the M1? I have been testing for a couple of hours now and seem to have gotten a little further:
I used SN65HVD230.
@Steve: do the can drivers for rockchip require MSI enabled? the dmesg errors look a bit like cpu deadlocks and interrupt foo. IIRC the original boot.scr
included pci=nomsi and I have carried this over to my install as well - but it doesnt like to boot without nomsi anyways.
"CAN" does not use more than 16 interrupts. So it's not relevant.


I found the cause of this crazy bus error.

Code: Select all

3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc fq_codel state UP mode DEFAULT group default qlen 128
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can state ERROR-PASSIVE (berr-counter tx 0 rx 0) restart-ms 0 
          bitrate 501689 sample-point 0.750 
          tq 498 prop-seg 1 phase-seg1 1 phase-seg2 1 sjw 1
          rockchip_can: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..128 brp-inc 2
          clock 148500000 
          re-started bus-errors arbit-lost error-warn error-pass bus-off
          0          72746      0          1          1          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
    RX: bytes  packets  errors  dropped overrun mcast   
    581971     72747    72746   0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    0          0        0       0       0       0       
It occurs when the bitrate is different on the can bus.
If the bitrate is 500K, it should occupy 2us per bit.
I think we can check and compare M1 and candlelight usb adapter respectively.
I'll take a picture of M1's can bus and upload it within today.
another weird thing is the MTU on the rockchip interface, it jumps to 604 when brought up, and I cant really change it either.
CAN spec says MTU should be 16:

Code: Select all

can1: flags=193<UP,RUNNING,NOARP>  mtu 604
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 256  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 56  
I'm not sure about the MTU issue. too..

steve.jeong
Posts: 99
Joined: Wed Dec 01, 2021 10:18 am
languages_spoken: english
Has thanked: 14 times
Been thanked: 22 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by steve.jeong »

I did test 2 odroid-M1 for catch wave of can-bus.

Code: Select all

#!/bin/bash
sudo ifconfig can0 down
sudo ip link set can0 type can bitrate 500000
sudo ip link set can0 txqueuelen 128
sudo ifconfig can0 up
can transceiver: SN65HVD230

command rx target:
candump can0

command tx target:
cansend can0 500#11.22.33

Here are the oscilloscope results:


Image
[picture 1]. scope: CAN-H to CAN-L


Image
[picture 2]. scope: CAN-rx to GND

From pictures, 1 bit timing is 2us.

bit value from [picture 2] (CAN-rx to GND)

- read 4 signals at a time.

Code: Select all

0101 0000 0100 0001 0001 1000 1000 1001 0001 0001 1001 1101 1111 0111 0000 110
- read signals in line with the can frame

Code: Select all

                   RTR                                                           CRC.D
                    |                                                              |
                    |                                                              |
                    |                                                              |
  0 101 0000 0'1'0000 0'1'00011 0001 0001 0010 0010 0011 0011    1011 1110 1110 0001 10
  |   |    |   |   |  | | |   | <--------------------------->    <---------------->  ||  
  |   |    |   |   |  | | |   |  Data:     11.22.33                      CRC         ||
  |   |    |   |   |  | | |   |                                                      ||
  s  '5'  '0'  s  '0' I s r   D                                                      AA
  o            t      D t 0   L                                                      CC
  f            u      E u     C                                                      KK
               f        f                                                             .
               f        f                                                             D

<ID: 500 DATA: 11.22.33>

I think you just need to compare it with the bus signal on your platform except for M1.
If the bit timing differs by an integer multiple, the driver may be updated.
I don't know if the data I posted can help.
These users thanked the author steve.jeong for the post:
chron0 (Tue Sep 20, 2022 3:26 am)

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by joerg »

Today I made some tests with the M1 Rockchip Canbus, a C4 with MCP2515 and an ATMega324p with MCP2515.
What I see is that the communication at 500k bitrate works between M1 and C4. The communication between ATMega324p and C4 also works.
Problems are coming when I connect the ATMega324p with the M1. The M1 gets very slow at ssh terminal.
I see on my scope that the ATMega324p resends like race the message, also the messages are shown in candump in M1 as race.
This does not happen with the ATMega324 and the C4. And also not with M1 and C4.
I see the bitrate with the ATMega324p at exactly 500kbs and the bitrate with the M1 at about 506kbs
It might be that the ATMega324p with MCP2515 doesn't receive an acknowledge because of this difference in bitrate. As I have programmed the ATMega324 registers with the help of this webpage https://www.kvaser.com/support/calculat ... alculator/ for sample point of 75% and a allowed tolerance of 1.5%.
Would it be possible to recalculate the M1 timings to be more exact at 500kbs?
These users thanked the author joerg for the post (total 2):
chron0 (Tue Sep 20, 2022 3:26 am) • steve.jeong (Tue Sep 20, 2022 8:34 am)

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

@joerg: yes, i saw this bitrate issue on 500k as well, kernel is even issuing a dmesg about it (0.3% bit error)
I found that on 750k it is spot on but I havent tested that yet with my com partner board on the opposite side.
looks like an interrupt/race condition on my end as well, see screenshot/video. box drops offline, cant reboot
and with the debug all on kernel I can still move on the active logged in console.

Could you test 750k and if the issues goes away? Then I would do the same as a "fix" on my side.

@steve: I had some issues getting a good trigger on can_h with the analog probes so I went with the digital
inputs. I will try another run soon with analog probes to really see the signal on the bus and try it on the
tx/rx side of the transceiver as well.
These users thanked the author chron0 for the post:
steve.jeong (Tue Sep 20, 2022 8:37 am)

steve.jeong
Posts: 99
Joined: Wed Dec 01, 2021 10:18 am
languages_spoken: english
Has thanked: 14 times
Been thanked: 22 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by steve.jeong »

@joerg: yes, i saw this bitrate issue on 500k as well, kernel is even issuing a dmesg about it (0.3% bit error)
Could you test 750k and if the issues goes away? Then I would do the same as a "fix" on my side.
Can't you use bitrate 125K or 250K?
I know that the CAN protocol allows for a little errors. But if you want to reduce errors, 125K or 250K will have less error than 500K or 750K (in rockchip driver).
@steve: I had some issues getting a good trigger on can_h with the analog probes so I went with the digital
inputs. I will try another run soon with analog probes to really see the signal on the bus and try it on the
tx/rx side of the transceiver as well.
All right. Please share the results.

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

No, i need 500k at the least, ideally more. 750k would be a good sweetspot between 1M and 500k. 1M should be no problem for CAN, especially on a bus thats only 1.5m long max, right now it's like 20cm in my test setup.
and we're not talking about slight canbus errors here, this goes into full spinlock on the host :)

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by joerg »

Sorry, I can't try 750 or 1000k with my MCP2515@8MHz, bit time calculation not possible. My experiments with the M1 are only to help here. I am about to setup a C4 for a new platform for my home automation, to replace the C2 that communicates by IIC with IO modules.

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by joerg »

Would it be possible to recalculate the M1 timings to be more exact at 500kbs?
I answer myself. No, I tried a lot. I can't get more exact than 501689.
I assume that it is because of the rare clock of 148500000. We can't get a good divider to get a good Tq. And as higher we set the canbus bitrate as bigger becomes the error.

So, next question: Would it be possible to set another clock source for the rockchip can device? A round clock as eg. 100MHz or 200MHz.?
These users thanked the author joerg for the post:
chron0 (Thu Sep 22, 2022 2:28 am)

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

@joerg: ok, thats fine, I'll try it then. On 750k we get a spot on bitrate with that odd 148500000 and 0% error, just to make sure THAT isnt the issue because 0.3% bitrate error should be well within CAN tolerances really, imho and not produce this race condition on the bus as well as wild CPU interrupt races we've seen. Basically freezing the whole machine.

I'll try it anyways, I got fresh _original_ TI SN65HVD230 and SN65HVD231 as well as one _original_ TJA1051T/3. I'll have to create some custom boards to use them properly, which I most likely wont be able to do until friday. Then I will flash the firmware of the EBB via the candlelight to 750k and plug it to the M1 canbus and test again. Hopefully by that time I will also have figured out how to properly trigger can on the analog probes but I still am not convinced that the issue is on the bus really.

@steve: the CAN ports on the m1 are 3.3V tolerant right?

steve.jeong
Posts: 99
Joined: Wed Dec 01, 2021 10:18 am
languages_spoken: english
Has thanked: 14 times
Been thanked: 22 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by steve.jeong »

joerg wrote:
Wed Sep 21, 2022 9:25 pm
So, next question: Would it be possible to set another clock source for the rockchip can device? A round clock as eg. 100MHz or 200MHz.?
I will find a way to fix it in the driver.

steve.jeong
Posts: 99
Joined: Wed Dec 01, 2021 10:18 am
languages_spoken: english
Has thanked: 14 times
Been thanked: 22 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by steve.jeong »

chron0 wrote:
Thu Sep 22, 2022 2:36 am
@steve: the CAN ports on the m1 are 3.3V tolerant right?
yes it is.

steve.jeong
Posts: 99
Joined: Wed Dec 01, 2021 10:18 am
languages_spoken: english
Has thanked: 14 times
Been thanked: 22 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by steve.jeong »

joerg wrote:
Wed Sep 21, 2022 9:25 pm
So, next question: Would it be possible to set another clock source for the rockchip can device? A round clock as eg. 100MHz or 200MHz.?
This is 200Mhz can clock setting.

Code: Select all

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-evb.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-evb.dtsi
index 4263f9d89dff..50f14cdb4bc7 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-evb.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568-evb.dtsi
@@ -364,7 +364,7 @@
 
 &can0 {
        assigned-clocks = <&cru CLK_CAN0>;
-       assigned-clock-rates = <150000000>;
+       assigned-clock-rates = <200000000>;
        pinctrl-names = "default";
        pinctrl-0 = <&can0m1_pins>;
        status = "disabled";
@joerg: Could you reflect it and test with M1 and ATMega324p again?
I'm going to do a test that I can do
These users thanked the author steve.jeong for the post:
chron0 (Sat Sep 24, 2022 4:51 pm)

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by joerg »

Thank you @steve, I will try it.

BTW. This night I slept not good and became thinking of it. First I thought I set the sampling point of the MCP2515 earlier, to about 60%, but no, it don't work. Then I made some more experiments and set the sampling point back to 75% and at the M1 I set bitrate to 488486. And what a surprise, communication is working with this setting!

Code: Select all

sudo ip link set can0 type can tq 250 prop-seg 1 phase-seg1 2 phase-seg2 4 sjw 1

Code: Select all

ip -details link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc fq_codel state UP mode DEFAULT group default qlen 10
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can <TRIPLE-SAMPLING> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 
	  bitrate 488486 sample-point 0.500 
	  tq 250 prop-seg 1 phase-seg1 2 phase-seg2 4 sjw 1
	  rockchip_can: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..128 brp-inc 2
	  clock 148500000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
But anyway, I will try your fix. If it works, it's better and cleaner.

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by joerg »

I have done a test with it. De-compiled and compiled the dtb and changed assigned-clock-rates = <0x8f0d180> with assigned-clock-rates = <0xBEBC200> at can@fe570000.
It seems to work well :)

Code: Select all

ip -details link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc fq_codel state UP mode DEFAULT group default qlen 10
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can <TRIPLE-SAMPLING> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 
	  bitrate 500000 sample-point 0.875 
	  tq 250 prop-seg 3 phase-seg1 3 phase-seg2 1 sjw 1
	  rockchip_can: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..128 brp-inc 2
	  clock 200000000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
These users thanked the author joerg for the post (total 2):
odroid (Thu Sep 22, 2022 5:38 pm) • chron0 (Sat Sep 24, 2022 5:08 pm)

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by joerg »

BTW, I tested also 1000kbs. For this I removed the 8MHz quartz from MCP2515 breakout board and connected XTAL1 to PB0 of the ATMega. I had to set the fuse of ATMega to output the sysclock to PB0 to have 16MHz at MCP2515. Works also like charm.

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

after applying steve's patch to my local tree, recompiling and booting I also get a "clean" 200000000 clock as well as "clean" bitrate (500000 sample-point 0.875):

Code: Select all

V0R0N ~ # ip -details -statistic link show can1
4: can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 256
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can <TRIPLE-SAMPLING> state STOPPED (berr-counter tx 0 rx 0) restart-ms 0 
	  bitrate 500000 sample-point 0.875 
	  tq 250 prop-seg 3 phase-seg1 3 phase-seg2 1 sjw 1
	  rockchip_can: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..128 brp-inc 2
	  clock 200000000 
	  re-started bus-errors arbit-lost error-warn error-pass bus-off
	  0          0          0          0          0          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
    RX:  bytes packets errors dropped  missed   mcast           
             0       0      0       0       0       0 
    TX:  bytes packets errors dropped carrier collsns           
             0       0      0       0       0       0 
as soon as i pull the interface up with ifconfig can1 up the MTU goes to 604 again:

Code: Select all

V0R0N ~ # ip -details -statistic link show can1
4: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 604 qdisc pfifo_fast state UP mode DEFAULT group default qlen 256
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can <TRIPLE-SAMPLING> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 
	  bitrate 500000 sample-point 0.875 
	  tq 250 prop-seg 3 phase-seg1 3 phase-seg2 1 sjw 1
	  rockchip_can: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..128 brp-inc 2
	  clock 200000000 
	  re-started bus-errors arbit-lost error-warn error-pass bus-off
	  0          0          0          0          0          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
    RX:  bytes packets errors dropped  missed   mcast           
             0       0      0       0       0       0 
    TX:  bytes packets errors dropped carrier collsns           
             0       0      0       0       0       0 
I'll have another bus debug session this afternoon or tomorrow to see if the behavior improved with the changed
clock setting as well. I am still wondering about the MTU change tho, because it doesnt seem to happen on joergs side.
I am not sure that is an issue, but it is an obvious difference compared to joergs ip details outputs.

EDIT: First test looks promising - after doing my socketcan query for the EBB device i get 0 results (since it's not connected)
but the system remains alive and doesnt throw any dmesgs.
Last edited by chron0 on Sat Sep 24, 2022 6:21 pm, edited 2 times in total.

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

@joerg: after comparing our interface configs i also stumbled on your queue setup: fq_codel
I dug a little more into this and found this thread, which might be interesting regarding can iface queue config:

https://github.com/systemd/systemd/issues/9194

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

Ok, more of my tests seem to work now:

Code: Select all

klipper@V0R0N ~ $ ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can1
Found canbus_uuid=c218fec190c5, Application: Klipper
Total 1 uuids found
it finds the device and no subsequent errors on the bus appear (in iface counters).

I will also try this at 1MBit/s next

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

Regarding the MTU issues, I think i figured out the cause:

On this machine I run dhcpcd for the normal network configuration. But as the can interfaces are also just "network" interfaces,
dhcpcd seems to try to configure these interfaces as well. That is probably the reason why even after manually setting the MTU
to 16 it went back up to 604 by "itself" again :)

The solution is to add the following line to /etc/dhcpcd.conf:

Code: Select all

denyinterfaces can*
So far it seems to stay at 16 where it belongs.

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by joerg »

[edit] You have been faster than me. ;)
I am not sure why it is on your side. I use stock ubuntu server image with kernel 4.19.219. It might be another configuration.
I can modify the mtu by command sudo ifconfig can0 mtu 16 up. I tried different values, it seems the setting is accepted.

I tried also to set it with systemd-networkd in a link file:

Code: Select all

cat  /etc/systemd/network/80-can.link
[Match]
OriginalName=can*

[Link]
TransmitQueueLength=1000
MTUBytes=32
I use QueueLength only to prove if setting is accepted.
On the M1 it is not accepted, but on Ubuntu Server 22.04 on my C4 QueueLength is accepted, but MTUBytes not.

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

@joerg: it doesnt seem to create issues in tests so far but I do believe fq_codel is a dead wrong algo setting for can, you may want to check how to set it to pfifo_fast.

User avatar
joerg
Posts: 1639
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 134 times
Been thanked: 288 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by joerg »

Oh, I haven't dealt with this before. :o
When I compare M1 with C4 it is like that:
M1:

Code: Select all

tc qdisc show dev can0
qdisc fq_codel 0: root refcnt 2 limit 10240p flows 1024 quantum 16 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
C4:

Code: Select all

tc qdisc show dev can0
qdisc pfifo_fast 0: root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
I can change this setting on the M1 with:

Code: Select all

sudo tc qdisc replace dev can0 root pfifo_fast
tc qdisc show dev can0
qdisc pfifo_fast 8002: root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
After reboot the old setting is back.
But as I have stated already, I use the M1 only to make some some tests to help here in this thread. I will continue with the C4 for my project. It's running with mainline kernel.

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

@steve: finally also a capture on analog probes with 500kbit:

Image

@joerg: and your help with this issue was invaluable and is greatly appreciated
These users thanked the author chron0 for the post:
joerg (Sun Sep 25, 2022 2:55 am)

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

I will do the final 1mbit/s test tomorrow, in the meantime to wrap things up, this is my current diff to have working canbus on the Odroid M1:

Code: Select all

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-evb.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-evb.dtsi
index 4263f9d89..50f14cdb4 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-evb.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568-evb.dtsi
@@ -364,7 +364,7 @@
 
 &can0 {
        assigned-clocks = <&cru CLK_CAN0>;
-       assigned-clock-rates = <150000000>;
+       assigned-clock-rates = <200000000>;
        pinctrl-names = "default";
        pinctrl-0 = <&can0m1_pins>;
        status = "disabled";
diff --git a/drivers/net/can/rockchip/rockchip_can.c b/drivers/net/can/rockchip/rockchip_can.c
index e262403fb..e6c7b7508 100644
--- a/drivers/net/can/rockchip/rockchip_can.c
+++ b/drivers/net/can/rockchip/rockchip_can.c
@@ -810,4 +810,4 @@ module_platform_driver(rockchip_can_driver);
 
 MODULE_AUTHOR("Andy Yan <andy.yan@rock-chips.com>");
 MODULE_DESCRIPTION("Rockchip CAN Drivers");
-MODULE_LICENSE("GPL v2");
+MODULE_LICENSE("GPL");
diff --git a/drivers/net/can/rockchip/rockchip_canfd.c b/drivers/net/can/rockchip/rockchip_canfd.c
index 69ca9cd9d..4ff6b825c 100644
--- a/drivers/net/can/rockchip/rockchip_canfd.c
+++ b/drivers/net/can/rockchip/rockchip_canfd.c
@@ -1039,4 +1039,4 @@ module_platform_driver(rockchip_canfd_driver);
 
 MODULE_AUTHOR("Elaine Zhang <zhangqing@rock-chips.com>");
 MODULE_DESCRIPTION("Rockchip CANFD Drivers");
-MODULE_LICENSE("GPL v2");
+MODULE_LICENSE("GPL");
Once the test with 1mbit/s is running without any further issue, I will set the topic back to solved.

chron0
Posts: 31
Joined: Tue Aug 30, 2022 7:57 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, N2, M1
Has thanked: 12 times
Been thanked: 4 times
Contact:

Re: Odroid M1 Rockchip CANBUS problems

Post by chron0 »

Upgraded firmware to 1MBit/s, flashed firmware via 500kbit/s CAN, changed bus to 1MBit/s, communication established and working like a charm now.
I'll mark it as solved for now. Thanks again guys.

The Waveshare Transceivers have not been the problem at all. They work now flawlessly with the updated kernel configuration.

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 2 guests