After enabling two MCP2517FD CAN interfaces on two different SPIs on my Verdin I faced another problem.
ip a lists two CAN interfaces:
4: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
link/can
5: can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
link/can
Linux autoenumerates the interfaces, sometimes the can0 interface denotes ecspi2 CAN interface and sometimes ecspi3. Is it possible for user to manually enumerate CAN interfaces ?
@Edward suggested to use aliase in order to avoid Linux autoenumeration. I tried this:
aliases {
...
/* ecspi2 CAN interface */
can1 = &can3;
/* ecspi3 CAN interface */
can0 = &can1;
...
};
But after rebooting Linux still autoenumerates CAN interfaces. Is there a way for me to manually reference ecspi3 as can0 and ecspi2 as can1 (or can5/6/7…) ?
P.S. It seemed like new problem so I opened new thread.