Hello!
I use Colibri-iMX6ULL 512MB WB BT V1.1A and Colibri Evaluation Board V3.2B.
I can use three CAN interfaces (CAN converted from SPI and twe flexCAN), thanks to previous your support !
However, each CAN interfaces are named depending on boot order of them. I show some examples below.
How can I get fixed name of the CAN interfaces independent of boot order? I would aprreciate it if you tell me how to set up.
Best regard
[Example.1]
When started in order of flexCAN, mcp251x, flexCAN, the interface name are assigned to flexCAN(can0), mcp251x(can1), flexCAN(can2).
root@colibri-imx6ull:/# dmesg | grep can
[ 17.000999] 2090000.can supply xceiver not found, using dummy regulator
[ 17.076902] flexcan 2090000.can: device registered (reg_base=a0b38000, irq=23)
[ 17.119991] mcp251x spi0.0 can1: MCP2515 successfully initialized.
[ 17.188175] 2094000.can supply xceiver not found, using dummy regulator
[ 17.313586] flexcan 2094000.can: device registered (reg_base=a0b54000, irq=24)
root@colibri-imx6ull:~# ip -details link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 250000 sample-point 0.866
tq 266 prop-seg 6 phase-seg1 6 phase-seg2 2 sjw 1
flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
flexcan: dtseg1 1..39 dtseg2 1..8 dsjw 1..8 dbrp 1..1024 dbrp-inc 1
clock 30000000numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
root@colibri-imx6ull:/# ip -details link show can1
4: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE restart-ms 0
bitrate 250000 sample-point 0.875
tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
root@colibri-imx6ull:/# ip -details link show can2
5: can2: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 250000 sample-point 0.866
tq 266 prop-seg 6 phase-seg1 6 phase-seg2 2 sjw 1
flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
flexcan: dtseg1 1..39 dtseg2 1..8 dsjw 1..8 dbrp 1..1024 dbrp-inc 1
clock 30000000numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
[Example.2]
When started in order of mcp251x, flexCAN, flexCAN, the interface name are assigned to mcp251x(can0), flexCAN(can1), flexCAN(can2).
root@colibri-imx6ull:~# dmesg | grep can
[ 21.035330] 2090000.can supply xceiver not found, using dummy regulator
[ 21.072846] mcp251x spi0.0 can0: MCP2515 successfully initialized.
[ 21.111270] flexcan 2090000.can: device registered (reg_base=a0b30000, irq=23)
[ 21.211619] 2094000.can supply xceiver not found, using dummy regulator
[ 21.351402] flexcan 2094000.can: device registered (reg_base=a0b50000, irq=24)
root@colibri-imx6ull:~# ip -details link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE restart-ms 0
bitrate 250000 sample-point 0.875
tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
root@colibri-imx6ull:~# ip -details link show can1
4: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 250000 sample-point 0.866
tq 266 prop-seg 6 phase-seg1 6 phase-seg2 2 sjw 1
flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
flexcan: dtseg1 1..39 dtseg2 1..8 dsjw 1..8 dbrp 1..1024 dbrp-inc 1
clock 30000000numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
root@colibri-imx6ull:~# ip -details link show can2
5: can2: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 250000 sample-point 0.866
tq 266 prop-seg 6 phase-seg1 6 phase-seg2 2 sjw 1
flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
flexcan: dtseg1 1..39 dtseg2 1..8 dsjw 1..8 dbrp 1..1024 dbrp-inc 1
clock 30000000numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535