Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 7fa1514..78ef0a2 100755
- --- a/target/linux/bcm63xx/base-files/etc/board.d/02_network
- +++ b/target/linux/bcm63xx/base-files/etc/board.d/02_network
- @@ -35,6 +35,7 @@ huawei,echolife-hg655b|\
- nucom,r5010un-v2|\
- sagem,fast-2504n|\
- sagem,fast-2704-v2|\
- +zyxel,p870hnu-51b|\
- zyxel,p870hw-51a-v2)
- ucidef_add_switch "switch0" \
- "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0"
- diff --git a/target/linux/bcm63xx/base-files/etc/diag.sh b/target/linux/bcm63xx/base-files/etc/diag.sh
- index 4b6d8d6..89c05ba 100644
- --- a/target/linux/bcm63xx/base-files/etc/diag.sh
- +++ b/target/linux/bcm63xx/base-files/etc/diag.sh
- @@ -141,6 +141,9 @@ set_state() {
- telsey,cpva642)
- status_led="CPVA642:green:power:"
- ;;
- + zyxel,p870hnu-51b)
- + status_led="P870HNU-51b:green:power"
- + ;;
- zyxel,p870hw-51a-v2)
- status_led="P870HW-51a:green:power"
- ;;
- diff --git a/target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc b/target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc
- index c33e56f..b310ad9 100644
- --- a/target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc
- +++ b/target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc
- @@ -37,6 +37,7 @@ case "$(board_name)" in
- telsey,cpva502plus|\
- telsey,cpva642|\
- telsey,magic|\
- + zyxel,p870hnu-51b|\
- zyxel,p870hw-51a-v2)
- do_fixcrc
- ;;
- diff --git a/target/linux/bcm63xx/dts/bcm6368-zyxel-p870hnu-51b.dts b/target/linux/bcm63xx/dts/bcm6368-zyxel-p870hnu-51b.dts
- new file mode 100644
- index 0000000..de1e1c2
- --- /dev/null
- +++ b/target/linux/bcm63xx/dts/bcm6368-zyxel-p870hnu-51b.dts
- @@ -0,0 +1,99 @@
- +/dts-v1/;
- +
- +#include "bcm6368.dtsi"
- +
- +#include <dt-bindings/input/input.h>
- +
- +/ {
- + model = "Zyxel P870HNU-51b";
- + compatible = "zyxel,p870hnu-51b", "brcm,bcm6368";
- +
- + chosen {
- + bootargs = "rootfstype=squashfs,jffs2 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 34 1>;
- + linux,code = <KEY_RESTART>;
- + debounce-interval = <60>;
- + };
- +
- + wps {
- + label = "wlan";
- + gpios = <&pinctrl 35 1>;
- + linux,code = <KEY_WLAN>;
- + debounce-interval = <60>;
- + };
- + };
- +
- + leds {
- + compatible = "gpio-leds";
- +
- + power_green {
- + label = "P870HNU-51b:green:power";
- + gpios = <&pinctrl 2 1>;
- + default-state = "on";
- + };
- + dsl_green {
- + label = "P870HNU-51b:green:dsl";
- + gpios = <&pinctrl 23 1>;
- + };
- + inet_green {
- + label = "P870HNU-51b:green:inet";
- + gpios = <&pinctrl 5 1>;
- + };
- + wps_orange {
- + label = "P870HNU-51b:orange:wps";
- + gpios = <&pinctrl 24 1>;
- + };
- + inet_red {
- + label = "P870HNU-51b:red:inet";
- + gpios = <&pinctrl 33 0>;
- + };
- + };
- +};
- +
- +&pflash {
- + status = "ok";
- +
- + partitions {
- + compatible = "fixed-partitions";
- + #address-cells = <1>;
- + #size-cells = <1>;
- +
- + cfe@0 {
- + label = "CFE";
- + reg = <0x000000 0x020000>;
- + read-only;
- + };
- +
- + linux@20000 {
- + label = "linux";
- + reg = <0x020000 0xfe0000>;
- + compatible = "brcm,bcm963xx-imagetag";
- + };
- +
- + nvram@fe0000 {
- + label = "nvram";
- + reg = <0xfe0000 0x10000>;
- + };
- + };
- +};
- +
- +&pinctrl {
- + pinctrl-names = "default";
- + pinctrl-0 = <&pinctrl_pci &pinctrl_ephy0_led &pinctrl_ephy1_led
- + &pinctrl_ephy2_led &pinctrl_ephy3_led>;
- +};
- +
- +&uart0 {
- + status = "ok";
- +};
- diff --git a/target/linux/bcm63xx/image/bcm63xx.mk b/target/linux/bcm63xx/image/bcm63xx.mk
- index 64ddb63..d89bfe4 100644
- --- a/target/linux/bcm63xx/image/bcm63xx.mk
- +++ b/target/linux/bcm63xx/image/bcm63xx.mk
- @@ -1147,6 +1147,20 @@ endef
- TARGET_DEVICES += usrobotics_usr9108
- ### ZyXEL ###
- +define Device/zyxel_p870hnu-51b
- + $(Device/bcm63xx)
- + DEVICE_VENDOR := ZyXEL
- + DEVICE_MODEL := P870HNU-51B
- + IMAGES := factory.bin
- + IMAGE/factory.bin := cfe-bin | zyxel-bin
- + CFE_BOARD_ID := 96368MVWG
- + CFE_CHIP_ID := 6368
- + CFE_EXTRAS += --rsa-signature "ZyXEL" --signature "ZyXEL_4004" --pad 8
- + IMAGE_OFFSET := 0x20000
- + DEVICE_PACKAGES := $(B43_PACKAGES)
- +endef
- +TARGET_DEVICES += zyxel_p870hnu-51b
- +
- define Device/zyxel_p870hw-51a-v2
- $(Device/bcm63xx)
- DEVICE_VENDOR := ZyXEL
- diff --git a/target/linux/bcm63xx/patches-5.4/599-board_P870HNU.patch b/target/linux/bcm63xx/patches-5.4/599-board_P870HNU.patch
- new file mode 100644
- index 0000000..2221d59
- --- /dev/null
- +++ b/target/linux/bcm63xx/patches-5.4/599-board_P870HNU.patch
- @@ -0,0 +1,69 @@
- +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
- ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
- +@@ -2152,6 +2152,50 @@
- + { .offset = 115, .value = 0xfad9 },
- + };
- +
- ++static struct board_info __initdata board_P870HNU51B = {
- ++ .name = "P870HNU-51b",
- ++ .expected_cpu_id = 0x6368,
- ++
- ++ .has_pci = 1,
- ++ .use_fallback_sprom = 1,
- ++ .has_ohci0 = 1,
- ++ .has_ehci0 = 1,
- ++
- ++ .num_usbh_ports = 1,
- ++
- ++ .has_enetsw = 1,
- ++ .enetsw = {
- ++ .used_ports = {
- ++ [0] = {
- ++ .used = 1,
- ++ .phy_id = 1,
- ++ .name = "port1",
- ++ },
- ++ [1] = {
- ++ .used = 1,
- ++ .phy_id = 2,
- ++ .name = "port2",
- ++ },
- ++ [2] = {
- ++ .used = 1,
- ++ .phy_id = 3,
- ++ .name = "port3",
- ++ },
- ++ [3] = {
- ++ .used = 1,
- ++ .phy_id = 4,
- ++ .name = "port4",
- ++ },
- ++ },
- ++ },
- ++
- ++ .fallback_sprom = {
- ++ .type = SPROM_BCM43222,
- ++ .pci_bus = 0,
- ++ .pci_dev = 1,
- ++ },
- ++};
- ++
- + static struct board_info __initdata board_P870HW51A_V2 = {
- + .name = "P870HW-51a_v2",
- + .expected_cpu_id = 0x6368,
- +@@ -2793,6 +2793,7 @@ static const struct board_info __initcon
- + &board_EVG2000,
- + &board_HG622,
- + &board_HG655b,
- ++ &board_P870HNU51B,
- + &board_P870HW51A_V2,
- + &board_R1000H,
- + &board_VH4032N,
- +@@ -2912,6 +2912,7 @@ static struct of_device_id const bcm963x
- + { .compatible = "netgear,dgnd3700-v1", .data = &board_DGND3700v1_3800B, },
- + { .compatible = "netgear,evg2000", .data = &board_EVG2000, },
- + { .compatible = "observa,vh4032n", .data = &board_VH4032N, },
- ++ { .compatible = "zyxel,p870hnu-51b", .data = &board_P870HNU51B, },
- + { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, },
- +#endif
- +#ifdef CONFIG_BCM63XX_CPU_63268
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement