Colibri imx7 FlexCan registration error

I’m trying to use the internal CAN controller (flexCan) for colibri imx7.
As you know the flexcan was disabled by default, so I activated it in imx7-colibri.dtsi as described here CAN (Linux) | Toradex Developer Center

I checked that has been enabled :

can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can state STOPPED (berr-counter tx 0 rx 0) restart-ms 0
          flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
          clock 24000000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

but when I tried to display message in my board’s OS , using dmesg command, I get this lines:

dmesg | grep can

[   18.782879] flexcan 30a00000.can: 30a00000.can supply xceiver not found, using dummy regulator
[   18.831810] imx7d-pinctrl 30330000.iomuxc: pin MX7D_PAD_GPIO1_IO14 already requested by 30330000.iomuxc; cannot claim for 30a10000.can
[   18.843982] imx7d-pinctrl 30330000.iomuxc: pin-11 (30a10000.can) status -22
[   18.850987] imx7d-pinctrl 30330000.iomuxc: could not request pin 11 (MX7D_PAD_GPIO1_IO14) from group flexcan2-grp  on device 30330000.iomuxc
[   18.863647] flexcan 30a10000.can: Error applying setting, reverse things back
[   19.291657] flexcan: probe of 30a10000.can failed with error -22

also, after enabling of flexCan, the external CAN mcp25xx became not available in can_dev

is there any other changes to do?
Thanks in advance

Hello @Achref,

Thanks for reaching out.
Could you please share the output of tdx-info (more information here)?

Hello @rudhi.tx ,
Thanks for the reply,
This is the output of tdx-info

Software summary
Bootloader:               U-Boot
Kernel version:           5.4.193-5.7.2+git.f5d73fd6e9f8 #1-TorizonCore SMP Fri Jun 24 10:15:32 UTC 2022
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.0/torizon/d17728156b30fb1df59ce8ec3395a9dba39e45b8235b484b927b420568db739f/0 key1=val1 key2=val2
Distro name:              NAME="TorizonCore Upstream"
Distro version:           VERSION_ID=5.7.2-build.20
Hostname:                 colibri-imx7-emmc-14866722

Hardware info
HW model:                 Toradex Colibri iMX7D 1GB (eMMC) on Colibri Evaluation Board V3
Toradex version:          0039 V1.1B
Serial number:            14866722
Processor arch:           armv7l

Hi @rudhi.tx
just for info, I tried to fix the iomuxc Error, and if I well understood, the problem due to the MX7D_PAD_GPIO1_IO14 pin which has been affected to on other driver.
so I removed the following two codes in imx7-colibri.dtsi (to enable flexcan1 and flexcan2):

	pinctrl_gpio4: gpio4-grp { /* Alternatively CAN2 */
		fsl,pins = <
			MX7D_PAD_GPIO1_IO15__GPIO1_IO15		0x14 /* SODIMM 178 */
			MX7D_PAD_GPIO1_IO14__GPIO1_IO14		0x14 /* SODIMM 188 */
		pinctrl_gpio7: gpio7-grp { /* Alternatively CAN1 */
		fsl,pins = <
			MX7D_PAD_ENET1_RGMII_RD3__GPIO7_IO3	0x14 /* SODIMM 55 */
			MX7D_PAD_ENET1_RGMII_RD2__GPIO7_IO2	0x14 /* SODIMM 63 */

After this modification, iomuxc Error has been fixed but this warning steel present and I couldn’t see that the flexcan registered

[   19.668037] flexcan 30a00000.can: 30a00000.can supply xceiver not found, using dummy regulator
[   19.733921] flexcan 30a10000.can: 30a10000.can supply xceiver not found, using dummy regulator

I don’t kown if this is a successful attempt or no :slightly_smiling_face:

Hi @Achref !

As we can see from your tdx-info output, you are using TorizonCore 5. By default, our documentation is set to the latest (major) version of TorizonCore, which is currently 6.

Did you change it to 5, which is the version you are using? You can do so by hovering of the version selector and clicking on the 5 (LTS) from the drop menu that appears.


Or you can just click below :slight_smile:

Best regards,

Hi @henrique.tx,
Thanks for the reply,
I downloaded this version (torizon-core-docker-colibri-imx7-emmc-Tezi_5.7.2+build.20.tar) and deploy it using torizoncore-builder.
it is necessary to use TorizonCore 6 to fix the problem?
if yes, I will donwload one of those versions of TorizonCore 6 ?

About the documentation, I’m always reading the last version

Hi @Achref

The version of the documentation is attached to the BSP/TorizonCore version. So, for example, if you are using TorizonCore 5, you must use version 5 of the articles in Toradex Developer.

You can see that for the link you want to access (CAN (Linux) | Toradex Developer Center) if you switch between version 5 and 6, the instructions for Colibri iMX7 are different and this is why you need to be sure to use the right documentation version for your use case.

You could keep using TorizonCore 5 (and documentation on version 5). But you can also try TorizonCore 6 (and documentation on version 6).

Best regards,

Hi @Achref!

Do you have any updates regarding this topic?

Best regards,

Hi @henrique.tx
Yes it works, the solution as I described it in the last post Colibri imx7 FlexCan registration error - #4 by Achref

Thank for your support