spi: mediatek: add mt8195 spi slave support
authorLeilk Liu <leilk.liu@mediatek.com>
Mon, 22 Mar 2021 05:52:44 +0000 (13:52 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 23 Mar 2021 17:19:45 +0000 (17:19 +0000)
this patch adds mt8195 spi slave compatible support.

Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
Link: https://lore.kernel.org/r/20210322055244.30179-5-leilk.liu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-slave-mt27xx.c

index 7e6fadc88cef037ece5959f924d9592738be9fd1..f199a6c4738a0bf6426d73ad90b1ac870118d3a6 100644 (file)
@@ -77,12 +77,20 @@ struct mtk_spi_compatible {
        const u32 max_fifo_size;
        bool must_rx;
 };
+
 static const struct mtk_spi_compatible mt2712_compat = {
        .max_fifo_size = 512,
 };
+static const struct mtk_spi_compatible mt8195_compat = {
+       .max_fifo_size = 128,
+       .must_rx = true,
+};
+
 static const struct of_device_id mtk_spi_slave_of_match[] = {
        { .compatible = "mediatek,mt2712-spi-slave",
          .data = (void *)&mt2712_compat,},
+       { .compatible = "mediatek,mt8195-spi-slave",
+         .data = (void *)&mt8195_compat,},
        {}
 };
 MODULE_DEVICE_TABLE(of, mtk_spi_slave_of_match);