Skip to content
Commit 3de8f45e authored by Quentin Schulz's avatar Quentin Schulz Committed by Kever Yang
Browse files

rockchip: spi: rk_spi: do not write bytes when in read-only mode



The read-only mode is currently supported but only for 16b-aligned
buffers. For unaligned buffers, the last byte will be read in RW mode
right now, which isn't what is desired. Instead, let's put the
controller back into RO mode for that last byte and skip any write in
the xfer loop.

This is required for 3-wire SPI mode where PICO/POCI lanes are shorted
on HW level. This incidentally the recommended design for RK806 PMIC for
RK3588 products.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: default avatarKever Yang <kever.yang@rock-chips.com>
Signed-off-by: default avatarQuentin Schulz <quentin.schulz@theobroma-systems.com>
parent 3b95c03d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment