Author: jogo
Date: 2016-01-18 11:47:23 +0100 (Mon, 18 Jan 2016)
New Revision: 48305

Added:
   trunk/target/linux/brcm63xx/dts/hg622.dts
   trunk/target/linux/brcm63xx/patches-4.1/574-board_HG622.patch
   trunk/target/linux/brcm63xx/patches-4.4/574-board_HG622.patch
Modified:
   trunk/target/linux/brcm63xx/base-files/etc/board.d/01_leds
   trunk/target/linux/brcm63xx/base-files/etc/board.d/02_network
   
trunk/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
   trunk/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
   trunk/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
   
trunk/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx
   trunk/target/linux/brcm63xx/image/Makefile
   trunk/target/linux/brcm63xx/profiles/huawei.mk
Log:
brcm63xx: add support for Huawei HG622

Signed-off-by: ?\195?\129lvaro Fern?\195?\161ndez Rojas <[email protected]>
Signed-off-by: Jonas Gorski <[email protected]>

Modified: trunk/target/linux/brcm63xx/base-files/etc/board.d/01_leds
===================================================================
--- trunk/target/linux/brcm63xx/base-files/etc/board.d/01_leds  2016-01-18 
10:46:58 UTC (rev 48304)
+++ trunk/target/linux/brcm63xx/base-files/etc/board.d/01_leds  2016-01-18 
10:47:23 UTC (rev 48305)
@@ -39,6 +39,9 @@
        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"
        ;;

Modified: trunk/target/linux/brcm63xx/base-files/etc/board.d/02_network
===================================================================
--- trunk/target/linux/brcm63xx/base-files/etc/board.d/02_network       
2016-01-18 10:46:58 UTC (rev 48304)
+++ trunk/target/linux/brcm63xx/base-files/etc/board.d/02_network       
2016-01-18 10:47:23 UTC (rev 48305)
@@ -86,6 +86,7 @@
 dsl-275xb-d |\
 fast2504n |\
 fast2704v2 |\
+hg622 |\
 hg655b |\
 p870hw-51a_v2 |\
 r5010un_v2 |\

Modified: 
trunk/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
===================================================================
--- 
trunk/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom  
    2016-01-18 10:46:58 UTC (rev 48304)
+++ 
trunk/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom  
    2016-01-18 10:47:23 UTC (rev 48305)
@@ -34,6 +34,7 @@
        hg556a_c)
                rt2x00_eeprom_extract "cal_data" 130560 512
                ;;
+       hg622 |\
        hg655b)
                rt2x00_eeprom_extract "cal_data" 0 512
                ;;

Modified: trunk/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
===================================================================
--- trunk/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc  
2016-01-18 10:46:58 UTC (rev 48304)
+++ trunk/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc  
2016-01-18 10:47:23 UTC (rev 48305)
@@ -21,6 +21,7 @@
        cpva642 |\
        ct-6373 |\
        dsl-274xb-f |\
+       hg622 |\
        magic |\
        p870hw-51a_v2 |\
        r5010un_v2 |\

Modified: trunk/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
===================================================================
--- trunk/target/linux/brcm63xx/base-files/lib/brcm63xx.sh      2016-01-18 
10:46:58 UTC (rev 48304)
+++ trunk/target/linux/brcm63xx/base-files/lib/brcm63xx.sh      2016-01-18 
10:47:23 UTC (rev 48305)
@@ -159,6 +159,9 @@
        "Huawei EchoLife HG556a (version C)")
                board_name="hg556a_c"
                ;;
+       "Huawei HG622")
+               board_name="hg622"
+               ;;
        "Huawei HG655b")
                board_name="hg655b"
                ;;

Modified: 
trunk/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx
===================================================================
--- 
trunk/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx  
    2016-01-18 10:46:58 UTC (rev 48304)
+++ 
trunk/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx  
    2016-01-18 10:47:23 UTC (rev 48305)
@@ -23,6 +23,7 @@
        hg553 |\
        hg556a_* |\
        hg520 |\
+       hg622 |\
        neufbox6 |\
        p870hw-51a_v2 |\
        rta770bw |\

Copied: trunk/target/linux/brcm63xx/dts/hg622.dts (from rev 48304, 
trunk/target/linux/brcm63xx/dts/p870hw-51a-v2.dts)
===================================================================
--- trunk/target/linux/brcm63xx/dts/hg622.dts                           (rev 0)
+++ trunk/target/linux/brcm63xx/dts/hg622.dts   2016-01-18 10:47:23 UTC (rev 
48305)
@@ -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>;
+       };
+};

Modified: trunk/target/linux/brcm63xx/image/Makefile
===================================================================
--- trunk/target/linux/brcm63xx/image/Makefile  2016-01-18 10:46:58 UTC (rev 
48304)
+++ trunk/target/linux/brcm63xx/image/Makefile  2016-01-18 10:47:23 UTC (rev 
48305)
@@ -575,6 +575,8 @@
 $(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

Copied: trunk/target/linux/brcm63xx/patches-4.1/574-board_HG622.patch (from rev 
48304, trunk/target/linux/brcm63xx/patches-4.4/570-board_HG655b.patch)
===================================================================
--- trunk/target/linux/brcm63xx/patches-4.1/574-board_HG622.patch               
                (rev 0)
+++ trunk/target/linux/brcm63xx/patches-4.1/574-board_HG622.patch       
2016-01-18 10:47:23 UTC (rev 48305)
@@ -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, },

Copied: trunk/target/linux/brcm63xx/patches-4.4/574-board_HG622.patch (from rev 
48304, trunk/target/linux/brcm63xx/patches-4.4/570-board_HG655b.patch)
===================================================================
--- trunk/target/linux/brcm63xx/patches-4.4/574-board_HG622.patch               
                (rev 0)
+++ trunk/target/linux/brcm63xx/patches-4.4/574-board_HG622.patch       
2016-01-18 10:47:23 UTC (rev 48305)
@@ -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, },

Modified: trunk/target/linux/brcm63xx/profiles/huawei.mk
===================================================================
--- trunk/target/linux/brcm63xx/profiles/huawei.mk      2016-01-18 10:46:58 UTC 
(rev 48304)
+++ trunk/target/linux/brcm63xx/profiles/huawei.mk      2016-01-18 10:47:23 UTC 
(rev 48305)
@@ -44,6 +44,16 @@
 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 \
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to