SPI availability on TX2

I am looking at using the TX2 developer kit for a project that we are spinning up. One of our requirements is having 2 SPI slave interfaces (meaning the TX2 is the slave). I see from the documentation that SPI1 is available on J21, and that SPI0 and SPI2 are available on J23. SPI2 is labeled as the ‘touchscreen SPI’. My questions for any of you who have experience with this board are:

  1. Can both SPI0 and SPI2 be used as generic SPI interfaces? Is there something special or some limitation to SPI2?
  2. I saw in a thread on this forum that someone had trouble with and SPI interface in slave mode, but there was no elaboration. Has anyone gotten SPI slave to work reliably? If not, what are the issues that you have come across?

Thanks in advance.

I have not used SPI slave mode, but I have noticed in several places in the documentation that NVIDIA explicitly states “the indicated usage of pins is only a recommendation, and if you need to use them for something else, then that’s fine, too.”
I would extrapolate this to mean that if you’re not using a touchscreen, using SPI2 for something else should be fine.
I realize this is not a super helpful answer, but hopefully it’s more than zero :-)

@jcochin
You can use this two SPI interface. The thread have problem you saw should be the spidev node not create but not impact the function.

Hi, Jcochin.

I saw in a thread on this forum that someone had trouble with and SPI interface in slave mode, but there was no elaboration

I believe it was me who said that. I had a lot of trouble getting SPI working in slave mode but i believe it was mostly down to inexperience on my side. There were some patches needed to be made to the low level Nvidia SPI slave driver and some slight changes in the device tree compared to using SPI as master (I don’t know if these patches made it into the latest kernel sources).

I’m happy to try help where I can, though I only got it working (slightly) on the TX1 before 28.1.

Links (bear in mind this is for TX1, any device tree modifications in these links will be different when you’re implementing your project)
[url]https://devtalk.nvidia.com/default/topic/979251/tx1-spi-slave-mode/?offset=11[/url]
[url]https://devtalk.nvidia.com/default/topic/1014109/jetson-tx1/jetson-tx1-spi-slave-mode/[/url]

P.S. Also, regarding the second SPI, on the standard Jetson TX2 dev board you cannot get at the J23 header easily. You will need a custom adapter or someone very (very) talented with a soldering iron (see image below). SPI on the J21 header is easily accessible (on the left hand side).
[url]http://imgur.com/a/AS3YW[/url]

Thanks to all for the answers and links! I had noticed that the J23 header was an issue, and we will probably have to spin a small adapter board and break out the signals we need to a more convenient connector. This will be mechanically more robust as well.

When the time comes, I am sure to be back with more questions.

Thanks again.