sunxi: enable NAND on pcDuino3
authorZoltan HERPAI <wigyori@uid0.hu>
Sun, 25 Aug 2019 20:40:37 +0000 (22:40 +0200)
committerZoltan HERPAI <wigyori@uid0.hu>
Thu, 21 Apr 2022 07:18:36 +0000 (09:18 +0200)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
target/linux/sunxi/patches-5.15/404-dts-add-nand-to-pcduino3.patch [new file with mode: 0644]

diff --git a/target/linux/sunxi/patches-5.15/404-dts-add-nand-to-pcduino3.patch b/target/linux/sunxi/patches-5.15/404-dts-add-nand-to-pcduino3.patch
new file mode 100644 (file)
index 0000000..d94f2cd
--- /dev/null
@@ -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;
++      };
+ };
+ &reg_ahci_5v {
+@@ -210,3 +243,20 @@
+       usb2_vbus-supply = <&reg_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>;
++      };
++};