• Sowjanya Komatineni's avatar
    spi: tegra114: de-assert CS before SPI mode change · f3e182c3
    Sowjanya Komatineni authored
    With SW CS, during the transfer completion CS is de-asserted by writing
    default command1 register value to SPI_COMMAND1 register. With this both
    mode and CS state are set at the same time and if current transfer mode
    is different to default SPI mode and if mode change happens prior to CS
    de-assert, clock polarity can change while CS is active before transfer
    finishes.
    
    This causes Slave to see spurious clock edges resulting in data mismatch.
    
    This patch fixes this by de-asserting CS before writing SPI_COMMAND1 to
    its default value so through out the transfer it will be in same SPI mode.
    Signed-off-by: default avatarSowjanya Komatineni <skomatineni@nvidia.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    f3e182c3
spi-tegra114.c 35.3 KB