105 | | The Newport product family uses the [http://dev.gateworks.com/datasheets/MCP25625.pdf MCP25625] CAN over SPI device. This is both a CAN controller as well as a CAN transceiver. Because this operates over the SPI bus, the '''spi-cavium''' and '''spi-cavium-thunderx''' kernel drivers are required as well as the '''mcp251x''' driver. Because the Thunderx SPI controller only supports half-duplex transactions patches are needed to the mcp251x driver which Gateworks has in its [https://github.com/Gateworks/linux-newport linux-newport] kernel repository: |
106 | | - [https://github.com/Gateworks/linux-newport/commit/cb270339619ccf2b50dfd3604a03626f85830453 can: mcp251x: convert driver to half-duplex SPI] |
107 | | - [https://github.com/Gateworks/linux-newport/commit/d67245936bf53b0e83831ae98931c7ce6a89f2d2 can: mpc251x: wait for chip to come out of reset] |
108 | | - [https://github.com/Gateworks/linux-newport/commit/184249e625fcc99837e35df95de2624f91d23067 can: mcp251x: configure the interrupt type for level triggered] |
| 105 | The Newport product family uses the [http://dev.gateworks.com/datasheets/MCP25625.pdf MCP25625] CAN over SPI device. This is both a CAN controller as well as a CAN transceiver. Because this operates over the SPI bus, the '''spi-thunderx''' (SPI_THUNDERX) kernel driver is required as well as the '''mcp251x''' (CAN_MCP251X) driver. Because the Thunderx SPI controller only supports half-duplex transactions a patch to the mcp251x driver is needed (which Gateworks has in its [https://github.com/Gateworks/linux-newport linux-newport] kernel repository): [https://github.com/Gateworks/linux-newport/commit/f284504b771b8741222ac54fd2d773d88e53de39 can: mcp251x: convert driver to half-duplex SPI]. |
| 106 | |
| 107 | You can use this patch as inspiration if you need to convert any other device drivers from full-duplex to half-duplex. Basically you need to make sure read and write operations are done in separate SPI transactions. |