• Leilk Liu's avatar
    spi: mediatek: mt8173 spi multiple devices support · 37457607
    Leilk Liu authored
    mt8173 IC spi HW has 4 gpio group, it's possible to support
    max <= 4 slave devices, even mtk spi HW is not congruent to spi core.
    1. When a device do a spi_message transfer, spi HW should know
       which pad-group this device is on, and then writes pad-select
       register.
    2. Mtk pad-select register just selects which MISO pin HW will
       receive data. For example, pad-select=1(select spi1 pins), HW just
       receives data from spi1 MISO, but it still send waveform to all 4
       group cs/clk/mosi. If cs pin in other groups is still spi mode,
       after spi1 is selected(by active cs pin), devices on other group
       will also be selected.
    Signed-off-by: default avatarLeilk Liu <leilk.liu@mediatek.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    37457607
spi-mt65xx.c 19.6 KB