From 70a0ae1c33572f012b734d4b574f38136c57f1a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 6 Jun 2016 09:43:50 +0200 Subject: [PATCH] ARM: BCM5301X: Fix NAND ECC parameters for D-Link DIR-885L MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Florian Fainelli --- arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 2 +- arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi diff --git a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts index 50cf80489cbf..c8c0b3616935 100644 --- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts @@ -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 index 000000000000..24b099c00f13 --- /dev/null +++ b/arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi @@ -0,0 +1,15 @@ +/* + * Broadcom Northstar NAND. + * + * Copyright (C) 2016 Rafał Miłecki + * + * Licensed under the ISC license. + */ + +#include "bcm5301x-nand-cs0.dtsi" + +&nandcs { + nand-ecc-algo = "bch"; + nand-ecc-strength = <1>; + nand-ecc-step-size = <512>; +}; -- 2.20.1