aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2020-05-19 08:55:06 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2020-05-19 10:41:42 +0200
commit62e7342ddfba605722b1d6700eec3f0aaa9377e5 (patch)
treefaccab6d48c4f5cb887282944f02bfd6ea47cc70 /target/linux
parent258cb7f1695d7c512069f48571c95c3de8053639 (diff)
downloadupstream-62e7342ddfba605722b1d6700eec3f0aaa9377e5.tar.gz
upstream-62e7342ddfba605722b1d6700eec3f0aaa9377e5.tar.bz2
upstream-62e7342ddfba605722b1d6700eec3f0aaa9377e5.zip
bcm63xx: add NETGEAR DGND3700v2 support
BCM6362 with 64M RAM, 32M NAND and BCM53125 switch. Switch is connected by MMAP, which is currently unsupported (no VLANs). More info: https://openwrt.org/toh/netgear/dgnd3700v2 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux')
-rwxr-xr-xtarget/linux/bcm63xx/base-files/etc/board.d/01_leds5
-rwxr-xr-xtarget/linux/bcm63xx/base-files/etc/board.d/02_network1
-rw-r--r--target/linux/bcm63xx/base-files/lib/upgrade/platform.sh6
-rw-r--r--target/linux/bcm63xx/dts/bcm6362-netgear-dgnd3700-v2.dts216
-rw-r--r--target/linux/bcm63xx/image/bcm63xx_nand.mk17
-rw-r--r--target/linux/bcm63xx/patches-5.4/600-board-DGND3700v2.patch50
6 files changed, 293 insertions, 2 deletions
diff --git a/target/linux/bcm63xx/base-files/etc/board.d/01_leds b/target/linux/bcm63xx/base-files/etc/board.d/01_leds
index 3f73d914f9..cdbfa6319b 100755
--- a/target/linux/bcm63xx/base-files/etc/board.d/01_leds
+++ b/target/linux/bcm63xx/base-files/etc/board.d/01_leds
@@ -63,6 +63,11 @@ netgear,dgnd3700-v1)
ucidef_set_led_usbdev "usb1" "USB1" "DGND3700v1_3800B:green:usb-back" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "DGND3700v1_3800B:green:usb-front" "1-2"
;;
+netgear,dgnd3700-v2)
+ ucidef_set_led_netdev "lan" "LAN" "dgnd3700-v2:green:ethernet" "eth0"
+ ucidef_set_led_usbdev "usb1" "USB1" "dgnd3700-v2:green:usb1" "1-1"
+ ucidef_set_led_usbdev "usb2" "USB2" "dgnd3700-v2:green:usb2" "1-2"
+ ;;
netgear,evg2000)
ucidef_set_led_netdev "lan" "LAN" "EVG2000:green:lan" "eth0"
ucidef_set_led_netdev "wan" "WAN" "EVG2000:green:wan" "eth1"
diff --git a/target/linux/bcm63xx/base-files/etc/board.d/02_network b/target/linux/bcm63xx/base-files/etc/board.d/02_network
index 7203b1c3fc..928aff0498 100755
--- a/target/linux/bcm63xx/base-files/etc/board.d/02_network
+++ b/target/linux/bcm63xx/base-files/etc/board.d/02_network
@@ -12,6 +12,7 @@ actiontec,r1000h|\
dynalink,rta770bw|\
dynalink,rta770w|\
netgear,cvg834g|\
+netgear,dgnd3700-v2|\
netgear,evg2000|\
t-com,speedport-w-303v|\
t-com,speedport-w-500v)
diff --git a/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
index 0debff28bb..202f55535a 100644
--- a/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
@@ -5,7 +5,8 @@ platform_check_image() {
[ "$#" -gt 1 ] && return 1
case "$(board_name)" in
- comtrend,vr-3032u)
+ comtrend,vr-3032u|\
+ netgear,dgnd3700-v2)
# NAND sysupgrade
return 0
;;
@@ -61,7 +62,8 @@ cfe_jffs2_upgrade_tar() {
platform_do_upgrade() {
case "$(board_name)" in
- comtrend,vr-3032u)
+ comtrend,vr-3032u|\
+ netgear,dgnd3700-v2)
REQUIRE_IMAGE_METADATA=1
cfe_jffs2_upgrade_tar "$1"
;;
diff --git a/target/linux/bcm63xx/dts/bcm6362-netgear-dgnd3700-v2.dts b/target/linux/bcm63xx/dts/bcm6362-netgear-dgnd3700-v2.dts
new file mode 100644
index 0000000000..07e5c1eff8
--- /dev/null
+++ b/target/linux/bcm63xx/dts/bcm6362-netgear-dgnd3700-v2.dts
@@ -0,0 +1,216 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/dts-v1/;
+
+#include "bcm6362.dtsi"
+
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "Netgear DGND3700v2";
+ compatible = "netgear,dgnd3700-v2", "brcm,bcm6362";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ chosen {
+ bootargs = "rootfstype=squashfs,ubifs noinitrd console=ttyS0,115200";
+ stdout-path = "serial0:115200n8";
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&pinctrl 24 1>;
+ linux,code = <KEY_RESTART>;
+ debounce-interval = <60>;
+ };
+
+ wlan {
+ label = "wlan";
+ gpios = <&pinctrl 25 1>;
+ linux,code = <KEY_WLAN>;
+ debounce-interval = <60>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&pinctrl 26 1>;
+ linux,code = <KEY_WPS_BUTTON>;
+ debounce-interval = <60>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led@28 {
+ label = "dgnd3700-v2:green:dsl";
+ gpios = <&pinctrl 28 1>;
+ };
+
+ led@34 {
+ label = "dgnd3700-v2:red:power";
+ gpios = <&pinctrl 34 1>;
+ };
+ };
+};
+
+&leds {
+ status = "okay";
+ brcm,serial-leds;
+ brcm,serial-dat-low;
+ brcm,serial-shift-inv;
+ brcm,serial-mux;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_leds &pinctrl_serial_led>;
+
+ led@1 {
+ reg = <1>;
+ active-low;
+ label = "dgnd3700-v2:green:internet";
+ };
+
+ led_power_green: led@8 {
+ reg = <8>;
+ label = "dgnd3700-v2:green:power";
+ default-state = "on";
+ };
+
+ led@9 {
+ reg = <9>;
+ active-low;
+ label = "dgnd3700-v2:green:wps";
+ };
+
+ led@10 {
+ reg = <10>;
+ active-low;
+ label = "dgnd3700-v2:green:usb1";
+ };
+
+ led@11 {
+ reg = <11>;
+ active-low;
+ label = "dgnd3700-v2:green:usb2";
+ };
+
+ led@12 {
+ reg = <12>;
+ active-low;
+ label = "dgnd3700-v2:amber:internet";
+ };
+
+ led@13 {
+ reg = <13>;
+ active-low;
+ label = "dgnd3700-v2:green:ethernet";
+ };
+
+ led@14 {
+ reg = <14>;
+ active-low;
+ label = "dgnd3700-v2:amber:dsl";
+ };
+
+ led@16 {
+ reg = <16>;
+ active-low;
+ label = "dgnd3700-v2:amber:usb1";
+ };
+
+ led@17 {
+ reg = <17>;
+ active-low;
+ label = "dgnd3700-v2:amber:usb2";
+ };
+
+ led@18 {
+ reg = <18>;
+ active-low;
+ label = "dgnd3700-v2:amber:ethernet";
+ };
+};
+
+&nflash {
+ status = "ok";
+
+ nandcs@0 {
+ compatible = "brcm,nandcs";
+ #size-cells = <1>;
+ #address-cells = <1>;
+ reg = <0>;
+ nand-ecc-step-size = <512>;
+ nand-ecc-strength = <15>;
+ nand-on-flash-bbt;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "cferom";
+ reg = <0x0000000 0x0004000>;
+ read-only;
+ };
+
+ partition@4000 {
+ compatible = "brcm,wfi";
+ label = "wfi";
+ reg = <0x0004000 0x1c7c000>;
+ };
+
+ partition@1c80000 {
+ label = "flag";
+ reg = <0x1c80000 0x0040000>;
+ read-only;
+ };
+
+ partition@1cc0000 {
+ label = "pcbasn";
+ reg = <0x1cc0000 0x0040000>;
+ read-only;
+ };
+
+ partition@1d00000 {
+ label = "xxx";
+ reg = <0x1d00000 0x0080000>;
+ read-only;
+ };
+
+ partition@1d80000 {
+ label = "language_dev";
+ reg = <0x1d80000 0x0040000>;
+ read-only;
+ };
+
+ partition@1dc0000 {
+ label = "scnvram";
+ reg = <0x1dc0000 0x0100000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pinctrl {
+ pinctrl_leds: leds {
+ function = "led";
+ pins = "gpio1";
+ };
+};
+
+&uart0 {
+ status = "ok";
+};
diff --git a/target/linux/bcm63xx/image/bcm63xx_nand.mk b/target/linux/bcm63xx/image/bcm63xx_nand.mk
index 5be27a3f75..c0505aceaa 100644
--- a/target/linux/bcm63xx/image/bcm63xx_nand.mk
+++ b/target/linux/bcm63xx/image/bcm63xx_nand.mk
@@ -51,3 +51,20 @@ define Device/comtrend_vr-3032u
CFE_WFI_FLASH_TYPE := 3
endef
TARGET_DEVICES += comtrend_vr-3032u
+
+### Netgear ###
+define Device/netgear_dgnd3700-v2
+ $(Device/bcm63xx-nand)
+ DEVICE_VENDOR := NETGEAR
+ DEVICE_MODEL := DGND3700
+ DEVICE_VARIANT := v2
+ CFE_CHIP_ID := 6362
+ CFE_RAM_FILE := netgear,dgnd3700-v2/cferam
+ CFE_RAM_JFFS2_NAME := cferam
+ CFE_RAM_JFFS2_PAD := 496k
+ BLOCKSIZE := 16k
+ PAGESIZE := 512
+ DEVICE_PACKAGES += $(B43_PACKAGES) $(USB2_PACKAGES)
+ CFE_WFI_FLASH_TYPE := 2
+endef
+TARGET_DEVICES += netgear_dgnd3700-v2
diff --git a/target/linux/bcm63xx/patches-5.4/600-board-DGND3700v2.patch b/target/linux/bcm63xx/patches-5.4/600-board-DGND3700v2.patch
new file mode 100644
index 0000000000..139d2104c5
--- /dev/null
+++ b/target/linux/bcm63xx/patches-5.4/600-board-DGND3700v2.patch
@@ -0,0 +1,50 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -1820,6 +1820,31 @@ static struct board_info __initdata boar
+ },
+ };
+
++static struct board_info __initdata board_dgnd3700v2 = {
++ .name = "96362ADVN2xh",
++ .expected_cpu_id = 0x6362,
++
++ .has_pci = 1,
++
++ .has_ohci0 = 1,
++ .has_ehci0 = 1,
++ .num_usbh_ports = 2,
++
++ .has_enetsw = 1,
++ .enetsw = {
++ .used_ports = {
++ [4] = {
++ .used = 1,
++ .phy_id = 0xff,
++ .bypass_link = 1,
++ .force_speed = 1000,
++ .force_duplex_full = 1,
++ .name = "RGMII",
++ },
++ },
++ },
++};
++
+ static struct board_info __initdata board_fast2504n = {
+ .name = "F@ST2504n",
+ .expected_cpu_id = 0x6362,
+@@ -2820,6 +2845,7 @@ static const struct board_info __initcon
+
+ #ifdef CONFIG_BCM63XX_CPU_6362
+ &board_nb6,
++ &board_dgnd3700v2,
+ &board_fast2504n,
+ #endif
+
+@@ -2934,6 +2960,7 @@ static struct of_device_id const bcm963x
+ { .compatible = "bt,home-hub-2-a", .data = &board_homehub2a, },
+ #endif
+ #ifdef CONFIG_BCM63XX_CPU_6362
++ { .compatible = "netgear,dgnd3700-v2", .data = &board_dgnd3700v2, },
+ { .compatible = "sagem,fast-2504n", .data = &board_fast2504n, },
+ { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, },
+ #endif