I’d like to set the SONY sensor with tegra tx2 SPI.
I’m using the SPI2 interface in the tegra tx2 module interface.
(H14-SPI2_SCK, H15-SPI2_MISO, G15-SPI2_MOSI, F16-SPI2_CS1)
at this moment, the SPI signal is transferred to sensor. but the data transferring edge of clock is mismatched. sensor spec requires falling edge transfer, but tegra tx2 transfer with rising edge. i found that the MODE register of SPI_COMMAND_1[29:28] in the Parker TRM to change the clock edge. i wrote that and checked the register value. but it does not work.
and one more issue is there. sensor spec require the little endian bit order of data transfer, then tegra transfer big endian bit order. it also, i found the register to change in the parker register map. that is En_LE_Bit bit in the same SPI_COMMAND_1 register. i wrote the 1 for LSB first. but it doesn’t work.
With that I changed the CS_SW_HW register in the SPI_COMMAND_1, it works well. after setting this value as 0, I can see the CS timing is changing.
I’d like to know the SPI_COMMAND_1/[29:28] MODE register and  En_LE_Bit register work properly or not.
Is there any issue related with this.
[ 4408.890392] [dooman:tegra_spi_writel] ss_mask(0x10011000), val(0x54c19827) <-- SPI_COMMAND_1 register value just before writel function in spi-tegra114.c