Changes between Version 9 and Version 10 of canbus


Ignore:
Timestamp:
06/30/2020 03:39:29 PM (2 years ago)
Author:
Tim Harvey
Comment:

update newport kernel patch details

Legend:

Unmodified
Added
Removed
Modified
  • canbus

    v9 v10  
    6767||          || GW53xx    || IMX6 / [http://dev.gateworks.com/datasheets/MCP2562.pdf MCP2562] || flexcan || R50 (not loaded) || GPIO1_IO02 / gpio-2 || ||
    6868||          || GW52xx    || IMX6 / [http://dev.gateworks.com/datasheets/MCP2562.pdf MCP2562] || flexcan || R168 (not loaded) || GPIO1_IO09 / gpio-9 || ||
    69  1. The Newport product family uses the MCP25625 CAN over SPI device thus the spi-cavium and spi-cavium-thunderx drivers are required as well. Because the Thunderx SPI controller only supports half-duplex transactions a patch is needed to the mcp251x driver. See [https://github.com/Gateworks/linux-newport/commit/cb270339619ccf2b50dfd3604a03626f85830453 commit-1], [https://github.com/Gateworks/linux-newport/commit/d67245936bf53b0e83831ae98931c7ce6a89f2d2 commit-2], [https://github.com/Gateworks/linux-newport/commit/184249e625fcc99837e35df95de2624f91d23067 commit-3]
     69 1. The Newport product family uses the MCP25625 CAN over SPI device thus the spi--thunderx (SPI_THUNDERX) driver is required in addition to the mcp251x (CAN_MCP251X) driver. Also, note the Thunderx SPI controller only supports half-duplex transactions requiring a patch to the mcp251x driver to make it operating as half-duplex: [https://github.com/Gateworks/linux-newport/commit/f284504b771b8741222ac54fd2d773d88e53de39 can: mcp251x: convert driver to half-duplex SPI]
    7070 2. The GW551x does not have a transceiver on board; CAN_RXD / CAN_TXD go to application connector
    7171
     
    103103[=#newport]
    104104=== Newport CAN Kernel drivers
    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]
     105The 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
     107You 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.
    109108
    110109