e27d41485f31a78e502f28d84b7fb17af0e094ae
[openwrt/staging/hauke.git] /
1 From 70a0ae1c33572f012b734d4b574f38136c57f1a0 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Mon, 6 Jun 2016 09:43:50 +0200
4 Subject: [PATCH 2/2] ARM: BCM5301X: Fix NAND ECC parameters for D-Link
5 DIR-885L
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 This device uses BCH-1 instead of BCH-8. This fixes ECC errors and makes
11 NAND usable with brcmnand.
12
13 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
14 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
15 ---
16 arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 2 +-
17 arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi | 15 +++++++++++++++
18 2 files changed, 16 insertions(+), 1 deletion(-)
19 create mode 100644 arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi
20
21 --- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
22 +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
23 @@ -10,7 +10,7 @@
24 /dts-v1/;
25
26 #include "bcm4708.dtsi"
27 -#include "bcm5301x-nand-cs0-bch8.dtsi"
28 +#include "bcm5301x-nand-cs0-bch1.dtsi"
29
30 / {
31 compatible = "dlink,dir-885l", "brcm,bcm47094", "brcm,bcm4708";
32 --- /dev/null
33 +++ b/arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi
34 @@ -0,0 +1,15 @@
35 +/*
36 + * Broadcom Northstar NAND.
37 + *
38 + * Copyright (C) 2016 Rafał Miłecki <rafal.milecki@gmail.com>
39 + *
40 + * Licensed under the ISC license.
41 + */
42 +
43 +#include "bcm5301x-nand-cs0.dtsi"
44 +
45 +&nandcs {
46 + nand-ecc-algo = "bch";
47 + nand-ecc-strength = <1>;
48 + nand-ecc-step-size = <512>;
49 +};