diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2016-04-09 09:59:21 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2016-04-09 09:59:21 +0000 |
commit | cfc45775e041f6bb8cf3cd96e08ef42dfbe3a042 (patch) | |
tree | 9f5d1adfcac98c8200448861b0425f401368d477 /target/linux | |
parent | b60495f968b59b210559f87c60833f7f30387902 (diff) | |
download | master-187ad058-cfc45775e041f6bb8cf3cd96e08ef42dfbe3a042.tar.gz master-187ad058-cfc45775e041f6bb8cf3cd96e08ef42dfbe3a042.tar.bz2 master-187ad058-cfc45775e041f6bb8cf3cd96e08ef42dfbe3a042.zip |
bcm53xx: add basic support for Netgear R7900
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49122 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
7 files changed, 87 insertions, 13 deletions
diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network index f879e01bf2..ea49f827b2 100755 --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network @@ -12,9 +12,8 @@ case "$board" in asus,rt-ac87u) ifname=eth1 ;; +netgear,r7900) netgear,r8000) - ifname=eth2 - ;; netgear,r8500) ifname=eth2 ;; @@ -23,16 +22,11 @@ netgear,r8500) ;; esac -# Workaround for devices using eth2 +# Workaround for devices using eth2 connected to (CPU) switch port 8 case "$board" in +netgear,r7900) netgear,r8000) ifname=eth0 - ;; -esac - -# Workaround for devices using CPU port 8 (connected to eth2) -case "$board" in -netgear,r8000) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@$ifname" board_config_flush diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh index 20d9e29e07..51ad041730 100644 --- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh @@ -28,6 +28,7 @@ platform_expected_image() { "netgear,r6250v1") echo "chk U12H245T00_NETGEAR"; return;; "netgear,r6300v2") echo "chk U12H240T00_NETGEAR"; return;; "netgear,r7000") echo "chk U12H270T00_NETGEAR"; return;; + "netgear,r7900") echo "chk U12H315T30_NETGEAR"; return;; "netgear,r8000") echo "chk U12H315T00_NETGEAR"; return;; "netgear,r8500") echo "chk U12H334T00_NETGEAR"; return;; esac diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index f6f0f5b756..41281f9066 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -177,6 +177,7 @@ $(eval $(call AsusDevice,rt-n18u,RT-N18U)) $(eval $(call DLinkDevice,dir-885l,wrgac42_dlink.2015_dir885l)) $(eval $(call LinksysDevice,ea6300-v1)) $(eval $(call NetgearDevice,r7000,U12H270T00_NETGEAR)) +$(eval $(call NetgearDevice,r7900,U12H315T30_NETGEAR)) # $(eval $(call NetgearDevice,r8500,U12H334T00_NETGEAR)) $(eval $(call BuildImage)) 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 new file mode 100644 index 0000000000..c67d562f0c --- /dev/null +++ b/target/linux/bcm53xx/patches-4.4/301-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch @@ -0,0 +1,63 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> +Subject: [PATCH] ARM: BCM5301X: Add DT for Netgear R7900 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Rafał Miłecki <zajec5@gmail.com> +--- + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -75,6 +75,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm4709-asus-rt-ac87u.dtb \ + bcm4709-buffalo-wxr-1900dhp.dtb \ + bcm4709-netgear-r7000.dtb \ ++ bcm4709-netgear-r7900.dtb \ + bcm4709-netgear-r8000.dtb \ + bcm47094-dlink-dir-885l.dtb \ + bcm94708.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm4709-netgear-r7900.dts +@@ -0,0 +1,41 @@ ++/* ++ * Broadcom BCM470X / BCM5301X ARM platform code. ++ * DTS for Netgear R7900 ++ * ++ * Copyright (C) 2016 Rafał Miłecki <zajec5@gmail.com> ++ * ++ * Licensed under the GNU/GPL. See COPYING for details. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm4708.dtsi" ++#include "bcm5301x-nand-cs0-bch8.dtsi" ++ ++/ { ++ compatible = "netgear,r7900", "brcm,bcm4709", "brcm,bcm4708"; ++ model = "Netgear R7900"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ ++ memory { ++ reg = <0x00000000 0x08000000>; ++ }; ++ ++ axi@18000000 { ++ usb3@23000 { ++ reg = <0x00023000 0x1000>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; 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 be58470edc..98a670c463 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 @@ -13,8 +13,8 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com> --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ - bcm4709-netgear-r7000.dtb \ +@@ -79,6 +79,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm4709-netgear-r7900.dtb \ bcm4709-netgear-r8000.dtb \ bcm47094-dlink-dir-885l.dtb \ + bcm47094-netgear-r8500.dtb \ diff --git a/target/linux/bcm53xx/patches-4.4/331-ARM-BCM5301X-Specify-RAM-on-devices-by-including-HIG.patch b/target/linux/bcm53xx/patches-4.4/331-ARM-BCM5301X-Specify-RAM-on-devices-by-including-HIG.patch index fef817f766..b388318470 100644 --- a/target/linux/bcm53xx/patches-4.4/331-ARM-BCM5301X-Specify-RAM-on-devices-by-including-HIG.patch +++ b/target/linux/bcm53xx/patches-4.4/331-ARM-BCM5301X-Specify-RAM-on-devices-by-including-HIG.patch @@ -195,3 +195,15 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com> }; leds { +--- a/arch/arm/boot/dts/bcm4709-netgear-r7900.dts ++++ b/arch/arm/boot/dts/bcm4709-netgear-r7900.dts +@@ -21,7 +21,8 @@ + }; + + memory { +- reg = <0x00000000 0x08000000>; ++ reg = <0x00000000 0x08000000 ++ 0x88000000 0x08000000>; + }; + + axi@18000000 { diff --git a/target/linux/bcm53xx/patches-4.4/710-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch b/target/linux/bcm53xx/patches-4.4/710-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch index 6e8681c5c0..68fa647209 100644 --- a/target/linux/bcm53xx/patches-4.4/710-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch +++ b/target/linux/bcm53xx/patches-4.4/710-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch @@ -21,12 +21,14 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com> #include "b53_regs.h" #include "b53_priv.h" -@@ -1370,6 +1371,20 @@ static int b53_switch_init(struct b53_de +@@ -1370,6 +1371,23 @@ static int b53_switch_init(struct b53_de sw_dev->cpu_port = 5; } + if (of_machine_is_compatible("asus,rt-ac87u")) + sw_dev->cpu_port = 7; ++ else if (of_machine_is_compatible("netgear,r7900")) ++ sw_dev->cpu_port = 8; + else if (of_machine_is_compatible("netgear,r8000")) + sw_dev->cpu_port = 8; + else if (of_machine_is_compatible("netgear,r8500")) @@ -36,7 +38,8 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com> + * Workaround for devices using port 8 (connected to the 3rd iface). + * For some reason it doesn't work (no packets on eth2). + */ -+ if (of_machine_is_compatible("netgear,r8000")) ++ if (of_machine_is_compatible("netgear,r7900") || ++ of_machine_is_compatible("netgear,r8000")) + sw_dev->cpu_port = 5; + /* cpu port is always last */ |