I am using the Colibri imx7d with the Iris carrier board rev2. Since the carrier board does not bring out the existing flexcan1 pins which is mapped to SODIMM 63 and 55, I want to remap it to pins available on the Iris board extension header. I identified SODIMM 90 and 92 as suitable pins for this application.
However, when I tried to build the following dts file, I am getting a syntax error and I cannot figure out why this is the case. The code is technically identical to some of the samples posted in the forum here. Tell me I am not blind.
With 0x2 here, are you assuming it is PAD MUX setting, which is 2 for CAN? No it is not MUX setting, it is pad control bits like pull up direction, strength, etc. See SW_PAD_CTL_PAD_I2C1_SCL SW PAD Control Register in iMX7 RM.
That seems to work and I was able to compile it. It seems to load without errors and the can driver is loaded. I can use cansend to send some packets out but I cannot seem to see anything on the scope.
Is there anything else I need to do? Do I need to disable the gpio that was used for the pin before it was reassigned to flexcan1? I am using one of the downstream images provided by the torizon care installer and just reassigning pins I need to the extension connector (X16) on the Iris carrier board.
You need to verify your overlay really applies. Is it no CAN interface without overlay and CAN with it? That could be a sign overlay is applied. Don’t you see activity on default pins? Once new fsl,pins setting is applied, old pins should left in boot default state, which is usually GPIO. If old pins are toggling on cansend, then your overlay isn’t applied.
No activity? Do Tx/Rx idle high or low? Low (dominant) on Rx would block communications until something recessive’s it. While blocked you may run cansend up to, ehh, perhaps 10+ times until cansend starts complaining.
Obviously you need to find device which claims that pin and disable that device or overwrite pad settings for that device so it doesn’t claims given pad any more.
Your &pinctrl_flexcan2 seems being not applied since &pinctrl_flexcan2 defaults using MX7D_PAD_GPIO1_IO14. Are you sure you don’t have more overlays which are applied for the same things?