Hi,
We are using 4.1.15 Linux NXP kernel for IMX6ULL platform.
We are using TCAN4550 module from TI, which is connected to processor through SPI.
Ported TCAN4550 driver in 4.1.15 Linux kernel.
We are facing below errors while booting the device,
spi_imx 2008000.ecspi: probed
CAN device driver interface
tcan4x5x spi0.0: Could not get Message RAM configuration.
tcan4x5x: probe of spi0.0 failed with error -12
FYI,
&ecspi1 {
fsl,spi-num-chipselects = <1>;pinctrl-names = "default";pinctrl-0 = <&pinctrl_ecspi1_1>;cs-gpios = <&gpio4 26 0>;status = "okay";tcan4x5x: tcan4x5x@0 {compatible = "ti,tcan4x5x";reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
spi-max-frequency = <10000000>;
interrupt-parent = <&gpio1>;
interrupts = <23 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
status = "okay";};};pinctrl_ecspi1_1: ecspi1grp {
fsl,pins = <};MX6UL_PAD_CSI_DATA04__ECSPI1_SCLK 0x10b0 /*SCLK*/>;
MX6UL_PAD_LCD_DATA22__ECSPI1_MOSI 0x10b0 /*MOSI*/
MX6UL_PAD_CSI_DATA07__ECSPI1_MISO 0x10b0 /*MISO*/
MX6UL_PAD_CSI_DATA05__GPIO4_IO26 0x80000000 /*CS*/
MX6UL_PAD_UART2_CTS_B__GPIO1_IO22 0x80000000 /*RESET*/
MX6UL_PAD_UART2_RTS_B__GPIO1_IO23 0x80000000 /*INT*/
I believe that the error code 12 you are receiving is referring to the processor not being able to allocate memory to store the retrieved settings from this file. Since that is not an issue specific to communication with the TCAN4550 device in hardware and is part of the boot process.
Please let us know what need to be done further to make TCAN4550 driver up.
Regards,
Haji
Hi,
I'm getting clock and MOSI in SPI Master after hard-coded the MRAM configuration in tcan4x5x driver, as shown below,
mram_config_vals[0] = 2;
mram_config_vals[1] = 1;
mram_config_vals[2] = 4;
mram_config_vals[3] = 5;
mram_config_vals[4] = 0;
mram_config_vals[5] = 3;
mram_config_vals[6] = 10;
mram_config_vals[7] = 7;
Now i'm facing "tcan4x5x spi0.0: Unsupported version number: 0" error, this error is occurring when driver tries to send command to SPI Slave to read the Version Number in Tcan4550.
Note: while sending command from SPI Master(iMx6ULL) to Slave(Tcan4550) CLOCK & MOSI is pulsing in oscilloscope in iMx6ULL. But no data in MISO.
Yellow: Chip Select
Blue : MOSI
Purple : Clock
Queried about this issue with TCAN4550 vendor, received below response,
The driver will first try to read the mcore release version from our device. Below command is for reading a 32-bit word (0x01 Length) from Addr CREL. Command is sent properly, but the reading clocks (where SDO will push our the data) for 32 bits are missing before the CS going high as you can see below. Please check the low level driver if the SPI READ / WRITE to the device is as per the TCAN requirement. Refer to the datasheet for more details.
Datasheet Link: https://www.ti.com/lit/ds/symlink/tcan4550.pdf#page=15&zoom=100,0,797
Any changes need to be done in SPI controller ?
Regards,
Haji
Hi Haji
one can recheck tcan4x5x dts settings like "bosch,mram-cfg", refer to
similar issues on TCAN4550: whether the my dts entry is right to enable CANFD in imx6ull processor? - Interface forum ...
and follow TCAN45xx Software User's Guide
http://www.ti.com/lit/ug/sllu270/sllu270.pdf
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igor,
I tried to configure "bosch,mram-cfg" in dts file by following "http://www.ti.com/lit/ug/sllu270/sllu270.pdf" & "http://www.ti.com/lit/ds/symlink/tcan4550.pdf?HQS=TI-null-null-mousermode-df-pf-null-wwe&DCM=yes&ref... " manuals. But still facing the same issue.
bosch,mram-cfg is an optional features.
Thanks & Regards,
Haji
Hi Haji
you can try to debug it using oscilloscope,
checkng ecspi data and driver sources.
Best regards
igor
Dear Igor,
Enabled spidev driver to verify the SPI line. Observed CLOCK and MOSI is pulsing verified with oscilloscope.
same procedure followed in TCAN45xx driver. Pulsing is not happening in CLOCK.
Regards,
Haji
Hi Haji
seems there is problem in ecspi, one can try to debug it
using description of ecspi driver in
Linux 4.1.15_2.1.0 BSP & Multimedia Codecs Documentation
Best regards
igor