Hello, I’m having trouble flashing the modified device-tree in order to make the CAN-BUS work, I guess there is something that I missed. I have read the documentation How to enable the pll_aon clock
I have modified the “tegra194-a02-bpmp-p2888-a04.dtb” file in the “bootloader” folder on my desktop computer using “dtc”. But when I want to upload the file with the command “sudo ./flash.sh -k kernel-dtb jetson-agx-xavier-devkit mmcblk0p1” its get systematically overwritten during the flashing process, and the device-tree on the Jetson AGX Xavier has not changed. I tried to put the file in the “kernel/dtb” folder but it seems that the file is just ignored.
However what I manged to do so far is to download and compile the kernel and the device-tree source files. I have edited “sources/hardware/nvidia/plateform/t19x/galen/kernel-dts/common/tegra194-p2888-0001-p2822-0000-common.dtsi” to fit the changes demanded in the documentation cited earlier How to enable the pll_aon clock
clocks-init {
compatible = "nvidia,clocks-config";
status = "okay";
disable {
clocks = <&bpmp_clks TEGRA194_CLK_CAN1>,
<&bpmp_clks TEGRA194_CLK_CAN2>;
};
};
and this in “sources/hardware/plateform/t19x/common/kernel-dts/t19x-common-platforms/tegra194-no-pll-aon-clock.dtsi”
mttcan@c310000 {
pll_source = "pllaon";
clocks = <&bpmp_clks TEGRA194_CLK_CAN1_CORE>,
<&bpmp_clks TEGRA194_CLK_CAN1_HOST>,
<&bpmp_clks TEGRA194_CLK_CAN1>,
<&bpmp_clks TEGRA194_CLK_PLLAON>;
clock-names = "can_core", "can_host","can", "pllaon";
};
mttcan@c320000 {
pll_source = "pllaon";
clocks = <&bpmp_clks TEGRA194_CLK_CAN2_CORE>,
<&bpmp_clks TEGRA194_CLK_CAN2_HOST>,
<&bpmp_clks TEGRA194_CLK_CAN2>,
<&bpmp_clks TEGRA194_CLK_PLLAON>;
clock-names = "can_core", "can_host","can", "pllaon";
};
This seems to work kind of, as when I type “cat /proc/device-tree/mttcan@c310000/pll_source” I get “pllaon”.
But this command “cat /sys/kernel/debug/bpmp/debug/clk/can1/parent” gives me “pll_c”
This one “cat /sys/kernel/debug/bpmp/debug/clk/can1/possible_parents” “clk_32k osc pll_c”
And this one “xxd /proc/device-tree/mttcan@c310000/clocks”
00000000: 0000 0004 0000 011c 0000 0004 0000 000a …
00000010: 0000 0004 0000 0009 0000 0004 0000 005e …^
When I type modprobe mttcan I get the error in dmesg saying:
mttcan c310000.mttcan: unable to set CAN_CLK parent
mttcan c310000.mttcan: probe failed
mttcan c320000.mttcan: unable to set CAN_CLK parent
mttcan c320000.mttcan: probe failed
Thank you for your help.