[OpenWrt-Devel] lantiq: Initial linux 4.4 support (with SPI problems)
Daniel Schwierzeck
daniel.schwierzeck at gmail.com
Wed Jan 13 15:05:16 EST 2016
Hi Martin,
Am Mittwoch, den 13.01.2016, 20:23 +0100 schrieb Martin Blumenstingl:
> Hi John,
>
> On Mon, Jan 11, 2016 at 3:25 PM, Martin Blumenstingl
> <martin.blumenstingl at googlemail.com> wrote:
> > Here's the kernel log from the TD-W8970:
> > https://paste.kde.org/pia7p73i9
> > I have debugged it and split_tplink_kernel gets 0x20000 as offset
> > and
> > 0x7A0000 as size (which looks correct). However, when mtd_read
> > tries to
> > read the magic bytes it only gets 0xFFFFFFFF.
> I found out that reverting this upstream commit makes SPI work again:
> [0]
>
> Then I had a deeper look at our SPI driver - that's where I need some
> help from you.
could you retry with the attached driver?
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 ;)
The driver works on xRX200 with following DT bindings:
xrx200.dtsi:
fpi {
...
spi: spi at e100800 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "lantiq,xrx200-spi";
reg = <0xe100800 0x100>;
interrupt-parent = <&icu0>;
interrupts = <22 23 24 25>;
interrupt-names = "spi_rx", "spi_tx", "spi_err",
"spi_frm";
status = "disabled";
};
...
};
board.dts:
&gpio {
...
pins_spi_default: pins_spi_default {
spi_in {
lantiq,groups = "spi_din";
lantiq,function = "spi";
};
spi_out {
lantiq,groups = "spi_dout", "spi_clk",
"spi_cs4";
lantiq,function = "spi";
lantiq,output = <1>;
};
};
...
};
&spi {
pinctrl-names = "default";
pinctrl-0 = <&pins_spi_default>;
status = "ok";
m25p80 at 4 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spansion,m25p80";
reg = <4>;
spi-max-frequency = <25000000>;
};
};
--
- Daniel
More information about the openwrt-devel
mailing list