Tool/software:
Hi ti expert,
I want to use the mcan0 device on the linux side. so I add a new node in the k3-am62a7-sk.dts as follow:
kernel/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts:
///// Add by mason 2024/11/07 begin /////
aliases {
serial0 = &mcu_uart0;
serial1 = &wkup_uart0;
serial2 = &main_uart0;
mmc0 = &sdhci0;
mmc1 = &sdhci1;
ethernet0 = &cpsw_port1;
spi0 = &ospi0;
can0 = &nullmax_can;
};
main_mcan0_pins_default: main-mcan0-pins-default {
pinctrl-single,pins = <
AM62PX_IOPAD(0x41DC, PIN_INPUT, 0) /* (C18) MCAN0_RX */
AM62PX_IOPAD(0x41D8, PIN_OUTPUT, 0) /* (B17) MCAN0_TX */
/*AM62PX_IOPAD(0x41D0, PIN_OUTPUT, 7) (F14) UART0_CTSN,SOC_CAN0_STBz */
>;
};
transceiver1: can-phy0 {
compatible = "ti,TJA1051TK";
#phy-cells = <0>;
max-bitrate = <5000000>;
};
nullmax_can:mason_canfd {
status = "okay";
compatible = "bosch,m_can";
pinctrl-names = "default";
pinctrl-0 = <&main_mcan0_pins_default>;
phys = <&transceiver1>;
reg = <0x00 0x20701000 0x00 0x200>,
<0x00 0x20708000 0x00 0x8000>;
reg-names = "m_can", "message_ram";
power-domains = <&k3_pds 98 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 98 6>, <&k3_clks 98 1>;
clock-names = "hclk", "cclk";
/* ======================== GICSS0_COMMON_0_INTERRUPT_MAP TRM page:1231 =====================================
MCAN0_COMMON_0_MCANSS_EXT_TS_ROLLOVER_LVL_INT_0 GICSS0_COMMON_0_SPI_IN_186
MCAN0_COMMON_0_MCANSS_MCAN_LVL_INT_0 GICSS0_COMMON_0_SPI_IN_187
MCAN0_COMMON_0_MCANSS_MCAN_LVL_INT_1 GICSS0_COMMON_0_SPI_IN_188
*/
interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "int0", "int1";
bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
};
///// Add by mason 2024/11/07 end /////
};
And I remove main_mcan0 node in the arch/arm64/boot/dts/ti/k3-am62a-main.dtsi as follow:
/*
main_mcan0: can@20701000 {
compatible = "bosch,m_can";
reg = <0x00 0x20701000 0x00 0x200>,
<0x00 0x20708000 0x00 0x8000>;
reg-names = "m_can", "message_ram";
power-domains = <&k3_pds 98 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 98 6>, <&k3_clks 98 1>;
clock-names = "hclk", "cclk";
interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "int0", "int1";
bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
status = "disabled";
};*/
After updated the DTB and reboot the linux. I can NOT found the can0 device:
And I fond some error via dmesg command:
In MCU1-0 only mcu_can0 and mcu_can1 be used.
SDK version: 9.2
can you help me to analysis analyze the root cause?
thank you .