summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-02-27 17:38:46 +0000
committerJonas Gorski <jogo@openwrt.org>2015-02-27 17:38:46 +0000
commitf3c071b376164795bcd1c582fdbd4d4ffec3398f (patch)
tree73728e3c5ea1d203e10179cd10f9edd73e0164d7 /target
parentdd7625ef151a993c2502ec8b2f73b928914a273a (diff)
downloadmtk-20170518-f3c071b376164795bcd1c582fdbd4d4ffec3398f.zip
mtk-20170518-f3c071b376164795bcd1c582fdbd4d4ffec3398f.tar.gz
mtk-20170518-f3c071b376164795bcd1c582fdbd4d4ffec3398f.tar.bz2
brcm63xx: add dts and profile for Livebox
Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 44559
Diffstat (limited to 'target')
-rw-r--r--target/linux/brcm63xx/dts/livebox-blue-5g.dts15
-rwxr-xr-xtarget/linux/brcm63xx/image/Makefile16
-rw-r--r--target/linux/brcm63xx/patches-3.14/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch67
-rw-r--r--target/linux/brcm63xx/patches-3.18/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch67
-rw-r--r--target/linux/brcm63xx/profiles/inventel.mk15
5 files changed, 119 insertions, 61 deletions
diff --git a/target/linux/brcm63xx/dts/livebox-blue-5g.dts b/target/linux/brcm63xx/dts/livebox-blue-5g.dts
new file mode 100644
index 0000000..efab6f7
--- /dev/null
+++ b/target/linux/brcm63xx/dts/livebox-blue-5g.dts
@@ -0,0 +1,15 @@
+/dts-v1/;
+
+/include/ "bcm6348.dtsi"
+
+/ {
+ model = "Inventel Livebox 1";
+ compatible = "inventel,livebox-blue-5g", "brcm,bcm6348";
+};
+
+&pflash {
+ reg = <0x1e400000 0x800000>;
+ status = "ok";
+
+ linux,part-probe = "redboot";
+};
diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile
index a7d856a..23600aa 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -96,12 +96,11 @@ define Image/Build/ZYXCFEDTB
rm -f $(BIN_DIR)/openwrt-$(5)-$(1).tmp
endef
-define Image/Build/RedBoot
- cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(1)-vmlinux.elf
- gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
- $(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
- dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/openwrt-$(1)-vmlinux.lzma bs=65536 conv=sync
- dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/openwrt-$(1)-vmlinux.gz bs=65536 conv=sync
+define Image/Build/RedBootDTB
+ gzip -9 -c $(KDIR)/vmlinux-$(2) > $(KDIR)/vmlinux-$(2).bin.gz
+ $(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux-$(2) $(KDIR)/vmlinux-$(2).bin.l7
+ dd if=$(KDIR)/vmlinux-$(2).bin.l7 of=$(BIN_DIR)/openwrt-$(5)-vmlinux.lzma bs=65536 conv=sync
+ dd if=$(KDIR)/vmlinux-$(2).bin.gz of=$(BIN_DIR)/openwrt-$(5)-vmlinux.gz bs=65536 conv=sync
endef
define Image/Build/HCS
@@ -201,9 +200,6 @@ define Image/Build
# RTA1320_16M (numerous routers)
$(call Image/Build/CFE,$(1),RTA1320_16M,6338,RTA1320_16M,,--layoutver 5)
- # Inventel Livebox
- $(call Image/Build/RedBoot,livebox)
-
# Netgear CVG834G
$(call Image/Build/HCS,$(1),cvg834g,a020,0001,0022,$(KDIR)/vmlinux)
@@ -297,6 +293,8 @@ $(eval $(call ImageDTB,CFEDTB,HG553,hg553,HW553,6358,HG553,--rsa-signature "Echo
$(eval $(call ImageDTB,CFEDTB,HG556a_AB,hg556a-a,HW556,6358,HG556a_A,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x10000 --tag-version 8))
$(eval $(call ImageDTB,CFEDTB,HG556a_AB,hg556a-b,HW556,6358,HG556a_B,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x20000 --tag-version 8))
$(eval $(call ImageDTB,CFEDTB,HG556a_C,hg556a-c,HW556,6358,HG556a_C,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x20000 --tag-version 8))
+# Inventel Livebox 1
+$(eval $(call ImageDTB,RedBootDTB,Livebox,livebox-blue-5g,,,livebox))
# Netgear DG834GT/PN
$(eval $(call ImageDTB,CFEDTB,DG834GTPN,dg834gtpn,96348GW-10,6348,DG834GT_PN))
# Pirelli Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0
diff --git a/target/linux/brcm63xx/patches-3.14/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch b/target/linux/brcm63xx/patches-3.14/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch
index 2f7bf49..3414379 100644
--- a/target/linux/brcm63xx/patches-3.14/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch
+++ b/target/linux/brcm63xx/patches-3.14/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch
@@ -1,15 +1,15 @@
-From 7e6b22225e16fbb22dbf7f2113d8c6d65333818c Mon Sep 17 00:00:00 2001
+From e796582b499f0ba6acaa1ac3a10c09cceaab7702 Mon Sep 17 00:00:00 2001
From: Jonas Gorski <jogo@openwrt.org>
Date: Sun, 9 Mar 2014 04:55:52 +0100
-Subject: [PATCH 44/44] MIPS: BCM63XX: add inventel Livebox support
+Subject: [PATCH] MIPS: BCM63XX: add inventel Livebox support
---
- arch/mips/bcm63xx/boards/Kconfig | 6 +
- arch/mips/bcm63xx/boards/Makefile | 1 +
- arch/mips/bcm63xx/boards/board_common.c | 2 +-
- arch/mips/bcm63xx/boards/board_common.h | 6 +
- arch/mips/bcm63xx/boards/board_livebox.c | 193 +++++++++++++++++++++++++++++++
- 5 files changed, 207 insertions(+), 1 deletion(-)
+ arch/mips/bcm63xx/boards/Kconfig | 6 +
+ arch/mips/bcm63xx/boards/Makefile | 1 +
+ arch/mips/bcm63xx/boards/board_common.c | 2 +-
+ arch/mips/bcm63xx/boards/board_common.h | 6 +
+ arch/mips/bcm63xx/boards/board_livebox.c | 215 ++++++++++++++++++++++++++++++
+ 5 files changed, 229 insertions(+), 1 deletion(-)
create mode 100644 arch/mips/bcm63xx/boards/board_livebox.c
--- a/arch/mips/bcm63xx/boards/Kconfig
@@ -57,7 +57,7 @@ Subject: [PATCH 44/44] MIPS: BCM63XX: add inventel Livebox support
#endif /* __BOARD_COMMON_H */
--- /dev/null
+++ b/arch/mips/bcm63xx/boards/board_livebox.c
-@@ -0,0 +1,200 @@
+@@ -0,0 +1,215 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
@@ -183,6 +183,11 @@ Subject: [PATCH 44/44] MIPS: BCM63XX: add inventel Livebox support
+#endif
+};
+
++static struct of_device_id const livebox_boards_dt[] = {
++ { .compatible = "inventel,livebox-blue-5g", .data = &board_livebox_blue5g, },
++ { }
++};
++
+/*
+ * register & return a new board mac address
+ */
@@ -227,23 +232,33 @@ Subject: [PATCH 44/44] MIPS: BCM63XX: add inventel Livebox support
+ u32 val;
+ u8 hw_version;
+ const struct board_info *board;
-+
-+ /* Get hardware version */
-+ val = bcm_gpio_readl(GPIO_CTL_LO_REG);
-+ val &= ~LIVEBOX_GPIO_DETECT_MASK;
-+ bcm_gpio_writel(val, GPIO_CTL_LO_REG);
-+
-+ hw_version = bcm_gpio_readl(GPIO_DATA_LO_REG) & LIVEBOX_GPIO_DETECT_MASK;
-+ switch (hw_version) {
-+ case LIVEBOX_HW_BLUE5G_9:
-+ printk(KERN_INFO PFX "Livebox BLUE5G.9\n");
-+ board = bcm963xx_boards[0];
-+ break;
-+ default:
-+ printk(KERN_INFO PFX "Unknown livebox version: %02x\n", hw_version);
-+ /* use default livebox configuration */
-+ board = bcm963xx_boards[0];
-+ break;
++ const struct of_device_id *board_match;
++
++ /* find board by compat */
++ board_match = bcm63xx_match_board(livebox_boards_dt);
++ if (board_match) {
++ board = board_match->data;
++ } else {
++ /* Get hardware version */
++ val = bcm_gpio_readl(GPIO_CTL_LO_REG);
++ val &= ~LIVEBOX_GPIO_DETECT_MASK;
++ bcm_gpio_writel(val, GPIO_CTL_LO_REG);
++
++ hw_version = bcm_gpio_readl(GPIO_DATA_LO_REG);
++ hw_version &= LIVEBOX_GPIO_DETECT_MASK;
++
++ switch (hw_version) {
++ case LIVEBOX_HW_BLUE5G_9:
++ printk(KERN_INFO PFX "Livebox BLUE5G.9\n");
++ board = bcm963xx_boards[0];
++ break;
++ default:
++ printk(KERN_INFO PFX "Unknown livebox version: %02x\n",
++ hw_version);
++ /* use default livebox configuration */
++ board = bcm963xx_boards[0];
++ break;
++ }
+ }
+
+ /* use default livebox configuration */
diff --git a/target/linux/brcm63xx/patches-3.18/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch b/target/linux/brcm63xx/patches-3.18/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch
index 2f7bf49..3414379 100644
--- a/target/linux/brcm63xx/patches-3.18/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch
+++ b/target/linux/brcm63xx/patches-3.18/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch
@@ -1,15 +1,15 @@
-From 7e6b22225e16fbb22dbf7f2113d8c6d65333818c Mon Sep 17 00:00:00 2001
+From e796582b499f0ba6acaa1ac3a10c09cceaab7702 Mon Sep 17 00:00:00 2001
From: Jonas Gorski <jogo@openwrt.org>
Date: Sun, 9 Mar 2014 04:55:52 +0100
-Subject: [PATCH 44/44] MIPS: BCM63XX: add inventel Livebox support
+Subject: [PATCH] MIPS: BCM63XX: add inventel Livebox support
---
- arch/mips/bcm63xx/boards/Kconfig | 6 +
- arch/mips/bcm63xx/boards/Makefile | 1 +
- arch/mips/bcm63xx/boards/board_common.c | 2 +-
- arch/mips/bcm63xx/boards/board_common.h | 6 +
- arch/mips/bcm63xx/boards/board_livebox.c | 193 +++++++++++++++++++++++++++++++
- 5 files changed, 207 insertions(+), 1 deletion(-)
+ arch/mips/bcm63xx/boards/Kconfig | 6 +
+ arch/mips/bcm63xx/boards/Makefile | 1 +
+ arch/mips/bcm63xx/boards/board_common.c | 2 +-
+ arch/mips/bcm63xx/boards/board_common.h | 6 +
+ arch/mips/bcm63xx/boards/board_livebox.c | 215 ++++++++++++++++++++++++++++++
+ 5 files changed, 229 insertions(+), 1 deletion(-)
create mode 100644 arch/mips/bcm63xx/boards/board_livebox.c
--- a/arch/mips/bcm63xx/boards/Kconfig
@@ -57,7 +57,7 @@ Subject: [PATCH 44/44] MIPS: BCM63XX: add inventel Livebox support
#endif /* __BOARD_COMMON_H */
--- /dev/null
+++ b/arch/mips/bcm63xx/boards/board_livebox.c
-@@ -0,0 +1,200 @@
+@@ -0,0 +1,215 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
@@ -183,6 +183,11 @@ Subject: [PATCH 44/44] MIPS: BCM63XX: add inventel Livebox support
+#endif
+};
+
++static struct of_device_id const livebox_boards_dt[] = {
++ { .compatible = "inventel,livebox-blue-5g", .data = &board_livebox_blue5g, },
++ { }
++};
++
+/*
+ * register & return a new board mac address
+ */
@@ -227,23 +232,33 @@ Subject: [PATCH 44/44] MIPS: BCM63XX: add inventel Livebox support
+ u32 val;
+ u8 hw_version;
+ const struct board_info *board;
-+
-+ /* Get hardware version */
-+ val = bcm_gpio_readl(GPIO_CTL_LO_REG);
-+ val &= ~LIVEBOX_GPIO_DETECT_MASK;
-+ bcm_gpio_writel(val, GPIO_CTL_LO_REG);
-+
-+ hw_version = bcm_gpio_readl(GPIO_DATA_LO_REG) & LIVEBOX_GPIO_DETECT_MASK;
-+ switch (hw_version) {
-+ case LIVEBOX_HW_BLUE5G_9:
-+ printk(KERN_INFO PFX "Livebox BLUE5G.9\n");
-+ board = bcm963xx_boards[0];
-+ break;
-+ default:
-+ printk(KERN_INFO PFX "Unknown livebox version: %02x\n", hw_version);
-+ /* use default livebox configuration */
-+ board = bcm963xx_boards[0];
-+ break;
++ const struct of_device_id *board_match;
++
++ /* find board by compat */
++ board_match = bcm63xx_match_board(livebox_boards_dt);
++ if (board_match) {
++ board = board_match->data;
++ } else {
++ /* Get hardware version */
++ val = bcm_gpio_readl(GPIO_CTL_LO_REG);
++ val &= ~LIVEBOX_GPIO_DETECT_MASK;
++ bcm_gpio_writel(val, GPIO_CTL_LO_REG);
++
++ hw_version = bcm_gpio_readl(GPIO_DATA_LO_REG);
++ hw_version &= LIVEBOX_GPIO_DETECT_MASK;
++
++ switch (hw_version) {
++ case LIVEBOX_HW_BLUE5G_9:
++ printk(KERN_INFO PFX "Livebox BLUE5G.9\n");
++ board = bcm963xx_boards[0];
++ break;
++ default:
++ printk(KERN_INFO PFX "Unknown livebox version: %02x\n",
++ hw_version);
++ /* use default livebox configuration */
++ board = bcm963xx_boards[0];
++ break;
++ }
+ }
+
+ /* use default livebox configuration */
diff --git a/target/linux/brcm63xx/profiles/inventel.mk b/target/linux/brcm63xx/profiles/inventel.mk
new file mode 100644
index 0000000..a6733fc
--- /dev/null
+++ b/target/linux/brcm63xx/profiles/inventel.mk
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Livebox
+ NAME:=Inventel Livebox 1
+ PACKAGES:=kmod-b43 wpad-mini kmod-usb-ohci
+endef
+define Profile/Livebox/Description
+ Package set optimized for Inventel Livebox 1.
+endef
+$(eval $(call Profile,Livebox))