From: Rafał Miłecki Date: Sun, 15 Jan 2017 21:52:24 +0000 (+0100) Subject: bcm53xx: add pending BCM5301X patches: Netgear R8000 WiFi & Luxul DTS X-Git-Tag: v17.01.0-rc1~58 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ea6d10d572ed819bb272d214bfbeeca32d9ea3ae;p=oweals%2Fopenwrt.git bcm53xx: add pending BCM5301X patches: Netgear R8000 WiFi & Luxul DTS This specifies wireless limitations for Netgear R8000 making sure people won't use channels incorrectly (limited performance). There are also 2 new DTS files not used by us yet. Signed-off-by: Rafał Miłecki --- diff --git a/target/linux/bcm53xx/patches-4.4/130-0001-ARM-BCM5301X-Set-5-GHz-wireless-frequency-limits-on-.patch b/target/linux/bcm53xx/patches-4.4/130-0001-ARM-BCM5301X-Set-5-GHz-wireless-frequency-limits-on-.patch new file mode 100644 index 0000000000..7eb586f849 --- /dev/null +++ b/target/linux/bcm53xx/patches-4.4/130-0001-ARM-BCM5301X-Set-5-GHz-wireless-frequency-limits-on-.patch @@ -0,0 +1,123 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Subject: [PATCH] ARM: BCM5301X: Set 5 GHz wireless frequency limits on Netgear + R8000 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Netgear R8000 is a tri-band home router. It has three BCM43602 chipsets +two of them for 5 GHz band. Both seem the same and their firmwares +report the same set of channels. The problem is due to hardware / board +design there are extra limitations that should be respected. + +First PHY should be used for U-NII-2 and U-NII-3. Third PHY should be +used for U-NII-1. Using them in a different way may result in wireless +not working or in noticeably reduced performance. Basic version of this +info was provided by Broadcom employee, then it has been verified by me +using original vendor firmware (which has limitations hardcoded in UI). + +This patch uses recently introduced ieee80211-freq-limit property to +describe these limitations at DT level. + +Referencing PCIe devices in DT required specifying all related bridges. +Below you can see (a bit complex) PCI tree from R8000 that explains all +entries that I needed to put in DT. + +0000:00:00.0 14e4:8012 Bridge Device +└─ 0000:01:00.0 14e4:aa52 Network Controller + +0001:00:00.0 14e4:8012 Bridge Device +└─ 0001:01:00.0 10b5:8603 Bridge Device + ├─ 0001:02:01.0 10b5:8603 Bridge Device + │ └─ 0001:03:00.0 14e4:aa52 Network Controller + ├─ 0001:02:02.0 10b5:8603 Bridge Device + │ └─ 0001:04:00.0 14e4:aa52 Network Controller + ├─ 0001:02:03.0 000d:0000 0x000000 + ├─ 0001:02:04.0 000d:0000 0x000000 + ├─ 0001:02:05.0 000d:0000 0x000000 + ├─ 0001:02:06.0 000d:0000 0x000000 + ├─ (...) + ├─ 0001:02:1d.0 000d:0000 0x000000 + ├─ 0001:02:1e.0 000d:0000 0x000000 + └─ 0001:02:1f.0 000d:0000 0x000000 + +Signed-off-by: Rafał Miłecki +--- + arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 48 +++++++++++++++++++++++++++++ + arch/arm/boot/dts/bcm5301x.dtsi | 8 +++++ + 2 files changed, 56 insertions(+) + +--- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts ++++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts +@@ -108,6 +108,54 @@ + }; + }; + ++&pcie0 { ++ #address-cells = <3>; ++ #size-cells = <2>; ++ ++ bridge@0,0,0 { ++ reg = <0x0000 0 0 0 0>; ++ ++ #address-cells = <3>; ++ #size-cells = <2>; ++ ++ wifi@0,1,0 { ++ reg = <0x0000 0 0 0 0>; ++ ieee80211-freq-limit = <5735000 5835000>; ++ }; ++ }; ++}; ++ ++&pcie1 { ++ #address-cells = <3>; ++ #size-cells = <2>; ++ ++ bridge@1,0,0 { ++ reg = <0x0000 0 0 0 0>; ++ ++ #address-cells = <3>; ++ #size-cells = <2>; ++ ++ bridge@1,1,0 { ++ reg = <0x0000 0 0 0 0>; ++ ++ #address-cells = <3>; ++ #size-cells = <2>; ++ ++ bridge@1,2,2 { ++ reg = <0x1000 0 0 0 0>; ++ ++ #address-cells = <3>; ++ #size-cells = <2>; ++ ++ wifi@1,4,0 { ++ reg = <0x0000 0 0 0 0>; ++ ieee80211-freq-limit = <5170000 5730000>; ++ }; ++ }; ++ }; ++ }; ++}; ++ + &usb2 { + vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>; + }; +--- a/arch/arm/boot/dts/bcm5301x.dtsi ++++ b/arch/arm/boot/dts/bcm5301x.dtsi +@@ -243,6 +243,14 @@ + #gpio-cells = <2>; + }; + ++ pcie0: pcie@12000 { ++ reg = <0x00012000 0x1000>; ++ }; ++ ++ pcie1: pcie@13000 { ++ reg = <0x00013000 0x1000>; ++ }; ++ + usb2: usb2@21000 { + reg = <0x00021000 0x1000>; + diff --git a/target/linux/bcm53xx/patches-4.4/130-0002-ARM-BCM5301X-Add-DT-for-Luxul-XAP-1410.patch b/target/linux/bcm53xx/patches-4.4/130-0002-ARM-BCM5301X-Add-DT-for-Luxul-XAP-1410.patch new file mode 100644 index 0000000000..5a03ba8bf4 --- /dev/null +++ b/target/linux/bcm53xx/patches-4.4/130-0002-ARM-BCM5301X-Add-DT-for-Luxul-XAP-1410.patch @@ -0,0 +1,86 @@ +From: Dan Haab +Subject: [PATCH] ARM: BCM5301X: Add DT for Luxul XAP-1410 + +Luxul XAP-1410 in a dual-band access point device based on BCM47081 with +serial flash. It has 3 LEDs and just one (reset) button. + +Signed-off-by: Dan Haab +--- + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 60 +++++++++++++++++++++++++++ + 2 files changed, 61 insertions(+) + create mode 100644 arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -73,6 +73,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm47081-asus-rt-n18u.dtb \ + bcm47081-buffalo-wzr-600dhp2.dtb \ + bcm47081-buffalo-wzr-900dhp.dtb \ ++ bcm47081-luxul-xap-1410.dtb \ + bcm4709-asus-rt-ac87u.dtb \ + bcm4709-buffalo-wxr-1900dhp.dtb \ + bcm4709-netgear-r7000.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts +@@ -0,0 +1,60 @@ ++/* ++ * Copyright 2017 Luxul Inc. ++ * ++ * Licensed under the ISC license. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm47081.dtsi" ++ ++/ { ++ compatible = "luxul,xap-1410v1", "brcm,bcm47081", "brcm,bcm4708"; ++ model = "Luxul XAP-1410 V1"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ ++ memory { ++ reg = <0x00000000 0x08000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ 5ghz { ++ label = "bcm53xx:blue:5ghz"; ++ gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "none"; ++ }; ++ ++ 2ghz { ++ label = "bcm53xx:blue:2ghz"; ++ gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "none"; ++ }; ++ ++ status { ++ label = "bcm53xx:green:status"; ++ gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "timer"; ++ }; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&spi_nor { ++ status = "okay"; ++}; diff --git a/target/linux/bcm53xx/patches-4.4/130-0003-ARM-BCM5301X-Add-DT-for-Luxul-XWR-1200.patch b/target/linux/bcm53xx/patches-4.4/130-0003-ARM-BCM5301X-Add-DT-for-Luxul-XWR-1200.patch new file mode 100644 index 0000000000..ba1907c000 --- /dev/null +++ b/target/linux/bcm53xx/patches-4.4/130-0003-ARM-BCM5301X-Add-DT-for-Luxul-XWR-1200.patch @@ -0,0 +1,133 @@ +From: Dan Haab +Subject: [PATCH] ARM: BCM5301X: Add DT for Luxul XWR-1200 + +Luxul XWR-1200 in a dual-band router based on BCM47081. It uses serial +flash (for bootloader and NVRAM) and NAND flash (for firmware). + +Signed-off-by: Dan Haab +--- + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 107 ++++++++++++++++++++++++++ + 2 files changed, 108 insertions(+) + create mode 100644 arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -74,6 +74,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm47081-buffalo-wzr-600dhp2.dtb \ + bcm47081-buffalo-wzr-900dhp.dtb \ + bcm47081-luxul-xap-1410.dtb \ ++ bcm47081-luxul-xwr-1200.dtb \ + bcm4709-asus-rt-ac87u.dtb \ + bcm4709-buffalo-wxr-1900dhp.dtb \ + bcm4709-netgear-r7000.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts +@@ -0,0 +1,107 @@ ++/* ++ * Copyright 2017 Luxul Inc. ++ * ++ * Licensed under the ISC license. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm47081.dtsi" ++#include "bcm5301x-nand-cs0-bch4.dtsi" ++ ++/ { ++ compatible = "luxul,xwr-1200v1", "brcm,bcm47081", "brcm,bcm4708"; ++ model = "Luxul XWR-1200 V1"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ ++ memory { ++ reg = <0x00000000 0x08000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ power { ++ label = "bcm53xx:green:power"; ++ gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ lan3 { ++ label = "bcm53xx:green:lan3"; ++ gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "none"; ++ }; ++ ++ lan4 { ++ label = "bcm53xx:green:lan4"; ++ gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "none"; ++ }; ++ ++ wan { ++ label = "bcm53xx:green:wan"; ++ gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "none"; ++ }; ++ ++ lan2 { ++ label = "bcm53xx:green:lan2"; ++ gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "none"; ++ }; ++ ++ usb { ++ label = "bcm53xx:green:usb"; ++ gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "none"; ++ }; ++ ++ status { ++ label = "bcm53xx:green:status"; ++ gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "timer"; ++ }; ++ ++ 2ghz { ++ label = "bcm53xx:green:2ghz"; ++ gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "none"; ++ }; ++ ++ 5ghz { ++ label = "bcm53xx:green:5ghz"; ++ gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "none"; ++ }; ++ ++ lan1 { ++ label = "bcm53xx:green:lan1"; ++ gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "none"; ++ }; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&usb2 { ++ vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>; ++}; ++ ++&spi_nor { ++ status = "okay"; ++}; diff --git a/target/linux/bcm53xx/patches-4.4/301-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch b/target/linux/bcm53xx/patches-4.4/301-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch index 3e24f66b65..4e59657012 100644 --- a/target/linux/bcm53xx/patches-4.4/301-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch +++ b/target/linux/bcm53xx/patches-4.4/301-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch @@ -9,7 +9,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -76,6 +76,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ +@@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm4709-asus-rt-ac87u.dtb \ bcm4709-buffalo-wxr-1900dhp.dtb \ bcm4709-netgear-r7000.dtb \