Skip to content
Snippets Groups Projects
Commit 22052c62 authored by Simon Glass's avatar Simon Glass Committed by Jagannadha Sutradharudu Teki
Browse files

spi: Support half-duplex mode in FDT decode


This parameter should also be supported.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Tested-by: default avatarAjay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: default avatarJagannadha Sutradharudu Teki <jaganna@xilinx.com>
parent a4e29db2
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,8 @@ contain the following properties.
used for MOSI. Defaults to 1 if not present.
- spi-rx-bus-width - (optional) The bus width(number of data wires) that
used for MISO. Defaults to 1 if not present.
- spi-half-duplex - (optional) Indicates that the SPI bus should wait for
a header byte before reading data from the slave.
Some SPI controllers and devices support Dual and Quad SPI transfer mode.
It allows data in SPI system transfered in 2 wires(DUAL) or 4 wires(QUAD).
......
......@@ -53,6 +53,8 @@ struct spi_slave *spi_base_setup_slave_fdt(const void *blob, int busnum,
mode |= SPI_CPHA;
if (fdtdec_get_bool(blob, node, "spi-cs-high"))
mode |= SPI_CS_HIGH;
if (fdtdec_get_bool(blob, node, "spi-half-duplex"))
mode |= SPI_PREAMBLE;
return spi_setup_slave(busnum, cs, max_hz, mode);
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment