mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 13:48:06 +00:00
brcm63xx: add support for Huawei HG622
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 48305
This commit is contained in:
parent
25ce154605
commit
a78bb9590f
@ -39,6 +39,9 @@ hg556a_*)
|
||||
ucidef_set_led_netdev "lan" "LAN" "HW556:red:dsl" "eth0"
|
||||
ucidef_set_led_usbdev "usb" "USB" "HW556:red:hspa" "1-2"
|
||||
;;
|
||||
hg622)
|
||||
ucidef_set_led_usbdev "usb" "USB" "HG622:green:usb" "1-2"
|
||||
;;
|
||||
hg655b)
|
||||
ucidef_set_led_usbdev "usb" "USB" "HW65x:green:usb" "1-2"
|
||||
;;
|
||||
|
@ -86,6 +86,7 @@ dsl-274xb-f |\
|
||||
dsl-275xb-d |\
|
||||
fast2504n |\
|
||||
fast2704v2 |\
|
||||
hg622 |\
|
||||
hg655b |\
|
||||
p870hw-51a_v2 |\
|
||||
r5010un_v2 |\
|
||||
|
@ -34,6 +34,7 @@ case "$FIRMWARE" in
|
||||
hg556a_c)
|
||||
rt2x00_eeprom_extract "cal_data" 130560 512
|
||||
;;
|
||||
hg622 |\
|
||||
hg655b)
|
||||
rt2x00_eeprom_extract "cal_data" 0 512
|
||||
;;
|
||||
|
@ -21,6 +21,7 @@ case "$(brcm63xx_board_name)" in
|
||||
cpva642 |\
|
||||
ct-6373 |\
|
||||
dsl-274xb-f |\
|
||||
hg622 |\
|
||||
magic |\
|
||||
p870hw-51a_v2 |\
|
||||
r5010un_v2 |\
|
||||
|
@ -159,6 +159,9 @@ brcm63xx_dt_detect() {
|
||||
"Huawei EchoLife HG556a (version C)")
|
||||
board_name="hg556a_c"
|
||||
;;
|
||||
"Huawei HG622")
|
||||
board_name="hg622"
|
||||
;;
|
||||
"Huawei HG655b")
|
||||
board_name="hg655b"
|
||||
;;
|
||||
|
@ -23,6 +23,7 @@ set_preinit_iface() {
|
||||
hg553 |\
|
||||
hg556a_* |\
|
||||
hg520 |\
|
||||
hg622 |\
|
||||
neufbox6 |\
|
||||
p870hw-51a_v2 |\
|
||||
rta770bw |\
|
||||
|
74
target/linux/brcm63xx/dts/hg622.dts
Normal file
74
target/linux/brcm63xx/dts/hg622.dts
Normal file
@ -0,0 +1,74 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "bcm6368.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Huawei HG622";
|
||||
compatible = "huawei,hg622", "brcm,bcm6368";
|
||||
|
||||
gpio-keys-polled {
|
||||
compatible = "gpio-keys-polled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
poll-interval = <20>;
|
||||
debounce-interval = <60>;
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio1 2 1>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
dsl_green {
|
||||
label = "HG622:green:dsl";
|
||||
gpios = <&gpio0 2 1>;
|
||||
};
|
||||
inet_green {
|
||||
label = "HG622:green:inet";
|
||||
gpios = <&gpio0 5 1>;
|
||||
};
|
||||
usb_green {
|
||||
label = "HG622:green:usb";
|
||||
gpios = <&gpio0 11 1>;
|
||||
};
|
||||
power_green {
|
||||
label = "HG622:green:power";
|
||||
gpios = <&gpio0 22 1>;
|
||||
default-state = "on";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pflash {
|
||||
status = "ok";
|
||||
|
||||
linux,part-probe = "bcm63xxpart";
|
||||
|
||||
cfe@0 {
|
||||
label = "CFE";
|
||||
reg = <0x000000 0x020000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
linux@20000 {
|
||||
label = "linux";
|
||||
reg = <0x020000 0xf80000>;
|
||||
};
|
||||
|
||||
cal_data@fa0000 {
|
||||
label = "cal_data";
|
||||
reg = <0xfa0000 0x020000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
nvram@fe0000 {
|
||||
label = "nvram";
|
||||
reg = <0xfe0000 0x020000>;
|
||||
};
|
||||
};
|
@ -575,6 +575,8 @@ $(eval $(call bcm63xxCfe,HG553,HG553,hg553,HW553,6358,--rsa-signature "EchoLife_
|
||||
$(eval $(call bcm63xxCfe,HG556a_AB,HG556a_A,hg556a-a,HW556,6358,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x10000 --tag-version 8))
|
||||
$(eval $(call bcm63xxCfe,HG556a_AB,HG556a_B,hg556a-b,HW556,6358,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x20000 --tag-version 8))
|
||||
$(eval $(call bcm63xxCfe,HG556a_C,HG556a_C,hg556a-c,HW556,6358,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x20000 --tag-version 8))
|
||||
# Huawei HG622
|
||||
$(eval $(call bcm63xxCfe,HG622,HG622,hg622,96368MVWG_hg622,6368,--image-offset 0x20000 --block-size 0x20000 --tag-version 7 --pad 8))
|
||||
# Huawei HG655b
|
||||
$(eval $(call bcm63xxCfe,HG655b,HG655b,hg655b,HW65x,6368,--image-offset 0x20000 --tag-version 7 --pad 4))
|
||||
# Inteno VG50
|
||||
|
72
target/linux/brcm63xx/patches-4.1/574-board_HG622.patch
Normal file
72
target/linux/brcm63xx/patches-4.1/574-board_HG622.patch
Normal file
@ -0,0 +1,72 @@
|
||||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
@@ -2057,6 +2057,53 @@ static struct board_info __initdata boar
|
||||
},
|
||||
};
|
||||
|
||||
+static struct board_info __initdata board_HG622 = {
|
||||
+ .name = "96368MVWG_hg622",
|
||||
+ .expected_cpu_id = 0x6368,
|
||||
+
|
||||
+ .has_uart0 = 1,
|
||||
+ .has_pci = 1,
|
||||
+ .has_ohci0 = 1,
|
||||
+ .has_ehci0 = 1,
|
||||
+ .num_usbh_ports = 2,
|
||||
+
|
||||
+ .has_caldata = 1,
|
||||
+ .caldata = {
|
||||
+ {
|
||||
+ .vendor = PCI_VENDOR_ID_RALINK,
|
||||
+ .caldata_offset = 0xfa0000,
|
||||
+ .slot = 1,
|
||||
+ .eeprom = "rt2x00.eeprom",
|
||||
+ },
|
||||
+ },
|
||||
+
|
||||
+ .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",
|
||||
+ },
|
||||
+ },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static struct sprom_fixup __initdata vr3025u_fixups[] = {
|
||||
{ .offset = 97, .value = 0xfeb3 },
|
||||
{ .offset = 98, .value = 0x1618 },
|
||||
@@ -2563,6 +2610,7 @@ static const struct board_info __initcon
|
||||
&board_96368mvwg,
|
||||
&board_96368mvngr,
|
||||
&board_DGND3700v1_3800B,
|
||||
+ &board_HG622,
|
||||
&board_HG655b,
|
||||
&board_P870HW51A_V2,
|
||||
&board_VR3025u,
|
||||
@@ -2671,6 +2719,7 @@ static struct of_device_id const bcm963x
|
||||
{ .compatible = "comtrend,vr-3025un", .data = &board_VR3025un, },
|
||||
{ .compatible = "comtrend,vr-3026e", .data = &board_VR3026e, },
|
||||
{ .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, },
|
||||
+ { .compatible = "huawei,hg622", .data = &board_HG622, },
|
||||
{ .compatible = "huawei,hg655b", .data = &board_HG655b, },
|
||||
{ .compatible = "netgear,dgnd3700v1", .data = &board_DGND3700v1_3800B, },
|
||||
{ .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, },
|
72
target/linux/brcm63xx/patches-4.4/574-board_HG622.patch
Normal file
72
target/linux/brcm63xx/patches-4.4/574-board_HG622.patch
Normal file
@ -0,0 +1,72 @@
|
||||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
@@ -2057,6 +2057,53 @@ static struct board_info __initdata boar
|
||||
},
|
||||
};
|
||||
|
||||
+static struct board_info __initdata board_HG622 = {
|
||||
+ .name = "96368MVWG_hg622",
|
||||
+ .expected_cpu_id = 0x6368,
|
||||
+
|
||||
+ .has_uart0 = 1,
|
||||
+ .has_pci = 1,
|
||||
+ .has_ohci0 = 1,
|
||||
+ .has_ehci0 = 1,
|
||||
+ .num_usbh_ports = 2,
|
||||
+
|
||||
+ .has_caldata = 1,
|
||||
+ .caldata = {
|
||||
+ {
|
||||
+ .vendor = PCI_VENDOR_ID_RALINK,
|
||||
+ .caldata_offset = 0xfa0000,
|
||||
+ .slot = 1,
|
||||
+ .eeprom = "rt2x00.eeprom",
|
||||
+ },
|
||||
+ },
|
||||
+
|
||||
+ .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",
|
||||
+ },
|
||||
+ },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static struct sprom_fixup __initdata vr3025u_fixups[] = {
|
||||
{ .offset = 97, .value = 0xfeb3 },
|
||||
{ .offset = 98, .value = 0x1618 },
|
||||
@@ -2563,6 +2610,7 @@ static const struct board_info __initcon
|
||||
&board_96368mvwg,
|
||||
&board_96368mvngr,
|
||||
&board_DGND3700v1_3800B,
|
||||
+ &board_HG622,
|
||||
&board_HG655b,
|
||||
&board_P870HW51A_V2,
|
||||
&board_VR3025u,
|
||||
@@ -2671,6 +2719,7 @@ static struct of_device_id const bcm963x
|
||||
{ .compatible = "comtrend,vr-3025un", .data = &board_VR3025un, },
|
||||
{ .compatible = "comtrend,vr-3026e", .data = &board_VR3026e, },
|
||||
{ .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, },
|
||||
+ { .compatible = "huawei,hg622", .data = &board_HG622, },
|
||||
{ .compatible = "huawei,hg655b", .data = &board_HG655b, },
|
||||
{ .compatible = "netgear,dgnd3700v1", .data = &board_DGND3700v1_3800B, },
|
||||
{ .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, },
|
@ -44,6 +44,16 @@ define Profile/HG556a_C/Description
|
||||
endef
|
||||
$(eval $(call Profile,HG556a_C))
|
||||
|
||||
define Profile/HG622
|
||||
NAME:=Huawei HG622
|
||||
PACKAGES:=kmod-rt2800-pci wpad-mini \
|
||||
kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev
|
||||
endef
|
||||
define Profile/HG622/Description
|
||||
Package set optimized for Huawei HG622.
|
||||
endef
|
||||
$(eval $(call Profile,HG622))
|
||||
|
||||
define Profile/HG655b
|
||||
NAME:=Huawei HG655b
|
||||
PACKAGES:=kmod-rt2800-pci wpad-mini \
|
||||
|
Loading…
Reference in New Issue
Block a user