From d5995af8d34210a17e35d547635533fc408eaadb Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 17 Jan 2016 19:56:03 +0000 Subject: lantiq: Switch to the new SPI driver Compared to the "old" driver: - Each device must assign a pinctrl setting to the SPI node to allow the new SPI driver to configure the SPI pins. While here we are also using separate input and output settings so we are independent of whether the bootloader configures the pins correctly. - We use the new "compatible" strings to make the driver choose the correct number of chip-selects for each SoC. - The new driver starts counting the chip-selects at 1 (instead of 0, like the old one did). Thus we have to adjust the devices accordingly. Signed-off-by: Martin Blumenstingl git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48293 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/lantiq/dts/TDW89X0.dtsi | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'target/linux/lantiq/dts/TDW89X0.dtsi') diff --git a/target/linux/lantiq/dts/TDW89X0.dtsi b/target/linux/lantiq/dts/TDW89X0.dtsi index 30225d5cc1..eabb98056f 100644 --- a/target/linux/lantiq/dts/TDW89X0.dtsi +++ b/target/linux/lantiq/dts/TDW89X0.dtsi @@ -43,16 +43,24 @@ lantiq,open-drain = <0>; lantiq,output = <1>; }; - spi { - lantiq,groups = "spi", "spi_cs4"; - lantiq,function = "spi"; - }; pcie-rst { lantiq,pins = "io38"; lantiq,pull = <0>; lantiq,output = <1>; }; }; + pins_spi_default: pins_spi_default { + spi_in { + lantiq,groups = "spi_di"; + lantiq,function = "spi"; + }; + spi_out { + lantiq,groups = "spi_do", "spi_clk", + "spi_cs4"; + lantiq,function = "spi"; + lantiq,output = <1>; + }; + }; }; eth@E108000 { @@ -211,13 +219,16 @@ }; &spi { + pinctrl-names = "default"; + pinctrl-0 = <&pins_spi_default>; + status = "ok"; - m25p80@3 { + m25p80@4 { #address-cells = <1>; #size-cells = <1>; compatible = "jedec,spi-nor"; - reg = <3 0>; + reg = <4 0>; spi-max-frequency = <33250000>; m25p,fast-read; -- cgit v1.2.3