CAN bus inconsistent behavior on L4T 32.4.4 and L4T 32.5.0

Hi shgarg,

After CAN up on network, I checked the parent is still ‘osc’.
Now twice modprobe mttcan, then mttcan works fine with NX CAN.

nvidia@xavier:~$ sudo modprobe can
nvidia@xavier:~$ sudo modprobe can-raw
nvidia@xavier:~$ sudo modprobe can-dev
nvidia@xavier:~$ sudo modprobe mttcan
nvidia@xavier:~$ 
nvidia@xavier:~$ sudo ip link set can0 down
nvidia@xavier:~$ sudo ip link set can1 down
nvidia@xavier:~$ sudo ip link set can0 up type can bitrate 1000000   dbitrate 1000000 restart-ms 1000 berr-reporting on fd on
nvidia@xavier:~$ sudo ip link set can1 up type can bitrate 1000000   dbitrate 1000000 restart-ms 1000 berr-reporting on fd on
nvidia@xavier:~$ cat /proc/device-tree/mttcan@c310000/pll_source
pllc
nvidia@xavier:~$ sudo cat /sys/kernel/debug/bpmp/debug/clk/can1/parent
osc
nvidia@xavier:~$ sudo ip link set up can0
nvidia@xavier:~$ sudo ip link set up can1
nvidia@xavier:~$ 
nvidia@xavier:~$ cat /proc/device-tree/mttcan@c310000/pll_source
pllc
nvidia@xaviersudo cat /sys/kernel/debug/bpmp/debug/clk/can1/parent
osc
nvidia@xavier:~$ ip -s -d link show can0
14: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
    link/can  promiscuity 0 
    can <BERR-REPORTING,FD> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 1000 
	  bitrate 1010526 sample-point 0.736 
	  tq 52 prop-seg 6 phase-seg1 7 phase-seg2 5 sjw 1
	  mttcan: tseg1 2..255 tseg2 0..127 sjw 1..127 brp 1..511 brp-inc 1
	  dbitrate 1010526 dsample-point 0.736 
	  dtq 52 dprop-seg 6 dphase-seg1 7 dphase-seg2 5 dsjw 1
	  mttcan: dtseg1 1..31 dtseg2 0..15 dsjw 1..15 dbrp 1..15 dbrp-inc 1
	  clock 38400000
	  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 overrun mcast   
    0          0        0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    0          0        0       0       0       0      

Hi shgarg,

I made a mistake while modify osc to pllc, now it’s right.

nvidia@xavier:~$ cat /proc/device-tree/mttcan@c310000/pll_source
pllc
nvidia@xavier:~$ sudo cat /sys/kernel/debug/bpmp/debug/clk/can1/parent
pll_c

Ok, so things are fine now or still some issue?

Hi shgarg,

When I change clock to pllc both of the mttcan work fine, but dbitrate max is 2Mbps, if large then 2Mbps there will be “mttcan c310000.mttcan can0: bitrate error 3.0%”.

All mttcan work fine
sudo ip link set can0 up type can bitrate 2000000   dbitrate 2000000 restart-ms 1000 berr-reporting on fd on
All mttcan have bit error large then 2000000
sudo ip link set can0 up type can bitrate 2000000   dbitrate 3000000 restart-ms 1000 berr-reporting on fd on

Hi,I have the same problem,can you tell me how to change the clock to pllc?

hello make9-11

please check developer guide, Flashing a Specific Partition.
you can flash a specific partition instead of flashing the whole device by using the command line switch ‑k .
thanks

You need to update mttcan node clocks section and pll-source inside kernel dtb.