bcm63xx: build images for 6328 reference boards with various flash sizes
authorJonas Gorski <jogo@openwrt.org>
Wed, 30 May 2012 10:27:46 +0000 (10:27 +0000)
committerJonas Gorski <jogo@openwrt.org>
Wed, 30 May 2012 10:27:46 +0000 (10:27 +0000)
Build images for 96328avng and 963281TAN (untested) for three different
flash sizes: 4MB, 8MB, and 16MB.

Known issues:
 * Button setup unknown, thus no fail-safe available.
 * All other BCM6328 and BCM63XX issues

SVN-Revision: 32004

12 files changed:
target/linux/brcm63xx/base-files/etc/uci-defaults/brcm63xx_fixcrc.sh
target/linux/brcm63xx/base-files/etc/uci-defaults/network
target/linux/brcm63xx/base-files/lib/brcm63xx.sh
target/linux/brcm63xx/image/Makefile
target/linux/brcm63xx/patches-3.3/522-MIPS-BCM63XX-add-96328avng-reference-board.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-3.3/522-board_dsl_274xb_rev_f.patch [deleted file]
target/linux/brcm63xx/patches-3.3/523-MIPS-BCM63XX-add-963281TAN-reference-board.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-3.3/524-board_dsl_274xb_rev_f.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-3.3/550-alice_gate2_leds.patch
target/linux/brcm63xx/patches-3.3/551-96348gw_a_leds.patch
target/linux/brcm63xx/patches-3.3/552-board_96348gw-10_reset_button.patch
target/linux/brcm63xx/patches-3.3/801-ssb_export_fallback_sprom.patch

index 45524aea4bb1af4950116cf7830203f2500ad508..fc743c784ebea901a297b618818ac35223a16111 100755 (executable)
@@ -13,6 +13,8 @@ do_fixcrc() {
 brcm63xx_detect
 
 case "$board_name" in
+       96328avng |\
+       963281TAN |\
        "CPVA502+" |\
        AW4339U |\
        CPVA642 |\
index 0adfa19c07157a511ff9ea6eb7ae817d802eb24b..193f76f49ce7dae5cfdeb29734e650aeb6b5ae4b 100755 (executable)
@@ -14,6 +14,8 @@ ucidef_set_interface_loopback
 
 case "$board_name" in
 
+96328avng |\
+963281TAN |\
 96348A-122 |\
 96358-502V |\
 AW4339U |\
index 6f36b50eea6be948f21b944a972c630f4c2ca74e..5fe0cdc06ebec00449fc923a6d180001eab557fd 100755 (executable)
@@ -18,6 +18,14 @@ brcm63xx_detect() {
        fi
 
        case "$board_name" in
+       96328avng)
+               status_led="96328avng::power"
+               ifname=eth0
+               ;;
+       963281TAN)
+               status_led="963281TAN::power"
+               ifname=eth0
+               ;;
        96348GW)
                status_led="power"
                brcm63xx_has_reset_button="true"
index 8eb15ca2b1c178abb62348a4a59795d23c6f0488..878545cdee19d536c2c1c9009199d9c06cc11b6a 100644 (file)
@@ -145,6 +145,12 @@ endef
 define Image/Build
        dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
        # Various routers
+       $(call Image/Build/CFE,$(1),96328avng,6328,96328avng-4M-flash-generic,,--pad 2)
+       $(call Image/Build/CFE,$(1),96328avng,6328,96328avng-8M-flash-generic,,--pad 4)
+       $(call Image/Build/CFE,$(1),96328avng,6328,96328avng-16M-flash-generic,,--pad 8)
+       $(call Image/Build/CFE,$(1),963281TAN,6328,963481TAN-4M-flash-generic,,--pad 2)
+       $(call Image/Build/CFE,$(1),963281TAN,6328,963481TAN-8M-flash-generic,,--pad 4)
+       $(call Image/Build/CFE,$(1),963281TAN,6328,963481TAN-16M-flash-generic,,--pad 8)
        $(call Image/Build/CFE,$(1),96345GW2,6345,96345GW2-generic)
        $(call Image/Build/CFE,$(1),96345GW2,6345,96348GW2-bc221,,--layoutver 5)
        $(call Image/Build/CFE,$(1),96345GW2,6345,92345GW2-rev,OpenWRT-$(REVISION))
