By default our BSP uses the MCP2515 SPI CAN controller as available on our Colibri Evaluation board V3.x. In order to use spidev instead one needs to disable (e.g. status = "disabled") the mcp2515 device tree node and enable (e.g. status = "okay") the spidev one and re-generate and deploy the device tree to the target. The specific changes are outlined below:

By default our BSP uses the MCP2515 SPI CAN controller as available on our Colibri Evaluation board V3.x. In order to use spidev instead one needs to disable (e.g. status = "disabled") the mcp2515 device tree node and enable (e.g. status = "okay") the spidev one and re-generate and deploy the device tree to the target. The specific changes are outlined below:

By default our BSP uses the MCP2515 SPI CAN controller as available on our Colibri Evaluation board V3.x. In order to use spidev instead one needs to disable (e.g. status = "disabled") the mcp2515 device tree node and enable (e.g. status = "okay") the spidev one and re-generate and deploy the device tree to the target. The specific changes are outlined below:

If you plan to write a SPI device driver you can use the SPI MCP2515 CAN controller driver as an example. The MCP2515 CAN controller is available and connected to the Colibri SPI port on the v3 series of the Colibri Evaulation Board.

By default the regular SPI interface is configured for 3 MHz operation. The sbc4 clock which is four times the SPI clock is configured for 12 MHz operation with pll_p as its parent. As the divider between its parent and sbc4 only supports 7.1 bits (e.g. 7 bits of mantissa and 1 bit of fraction) and pll_p runs at 216 MHz the lowest possible SPI clock in that configuration lays somewhere around 424 kHz. If a lower clock is desired one has to choose another parent clock like clk_m operating at 13 MHz. This allows SPI clocks as low as 25 kHz. In the Linux kernel sources that configuration can be found here.