On 22.03.2021 09:06:52, Pavel Pisa wrote: > my colleague at Elektroline.cz works on design of iMX6 > based system with CAN FD support realized by tcan4x5x > chip connected to eCSPI. It seems that there are problems > with eCSPI DMA stucks and other troubles. When the same > chip (or even Microchip's mcp251xfd) is connected to > other (less industry sound platforms) as Allwinner etc... > drivers seems to work reliably, but tests on iMX6 results > in failures. They consider fast redesign to slCAN connected > second Microchip MCU to resolve critical problem for the > project now.... Don't use slcan, just don't. - If you want to stick to the SPI, use a mcp2518fd. - If you don't need CAN-FD, attach a stm32f042 or f072 via USB. There is a open source firmware and Linux drivers. - If you need CAN-FD, use a more modern stm32. I think some of the "G" series have CAN-FD. But the firmware and Linux drivers are not adopted, yet. Expect quite some CPU load for the SPI based CAN controllers, due to the high Linux SPI overhead and the not that optimized imx SPI host driver. > The setup on 5.7 kernel partially works For the tcan4x5x better use latest v5.12 plus this series: https://lore.kernel.org/linux-can/20210308102427.63916-1-torin@xxxxxxxxxxxxxxxxxx/ If the SPI DMA makes troubles, deactivate it. I think the tcan4x5x driver uses single tcan4x5x register reads, which results in small SPI transfers, so DMA brings no benefits. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: PGP signature