On my custom tx2-4gb board, I used the command to enable can0 & can1 like tx2:
#! /bin/bash
sudo modprobe can
sudo modprobe can-raw
sudo modprobe mttcan
sudo ip link set can0 type can bitrate 500000 #loopback on
sudo ip link set up can0
sudo ip link set can1 type can bitrate 500000 #loopback on
sudo ip link set up can1
Can you increase kernel loglevel and then try above commands? I need outputs when you use modprobe.
$dmesg -n 7 # To increase loglevel
You do not need to enable it like Xavier but still please provide values in registers:
0x0c303008
0x0c303010
0x0c303018
0x0c303020
Also please give the output of following node:
cat /proc/device-tree/mttcan@c310000/status
cat /proc/device-tree/mttcan@c320000/status
Thank you!
I've found my mistake that caused the problem of can_ports: I had just changed "CONFIG_CAN=m" to "CONFIG_CAN=m", then I thought the can driver would be static installed. However, It didn't work even if I used mobprobe again.
When I returned to the configuration before modification, the can_prots could be set up by mobprobe.
Hi camasmie,
You need to update status in mttcan@c320000 node of kernel device-tree present in BSP.
Use dtc command to modify and compile device tree.
Flash device with updated dtb.
Let me know if you face any issues.