[OpenWrt-Devel] lantiq: Initial linux 4.4 support (with SPI problems)

Martin Blumenstingl martin.blumenstingl at googlemail.com
Sat Jan 16 09:39:09 EST 2016


Hi Daniel,

On Sat, Jan 16, 2016 at 1:06 AM, Martin Blumenstingl
<martin.blumenstingl at googlemail.com> wrote:
>> It is a complete rewrite with DT support and runs against the UGW-6.1.1
>> kernel. Unfortunately I hadn't time yet to adapt and test it with
>> OpenWRT. Maybe you want to volunteer for that ;)
> Thanks for this update! I am going to test it on kernel 4.1 in the
> next days and let you know about the results.
I had to make 3 adjustments to get it working on OpenWrt:
- 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 can
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)

After that everything is working nicely on linux 4.1 (on my TD-W8970):
[    0.926597] spi-lantiq 1e100800.spi: using internal chipselect 3
[    0.931499] spi-lantiq 1e100800.spi: spi_clk 125000000,
max_speed_hz 33250000, brt 2
[    0.939351] m25p80 spi0.3: s25fl064k (8192 Kbytes)
[    0.943763] 4 ofpart partitions found on MTD device spi0.3
[    0.949192] Creating 4 MTD partitions on "spi0.3":
[    0.953984] 0x000000000000-0x000000020000 : "u-boot"
[    0.960136] 0x000000020000-0x0000007c0000 : "firmware"
[    0.966720] 0x0000001cf40c-0x0000007c0000 : "rootfs"
[    0.971380] mtd: device 2 (rootfs) set to be root filesystem
[    0.976814] 1 squashfs-split partitions found on MTD device rootfs
[    0.982126] 0x000000460000-0x0000007c0000 : "rootfs_data"
[    1.030051] 0x0000007c0000-0x0000007d0000 : "config"
[    1.034667] 0x0000007d0000-0x000000800000 : "boardconfig"
[    1.040154] spi-lantiq 1e100800.spi: Lantiq SPI controller (TXFS 8,
RXFS 8, DMA 32)

I have pushed my changes to the OpenWrt tree here: [0]
My plan is to finish them soon (I want to do a little more testing,
and I need to verify that my other dts changes are correct).

Thank you for your help!


Regards,
Martin

[0] https://github.com/xdarklight/openwrt/commits/lantiq-spi-driver-daniel-v2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list