From: Rafał Miłecki Date: Thu, 7 Jul 2016 11:54:11 +0000 (+0200) Subject: bcm53xx: backport BCM5301x patches from 2016-07-06 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e71fffed64ee58a56571c18579bbf4c07d07ead4;p=openwrt%2Fstaging%2Fsvanheule.git bcm53xx: backport BCM5301x patches from 2016-07-06 Signed-off-by: Rafał Miłecki --- diff --git a/target/linux/bcm53xx/patches-4.4/039-ARM-dts-BCM5301x-Add-RNG-Device-Tree-node.patch b/target/linux/bcm53xx/patches-4.4/039-ARM-dts-BCM5301x-Add-RNG-Device-Tree-node.patch new file mode 100644 index 0000000000..9b18ac6886 --- /dev/null +++ b/target/linux/bcm53xx/patches-4.4/039-ARM-dts-BCM5301x-Add-RNG-Device-Tree-node.patch @@ -0,0 +1,27 @@ +From 36e55669ebdef9eaf3f4ab4e82a07bb4b95a4813 Mon Sep 17 00:00:00 2001 +From: Florian Fainelli +Date: Wed, 22 Jun 2016 17:27:03 -0700 +Subject: [PATCH] ARM: dts: BCM5301x: Add RNG Device Tree node + +Add the DT node for the random number generator peripheral. + +Acked-by: Scott Branden +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm5301x.dtsi | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/arch/arm/boot/dts/bcm5301x.dtsi ++++ b/arch/arm/boot/dts/bcm5301x.dtsi +@@ -302,6 +302,11 @@ + /* ports are defined in board DTS */ + }; + ++ rng: rng@18004000 { ++ compatible = "brcm,bcm5301x-rng"; ++ reg = <0x18004000 0x14>; ++ }; ++ + nand: nand@18028000 { + compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1", "brcm,brcmnand"; + reg = <0x18028000 0x600>, <0x1811a408 0x600>, <0x18028f00 0x20>; diff --git a/target/linux/bcm53xx/patches-4.4/040-ARM-dts-BCM5301x-Add-BCM953012ER-board.patch b/target/linux/bcm53xx/patches-4.4/040-ARM-dts-BCM5301x-Add-BCM953012ER-board.patch new file mode 100644 index 0000000000..dd24e2624d --- /dev/null +++ b/target/linux/bcm53xx/patches-4.4/040-ARM-dts-BCM5301x-Add-BCM953012ER-board.patch @@ -0,0 +1,139 @@ +From f8c331bda6a90b239f600020eec1b0defe7249b5 Mon Sep 17 00:00:00 2001 +From: Florian Fainelli +Date: Wed, 22 Jun 2016 17:00:35 -0700 +Subject: [PATCH] ARM: dts: BCM5301x: Add BCM953012ER board + +Add support for the Broadcom BCM953012 Enterprise Router reference +board, enable the following peripherals: + +- UART0 (UART1 is not populated) +- WPS and restart GPIO buttons +- Ethernet switch w/ only two facing ports +- NAND flash +- SPI-NOR flash + +Acked-by: Jon Mason +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/bcm953012er.dts | 104 ++++++++++++++++++++++++++++++++++++++ + 2 files changed, 105 insertions(+) + create mode 100644 arch/arm/boot/dts/bcm953012er.dts + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -79,6 +79,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm47094-dlink-dir-885l.dtb \ + bcm94708.dtb \ + bcm94709.dtb \ ++ bcm953012er.dtb \ + bcm953012k.dtb + dtb-$(CONFIG_ARCH_BCM_63XX) += \ + bcm963138dvt.dtb +--- /dev/null ++++ b/arch/arm/boot/dts/bcm953012er.dts +@@ -0,0 +1,104 @@ ++/* ++ * BSD LICENSE ++ * ++ * Copyright(c) 2016 Broadcom. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in ++ * the documentation and/or other materials provided with the ++ * distribution. ++ * * Neither the name of Broadcom Corporation nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm4708.dtsi" ++#include "bcm5301x-nand-cs0-bch8.dtsi" ++ ++/ { ++ model = "NorthStar Enterprise Router (BCM953012ER)"; ++ compatible = "brcm,bcm953012er", "brcm,brcm53012", "brcm,bcm4708"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ memory { ++ reg = <0x00000000 0x8000000>; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ wps { ++ label = "WPS"; ++ linux,code = ; ++ gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; ++ }; ++ ++ restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; ++ ++&spi_nor { ++ status = "okay"; ++}; ++ ++&srab { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ label = "port0"; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ label = "port1"; ++ }; ++ ++ port@5 { ++ reg = <5>; ++ label = "cpu"; ++ ethernet = <&gmac0>; ++ }; ++ }; ++}; diff --git a/target/linux/bcm53xx/patches-4.4/041-0001-ARM-BCM5301X-Specify-NAND-chip-select-and-ECC-in-sep.patch b/target/linux/bcm53xx/patches-4.4/041-0001-ARM-BCM5301X-Specify-NAND-chip-select-and-ECC-in-sep.patch new file mode 100644 index 0000000000..77a90c3fcd --- /dev/null +++ b/target/linux/bcm53xx/patches-4.4/041-0001-ARM-BCM5301X-Specify-NAND-chip-select-and-ECC-in-sep.patch @@ -0,0 +1,65 @@ +From 8ab5f1fbd39c29125403678a0caf0a71046da361 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 6 Jun 2016 09:43:49 +0200 +Subject: [PATCH 1/2] ARM: BCM5301X: Specify NAND chip select and ECC in + separated files +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Using separated file with common chip select parameters will allow us +adding other ECC setups without code duplication. + +Signed-off-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi | 16 +++++----------- + arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi | 18 ++++++++++++++++++ + 2 files changed, 23 insertions(+), 11 deletions(-) + create mode 100644 arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi + +--- a/arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi ++++ b/arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi +@@ -9,16 +9,10 @@ + * Licensed under the GNU/GPL. See COPYING for details. + */ + +-/ { +- nand@18028000 { +- nandcs@0 { +- compatible = "brcm,nandcs"; +- reg = <0>; +- #address-cells = <1>; +- #size-cells = <1>; ++#include "bcm5301x-nand-cs0.dtsi" + +- nand-ecc-strength = <8>; +- nand-ecc-step-size = <512>; +- }; +- }; ++&nandcs { ++ nand-ecc-algo = "bch"; ++ nand-ecc-strength = <8>; ++ nand-ecc-step-size = <512>; + }; +--- /dev/null ++++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi +@@ -0,0 +1,18 @@ ++/* ++ * Broadcom Northstar NAND. ++ * ++ * Copyright (C) 2015 Hauke Mehrtens ++ * ++ * Licensed under the GNU/GPL. See COPYING for details. ++ */ ++ ++/ { ++ nand@18028000 { ++ nandcs: nandcs@0 { ++ compatible = "brcm,nandcs"; ++ reg = <0>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ }; ++ }; ++}; diff --git a/target/linux/bcm53xx/patches-4.4/041-0002-ARM-BCM5301X-Fix-NAND-ECC-parameters-for-D-Link-DIR-.patch b/target/linux/bcm53xx/patches-4.4/041-0002-ARM-BCM5301X-Fix-NAND-ECC-parameters-for-D-Link-DIR-.patch new file mode 100644 index 0000000000..e27d41485f --- /dev/null +++ b/target/linux/bcm53xx/patches-4.4/041-0002-ARM-BCM5301X-Fix-NAND-ECC-parameters-for-D-Link-DIR-.patch @@ -0,0 +1,49 @@ +From 70a0ae1c33572f012b734d4b574f38136c57f1a0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 6 Jun 2016 09:43:50 +0200 +Subject: [PATCH 2/2] ARM: BCM5301X: Fix NAND ECC parameters for D-Link + DIR-885L +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +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 + +--- 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"; +--- /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>; ++}; diff --git a/target/linux/bcm53xx/patches-4.4/101-use-part-parser.patch b/target/linux/bcm53xx/patches-4.4/101-use-part-parser.patch index 8d48673c6d..4ecb8dc693 100644 --- a/target/linux/bcm53xx/patches-4.4/101-use-part-parser.patch +++ b/target/linux/bcm53xx/patches-4.4/101-use-part-parser.patch @@ -1,9 +1,9 @@ ---- a/arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi -+++ b/arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi -@@ -19,6 +19,8 @@ - - nand-ecc-strength = <8>; - nand-ecc-step-size = <512>; +--- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi ++++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi +@@ -13,6 +13,8 @@ + reg = <0>; + #address-cells = <1>; + #size-cells = <1>; + + linux,part-probe = "ofpart", "bcm47xxpart"; }; diff --git a/target/linux/bcm53xx/patches-4.4/306-ARM-BCM5301X-Add-DT-for-Netgear-R8500.patch b/target/linux/bcm53xx/patches-4.4/306-ARM-BCM5301X-Add-DT-for-Netgear-R8500.patch index 98a670c463..8db50e0116 100644 --- a/target/linux/bcm53xx/patches-4.4/306-ARM-BCM5301X-Add-DT-for-Netgear-R8500.patch +++ b/target/linux/bcm53xx/patches-4.4/306-ARM-BCM5301X-Add-DT-for-Netgear-R8500.patch @@ -20,7 +20,7 @@ Signed-off-by: Rafał Miłecki + bcm47094-netgear-r8500.dtb \ bcm94708.dtb \ bcm94709.dtb \ - bcm953012k.dtb + bcm953012er.dtb \ --- /dev/null +++ b/arch/arm/boot/dts/bcm47094-netgear-r8500.dts @@ -0,0 +1,107 @@ diff --git a/target/linux/bcm53xx/patches-4.4/360-ARM-BCM5301X-Fix-NAND-flash-parameters-for-D-Link-DI.patch b/target/linux/bcm53xx/patches-4.4/360-ARM-BCM5301X-Fix-NAND-flash-parameters-for-D-Link-DI.patch deleted file mode 100644 index e114df68d6..0000000000 --- a/target/linux/bcm53xx/patches-4.4/360-ARM-BCM5301X-Fix-NAND-flash-parameters-for-D-Link-DI.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 842f2d4df49fccc31424f9bc6bcc45d1e1d2fda7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Mon, 1 Feb 2016 12:37:00 +0100 -Subject: [PATCH] ARM: BCM5301X: Fix NAND flash parameters for D-Link DIR-885L -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It doesn't use 8-bit ECC strength. - -Signed-off-by: Rafał Miłecki ---- - arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - ---- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts -+++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts -@@ -10,7 +10,6 @@ - /dts-v1/; - - #include "bcm4708.dtsi" --#include "bcm5301x-nand-cs0-bch8.dtsi" - - / { - compatible = "dlink,dir-885l", "brcm,bcm47094", "brcm,bcm4708"; -@@ -27,6 +26,13 @@ - - nand: nand@18028000 { - nandcs@0 { -+ compatible = "brcm,nandcs"; -+ reg = <0>; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ linux,part-probe = "ofpart", "bcm47xxpart"; -+ - partition@0 { - label = "firmware"; - reg = <0x00000000 0x08000000>;