mcp25xxfd driver testing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I currently try to get a MCP2518FD to work on our custom iMX6ULL based
hardware. I use the driver currently in linux-can-next backported to
our v5.4 kernel

DT:
    can0: can@0 {
        compatible = "microchip,mcp25xxfd";
        reg = <0>;
        clocks = <&can3_osc>;
        spi-max-frequency = <85000000>;
        interrupts-extended = <&gpio1 18 IRQ_TYPE_LEVEL_LOW>;
        status = "okay";
    };

 # dmesg | grep mcp
[    3.706085] mcp25xxfd spi1.0 can0: MCP2518FD rev0.0 (-RX_INT
-MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD c:20.00MHz m:8.50MHz
r:8.50MHz e:0.00MHz) successfully initialized.

I then up the CAN interface
# ip link set can0 up type can bitrate 125000 sample-point 0.75
dbitrate 500000 dsample-point 0.8 fd on

I am then able to send CAN frames using
# cansend can0 123#42
and CAN-FD frames using
# cansend can0 123##042

These frames are successfully received on a connected PC using an PCAN-USB FD

Trying to send a CAN-FD frame with baud rate switch fails
# cansend can0 123##142
[  190.921477] mcp25xxfd spi1.0 can0: bus-off

Also receiving of any CAN frame doesn't work
# candump any,0:0,#FFFFFFFF
[  259.937612] spi_master spi1: I/O Error in DMA RX
[  259.943743] mcp25xxfd spi1.0: SPI transfer failed: -110
[  259.949644] spi_master spi1: failed to transfer one message from queue
[  259.956566] mcp25xxfd spi1.0 can0: IRQ handler
mcp25xxfd_handle_rxif() returned -110.
[  259.964547] mcp25xxfd spi1.0 can0: IRQ handler returned -110
(intf=0x3f1a0002).

My first thought was that the interrupts of the controller are not
recognized by the iMX but /proc/interrupts shows that there are some
of them
 78:         10  gpio-mxc  18 Level     spi1.0

Any hints are greatly appreciated


Regards

Matthias



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux