In the userspace, I open the /dev/spidevX.X and set the mode to be "SPI_MODE_2", which is for CPOL = 1.
After setting, I read the mode back to verified if it is correctly set.
ioctl(fd, SPI_IOC_WR_MODE, &mode)
ioctl(fd, SPI_IOC_RD_MODE, &mode)
I also added some debug code in imx_spi.c and check if the ECSPI register value change and verified that ECSCPI_CONFIGREG 's SCLK_POL bits are correctly set to be idle high.
