Hi all,
I am debugging the CAN communication function, but I cannot find the flexCAN device node in the dtb file. If I want to get it working, what's the solution?
Best regards!
Solved! Go to Solution.
I just got the confirmation from the SE team.
FlexCAN is in realtime domain so it is not supported in Linux. It can only be accessed by M core. You can find driver and related examples in SDK.
Please refer to the following definition in arch/arm64/boot/dts/freescale/imx8mp.dtsi in Linux Kernel.
flexcan1: can@308c0000 {
compatible = "fsl,imx8mp-flexcan";
reg = <0x308c0000 0x10000>;
interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MP_CLK_IPG_ROOT>,
<&clk IMX8MP_CLK_CAN1_ROOT>;
clock-names = "ipg", "per";
assigned-clocks = <&clk IMX8MP_CLK_CAN1>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_40M>;
assigned-clock-rates = <40000000>;
fsl,clk-source = /bits/ 8 <0>;
fsl,stop-mode = <&gpr 0x10 4>;
status = "disabled";
};
flexcan2: can@308d0000 {
compatible = "fsl,imx8mp-flexcan";
reg = <0x308d0000 0x10000>;
interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MP_CLK_IPG_ROOT>,
<&clk IMX8MP_CLK_CAN2_ROOT>;
clock-names = "ipg", "per";
assigned-clocks = <&clk IMX8MP_CLK_CAN2>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_40M>;
assigned-clock-rates = <40000000>;
fsl,clk-source = /bits/ 8 <0>;
fsl,stop-mode = <&gpr 0x10 5>;
status = "disabled";
};
};
And the following definition in arch/arm64/boot/dts/freescale/imx8mp-evk.dts.
&flexcan1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan1>;
xceiver-supply = <®_can1_stby>;
status = "okay";
};
&flexcan2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan2>;
xceiver-supply = <®_can2_stby>;
pinctrl-assert-gpios = <&pca6416 3 GPIO_ACTIVE_HIGH>;
status = "disabled";/* can2 pin conflict with pdm */
};
I just got the confirmation from the SE team.
FlexCAN is in realtime domain so it is not supported in Linux. It can only be accessed by M core. You can find driver and related examples in SDK.