[OpenWrt-Devel] lantiq: Initial linux 4.4 support (with SPI problems)
martin.blumenstingl at googlemail.com
Sat Jan 16 12:03:30 EST 2016
On Sat, Jan 16, 2016 at 4:34 PM, Daniel Schwierzeck
<daniel.schwierzeck at gmail.com> wrote:
> nice, thanks for testing :)
Thanks for writing nice patches ;-)
>> - replace INIT_COMPLECTION with reinit_completion (this is due the
>> newer kernel version in OpenWrt)
>> - use clk_get_fpi() to obtain the FPI clock (horrible, I am currently
>> porting the lantiq clock code to the common clk framework, then we
>> pass this in correctly)
>> - remove the " - 1" in "cs - 1" (it seems that your chipselect
>> indexing in the .dts begins at 1, whereas the previous driver started
>> at 0)
> I fixed that because datasheets and pin descriptions in schematics use
> CS1..CS6. I think DT should be in sync to the datasheets.
I am not sure if this would work with GPIO chipselects then, see .
If I understand it correctly then you would have to change the "reg"
property of each device to "0" if you would use GPIO CS0 and then back
to "1" if you want to use hardware CS0.
Let me know if we should still go with chipselects starting at 1, then
I will simply adjust them in the commit which switches to your new SPI
> linux-4.4 finally has the patch  I was referring to. Maybe we should
> also add it to 4.1. It is important to be able to setup each SPI pin
> separately. You always should explicitely setup spi_clk and spi_do to
> "lantiq,output = <1>" and spi_di to "lantiq,input". Depending on the
> board, you optionally have to enable internal pull-up's, if there are
> no external ones. The current DT pinmux setup with only one spi pin
> group relies on the bootloader setup. This only works if the board
> boots from SPI and the bootloader have to setup the SPI pins. With
> other boot variants the SPI pins are likely not setup.
I am assuming that you are speaking of upstream commit
I went ahead and also backported that to 4.1, you can find the updated
patchset here: 
While reviewing my changes I may have found a small problem with your driver:
You don't have a separate "lantiq,spi-xrx100" OF-match. I think you
should add one with the same settings as for the other xrx-SoCs.
If you look at DGN3500.dtsi  you'll see that it's an ARX100 board
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel