IMX8QM-MEK CAN01 and CAN2 Enable steps

cancel
Showing results for 
Search instead for 
Did you mean: 

IMX8QM-MEK CAN01 and CAN2 Enable steps

64 Views
rahulM
Contributor III

Hi NXP,

I am using IMX8QM-MEK board, i booted board with BSP version-i.MX Linux Yocto Project BSP 5.4.47_2.2.0 Release.
Following messages has been seen after board boots
root@imx8qmmek:~# [ 35.923813] vref_1v8: disabling
[ 35.926969] epdev_on: disabling
[ 35.930152] SD1_SPWR: disabling
[ 35.933321] can01-en: disabling
[ 35.936488] can2-en: disabling
[ 35.939553] can01-stby: disabling
[ 35.942891] can2-stby: disabling
[ 64.596108] cfg80211: failed to load regulatory.db


I need to enable CAN0 and CAN1. 

Seen that in imx8qm-mek.dts flexcan is enabled.

Please let us know the steps how to enable CAN01, CAN02 and CAN3 on this IMX8QM-MEK board.

Thanks and Regards

rahulM

 

0 Kudos
3 Replies

40 Views
rahulM
Contributor III

Hi NXP,

My above issue some what i solved by changing devicetree, i am not able to see above error for can0 and can1.
root@imx8qmmek:~# [ 35.926757] vref_1v8: disabling
[ 35.929970] epdev_on: disabling
[ 35.933172] SD1_SPWR: disabling

I am not able to see can0 and can1 on giving command #ifconfig or ls /dev

root@imx8qmmek:~# ifconfig can0 up
ifconfig: SIOCGIFFLAGS: No such device
root@imx8qmmek:~#

Please let me know, how to make enable can0 and can1 at ls /dev or ifconfig

Thanks and Regards
rahulM

 

0 Kudos

34 Views
nxf63675
NXP TechSupport
NXP TechSupport

Hi rahulM,

 

As you already do it, first we need to enable it from the device tree, could you share you dts file to check how you are enable the CAN bus?

 

Regards,

Israel H.

0 Kudos

30 Views
rahulM
Contributor III

Hi Israel,

Thanks for your reply
Not able to attach .dts file

After making some networking configurations

i am able to see can on ifconfig

root@imx8qmmek:~# ifconfig -a
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:77

can1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:78

can2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:79

eth0 Link encap:Ethernet HWaddr 00:04:9F:06:CF:07
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

root@imx8qmmek:~# ip link set can0 type can bitrate 125000
ip: either "dev" is duplicate, or "type" is garbage


root@imx8qmmek:~# ifconfig can0 up
[ 35.785977] flexcan 5a8d0000.can can0: bit-timing not yet defined
ifconfig: SIOCSIFFLAGS: Invalid argument

i am using imx8qm-mek.dts as provided by nxp

reg_can01_en: regulator-can01-gen {
compatible = "regulator-fixed";
// compatible = "regulator-fixed", "fsl,imx8qm-flexcan";
regulator-name = "can01-en";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&pca6416 3 GPIO_ACTIVE_HIGH>;
enable-active-high;
};


reg_can2_en: regulator-can2-gen {
compatible = "regulator-fixed";
//compatible = "regulator-fixed", "fsl,imx8qm-flexcan";
regulator-name = "can2-en";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&pca6416 4 GPIO_ACTIVE_HIGH>;
enable-active-high;
};

reg_can01_stby: regulator-can01-stby {
compatible = "regulator-fixed";
//compatible = "regulator-fixed", "fsl,imx8qm-flexcan";
regulator-name = "can01-stby";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&pca6416 5 GPIO_ACTIVE_HIGH>;
enable-active-high;
vin-supply = <&reg_can01_en>;
};

reg_can2_stby: regulator-can2-stby {
compatible = "regulator-fixed";
//compatible = "regulator-fixed", "fsl,imx8qm-flexcan";
regulator-name = "can2-stby";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&pca6416 6 GPIO_ACTIVE_HIGH>;
enable-active-high;
vin-supply = <&reg_can2_en>;
};

Please let me know how to solve this issue.

Thanks and Regards

rahulM

0 Kudos