@@ -157,7 +163,6 @@ define Image/Build
        $(call Image/Build/CFE,$(1),96348GW-10,6348,96348GW-10-generic)
        $(call Image/Build/CFE,$(1),96358VW,6358,96358VW-generic)
        $(call Image/Build/CFE,$(1),96358VW2,6358,96358VW2-generic)
-
        $(call Image/Build/CFE,$(1),96368MVNgr,6368,96368MVNgr-generic)
        $(call Image/Build/CFE,$(1),96368MVWG,6368,96368MVWG-generic)
 
diff --git a/target/linux/brcm63xx/patches-3.3/522-MIPS-BCM63XX-add-96328avng-reference-board.patch b/target/linux/brcm63xx/patches-3.3/522-MIPS-BCM63XX-add-96328avng-reference-board.patch
new file mode 100644 (file)
index 0000000..41ac445
--- /dev/null
@@ -0,0 +1,100 @@
+From c93c2bbf0cc96da5a47d77f01daf6c983cfe4216 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski@gmail.com>
+Date: Tue, 29 May 2012 10:52:25 +0200
+Subject: [PATCH] MIPS: BCM63XX: add 96328avng reference board
+
+---
+ arch/mips/bcm63xx/boards/board_bcm963xx.c |   75 +++++++++++++++++++++++++++++
+ 1 files changed, 75 insertions(+), 0 deletions(-)
+
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -54,6 +54,78 @@
+ static struct board_info board;
+ /*
++ * known 6328 boards
++ */
++#ifdef CONFIG_BCM63XX_CPU_6328
++static struct board_info __initdata board_96328avng = {
++      .name                           = "96328avng",
++      .expected_cpu_id                = 0x6328,
++
++      .has_uart0                      = 1,
++      .has_pci                        = 1,
++
++      .enetsw = {
++              .used_ports = {
++                      [0] = {
++                              .used   = 1,
++                              .phy_id = 1,
++                              .name   = "Port 1",
++                      },
++                      [1] = {
++                              .used   = 1,
++                              .phy_id = 2,
++                              .name   = "Port 2",
++                      },
++                      [2] = {
++                              .used   = 1,
++                              .phy_id = 3,
++                              .name   = "Port 3",
++                      },
++                      [3] = {
++                              .used   = 1,
++                              .phy_id = 4,
++                              .name   = "Port 4",
++                      },
++              },
++      },
++
++      .leds = {
++              {
++                      .name           = "96328avng::internet-fail",
++                      .gpio           = 2,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "96328avng::dsl",
++                      .gpio           = 3,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "96328avng::power",
++                      .gpio           = 4,
++                      .active_low     = 1,
++                      .default_trigger = "default-on",
++              },
++              {
++                      .name           = "96328avng::power-fail",
++                      .gpio           = 8,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "96328avng::wps",
++                      .gpio           = 9,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "96328avng::internet",
++                      .gpio           = 11,
++                      .active_low     = 1,
++              },
++      },
++};
++#endif
++
++/*
+  * known 6338 boards
+  */
+ #ifdef CONFIG_BCM63XX_CPU_6338
+@@ -2160,6 +2232,9 @@ static struct board_info __initdata boar
+  * all boards
+  */
+ static const struct board_info __initdata *bcm963xx_boards[] = {
++#ifdef CONFIG_BCM63XX_CPU_6328
++      &board_96328avng,
++#endif
+ #ifdef CONFIG_BCM63XX_CPU_6338
+       &board_96338gw,
+       &board_96338w,
diff --git a/target/linux/brcm63xx/patches-3.3/522-board_dsl_274xb_rev_f.patch b/target/linux/brcm63xx/patches-3.3/522-board_dsl_274xb_rev_f.patch
deleted file mode 100644 (file)
index 36b0706..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-From 653dd2c8ff9d777104de85fb7b872ebed7139ceb Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Mon, 30 Apr 2012 09:10:51 +0200
-Subject: [PATCH 70/79] MIPS: BCM63XX: Add board definition for D-Link
- DSL-274xB rev F1
-
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c |   80 +++++++++++++++++++++++++++++
- 1 file changed, 80 insertions(+)
-
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -54,6 +54,114 @@
- static struct board_info board;
- /*
-+ * known 6328 boards
-+ */
-+#ifdef CONFIG_BCM63XX_CPU_6328
-+static struct board_info __initdata board_dsl_274xb_f1 = {
-+      .name                           = "AW4339U",
-+      .expected_cpu_id                = 0x6328,
-+
-+      .has_uart0                      = 1,
-+      .has_pci                        = 1,
-+
-+      .has_caldata                    = 1,
-+      .caldata = {
-+              {
-+                      .caldata_offset = 0x7d1000,
-+                      .slot           = 0,
-+              },
-+      },
-+
-+      .has_enetsw                     = 1,
-+
-+      .enetsw = {
-+              .used_ports = {
-+                      [0] = {
-+                              .used   = 1,
-+                              .phy_id = 1,
-+                              .name   = "Port 4",
-+                      },
-+                      [1] = {
-+                              .used   = 1,
-+                              .phy_id = 2,
-+                              .name   = "Port 3",
-+                      },
-+                      [2] = {
-+                              .used   = 1,
-+                              .phy_id = 3,
-+                              .name   = "Port 2",
-+                      },
-+                      [3] = {
-+                              .used   = 1,
-+                              .phy_id = 4,
-+                              .name   = "Port 1",
-+                      },
-+              },
-+      },
-+
-+      .leds = {
-+              {
-+                      .name           = "dsl-274xb:red:internet",
-+                      .gpio           = 2,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "dsl-274xb:green:dsl",
-+                      .gpio           = 3,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "dsl-274xb:green:power",
-+                      .gpio           = 4,
-+                      .active_low     = 1,
-+                      .default_trigger = "default-on",
-+              },
-+              {
-+                      .name           = "dsl-274xb:red:power",
-+                      .gpio           = 8,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "dsl-274xb:blue:wps",
-+                      .gpio           = 9,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "dsl-274xb:green:internet",
-+                      .gpio           = 11,
-+                      .active_low     = 1,
-+              },
-+      },
-+
-+      .buttons = {
-+              {
-+                      .desc           = "wifi",
-+                      .gpio           = 10,
-+                      .active_low     = 1,
-+                      .type           = EV_KEY,
-+                      .code           = BTN_0,
-+                      .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+              },
-+              {
-+                      .desc           = "reset",
-+                      .gpio           = 23,
-+                      .active_low     = 1,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_RESTART,
-+                      .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+              },
-+              {
-+                      .desc           = "wps",
-+                      .gpio           = 24,
-+                      .active_low     = 1,
-+                      .code           = KEY_WPS_BUTTON,
-+                      .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+              },
-+      },
-+};
-+#endif
-+
-+/*
-  * known 6338 boards
-  */
- #ifdef CONFIG_BCM63XX_CPU_6338
-@@ -2160,6 +2268,9 @@ static struct board_info __initdata boar
-  * all boards
-  */
- static const struct board_info __initdata *bcm963xx_boards[] = {
-+#ifdef CONFIG_BCM63XX_CPU_6328
-+      &board_dsl_274xb_f1,
-+#endif
- #ifdef CONFIG_BCM63XX_CPU_6338
-       &board_96338gw,
-       &board_96338w,
diff --git a/target/linux/brcm63xx/patches-3.3/523-MIPS-BCM63XX-add-963281TAN-reference-board.patch b/target/linux/brcm63xx/patches-3.3/523-MIPS-BCM63XX-add-963281TAN-reference-board.patch
new file mode 100644 (file)
index 0000000..ae041cc
--- /dev/null
@@ -0,0 +1,94 @@
+From f0649f7b7c672cf452a1796a1422bf615e1973f8 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski@gmail.com>
+Date: Tue, 29 May 2012 11:01:12 +0200
+Subject: [PATCH] MIPS: BCM63XX: add 963281TAN reference board
+
+---
+ arch/mips/bcm63xx/boards/board_bcm963xx.c |   69 +++++++++++++++++++++++++++++
+ 1 files changed, 69 insertions(+), 0 deletions(-)
+
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -123,6 +123,74 @@ static struct board_info __initdata boar
+               },
+       },
+ };
++
++static struct board_info __initdata board_963281TAN = {
++      .name                           = "963281TAN",
++      .expected_cpu_id                = 0x6328,
++
++      .has_uart0                      = 1,
++      .has_pci                        = 1,
++
++      .enetsw = {
++              .used_ports = {
++                      [0] = {
++                              .used   = 1,
++                              .phy_id = 1,
++                              .name   = "Port 1",
++                      },
++                      [1] = {
++                              .used   = 1,
++                              .phy_id = 2,
++                              .name   = "Port 2",
++                      },
++                      [2] = {
++                              .used   = 1,
++                              .phy_id = 3,
++                              .name   = "Port 3",
++                      },
++                      [3] = {
++                              .used   = 1,
++                              .phy_id = 4,
++                              .name   = "Port 4",
++                      },
++              },
++      },
++
++      .leds = {
++              {
++                      .name           = "963281TAN::internet",
++                      .gpio           = 1,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "963281TAN::power",
++                      .gpio           = 4,
++                      .active_low     = 1,
++                      .default_trigger = "default-on",
++              },
++              {
++                      .name           = "963281TAN::internet-fail",
++                      .gpio           = 7,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "963281TAN::power-fail",
++                      .gpio           = 8,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "963281TAN::wps",
++                      .gpio           = 9,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "963281TAN::dsl",
++                      .gpio           = 11,
++                      .active_low     = 1,
++              },
++
++      },
++};
+ #endif
+ /*
+@@ -2234,6 +2302,7 @@ static struct board_info __initdata boar
+ static const struct board_info __initdata *bcm963xx_boards[] = {
+ #ifdef CONFIG_BCM63XX_CPU_6328
+       &board_96328avng,
++      &board_963281TAN,
+ #endif
+ #ifdef CONFIG_BCM63XX_CPU_6338
+       &board_96338gw,
diff --git a/target/linux/brcm63xx/patches-3.3/524-board_dsl_274xb_rev_f.patch b/target/linux/brcm63xx/patches-3.3/524-board_dsl_274xb_rev_f.patch
new file mode 100644 (file)
index 0000000..0de01a7
--- /dev/null
@@ -0,0 +1,130 @@
+From 66808f706b3dcd83a9f5157997ff478a880a2906 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski@gmail.com>
+Date: Mon, 30 Apr 2012 09:10:51 +0200
+Subject: [PATCH 70/79] MIPS: BCM63XX: Add board definition for D-Link
+ DSL-274xB rev F1
+
+---
+ arch/mips/bcm63xx/boards/board_bcm963xx.c |  104 +++++++++++++++++++++++++++++
+ 1 files changed, 104 insertions(+), 0 deletions(-)
+
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -191,6 +191,109 @@ static struct board_info __initdata boar
+       },
+ };
++
++static struct board_info __initdata board_dsl_274xb_f1 = {
++      .name                           = "AW4339U",
++      .expected_cpu_id                = 0x6328,
++
++      .has_uart0                      = 1,
++      .has_pci                        = 1,
++
++      .has_caldata                    = 1,
++      .caldata = {
++              {
++                      .caldata_offset = 0x7d1000,
++                      .slot           = 0,
++              },
++      },
++
++      .has_enetsw                     = 1,
++
++      .enetsw = {
++              .used_ports = {
++                      [0] = {
++                              .used   = 1,
++                              .phy_id = 1,
++                              .name   = "Port 4",
++                      },
++                      [1] = {
++                              .used   = 1,
++                              .phy_id = 2,
++                              .name   = "Port 3",
++                      },
++                      [2] = {
++                              .used   = 1,
++                              .phy_id = 3,
++                              .name   = "Port 2",
++                      },
++                      [3] = {
++                              .used   = 1,
++                              .phy_id = 4,
++                              .name   = "Port 1",
++                      },
++              },
++      },
++
++      .leds = {
++              {
++                      .name           = "dsl-274xb:red:internet",
++                      .gpio           = 2,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "dsl-274xb:green:dsl",
++                      .gpio           = 3,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "dsl-274xb:green:power",
++                      .gpio           = 4,
++                      .active_low     = 1,
++                      .default_trigger = "default-on",
++              },
++              {
++                      .name           = "dsl-274xb:red:power",
++                      .gpio           = 8,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "dsl-274xb:blue:wps",
++                      .gpio           = 9,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "dsl-274xb:green:internet",
++                      .gpio           = 11,
++                      .active_low     = 1,
++              },
++      },
++
++      .buttons = {
++              {
++                      .desc           = "wifi",
++                      .gpio           = 10,
++                      .active_low     = 1,
++                      .type           = EV_KEY,
++                      .code           = BTN_0,
++                      .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++              },
++              {
++                      .desc           = "reset",
++                      .gpio           = 23,
++                      .active_low     = 1,
++                      .type           = EV_KEY,
++                      .code           = KEY_RESTART,
++                      .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 24,
++                      .active_low     = 1,
++                      .code           = KEY_WPS_BUTTON,
++                      .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++              },
++      },
++};
+ #endif
+ /*
+@@ -2303,6 +2406,7 @@ static const struct board_info __initdat
+ #ifdef CONFIG_BCM63XX_CPU_6328
+       &board_96328avng,
+       &board_963281TAN,
++      &board_dsl_274xb_f1,
+ #endif
+ #ifdef CONFIG_BCM63XX_CPU_6338
+       &board_96338gw,
index 98fe1ea6f33efe2d8e70348e193a1ec45d85332c..1931e75032fb1db6fe1403cc288a5ae2ff020dc5 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1413,6 +1413,99 @@ static struct board_info __initdata boar
+@@ -1548,6 +1548,99 @@ static struct board_info __initdata boar
  
        .has_ohci0 = 1,
        .has_ehci0 = 1,
index 902d076188487ac10b28efc3705d679768fef1c6..ca57741dd2bb41aaa8a420dc6af3ee8591dbde5f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1193,6 +1193,19 @@ static struct board_info __initdata boar
+@@ -1328,6 +1328,19 @@ static struct board_info __initdata boar
        },
  
        .has_ohci0 = 1,
index 0ade7a479dd24115eeb48342d7ff84ed62d0323d..1ef7e0144fd1bc89f05bdcd3d60a7dc2753b1baa 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -771,6 +771,17 @@ static struct board_info __initdata boar
+@@ -906,6 +906,17 @@ static struct board_info __initdata boar
                        .active_low     = 1,
                },
        },
index faa122b4947da42e7f01cd573269e40f66c2547c..f8c089404071a43fe346fdf3f64439a28e701d20 100644 (file)
@@ -8,7 +8,7 @@
  #include <linux/spi/spi.h>
  #include <linux/spi/spi_gpio.h>
  #include <linux/spi/74x164.h>
-@@ -2462,7 +2463,7 @@ static void __init nb4_nvram_fixup(void)
+@@ -2599,7 +2600,7 @@ static void __init nb4_nvram_fixup(void)
   * bcm4318 WLAN work
   */
  #ifdef CONFIG_SSB_PCIHOST
@@ -17,7 +17,7 @@
        .revision               = 0x02,
        .board_rev              = 0x17,
        .country_code           = 0x0,
-@@ -2482,6 +2483,7 @@ static struct ssb_sprom bcm63xx_sprom =
+@@ -2619,6 +2620,7 @@ static struct ssb_sprom bcm63xx_sprom =
        .boardflags_lo          = 0x2848,
        .boardflags_hi          = 0x0000,
  };