aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-07-27 15:35:05 +0000
committerFlorian Fainelli <florian@openwrt.org>2012-07-27 15:35:05 +0000
commit18206793b25709ef14888d9960c259726fb65d25 (patch)
treea51ddadbc416ce8ae47b7d4a98d502a2966aa61d /target/linux
parent6afd1725f1be2b83947d91ac5b5044cee1e5c3db (diff)
downloadupstream-18206793b25709ef14888d9960c259726fb65d25.tar.gz
upstream-18206793b25709ef14888d9960c259726fb65d25.tar.bz2
upstream-18206793b25709ef14888d9960c259726fb65d25.zip
Add CT6376-1 board support
Added CT6373 devices instead of using NB4's devices, as Florian suggested. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> SVN-Revision: 32892
Diffstat (limited to 'target/linux')
-rwxr-xr-xtarget/linux/brcm63xx/base-files/etc/uci-defaults/brcm63xx_fixcrc.sh1
-rwxr-xr-xtarget/linux/brcm63xx/base-files/etc/uci-defaults/network1
-rw-r--r--target/linux/brcm63xx/image/Makefile2
-rw-r--r--target/linux/brcm63xx/patches-3.3/554-board_CT6373-1.patch136
-rw-r--r--target/linux/brcm63xx/patches-3.3/801-ssb_export_fallback_sprom.patch4
5 files changed, 142 insertions, 2 deletions
diff --git a/target/linux/brcm63xx/base-files/etc/uci-defaults/brcm63xx_fixcrc.sh b/target/linux/brcm63xx/base-files/etc/uci-defaults/brcm63xx_fixcrc.sh
index fc743c784e..f5b6d440e6 100755
--- a/target/linux/brcm63xx/base-files/etc/uci-defaults/brcm63xx_fixcrc.sh
+++ b/target/linux/brcm63xx/base-files/etc/uci-defaults/brcm63xx_fixcrc.sh
@@ -18,6 +18,7 @@ case "$board_name" in
"CPVA502+" |\
AW4339U |\
CPVA642 |\
+ CT6373-1 |\
MAGIC |\
V2110 |\
V2500V_BB)
diff --git a/target/linux/brcm63xx/base-files/etc/uci-defaults/network b/target/linux/brcm63xx/base-files/etc/uci-defaults/network
index 2eca4f2a77..10b6e5a1b6 100755
--- a/target/linux/brcm63xx/base-files/etc/uci-defaults/network
+++ b/target/linux/brcm63xx/base-files/etc/uci-defaults/network
@@ -18,6 +18,7 @@ case "$board_name" in
963281TAN |\
96348A-122 |\
96358-502V |\
+CT6373-1 |\
AW4339U |\
CPVA642 |\
CT536_CT5621 |\
diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile
index 8066430c96..5505cfd1e8 100644
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -191,6 +191,8 @@ define Image/Build
$(call Image/Build/CFEFIXUP,$(1),96348GW,GW6200,6348,GW6200,$(shell printf '\x99'))
# Neufbox4
$(call Image/Build/CFE,$(1),96358VW,6358,NEUFBOX4,OpenWRT-$(REVISION))
+ # Comtrend 6373
+ $(call Image/Build/CFE,$(1),CT6373-1,6358,CT6373)
# Comtrend 536, 5621
$(call Image/Build/CFEFIXUP,$(1),96348GW-11,CT536_CT5621,6348,CT536_CT5621)
# Davolink DV201AMR
diff --git a/target/linux/brcm63xx/patches-3.3/554-board_CT6373-1.patch b/target/linux/brcm63xx/patches-3.3/554-board_CT6373-1.patch
new file mode 100644
index 0000000000..9b36baf727
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.3/554-board_CT6373-1.patch
@@ -0,0 +1,136 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -51,6 +51,13 @@
+ #define NB4_SPI_GPIO_CLK 6
+ #define NB4_74HC64_GPIO(X) (NB4_74X164_GPIO_BASE + (X))
+
++#define CT6373_PID_OFFSET 0xff80
++#define CT6373_74X164_GPIO_BASE 64
++#define CT6373_SPI_GPIO_MOSI 7
++#define CT6373_SPI_GPIO_CLK 6
++#define CT6373_74HC64_GPIO(X) (CT6373_74X164_GPIO_BASE + (X))
++
++
+ static struct board_info board;
+
+ /*
+@@ -2287,6 +2294,111 @@ static struct board_info __initdata boar
+ .num_spis = ARRAY_SIZE(nb4_spi_devices),
+ };
+
++
++struct spi_gpio_platform_data ct6373_spi_gpio_data = {
++ .sck = CT6373_SPI_GPIO_CLK,
++ .mosi = CT6373_SPI_GPIO_MOSI,
++ .miso = SPI_GPIO_NO_MISO,
++ .num_chipselect = 1,
++};
++
++static struct platform_device ct6373_spi_gpio = {
++ .name = "spi_gpio",
++ .id = 1,
++ .dev = {
++ .platform_data = &ct6373_spi_gpio_data,
++ },
++};
++
++static struct platform_device * __initdata ct6373_devices[] = {
++ &ct6373_spi_gpio,
++};
++
++const struct gen_74x164_chip_platform_data ct6373_74x164_platform_data = {
++ .base = CT6373_74X164_GPIO_BASE
++};
++
++static struct spi_board_info ct6373_spi_devices[] = {
++ {
++ .modalias = "74x164",
++ .max_speed_hz = 781000,
++ .bus_num = 1,
++ .controller_data = (void *) SPI_GPIO_NO_CHIPSELECT,
++ .mode = SPI_MODE_0,
++ .platform_data = &ct6373_74x164_platform_data
++ }
++};
++
++static struct board_info __initdata board_ct6373_1 = {
++ .name = "CT6373-1",
++ .expected_cpu_id = 0x6358,
++
++ .has_uart0 = 1,
++ .has_pci = 1,
++ .has_ohci0 = 1,
++ .has_ehci0 = 1,
++
++ .has_enet1 = 1,
++ .enet1 = {
++ .force_speed_100 = 1,
++ .force_duplex_full = 1,
++ },
++
++ .leds = {
++ {
++ .name = "CT6373-1:green:power",
++ .gpio = 0,
++ .default_trigger = "default-on",
++ },
++ {
++ .name = "CT6373-1:green:usb",
++ .gpio = 3,
++ .active_low = 1,
++ },
++ {
++ .name = "CT6373-1:green:wlan",
++ .gpio = 9,
++ .active_low = 1,
++ },
++ {
++ .name = "CT6373-1:green:adsl",
++ .gpio = CT6373_74HC64_GPIO(0),
++ .active_low = 1,
++ },
++ {
++ .name = "CT6373-1:green:line",
++ .gpio = CT6373_74HC64_GPIO(1),
++ .active_low = 1,
++ },
++ {
++ .name = "CT6373-1:green:fxs1",
++ .gpio = CT6373_74HC64_GPIO(2),
++ .active_low = 1,
++ },
++ {
++ .name = "CT6373-1:green:fxs2",
++ .gpio = CT6373_74HC64_GPIO(3),
++ .active_low = 1,
++ },
++ },
++
++ .buttons = {
++ {
++ .desc = "reset",
++ .gpio = 35,
++ .active_low = 1,
++ .type = EV_KEY,
++ .code = KEY_RESTART,
++ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++ },
++ },
++
++ .devs = ct6373_devices,
++ .num_devs = ARRAY_SIZE(ct6373_devices),
++ .spis = ct6373_spi_devices,
++ .num_spis = ARRAY_SIZE(ct6373_spi_devices),
++};
++
+ static struct board_info __initdata board_HW553 = {
+ .name = "HW553",
+ .expected_cpu_id = 0x6358,
+@@ -2620,6 +2732,7 @@ static const struct board_info __initdat
+ &board_nb4_ser_r2,
+ &board_nb4_fxc_r1,
+ &board_nb4_fxc_r2,
++ &board_ct6373_1,
+ &board_HW553,
+ &board_spw303v,
+ #endif
diff --git a/target/linux/brcm63xx/patches-3.3/801-ssb_export_fallback_sprom.patch b/target/linux/brcm63xx/patches-3.3/801-ssb_export_fallback_sprom.patch
index df3dc91791..c06fce4bce 100644
--- a/target/linux/brcm63xx/patches-3.3/801-ssb_export_fallback_sprom.patch
+++ b/target/linux/brcm63xx/patches-3.3/801-ssb_export_fallback_sprom.patch
@@ -8,7 +8,7 @@
#include <linux/spi/spi.h>
#include <linux/spi/spi_gpio.h>
#include <linux/spi/74x164.h>
-@@ -2652,7 +2653,7 @@ static void __init nb4_nvram_fixup(void)
+@@ -2765,7 +2766,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,
-@@ -2672,6 +2673,7 @@ static struct ssb_sprom bcm63xx_sprom =
+@@ -2785,6 +2786,7 @@ static struct ssb_sprom bcm63xx_sprom =
.boardflags_lo = 0x2848,
.boardflags_hi = 0x0000,
};