From f41f46e648ac9e4236491084f671e93904799d9a Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Sun, 25 Aug 2019 22:40:37 +0200 Subject: [PATCH] sunxi: enable NAND on pcDuino3 Signed-off-by: Zoltan HERPAI --- .../404-dts-add-nand-to-pcduino3.patch | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 target/linux/sunxi/patches-5.4/404-dts-add-nand-to-pcduino3.patch diff --git a/target/linux/sunxi/patches-5.4/404-dts-add-nand-to-pcduino3.patch b/target/linux/sunxi/patches-5.4/404-dts-add-nand-to-pcduino3.patch new file mode 100644 index 0000000000..d94f2cdb11 --- /dev/null +++ b/target/linux/sunxi/patches-5.4/404-dts-add-nand-to-pcduino3.patch @@ -0,0 +1,62 @@ +diff -ruN a/arch/arm/boot/dts/sun7i-a20-pcduino3d.dts b/arch/arm/boot/dts/sun7i-a20-pcduino3.dts +--- a/arch/arm/boot/dts/sun7i-a20-pcduino3.dts 2019-02-20 16:13:12.000000000 +0100 ++++ b/arch/arm/boot/dts/sun7i-a20-pcduino3.dts 2019-02-22 14:52:35.906512308 +0100 +@@ -175,6 +177,37 @@ + function = "gpio_in"; + bias-pull-up; + }; ++ ++ nand_pins: nand-pins { ++ pins = "PC0", "PC1", "PC2", "PC5", ++ "PC8", "PC9", "PC10", "PC11", ++ "PC12", "PC13", "PC14", "PC15"; ++ function = "nand0"; ++ }; ++ ++ nand_pins_cs0: nand-pins-cs0 { ++ pins = "PC4"; ++ function = "nand0"; ++ bias-pull-up; ++ }; ++ ++ nand_pins_cs1: nand-pins-cs1 { ++ pins = "PC3"; ++ function = "nand0"; ++ bias-pull-up; ++ }; ++ ++ nand_pins_rb0: nand-pins-rb0 { ++ pins = "PC6"; ++ function = "nand0"; ++ bias-pull-up; ++ }; ++ ++ nand_pins_rb1: nand-pins-rb1 { ++ pins = "PC7"; ++ function = "nand0"; ++ bias-pull-up; ++ }; + }; + + ®_ahci_5v { +@@ -210,3 +243,20 @@ + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; + }; ++ ++&nfc { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&nand_pins>, <&nand_pins_cs0>, <&nand_pins_rb0>; ++ ++ /* ESMT NAND 128MiB 3,3V 8-bit */ ++ nand@0 { ++ #address-cells = <2>; ++ #size-cells = <2>; ++ reg = <0>; ++ allwinner,rb = <0>; ++ nand-ecc-mode = "hw"; ++ nand-ecc-strength = <40>; ++ nand-ecc-step-size = <1024>; ++ }; ++}; -- 2.30.2