ARM: BCM5301X: Fix NAND ECC parameters for D-Link DIR-885L
authorRafał Miłecki <zajec5@gmail.com>
Mon, 6 Jun 2016 07:43:50 +0000 (09:43 +0200)
committerFlorian Fainelli <f.fainelli@gmail.com>
Thu, 7 Jul 2016 02:42:33 +0000 (19:42 -0700)
This device uses BCH-1 instead of BCH-8. This fixes ECC errors and makes
NAND usable with brcmnand.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi [new file with mode: 0644]

index 50cf804..c8c0b36 100644 (file)
@@ -10,7 +10,7 @@
 /dts-v1/;
 
 #include "bcm4708.dtsi"
-#include "bcm5301x-nand-cs0-bch8.dtsi"
+#include "bcm5301x-nand-cs0-bch1.dtsi"
 
 / {
        compatible = "dlink,dir-885l", "brcm,bcm47094", "brcm,bcm4708";
diff --git a/arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi b/arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi
new file mode 100644 (file)
index 0000000..24b099c
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ * Broadcom Northstar NAND.
+ *
+ * Copyright (C) 2016 Rafał Miłecki <rafal.milecki@gmail.com>
+ *
+ * Licensed under the ISC license.
+ */
+
+#include "bcm5301x-nand-cs0.dtsi"
+
+&nandcs {
+       nand-ecc-algo = "bch";
+       nand-ecc-strength = <1>;
+       nand-ecc-step-size = <512>;
+};