]> git.baikalelectronics.ru Git - uboot.git/commit
spi: mpc8xxx: Add support for SPI on mpc832x
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 2 Mar 2023 15:26:26 +0000 (16:26 +0100)
committerChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 6 Apr 2023 12:50:03 +0000 (14:50 +0200)
commit29b2277bc0f7d7ee4d5e0cea0c2e80d489b45ddf
tree103f493387c58920f5be740bcbbc00c6409bbe40
parent17fe5bb075fddea1fdfb38d24ea98a555764980f
spi: mpc8xxx: Add support for SPI on mpc832x

On mpc832x, SPI can be either handled by CPU or QE.
In order to work in CPU mode, bit 17 of SPMODE has to
be set to 1, that bit is called OP.

Also, data is located at a different place than the one expected
by the driver today. In 8 bits mode with REV set, data to be
transmitted is located in the most significant byte while
received data is located in second byte. So perform the
necessary shifts.

In order to differentiate with other CPUs, a new compatible is
added for mpc832x: fsl,mpc832x-spi

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
arch/powerpc/include/asm/mpc8xxx_spi.h
drivers/spi/mpc8xxx_spi.c