IMX8ulp flexCAN

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

IMX8ulp flexCAN

Jump to solution
1,352 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,261 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,322 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,317 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,262 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
1,232 Views
wendy-liu
Contributor II
Yes, I see.Thanks a lot!
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2040549%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EIMX8ulp%20flexCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2040549%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20all%EF%BC%8C%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20I%20am%20debugging%20the%20CAN%20communication%20function%2C%20but%20I%20cannot%20find%20the%20flexCAN%20device%20node%20in%20the%20dtb%20file.%20If%20I%20want%20to%20get%20it%20working%2C%20what's%20the%20solution%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EBest%20regards!%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2040549%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX8ULP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2044989%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20IMX8ulp%20flexCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2044989%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EYes%2C%20I%20see.Thanks%20a%20lot!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2044478%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20IMX8ulp%20flexCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2044478%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20just%20got%20the%20confirmation%20from%20the%20SE%20team.%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EFlexCAN%20is%20in%20realtime%20domain%20so%20it%20is%20not%20supported%20in%20Linux.%20It%20can%20only%20be%20accessed%20by%20M%20core.%20You%20can%20find%20driver%20and%20related%20examples%20in%20SDK.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2040703%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20IMX8ulp%20flexCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2040703%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eyeah%2C%26nbsp%3BI%20know%20I%20can%26nbsp%3Brefer%20to%20other%20dts%2C%20but%20how%20do%20I%20reference%20the%20clock%20and%20interrupts%3F%20These%20are%20strongly%20related%20to%20hardware.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2040698%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20IMX8ulp%20flexCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2040698%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EPlease%20refer%20to%20the%20following%20definition%20in%26nbsp%3Barch%2Farm64%2Fboot%2Fdts%2Ffreescale%2Fimx8mp.dtsi%20in%20Linux%20Kernel.%3C%2FP%3E%0A%3CP%3Eflexcan1%3A%20can%40308c0000%20%7B%3CBR%20%2F%3Ecompatible%20%3D%20%22fsl%2Cimx8mp-flexcan%22%3B%3CBR%20%2F%3Ereg%20%3D%20%26lt%3B0x308c0000%200x10000%26gt%3B%3B%3CBR%20%2F%3Einterrupts%20%3D%20%3CGIC_SPI%20142%3D%22%22%20irq_type_level_high%3D%22%22%3E%3B%3CBR%20%2F%3Eclocks%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MP_CLK_IPG_ROOT%26gt%3B%2C%3CBR%20%2F%3E%26lt%3B%26amp%3Bclk%20IMX8MP_CLK_CAN1_ROOT%26gt%3B%3B%3CBR%20%2F%3Eclock-names%20%3D%20%22ipg%22%2C%20%22per%22%3B%3CBR%20%2F%3Eassigned-clocks%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MP_CLK_CAN1%26gt%3B%3B%3CBR%20%2F%3Eassigned-clock-parents%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MP_SYS_PLL1_40M%26gt%3B%3B%3CBR%20%2F%3Eassigned-clock-rates%20%3D%20%26lt%3B40000000%26gt%3B%3B%3CBR%20%2F%3Efsl%2Cclk-source%20%3D%20%2Fbits%2F%208%20%26lt%3B0%26gt%3B%3B%3CBR%20%2F%3Efsl%2Cstop-mode%20%3D%20%26lt%3B%26amp%3Bgpr%200x10%204%26gt%3B%3B%3CBR%20%2F%3Estatus%20%3D%20%22disabled%22%3B%3CBR%20%2F%3E%7D%3B%3C%2FGIC_SPI%3E%3C%2FP%3E%0A%3CP%3Eflexcan2%3A%20can%40308d0000%20%7B%3CBR%20%2F%3Ecompatible%20%3D%20%22fsl%2Cimx8mp-flexcan%22%3B%3CBR%20%2F%3Ereg%20%3D%20%26lt%3B0x308d0000%200x10000%26gt%3B%3B%3CBR%20%2F%3Einterrupts%20%3D%20%3CGIC_SPI%20144%3D%22%22%20irq_type_level_high%3D%22%22%3E%3B%3CBR%20%2F%3Eclocks%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MP_CLK_IPG_ROOT%26gt%3B%2C%3CBR%20%2F%3E%26lt%3B%26amp%3Bclk%20IMX8MP_CLK_CAN2_ROOT%26gt%3B%3B%3CBR%20%2F%3Eclock-names%20%3D%20%22ipg%22%2C%20%22per%22%3B%3CBR%20%2F%3Eassigned-clocks%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MP_CLK_CAN2%26gt%3B%3B%3CBR%20%2F%3Eassigned-clock-parents%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MP_SYS_PLL1_40M%26gt%3B%3B%3CBR%20%2F%3Eassigned-clock-rates%20%3D%20%26lt%3B40000000%26gt%3B%3B%3CBR%20%2F%3Efsl%2Cclk-source%20%3D%20%2Fbits%2F%208%20%26lt%3B0%26gt%3B%3B%3CBR%20%2F%3Efsl%2Cstop-mode%20%3D%20%26lt%3B%26amp%3Bgpr%200x10%205%26gt%3B%3B%3CBR%20%2F%3Estatus%20%3D%20%22disabled%22%3B%3CBR%20%2F%3E%7D%3B%3CBR%20%2F%3E%7D%3B%3C%2FGIC_SPI%3E%3C%2FP%3E%0A%3CP%3EAnd%20the%20following%20definition%20in%26nbsp%3Barch%2Farm64%2Fboot%2Fdts%2Ffreescale%2Fimx8mp-evk.dts.%3CBR%20%2F%3E%26amp%3Bflexcan1%20%7B%3CBR%20%2F%3Epinctrl-names%20%3D%20%22default%22%3B%3CBR%20%2F%3Epinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_flexcan1%26gt%3B%3B%3CBR%20%2F%3Exceiver-supply%20%3D%20%26lt%3B%26amp%3Breg_can1_stby%26gt%3B%3B%3CBR%20%2F%3Estatus%20%3D%20%22okay%22%3B%3CBR%20%2F%3E%7D%3B%3C%2FP%3E%0A%3CP%3E%26amp%3Bflexcan2%20%7B%3CBR%20%2F%3Epinctrl-names%20%3D%20%22default%22%3B%3CBR%20%2F%3Epinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_flexcan2%26gt%3B%3B%3CBR%20%2F%3Exceiver-supply%20%3D%20%26lt%3B%26amp%3Breg_can2_stby%26gt%3B%3B%3CBR%20%2F%3Epinctrl-assert-gpios%20%3D%20%26lt%3B%26amp%3Bpca6416%203%20GPIO_ACTIVE_HIGH%26gt%3B%3B%3CBR%20%2F%3Estatus%20%3D%20%22disabled%22%3B%2F*%20can2%20pin%20conflict%20with%20pdm%20*%2F%3CBR%20%2F%3E%7D%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E