From 04ad02d132fb14d509d14054313405f24cf1e8ff 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 SVN-Revision: 48293 --- target/linux/lantiq/dts/DGN1000B.dts | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'target/linux/lantiq/dts/DGN1000B.dts') diff --git a/target/linux/lantiq/dts/DGN1000B.dts b/target/linux/lantiq/dts/DGN1000B.dts index a6bd5a8021..68415ca35c 100644 --- a/target/linux/lantiq/dts/DGN1000B.dts +++ b/target/linux/lantiq/dts/DGN1000B.dts @@ -28,10 +28,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - spi { - lantiq,groups = "spi", "spi_cs1"; - lantiq,function = "spi"; - }; asc { lantiq,groups = "asc"; lantiq,function = "asc"; @@ -42,6 +38,18 @@ lantiq,open-drain = <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_cs1"; + lantiq,function = "spi"; + lantiq,output = <1>; + }; + }; }; etop@E180000 { @@ -50,11 +58,14 @@ }; spi@E100800 { - m25p80@0 { + pinctrl-names = "default"; + pinctrl-0 = <&pins_spi_default>; + + m25p80@1 { #address-cells = <1>; #size-cells = <1>; compatible = "jedec,spi-nor"; - reg = <0 0>; + reg = <1 0>; spi-max-frequency = <5000000>; partition@0 { -- cgit v1.2.3