Skip to content

Commit 138f56e

Browse files
vladimirolteanbroonie
authored andcommitted
spi: spi-fsl-dspi: Add support for LS1028A
This is similar to the DSPI instantiation on LS1028A, except that: - The A-011218 erratum has been fixed, so DMA works - The endianness is different, which has implications on XSPI mode Some benchmarking with the following command: spidev_test --device /dev/spidev2.0 --bpw 8 --size 256 --cpha --iter 10000000 --speed 20000000 shows that in DMA mode, it can achieve around 2400 kbps, and in XSPI mode, the same command goes up to 4700 kbps. This is somewhat to be expected, since the DMA buffer size is extremely small at 8 bytes, the winner becomes whomever can prepare the buffers for transmission quicker, and DMA mode has higher overhead there. So XSPI FIFO mode has been chosen as the operating mode for this chip. Signed-off-by: Vladimir Oltean <[email protected]> Tested-by: Michael Walle <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 5b342c5 commit 138f56e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/spi/spi-fsl-dspi.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ struct fsl_dspi_devtype_data {
124124
enum {
125125
LS1021A,
126126
LS1012A,
127+
LS1028A,
127128
LS1043A,
128129
LS1046A,
129130
LS2080A,
@@ -151,6 +152,11 @@ static const struct fsl_dspi_devtype_data devtype_data[] = {
151152
.max_clock_factor = 8,
152153
.fifo_size = 16,
153154
},
155+
[LS1028A] = {
156+
.trans_mode = DSPI_XSPI_MODE,
157+
.max_clock_factor = 8,
158+
.fifo_size = 4,
159+
},
154160
[LS1043A] = {
155161
/* Has A-011218 DMA erratum */
156162
.trans_mode = DSPI_XSPI_MODE,
@@ -1050,6 +1056,9 @@ static const struct of_device_id fsl_dspi_dt_ids[] = {
10501056
}, {
10511057
.compatible = "fsl,ls1012a-dspi",
10521058
.data = &devtype_data[LS1012A],
1059+
}, {
1060+
.compatible = "fsl,ls1028a-dspi",
1061+
.data = &devtype_data[LS1028A],
10531062
}, {
10541063
.compatible = "fsl,ls1043a-dspi",
10551064
.data = &devtype_data[LS1043A],

0 commit comments

Comments
 (0)