spi-bridge with recent OpenWrt

Hi!
I'm involved in project which uses the WrtNode2R as a data-hub for renewable energy application based on recent LEDE/OpenWrt. I did my best to fix things so I can use Kernel 4.14:
https://github.com/openwrt/openwrt/commit/8796680277f4b231386fbc6e8a1ccae91d9fcbe8
https://bugs.openwrt.org/index.php?do=details&task_id=1560
 
One remaining issue is spi-bridge communication with RTThread. I managed to get all packages from https://github.com/WRTnode/openwrt-packages.git built with only very little modifications (removing references to missing error.h header). However, spi-bridge doesn't work when using OpenWrt's spi-mt7621.c driver:
root@OpenWrt:/# spi-bridge status
spi bridge send cmd error.
spi bridge read status error.
When using the stock OpenWrt ChaosCalmer 15.05 which came on the board, it works
 
root@OpenWrt:/# spi-bridge status
OK


Unfortunately, the repository on github only contains a binary blob
https://github.com/WRTnode/openwrt/blob/master/target/linux/ramips/files/drivers/mtd/ralink/ralink_spi_bbu.o 
which cannot be used with recent kernels...

Please share the modifications made to ralink_spi_bbu driver or give me a hint what is needed as otherwise I'll have to revert to bit-banging SPI which is extremely slow :/
 
已邀请:

xzmu - 10w

赞同来自:

this driver use bit-banging SPI driver for CS1,it's slow too

dangowrt

赞同来自:

xzmu: so the m25p80 is used with ramips-spi in hardware as and for using the stm32 the direct does bit-banging... obviously pinctrl mapping in sysctrl need to be changed for that as well, but yes, it's as good as it can get on MT76x8 hardware...

要回复问题请先登录注册