
On 15.08.2018 17:19, Stefan Roese wrote:
This patch adds the SPI driver for the MediaTek MT7688 SoC (and derivates). Its been tested on the LinkIt Smart 7688 and the Gardena Smart Gateway with and SPI NOR on CS0 and on the Gardena Smart Gateway additionally with an SPI NAND on CS1.
Note that the SPI controller only supports a max transfer size of 32 bytes. This driver implementes a workaround to enable bigger xfer sizes to speed up the transfer especially for the SPI NAND support.
Signed-off-by: Stefan Roese sr@denx.de Cc: Jagan Teki jagan@openedev.com Cc: Daniel Schwierzeck daniel.schwierzeck@gmail.com Reviewed-by: Jagan Teki jagan@openedev.com
v4:
- Rename functions and macros from mt7621 to mt76xx to better reflect the SoC usage and match the driver name
v3:
- Drop IO wrappers completely as suggested by Daniel
- Read "clock-frequency" DT property instead of using CONFIG_SYS_MIPS_TIMER_FREQ
v2:
- Add some macros instead of hardcoded numbers
- Move compatible DT struct down in the file
drivers/spi/Kconfig | 8 + drivers/spi/Makefile | 1 + drivers/spi/mt76xx_spi.c | 312 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 321 insertions(+) create mode 100644 drivers/spi/mt76xx_spi.c
Reviewed-by: Daniel Schwierzeck daniel.schwierzeck@gmail.com