How to set to spi slave mode

Hello

I want to run spi test by connecting spi1 and spi3 of jetson xavier nx board.
Before connecting spi1-spi3, I connected spi1’s MOSI-MISO (spi3’s MOSI-MISO) and tested with the spidev_test.c example to confirm that tx rx works well for both spi1 and spi3.
(Currently jetson xavier nx board has jetpack4.4 version installed.)
Here I have some questions.

  1. How to set the master mode and slave mode when connecting spi1 and spi3? (Should I update pinmux? or
    https://www.jetsonhacks.com/2020/05/04/spi-on-jetson-using-jetson-io/ like this link on jetson?
  1. https://forums.developer.nvidia.com/t/spi-cant-work-in-slave-mode-on-xavier/128835
    If I set it like this post, does it become slave mode?
    If so, 1) how to configure the device tree and 2) how to add properties?
  1. How to connect spi1-spi3 between the two methods below?
  1. spi1 MISO ↔ spi3 MISO / spi1 MOSI ↔ spi3 MOSI / spi1 SCK<-> spi3 SCK / spi1 CS0 ↔ spi CS0
    2)spi1 MISO ↔ spi3 MOSI / spi1 MOSI ↔ spi3 MISO / spi1 SCK<-> spi3 SCK / spi1 CS0 ↔ spi CS0
  1. How to do rx in spi slave?
    Does an interrupt appear when data comes in?
    Looking at the spi example (spidev_test.c), ioctl(fd, SPI_IOC_MESSAGE(1), &tr) is used to check tx and rx. Is this the only way to check rx?
    If you check rx with ioctl(fd, SPI_IOC_MESSAGE(1), &tr), how do you know if the data has come in?
    Are there any c++ examples of spi slaves?

Thank you.