TCAN4550-Q1: Question regarding the driver

Part Number: TCAN4550-Q1
Other Parts Discussed in Thread: TCAN4550

Tool/software:

Hi 

My customer are using TCAN4550 driver from here 

https://www.kernel.org/doc/Documentation/devicetree/bindings/net/can/tcan4x5x.txt

The kernel log they saw "Unsupported version number: 0", what does this mean ?

static int m_can_dev_setup(struct m_can_classdev *cdev) {  struct net_device *dev = cdev->net;  int m_can_version, err;

  m_can_version = m_can_check_core_release(cdev);

 /* return if unsupported version */

 if (!m_can_version) {

  dev_err(cdev->dev, "Unsupported version number: %2d",

   m_can_version);

  return -EINVAL;

 }

Below is my customer's device tree 

tcan4x5x: tcan4x5x@0 {

        compatible = "ti,tcan4x5x";

        reg = <0>;                /* SPI CS0 */

        //spi-max-frequency = <20000000>;

                             spi-max-frequency = <10000000>;

                             bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>;

 

                             device-state-gpios = <&gpmd 3 GPIOc_ACTIVE_HIGH>;// CAN_PWR_EN on GPIO_MD3

                             device-wake-gpios = <&gpma 17 GPIO_ACTIVE_HIGH>;// CAN3_WKRQ on GPIO_MA17

                             reset-gpios = <&gpma 18 GPIO_ACTIVE_LOW>;  // CAN3_RST on GPIO_MA18

                            

                             interrupt-parent = <&gpma>;

                             interrupts = <19 IRQ_TYPE_LEVEL_LOW>;//GPIO_MA19              CAN3_INT

                            

                             //kevin add

                             clocks = <&clk_peri PERI_GPSB0>;

                             clock-names = "cclk";

 and they see below log 

[    0.440891] tcan4x5x spi0.0: M_CAN CREL=0x00000000, rel=0, step=0

[    0.447003] tcan4x5x spi0.0: Unsupported M_CAN version: expected rel=3.x, got rel=0, step=0

[    0.455367] tcan4x5x spi0.0: Unsupported version number:  0

Are above log message mean the device is not powered on ?

  • Hi PYTsai,

    This probably means they have some sort of error with the SPI driver not matching the required protocol format needed by the TCAN4550 and preventing it from reading the proper value.

    I would suggest they verify the SPI communication signals and make sure they match the format and timing requirements outlined in the datasheet.

    Regards,

    Jonathan