IMX8ulp flexCAN

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8ulp flexCAN

Jump to solution
1,112 Views
wendy-liu
Contributor II

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!

 

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
1,021 Views
yipingwang
NXP TechSupport
NXP TechSupport

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.

View solution in original post

0 Kudos
Reply
4 Replies
1,082 Views
yipingwang
NXP TechSupport
NXP TechSupport

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 = <&reg_can1_stby>;
status = "okay";
};

&flexcan2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan2>;
xceiver-supply = <&reg_can2_stby>;
pinctrl-assert-gpios = <&pca6416 3 GPIO_ACTIVE_HIGH>;
status = "disabled";/* can2 pin conflict with pdm */
};

0 Kudos
Reply
1,077 Views
wendy-liu
Contributor II
yeah, I know I can refer to other dts, but how do I reference the clock and interrupts? These are strongly related to hardware.
0 Kudos
Reply
1,022 Views
yipingwang
NXP TechSupport
NXP TechSupport

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.

0 Kudos
Reply
992 Views
wendy-liu
Contributor II
Yes, I see.Thanks a lot!
0 Kudos
Reply