From 7298c25f744a042f021da7a5e0fa81268bb454ce Mon Sep 17 00:00:00 2001 From: Martin Blumenstingl Date: Mon, 8 Jul 2019 12:10:12 +0200 Subject: [PATCH] lantiq: dts: assign the NAND pins to the nand-controller node Assign the NAND pins to the NAND controller node instead of using pin hogging (where pins are assigned to the pin controller). This is the preferred way of assigning pins upstream. While here, define all NAND pins (CLE, ALE, read/RD, ready busy/RDY and CE/CS1). This means that the pinctrl subsystem knows that these pins are in use and cannot be re-assigned as GPIOs for example. Signed-off-by: Martin Blumenstingl --- .../files/arch/mips/boot/dts/BTHOMEHUBV2B.dts | 16 +++--------- .../files/arch/mips/boot/dts/BTHOMEHUBV3A.dts | 17 +++--------- .../files/arch/mips/boot/dts/BTHOMEHUBV5A.dts | 17 +++--------- .../files/arch/mips/boot/dts/EASY80920.dtsi | 11 ++------ .../arch/mips/boot/dts/EASY80920NAND.dts | 3 +++ .../mips/boot/dts/FRITZ3370-REV2-HYNIX.dts | 3 +++ .../mips/boot/dts/FRITZ3370-REV2-MICRON.dts | 3 +++ .../arch/mips/boot/dts/FRITZ3370-REV2.dtsi | 7 ----- .../files/arch/mips/boot/dts/FRITZ7362SL.dts | 10 +++---- .../files/arch/mips/boot/dts/FRITZ7412.dts | 13 +++------- .../files/arch/mips/boot/dts/P2812HNUF1.dts | 3 +++ .../files/arch/mips/boot/dts/P2812HNUF3.dts | 3 +++ .../files/arch/mips/boot/dts/P2812HNUFX.dtsi | 13 ---------- .../lantiq/files/arch/mips/boot/dts/ar9.dtsi | 26 +++++++++++++++++++ .../files/arch/mips/boot/dts/danube.dtsi | 26 +++++++++++++++++++ .../lantiq/files/arch/mips/boot/dts/vr9.dtsi | 26 +++++++++++++++++++ 16 files changed, 112 insertions(+), 85 deletions(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV2B.dts b/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV2B.dts index 2b3afb2295..5d69ed8d72 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV2B.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV2B.dts @@ -108,19 +108,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - nand_out { - lantiq,groups = "nand cle", "nand ale"; - lantiq,function = "ebu"; - lantiq,output = <1>; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; - nand_cs1 { - lantiq,groups = "nand cs1"; - lantiq,function = "ebu"; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; exin { lantiq,groups = "exin1"; lantiq,function = "exin"; @@ -209,6 +196,9 @@ reg = <1 0x0 0x2000000 >; req-mask = <0x1>; /* PCI request lines to mask during NAND access */ + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV3A.dts b/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV3A.dts index 823a158fbf..b4d9fbea91 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV3A.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV3A.dts @@ -109,20 +109,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - nand_out { - lantiq,groups = "nand cle", "nand ale"; - lantiq,function = "ebu"; - lantiq,output = <1>; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; - nand_cs1 { - lantiq,groups = "nand cs1"; - lantiq,function = "ebu"; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; - pci_in { lantiq,groups = "req1"; lantiq,function = "pci"; @@ -158,6 +144,9 @@ reg = <1 0x0 0x2000000 >; req-mask = <0x1>; /* PCI request lines to mask during NAND access */ + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV5A.dts b/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV5A.dts index 186ed37a9c..f6a2d9f6a7 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV5A.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV5A.dts @@ -214,19 +214,6 @@ lantiq,open-drain = <0>; lantiq,output = <1>; }; - nand_out { - lantiq,groups = "nand cle", "nand ale"; - lantiq,function = "ebu"; - lantiq,output = <1>; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; - nand_cs1 { - lantiq,groups = "nand cs1"; - lantiq,function = "ebu"; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; }; }; @@ -236,6 +223,10 @@ lantiq,cs = <1>; bank-width = <2>; reg = <0x1 0x0 0x2000000>; + + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + nand-on-flash-bbt; nand-ecc-strength = <3>; nand-ecc-step-size = <256>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi index 687a2f4098..33c8dd19f7 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi @@ -193,18 +193,12 @@ lantiq,groups = "stp"; lantiq,function = "stp"; }; - nand { - lantiq,groups = "nand cle", "nand ale", - "nand rd", "nand rdy"; - lantiq,function = "ebu"; - }; pci { lantiq,groups = "gnt1", "req1"; lantiq,function = "pci"; }; conf_out { - lantiq,pins = "io24", "io13", "io49", /* nand cle, ale and rd */ - "io4", "io5", "io6", /* stp */ + lantiq,pins = "io4", "io5", "io6", /* stp */ "io21", "io33"; lantiq,open-drain; @@ -217,8 +211,7 @@ lantiq,output = <1>; }; conf_in { - lantiq,pins = "io39", /* exin3 */ - "io48"; /* nand rdy */ + lantiq,pins = "io39"; /* exin3 */ lantiq,pull = <2>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NAND.dts b/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NAND.dts index f687edf54d..0bf8e1b7ef 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NAND.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NAND.dts @@ -19,6 +19,9 @@ bank-width = <2>; reg = <0 0x0 0x2000000>; + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts index c70f124db5..15bd0d2713 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts @@ -13,6 +13,9 @@ bank-width = <2>; reg = <1 0x0 0x2000000>; + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + nand-ecc-mode = "soft"; nand-ecc-strength = <3>; nand-ecc-step-size = <256>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts index 3aaea4cb6d..7e4a3e1114 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts @@ -13,6 +13,9 @@ bank-width = <2>; reg = <1 0x0 0x2000000>; + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + nand-ecc-mode = "on-die"; partitions { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi index b83f0f058a..bac27c3649 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi @@ -193,13 +193,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - nand { - lantiq,groups = "nand cle", "nand ale", - "nand rd", "nand cs1", "nand rdy"; - lantiq,function = "ebu"; - lantiq,pull = <1>; - }; - phy-rst { lantiq,pins = "io37", "io44"; lantiq,pull = <0>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts index 8f1fc261fb..feb9242574 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts @@ -36,12 +36,6 @@ }; &state_default { - nand { - lantiq,groups = "nand ale", "nand cle", - "nand cs1", "nand rd", "nand rdy"; - lantiq,function = "ebu"; - }; - pcie-rst { lantiq,pins = "io21"; lantiq,open-drain = <1>; @@ -85,6 +79,10 @@ lantiq,cs1 = <1>; bank-width = <1>; reg = <1 0x0 0x2000000>; + + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + nand-ecc-mode = "on-die"; partitions { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7412.dts b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7412.dts index 04aa99d185..43216d66be 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7412.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7412.dts @@ -89,6 +89,9 @@ reg = <0 0x0 0x2000000>; lantiq,cs = <1>; + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; @@ -172,16 +175,6 @@ lantiq,open-drain = <1>; lantiq,output = <1>; }; - nand-mux { - lantiq,groups = "nand cle", "nand ale", - "nand rd", "nand cs1", - "nand rdy"; - lantiq,function = "ebu"; - }; - nand-pins { - lantiq,pins = "io13", "io24", "io49"; - lantiq,pull = <1>; - }; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF1.dts b/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF1.dts index 3159a5a244..d1a04a4a78 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF1.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF1.dts @@ -30,6 +30,9 @@ bank-width = <2>; reg = <0 0x0 0x2000000>; + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF3.dts b/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF3.dts index f6e8fd8c83..a607311460 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF3.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF3.dts @@ -21,6 +21,9 @@ bank-width = <2>; reg = <0 0x0 0x800000>; + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUFX.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUFX.dtsi index 274abcc503..d02c8837f4 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUFX.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUFX.dtsi @@ -242,19 +242,6 @@ lantiq,open-drain = <0>; lantiq,output = <1>; }; - nand_out { - lantiq,groups = "nand cle", "nand ale"; - lantiq,function = "ebu"; - lantiq,output = <1>; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; - nand_cs1 { - lantiq,groups = "nand cs1"; - lantiq,function = "ebu"; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi index ab518e75c6..da56485214 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi @@ -178,6 +178,32 @@ }; }; + nand_pins: nand { + mux-0 { + lantiq,groups = "nand cle", "nand ale", + "nand rd"; + lantiq,function = "ebu"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + mux-1 { + lantiq,groups = "nand rdy"; + lantiq,function = "ebu"; + lantiq,output = <0>; + lantiq,pull = <2>; + }; + }; + + nand_cs1_pins: nand-cs1 { + mux { + lantiq,groups = "nand cs1"; + lantiq,function = "ebu"; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; + spi_pins: spi { mux-0 { lantiq,groups = "spi_di"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/danube.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/danube.dtsi index cadfb80750..eec7a5d054 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/danube.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/danube.dtsi @@ -162,6 +162,32 @@ #gpio-cells = <2>; gpio-controller; reg = <0xe100b10 0xa0>; + + nand_pins: nand { + mux-0 { + lantiq,groups = "nand cle", "nand ale", + "nand rd"; + lantiq,function = "ebu"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + mux-1 { + lantiq,groups = "nand rdy"; + lantiq,function = "ebu"; + lantiq,output = <0>; + lantiq,pull = <2>; + }; + }; + + nand_cs1_pins: nand-cs1 { + mux { + lantiq,groups = "nand cs1"; + lantiq,function = "ebu"; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; }; asc1: serial@e100c00 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi index 4639aaf490..caedad8bce 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi @@ -220,6 +220,32 @@ }; }; + nand_pins: nand { + mux-0 { + lantiq,groups = "nand cle", "nand ale", + "nand rd"; + lantiq,function = "ebu"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + mux-1 { + lantiq,groups = "nand rdy"; + lantiq,function = "ebu"; + lantiq,output = <0>; + lantiq,pull = <2>; + }; + }; + + nand_cs1_pins: nand-cs1 { + mux { + lantiq,groups = "nand cs1"; + lantiq,function = "ebu"; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; + spi_pins: spi { mux-0 { lantiq,groups = "spi_di";