bcm63xx: Add support for the T-Home Speedport W 303V
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 11 May 2011 13:34:14 +0000 (13:34 +0000)
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 11 May 2011 13:34:14 +0000 (13:34 +0000)
Add the required board definition, default config and image generation for
the T-Home Speedport W 303V Typ B.

Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26878 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/brcm63xx/base-files/etc/defconfig/96358-502V/network [new file with mode: 0644]
target/linux/brcm63xx/base-files/lib/brcm63xx.sh
target/linux/brcm63xx/image/Makefile
target/linux/brcm63xx/patches-2.6.37/453-board_spw303v.patch [new file with mode: 0644]

diff --git a/target/linux/brcm63xx/base-files/etc/defconfig/96358-502V/network b/target/linux/brcm63xx/base-files/etc/defconfig/96358-502V/network
new file mode 100644 (file)
index 0000000..a35fd2e
--- /dev/null
@@ -0,0 +1,14 @@
+# Copyright (C) 2006 OpenWrt.org
+
+config interface loopback
+       option ifname   lo
+       option proto    static
+       option ipaddr   127.0.0.1
+       option netmask  255.0.0.0
+
+config interface lan
+       option ifname   eth0
+       option type     bridge
+       option proto    static
+       option ipaddr   192.168.1.1
+       option netmask  255.255.255.0
index b18386e..2c62928 100755 (executable)
@@ -49,6 +49,11 @@ brcm63xx_detect() {
                brcm63xx_has_reset_button="true"
                ifname=eth0
                ;;
+       "bcm63xx/96358-502V "*)
+               status_led="spw303v:green:power+adsl"
+               brcm63xx_has_reset_button="true"
+               ifname=eth0
+               ;;
        "bcm63xx/CPVA642 "* )
                status_led="power:green"
                brcm63xx_has_reset_button="true"
index 144f555..bf292de 100644 (file)
@@ -87,6 +87,21 @@ define Image/Build/RedBoot
        dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/openwrt-$(1)-vmlinux.gz bs=65536 conv=sync
 endef
 
+define Image/Build/SPW303V
+       # Generate the tagged image
+       $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
+               --output $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp \
+               --boardid $(2) --chipid $(3) --entry $(KERNEL_ENTRY) \
+               --load-addr $(LOADADDR) --rsa-signature "$(5)" \
+               $(6) $(7) $(8) $(9)
+       # Fix up header
+       $(STAGING_DIR_HOST)/bin/spw303v -i $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp \
+               -o $(BIN_DIR)/openwrt-$(4)-$(1)-cfe-sysupgrade.bin
+       $(STAGING_DIR_HOST)/bin/xorimage -i $(BIN_DIR)/openwrt-$(4)-$(1)-cfe-sysupgrade.bin \
+               -o $(BIN_DIR)/openwrt-$(4)-$(1)-cfe-factory.bin
+       rm -f $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp
+endef
+
 define Image/Build/CFEOLD
        $(TOPDIR)/scripts/brcmImage.pl -t -p    \
                -b $(2) -c $(3)                 \
@@ -209,6 +224,9 @@ define Image/Build
 
        #HW553
        $(call Image/Build/CFEHW553,$(1),HW553,6358,0x20000,HW553)
+
+       # T-Com Speedport W 303V Typ B
+       $(call Image/Build/SPW303V,$(1),96358-502V,6358,SPW303V)
 endef
 
 $(eval $(call BuildImage))
diff --git a/target/linux/brcm63xx/patches-2.6.37/453-board_spw303v.patch b/target/linux/brcm63xx/patches-2.6.37/453-board_spw303v.patch
new file mode 100644 (file)
index 0000000..8e97fcf
--- /dev/null
@@ -0,0 +1,83 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -1728,6 +1728,72 @@ static struct board_info __initdata boar
+       .spis = nb4_spi_devices,
+       .num_spis = ARRAY_SIZE(nb4_spi_devices),
+ };
++
++ /* T-Home Speedport W 303V Typ B */
++static struct board_info __initdata board_spw303v = {
++      .name                   = "96358-502V",
++      .expected_cpu_id        = 0x6358,
++
++      .has_uart0              = 1,
++      .has_enet0              = 1,
++      .has_pci                = 1,
++
++      .enet0 = {
++              .has_phy                = 1,
++              .use_internal_phy       = 1,
++      },
++
++      .leds = {
++              {
++                      .name           = "spw303v:green:power+adsl",
++                      .gpio           = 22,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "spw303v:red:power+adsl",
++                      .gpio           = 2,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "spw303v:green:ppp",
++                      .gpio           = 5,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "spw303v:green:ses",
++                      .gpio           = 0,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "spw303v:green:voip",
++                      .gpio           = 27,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "spw303v:green:pots",
++                      .gpio           = 31,
++                      .active_low     = 1,
++              },
++      },
++
++      .buttons = {
++              {
++                      .desc           = "reset",
++                      .gpio           = 11,
++                      .type           = EV_KEY,
++                      .code           = KEY_RESTART,
++                      .threshold      = 3,
++              },
++              {
++                      .desc           = "ses",
++                      .gpio           = 37,
++                      .active_low     = 1,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
++      }
++};
+ #endif
+ static struct board_info __initdata board_HW553 = {
+@@ -1845,6 +1911,7 @@ static const struct board_info __initdat
+       &board_nb4_fxc_r1,
+       &board_nb4_fxc_r2,
+       &board_HW553,
++      &board_spw303v,
+ #endif
+ };
This page took 0.037519 seconds and 4 git commands to generate.