[LEDE-DEV] MT7688 SPI confusion
John Crispin
john at phrozen.org
Sun Jun 4 22:55:37 PDT 2017
spi duplex is fucked in HW. the spi is a m25p80 engine and not a real
spi. you need to use spi-gpio if you require a real spi
On 05/06/17 02:57, Daniel Golle wrote:
> Hi!
>
> I'm currently trying to get SPI with two devices connected to work on
> MT7688 and noticed that the spi-mt7621 driver got a pretty weird
> work-around going on: if CS# is set it does only half-duplex transfers
> which if CS# is not set it does full-duplex. John has then disabled
> full-duplex alltogether on the Chaos Calmer branch [1].
> What I'm trying to achieve is to use WrtNode2R's spi-bridge [2] to
> communicate with the STM32 MCU running RT-Thread. This somehow works
> in Chaos Calmer when using WrtNode modified tree [3] but doesn't
> work well on LEDE git HEAD... Any ideas?
>
> Apart from the spi-based rpc/console the Wrtnode2R comes with a flash
> tool for the STM32 [4] -- it would of course be much nicer to have a
> SPI backend for stm32flash to achieve the same thing. To be able to
> implement that I'd like to first understand what is needed to get SPI
> fixed so that the not-very-beautiful existing tooling can be replaced.
>
> Any experience with more than one SPI slave connected to MT76xx SoCs,
> stm32flash via SPI and general ideas/inspiration on bridging with RTOS
> running on MCUs next to an embedded Linux SoC is more than welcome :)
>
>
> Cheers
>
>
> Daniel
>
>
>
> [1]:
> commit 877ee7d7f54847b4e95c1feb6de0f5413e2fe7a1
> Author: John Crispin <blogic at openwrt.org>
> Date: Tue Apr 19 21:01:34 2016 +0000
>
> ralink: add spi fix
>
> the fullduplex on CS1 is broken. remove the fullduplex support and run on
> plain half duplex on both CS lines.
>
> Signed-off-by: John Crispin <blogic at openwrt.org>
>
> git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@49201 3c298f89-4303-0410-b956-a3cf2f4a3e73
>
> [2]: https://github.com/WRTnode/openwrt-packages/blob/master/wrtnode/spi-bridge/src/main.c
>
> [3]: https://github.com/WRTnode/openwrt
>
> [4]: https://github.com/WRTnode/openwrt-packages/blob/master/wrtnode/WRTnode2r-stm32/src/main.c#L57
>
More information about the Lede-dev
mailing list