Orin nx minimal can not find mttcan in dtb

我使用的版本是R36.3
我基于Controller Area Network (CAN) — NVIDIA Jetson Linux Developer Guide 1 documentation 去配置can通信。
我构建了minimal的镜像,烧入系统之后发现没有 /proc/device-tree/mttcan@c310000/status这个文件,于是我查看设备树是配置了状态为okay的,不知道这个在minimal中需要怎么打开?

zme@zme-0010-jp60:~$ cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} root=/dev/nvme0n1p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 

# When testing a custom kernel, it is recommended that you create a backup of
# the original kernel and add a new entry to this file so that the device can
# fallback to the original kernel. To do this:
#
# 1, Make a backup of the original kernel
#      sudo cp /boot/Image /boot/Image.backup
#
# 2, Copy your custom kernel into /boot/Image
#
# 3, Uncomment below menu setting lines for the original kernel
#
# 4, Reboot

# LABEL backup
#    MENU LABEL backup kernel
#    LINUX /boot/Image.backup
#    INITRD /boot/initrd
#    APPEND ${cbootargs}


我是基于/boot/dtb/kernel_tegra234-p3768-0000+p3767-0000-nv.dtb,使用dtc转换出的dts查看的status状态。

Hi 1031150349,

Are you using the devkit or custom board for Orin NX?

For Orin NX, it seems only one available CAN interface mttcan@c310000, which has been enabled in your case. (i.e. mttcan@c320000 is unavailable as expected for Orin NX)

我是使用的官方devkit,在设备树中的状态是正常的,但是/proc/device-tree/下的节点非常少

$ ls /proc/device-tree
'#address-cells'       mgbe-vm-irq-config       serial
 aliases               model                    serial-number
 bpmp                  name                    '#size-cells'
 bus@0                 nvpmodel                 soc0-throttle-alert
 camera-ivc-channels   opp-table-cluster0       soc1-throttle-alert
 chosen                opp-table-cluster1       soc2-throttle-alert
 compatible            opp-table-cluster2       soctherm-oc-event
 cpus                  pmu                      sound
 cpu-throttle-alert    psci                     sram@40000000
 cv0-throttle-alert    pwm-fan                  __symbols__
 cv1-throttle-alert    regulator@101            tegra-camera-platform
 cv2-throttle-alert    regulator-vdd-1v1-hub    tegra-capture-vi
 dce@d800000           regulator-vdd-1v8-ao     tegra-carveouts
 display@13800000      regulator-vdd-1v8-hs     tegra-hsp@b950000
 dsu-pmu0              regulator-vdd-1v8-sys    tegra_mce@e100000
 dsu-pmu1              regulator-vdd-3v3-ao     tegra-rtcpu-trace
 dsu-pmu2              regulator-vdd-3v3-pcie   thermal-zones
 firmware              regulator-vdd-3v3-sd     timer
 gpio-keys             regulator-vdd-5v0-sys    tsc_sig_gen@c6a0000
 gpu-throttle-alert    reserved-memory          vm-irq-config
 hot-surface-alert     rtcpu@bc00000
 interrupt-parent      scf-pmu

经过我查找,发现can节点被放到了/proc/device-tree/bus@0/目录中,是我疏忽了。

do you mean mttcan@c320000 is available for Orin NX with rel-36?

orin nx 中mttcan@c320000节点默认是disabled, mttcan@c310000默认是okay的,与设备树一致。

Yes, but i think mttcan@c320000 still wouldn’t work even if you enable it since there’s no interface available on the board.
So, please use mttcan@c310000 instead.

ok, i know, thank you for help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.