aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/lantiq')
-rw-r--r--target/linux/lantiq/Makefile4
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/board.d/01_leds13
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/board.d/02_network22
-rwxr-xr-xtarget/linux/lantiq/base-files/lib/upgrade/platform.sh2
-rw-r--r--target/linux/lantiq/dts/ARV452CQW.dts14
-rw-r--r--target/linux/lantiq/dts/DGN3500.dtsi2
-rw-r--r--target/linux/lantiq/dts/EASY80920.dtsi3
-rw-r--r--target/linux/lantiq/dts/EASY80920NAND.dts36
-rw-r--r--target/linux/lantiq/dts/FRITZ7320.dts10
-rw-r--r--target/linux/lantiq/dts/FRITZ7360SL.dts217
-rw-r--r--target/linux/lantiq/dts/VG3503J.dts178
-rw-r--r--target/linux/lantiq/dts/VG3503J.dtsi176
-rw-r--r--target/linux/lantiq/dts/VG3503J_V2.dts11
-rw-r--r--target/linux/lantiq/dts/VGV7510KW22.dtsi53
-rw-r--r--target/linux/lantiq/dts/VGV7519.dtsi78
-rw-r--r--target/linux/lantiq/dts/VGV7519BRN.dts65
-rw-r--r--target/linux/lantiq/dts/VGV7519NOR.dts18
-rw-r--r--target/linux/lantiq/dts/WBMR300.dts303
-rw-r--r--target/linux/lantiq/dts/amazonse.dtsi2
-rw-r--r--target/linux/lantiq/dts/ar9.dtsi2
-rw-r--r--target/linux/lantiq/dts/danube.dtsi2
-rw-r--r--target/linux/lantiq/dts/vr9.dtsi2
-rw-r--r--target/linux/lantiq/image/Makefile750
-rw-r--r--target/linux/lantiq/image/tp-link.mk48
-rw-r--r--target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch4
-rw-r--r--target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch67
-rw-r--r--target/linux/lantiq/patches-4.4/0028-NET-lantiq-various-etop-fixes.patch81
-rw-r--r--target/linux/lantiq/patches-4.4/0030-GPIO-add-named-gpio-exports.patch6
-rw-r--r--target/linux/lantiq/patches-4.4/0034-reset-Fix-compile-when-reset-RESET_CONTROLLER-is-not.patch45
-rw-r--r--target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch19
-rw-r--r--target/linux/lantiq/patches-4.4/0042-arch-mips-increase-io_space_limit.patch23
-rw-r--r--target/linux/lantiq/patches-4.4/0047-irq-fixes.patch78
-rw-r--r--target/linux/lantiq/patches-4.4/0047-poweroff.patch23
-rw-r--r--target/linux/lantiq/patches-4.4/0160-owrt-lantiq-multiple-flash.patch69
-rw-r--r--target/linux/lantiq/patches-4.4/0400-xrx200-net-multi-phy.patch38
-rw-r--r--target/linux/lantiq/xrx200/config-default54
-rw-r--r--target/linux/lantiq/xrx200/profiles/00-default.mk9
-rw-r--r--target/linux/lantiq/xrx200/profiles/arv.mk46
-rw-r--r--target/linux/lantiq/xrx200/profiles/avm.mk9
-rw-r--r--target/linux/lantiq/xrx200/profiles/bt.mk9
-rw-r--r--target/linux/lantiq/xrx200/profiles/lantiq.mk13
-rw-r--r--target/linux/lantiq/xrx200/profiles/tplink.mk20
-rw-r--r--target/linux/lantiq/xrx200/profiles/zyxel.mk20
-rw-r--r--target/linux/lantiq/xrx200/target.mk2
-rw-r--r--target/linux/lantiq/xway/profiles/00-default.mk9
-rw-r--r--target/linux/lantiq/xway/profiles/arv.mk167
-rw-r--r--target/linux/lantiq/xway/profiles/audiocodes.mk9
-rw-r--r--target/linux/lantiq/xway/profiles/avm.mk10
-rw-r--r--target/linux/lantiq/xway/profiles/aztech.mk7
-rw-r--r--target/linux/lantiq/xway/profiles/bt.mk34
-rw-r--r--target/linux/lantiq/xway/profiles/buffalo.mk23
-rw-r--r--target/linux/lantiq/xway/profiles/gigaset.mk11
-rw-r--r--target/linux/lantiq/xway/profiles/lantiq.mk5
-rw-r--r--target/linux/lantiq/xway/profiles/netgear.mk23
-rw-r--r--target/linux/lantiq/xway/profiles/zte.mk12
-rw-r--r--target/linux/lantiq/xway/profiles/zyxel.mk10
-rw-r--r--target/linux/lantiq/xway_legacy/config-default29
-rw-r--r--target/linux/lantiq/xway_legacy/profiles/00-default.mk9
-rw-r--r--target/linux/lantiq/xway_legacy/target.mk12
59 files changed, 1841 insertions, 1175 deletions
diff --git a/target/linux/lantiq/Makefile b/target/linux/lantiq/Makefile
index 7b79b68c42..af4295cbb8 100644
--- a/target/linux/lantiq/Makefile
+++ b/target/linux/lantiq/Makefile
@@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
BOARD:=lantiq
BOARDNAME:=Lantiq
FEATURES:=squashfs
-SUBTARGETS=xway xrx200
-MAINTAINER:=John Crispin <blogic@openwrt.org>
+SUBTARGETS=xrx200 xway xway_legacy
+MAINTAINER:=John Crispin <john@phrozen.org>
KERNEL_PATCHVER:=4.4
diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds
index 39b693ac19..4cca17f280 100755
--- a/target/linux/lantiq/base-files/etc/board.d/01_leds
+++ b/target/linux/lantiq/base-files/etc/board.d/01_leds
@@ -42,6 +42,19 @@ P2812HNUF*)
ARV7519RW22)
ucidef_set_led_netdev "lan" "lan" "arv7519rw22:green:lan" "eth0.1"
;;
+FRITZ7320)
+ ucidef_set_led_netdev "wifi" "wifi" "fritz7320:green:wlan" "wlan0"
+ ;;
+ARV4525PW)
+ ucidef_set_led_netdev "wifi" "wifi" "arv4525pw:green:wlan" "wlan0"
+ ;;
+WBMR300)
+ ucidef_set_led_switch "lan1" "LAN1" "wbmr300:green:lan1" "switch0" "0x08"
+ ucidef_set_led_switch "lan2" "LAN2" "wbmr300:green:lan2" "switch0" "0x04"
+ ucidef_set_led_switch "wan" "WAN" "wbmr300:green:wan" "switch0" "0x10"
+ ucidef_set_led_switch "lan3" "LAN3" "wbmr300:green:lan3" "switch0" "0x20"
+ ucidef_set_led_default "router" "router" "wbmr300:green:router" "1"
+ ;;
*)
;;
esac
diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network
index b27b8026df..cafcb0e009 100755
--- a/target/linux/lantiq/base-files/etc/board.d/02_network
+++ b/target/linux/lantiq/base-files/etc/board.d/02_network
@@ -62,11 +62,20 @@ VG3503J)
ucidef_set_interface_lan 'eth0'
;;
+ARV4518PWR01*)
+ ucidef_set_interface_lan 'eth0'
+ ;;
+
DGN3500*)
ucidef_add_switch "switch0" \
"3:lan:1" "2:lan:2" "1:lan:3" "0:lan:4" "5t@eth0"
;;
+FRITZ7360SL)
+ ucidef_add_switch "switch0" \
+ "4:lan:1" "2:lan:2" "0:lan:3" "1:lan:4" "6t@eth0"
+ ;;
+
GR7000)
ucidef_set_interface_wan "eth0"
;;
@@ -126,7 +135,8 @@ BTHOMEHUBV5A)
VGV7519)
lan_mac=$(mtd_get_mac_binary board_config 22)
wan_mac=$(macaddr_add "$lan_mac" 1)
- ucidef_set_interface_lan 'eth0'
+ ucidef_add_switch "switch0" \
+ "4:lan:1" "2:lan:2" "1:lan:3" "0:lan:4" "6t@eth0"
;;
VGV7510KW22)
@@ -135,6 +145,16 @@ VGV7510KW22)
ucidef_add_switch "switch0" \
"2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "6t@eth0"
;;
+*)
+ ucidef_set_interface_lan 'eth0'
+ ;;
+
+WBMR300)
+ lan_mac=$(mtd_get_mac_ascii ubootconfig ethaddr)
+ wan_mac="$lan_mac"
+ ucidef_add_switch "switch0" \
+ "2:lan:1" "3:lan:2" "5:lan:3" "4:wan:1" "6t@eth0"
+ ;;
esac
diff --git a/target/linux/lantiq/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/base-files/lib/upgrade/platform.sh
index e876b11af5..c8fc617035 100755
--- a/target/linux/lantiq/base-files/lib/upgrade/platform.sh
+++ b/target/linux/lantiq/base-files/lib/upgrade/platform.sh
@@ -16,6 +16,8 @@ platform_check_image() {
case "$(get_magic_word "$1")" in
# uImage
2705) return 0;;
+ # AVM
+ 8112) return 0;;
# tplink
0200) return 0;;
*)
diff --git a/target/linux/lantiq/dts/ARV452CQW.dts b/target/linux/lantiq/dts/ARV452CQW.dts
index 57aa864693..2bace94b0d 100644
--- a/target/linux/lantiq/dts/ARV452CQW.dts
+++ b/target/linux/lantiq/dts/ARV452CQW.dts
@@ -152,19 +152,19 @@
#size-cells = <0>;
poll-interval = <100>;
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 11 1>;
+ linux,code = <0xf7>;
+ };
wps {
label = "wps";
- gpios = <&gpio 11 1>;
+ gpios = <&gpio 29 1>;
linux,code = <0x101>;
};
- restart {
- label = "restart";
- gpios = <&gpio 12 1>;
- linux,code = <0x110>;
- };
reset {
label = "reset";
- gpios = <&gpio 28 1>;
+ gpios = <&gpio 30 1>;
linux,code = <0x198>;
};
};
diff --git a/target/linux/lantiq/dts/DGN3500.dtsi b/target/linux/lantiq/dts/DGN3500.dtsi
index 7854007e01..bc50e4ae65 100644
--- a/target/linux/lantiq/dts/DGN3500.dtsi
+++ b/target/linux/lantiq/dts/DGN3500.dtsi
@@ -168,7 +168,7 @@
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <4 0>;
- spi-max-frequency = <1000000>;
+ spi-max-frequency = <20000000>;
partitions {
compatible = "fixed-partitions";
diff --git a/target/linux/lantiq/dts/EASY80920.dtsi b/target/linux/lantiq/dts/EASY80920.dtsi
index e8cbc42980..4e649976a2 100644
--- a/target/linux/lantiq/dts/EASY80920.dtsi
+++ b/target/linux/lantiq/dts/EASY80920.dtsi
@@ -145,7 +145,8 @@
gphy-xrx200 {
compatible = "lantiq,phy-xrx200";
- firmware = "lantiq/vr9_phy11g_a2x.bin";
+ firmware1 = "lantiq/vr9_phy11g_a1x.bin";
+ firmware2 = "lantiq/vr9_phy11g_a2x.bin";
phys = [ 00 01 ];
};
diff --git a/target/linux/lantiq/dts/EASY80920NAND.dts b/target/linux/lantiq/dts/EASY80920NAND.dts
index d7e04eef55..7e1811edc1 100644
--- a/target/linux/lantiq/dts/EASY80920NAND.dts
+++ b/target/linux/lantiq/dts/EASY80920NAND.dts
@@ -4,6 +4,10 @@
/include/ "EASY80920.dtsi"
/ {
+ chosen {
+ bootargs = "ubi.mtd=ubi ubi.block=0,rootfsA root=/dev/ubiblock0_1";
+ };
+
fpi@10000000 {
localbus@0 {
ranges = <0 0 0x4000000 0x3ffffff>;
@@ -22,17 +26,37 @@
partition@0 {
label = "uboot";
- reg = <0x00000 0x40000>;
+ reg = <0x00000 0x100000>; /* 1024 KB */
};
- partition@10000 {
+ partition@100000 {
label = "uboot_env";
- reg = <0x40000 0x40000>;
+ reg = <0x100000 0x40000>; /* 256 KB */
+ };
+
+ partition@140000 {
+ label = "ubootconfigB";
+ reg = <0x140000 0x40000>; /* 256 KB */
+ };
+
+ partition@180000 {
+ label = "gphyfirmware";
+ reg = <0x180000 0x40000>; /* 256 KB */
+ };
+
+ partition@1c0000 {
+ label = "ubi";
+ reg = <0x1c0000 0xc800000>;
+ };
+
+ partition@c9c0000 {
+ label = "calibration";
+ reg = <0xc9c0000 0x100000>;
};
- partition@20000 {
- label = "firmware";
- reg = <0x80000 0x3f80000>;
+ partition@cac0000 {
+ label = "res";
+ reg = <0xcac0000 0x13540000>;
};
};
};
diff --git a/target/linux/lantiq/dts/FRITZ7320.dts b/target/linux/lantiq/dts/FRITZ7320.dts
index 475da7ac8e..acb88b60a0 100644
--- a/target/linux/lantiq/dts/FRITZ7320.dts
+++ b/target/linux/lantiq/dts/FRITZ7320.dts
@@ -37,7 +37,7 @@
#address-cells = <1>;
#size-cells = <1>;
- partition@0 {
+ ath9k_cal: partition@0 {
label = "urlader";
reg = <0x00000 0x20000>;
read-only;
@@ -63,6 +63,14 @@
};
};
+ ath9k_eep {
+ compatible = "ath9k,eeprom";
+ ath,eep-flash = <&ath9k_cal 0x985>;
+ ath,device-id = /bits/ 16 <0xff1d 0x2d>;
+ ath,eep-endian;
+ ath,eep-swap;
+ };
+
gpio: pinmux@E100B10 {
pinctrl-names = "default";
pinctrl-0 = <&state_default>;
diff --git a/target/linux/lantiq/dts/FRITZ7360SL.dts b/target/linux/lantiq/dts/FRITZ7360SL.dts
new file mode 100644
index 0000000000..e8fdc13cb3
--- /dev/null
+++ b/target/linux/lantiq/dts/FRITZ7360SL.dts
@@ -0,0 +1,217 @@
+/dts-v1/;
+
+/include/ "vr9.dtsi"
+
+/ {
+ model = "FRITZ7360SL - 1&1 HomeServer";
+
+ chosen {
+ bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
+
+ leds {
+ boot = &power_green;
+ failsafe = &power_red;
+ running = &power_green;
+
+ internet = &info_green;
+ dsl = &power_green;
+ wifi = &wifi;
+ };
+ };
+
+ memory@0 {
+ reg = <0x0 0x8000000>;
+ };
+
+ fpi@10000000 {
+ localbus@0 {
+ nor-boot@0 {
+ compatible = "lantiq,nor";
+ bank-width = <2>;
+ reg = <0 0x0 0x1000000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ urlader: partition@0 {
+ label = "urlader";
+ reg = <0x00000 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "firmware";
+ reg = <0x20000 0xf60000>;
+ };
+
+ partition@f80000 {
+ label = "tffs (1)";
+ reg = <0xf80000 0x40000>;
+ read-only;
+ };
+
+ partition@fc0000 {
+ label = "tffs (2)";
+ reg = <0xfc0000 0x40000>;
+ read-only;
+ };
+ };
+ };
+ };
+
+ gpio: pinmux@E100B10 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinmux {
+ mdio {
+ lantiq,groups = "mdio";
+ lantiq,function = "mdio";
+ };
+ phy-rst {
+ lantiq,pins = "io37", "io44";
+ lantiq,pull = <2>;
+ lantiq,open-drain;
+ lantiq,output = <1>;
+ };
+ pcie-rst {
+ lantiq,pins = "io38";
+ lantiq,pull = <0>;
+ lantiq,output = <1>;
+ };
+ };
+ };
+
+ ifxhcd@E101000 {
+ status = "okay";
+ lantiq,portmask = <0x3>;
+ };
+
+ ifxhcd@E106000 {
+ status = "okay";
+ };
+ };
+
+ ath9k_eep {
+ compatible = "ath9k,eeprom";
+ ath,eep-flash = <&urlader 0x985>;
+ ath,eep-endian;
+ ath,eep-swap;
+ ath,pci-slot = <0>;
+ };
+
+ gphy-xrx200 {
+ compatible = "lantiq,phy-xrx200";
+ firmware = "lantiq/vr9_phy11g_a2x.bin";
+ phys = [ 00 01 ];
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <100>;
+ dect {
+ label = "power";
+ gpios = <&gpio 1 0>;
+ linux,code = <0x102>;
+ };
+ wifi {
+ label = "wifi";
+ gpios = <&gpio 29 0>;
+ linux,code = <0x101>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ power_green: power {
+ label = "fritz7360sl:green:power";
+ gpios = <&gpio 32 1>;
+ default-state = "keep";
+ };
+ power_red: power2 {
+ label = "fritz7360sl:red:power";
+ gpios = <&gpio 33 1>;
+ };
+ info_red {
+ label = "fritz7360sl:red:info";
+ gpios = <&gpio 34 1>;
+ };
+ info_green: info_green {
+ label = "fritz7360sl:green:info";
+ gpios = <&gpio 47 1>;
+ };
+ wifi: wifi {
+ label = "fritz7360sl:green:wlan";
+ gpios = <&gpio 36 1>;
+ };
+ dect {
+ label = "fritz7360sl:green:dect";
+ gpios = <&gpio 35 1>;
+ };
+ };
+};
+
+&eth0 {
+ lan: interface@0 {
+ compatible = "lantiq,xrx200-pdi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ mac-address = [ 00 11 22 33 44 55 ];
+ lantiq,switch;
+
+ ethernet@0 {
+ compatible = "lantiq,xrx200-pdi-port";
+ reg = <0>;
+ phy-mode = "rmii";
+ phy-handle = <&phy0>;
+ // gpios = <&gpio 37 1>;
+ };
+ ethernet@1 {
+ compatible = "lantiq,xrx200-pdi-port";
+ reg = <1>;
+ phy-mode = "rmii";
+ phy-handle = <&phy1>;
+ // gpios = <&gpio 44 1>;
+ };
+ ethernet@2 {
+ compatible = "lantiq,xrx200-pdi-port";
+ reg = <2>;
+ phy-mode = "gmii";
+ phy-handle = <&phy11>;
+ };
+ ethernet@3 {
+ compatible = "lantiq,xrx200-pdi-port";
+ reg = <4>;
+ phy-mode = "gmii";
+ phy-handle = <&phy13>;
+ };
+ };
+
+ mdio@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "lantiq,xrx200-mdio";
+ phy0: ethernet-phy@0 {
+ reg = <0x00>;
+ compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
+ };
+ phy1: ethernet-phy@1 {
+ reg = <0x01>;
+ compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
+ };
+ phy11: ethernet-phy@11 {
+ reg = <0x11>;
+ compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
+ };
+ phy13: ethernet-phy@13 {
+ reg = <0x13>;
+ compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
+ };
+ };
+};
diff --git a/target/linux/lantiq/dts/VG3503J.dts b/target/linux/lantiq/dts/VG3503J.dts
index b4b3cf5aec..1aeb4f19f8 100644
--- a/target/linux/lantiq/dts/VG3503J.dts
+++ b/target/linux/lantiq/dts/VG3503J.dts
@@ -1,11 +1,185 @@
/dts-v1/;
-/include/ "VG3503J.dtsi"
+/include/ "vr9.dtsi"
/ {
+ model = "VG3503J - BT OpenReach VDSL Modem";
+
+ chosen {
+ bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
+
+ leds {
+ boot = &power_green;
+ failsafe = &power_red;
+ running = &power_green;
+
+ internet = &dsl;
+ };
+ };
+
+ memory@0 {
+ reg = <0x0 0x2000000>;
+ };
+
+ fpi@10000000 {
+ localbus@0 {
+ ranges = <0 0 0x0 0x3ffffff>;
+ nor-boot@0 {
+ compatible = "lantiq,nor";
+ bank-width = <2>;
+ reg = <0 0x0 0x2000000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x00000 0x20000>;
+ };
+
+ partition@20000 {
+ label = "kernel";
+ reg = <0x20000 0x300000>;
+ };
+
+ partition@1a0000 {
+ label = "rootfs";
+ reg = <0x320000 0x420000>;
+ };
+
+ partition@740000 {
+ label = "btagent";
+ reg = <0x740000 0x80000>;
+ };
+
+ partition@7c0000 {
+ label = "pri_bfocus_cfg";
+ reg = <0x7c0000 0x10000>;
+ };
+
+ partition@7d0000 {
+ label = "sec_bfocus_cfg";
+ reg = <0x7d0000 0x10000>;
+ };
+
+ partition@7e0000 {
+ label = "sysconfig";
+ reg = <0x7e0000 0x10000>;
+ };
+
+ partition@7f0000 {
+ label = "misc_cfg";
+ reg = <0x7f0000 0x10000>;
+ };
+ };
+ };
+ };
+
+ gpio: pinmux@E100B10 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinmux {
+ mdio {
+ lantiq,groups = "mdio";
+ lantiq,function = "mdio";
+ };
+ gphy-leds {
+ lantiq,groups = "gphy0 led0", "gphy0 led1",
+ "gphy0 led2", "gphy1 led0",
+ "gphy1 led1", "gphy1 led2";
+ lantiq,function = "gphy";
+ lantiq,pull = <2>;
+ lantiq,open-drain = <0>;
+ lantiq,output = <1>;
+ };
+ };
+ };
+ };
+
gphy-xrx200 {
compatible = "lantiq,phy-xrx200";
- firmware = "lantiq/vr9_phy22f_a1x.bin";
+ firmware1 = "lantiq/vr9_phy11g_a1x.bin"; /*VR9 1.1*/
+ firmware2 = "lantiq/vr9_phy11g_a2x.bin"; /*VR9 1.2*/
phys = [ 00 01 ];
};
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <100>;
+ reset {
+ label = "reset";
+ gpios = <&gpio 6 1>;
+ linux,code = <0x198>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ power_red: power2 {
+ label = "vg3503j:red:power";
+ gpios = <&gpio 14 1>;
+ };
+ dsl: dsl {
+ label = "vg3503j:green:dsl";
+ gpios = <&gpio 19 1>;
+ };
+ power_green: power {
+ label = "vg3503j:green:power";
+ gpios = <&gpio 28 1>;
+ default-state = "keep";
+ };
+ };
+};
+
+&eth0 {
+ interface@0 {
+ compatible = "lantiq,xrx200-pdi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ mac-address = [ 00 11 22 33 44 55 ];
+ lantiq,switch;
+ ethernet@2 {
+ compatible = "lantiq,xrx200-pdi-port";
+ reg = <2>;
+ phy-mode = "mii";
+ phy-handle = <&phy11>;
+ };
+ ethernet@4 {
+ compatible = "lantiq,xrx200-pdi-port";
+ reg = <4>;
+ phy-mode = "mii";
+ phy-handle = <&phy13>;
+ };
+ };
+
+ mdio@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "lantiq,xrx200-mdio";
+ phy11: ethernet-phy@11 {
+ reg = <0x11>;
+ compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
+ lantiq,led1h = <0x70>;
+ lantiq,led1l = <0x00>;
+ lantiq,led2h = <0x00>;
+ lantiq,led2l = <0x03>;
+ };
+ phy13: ethernet-phy@13 {
+ reg = <0x13>;
+ compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
+ lantiq,led1h = <0x70>;
+ lantiq,led1l = <0x00>;
+ lantiq,led2h = <0x00>;
+ lantiq,led2l = <0x03>;
+ };
+ };
};
diff --git a/target/linux/lantiq/dts/VG3503J.dtsi b/target/linux/lantiq/dts/VG3503J.dtsi
deleted file mode 100644
index f68d22cceb..0000000000
--- a/target/linux/lantiq/dts/VG3503J.dtsi
+++ /dev/null
@@ -1,176 +0,0 @@
-/include/ "vr9.dtsi"
-
-/ {
- model = "VG3503J - BT OpenReach VDSL Modem";
-
- chosen {
- bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
-
- leds {
- boot = &power_green;
- failsafe = &power_red;
- running = &power_green;
-
- internet = &dsl;
- };
- };
-
- memory@0 {
- reg = <0x0 0x2000000>;
- };
-
- fpi@10000000 {
- localbus@0 {
- ranges = <0 0 0x0 0x3ffffff>;
- nor-boot@0 {
- compatible = "lantiq,nor";
- bank-width = <2>;
- reg = <0 0x0 0x2000000>;
- #address-cells = <1>;
- #size-cells = <1>;
-
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
-
- partition@0 {
- label = "uboot";
- reg = <0x00000 0x20000>;
- };
-
- partition@20000 {
- label = "kernel";
- reg = <0x20000 0x300000>;
- };
-
- partition@1a0000 {
- label = "rootfs";
- reg = <0x320000 0x420000>;
- };
-
- partition@740000 {
- label = "btagent";
- reg = <0x740000 0x80000>;
- };
-
- partition@7c0000 {
- label = "pri_bfocus_cfg";
- reg = <0x7c0000 0x10000>;
- };
-
- partition@7d0000 {
- label = "sec_bfocus_cfg";
- reg = <0x7d0000 0x10000>;
- };
-
- partition@7e0000 {
- label = "sysconfig";
- reg = <0x7e0000 0x10000>;
- };
-
- partition@7f0000 {
- label = "misc_cfg";
- reg = <0x7f0000 0x10000>;
- };
- };
- };
- };
-
- gpio: pinmux@E100B10 {
- pinctrl-names = "default";
- pinctrl-0 = <&state_default>;
-
- state_default: pinmux {
- mdio {
- lantiq,groups = "mdio";
- lantiq,function = "mdio";
- };
- gphy-leds {
- lantiq,groups = "gphy0 led0", "gphy0 led1",
- "gphy0 led2", "gphy1 led0",
- "gphy1 led1", "gphy1 led2";
- lantiq,function = "gphy";
- lantiq,pull = <2>;
- lantiq,open-drain = <0>;
- lantiq,output = <1>;
- };
- };
- };
- };
-
- gpio-keys-polled {
- compatible = "gpio-keys-polled";
- #address-cells = <1>;
- #size-cells = <0>;
- poll-interval = <100>;
- reset {
- label = "reset";
- gpios = <&gpio 6 1>;
- linux,code = <0x198>;
- };
- };
-
- gpio-leds {
- compatible = "gpio-leds";
-
- power_red: power2 {
- label = "vg3503j:red:power";
- gpios = <&gpio 14 1>;
- };
- dsl: dsl {
- label = "vg3503j:green:dsl";
- gpios = <&gpio 19 1>;
- };
- power_green: power {
- label = "vg3503j:green:power";
- gpios = <&gpio 28 1>;
- default-state = "keep";
- };
- };
-};
-
-&eth0 {
- interface@0 {
- compatible = "lantiq,xrx200-pdi";
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <0>;
- mac-address = [ 00 11 22 33 44 55 ];
- lantiq,switch;
- ethernet@2 {
- compatible = "lantiq,xrx200-pdi-port";
- reg = <2>;
- phy-mode = "mii";
- phy-handle = <&phy11>;
- };
- ethernet@4 {
- compatible = "lantiq,xrx200-pdi-port";
- reg = <4>;
- phy-mode = "mii";
- phy-handle = <&phy13>;
- };
- };
-
- mdio@0 {
- #address-cells = <1>;
- #size-cells = <0>;
- compatible = "lantiq,xrx200-mdio";
- phy11: ethernet-phy@11 {
- reg = <0x11>;
- compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
- lantiq,led1h = <0x70>;
- lantiq,led1l = <0x00>;
- lantiq,led2h = <0x00>;
- lantiq,led2l = <0x03>;
- };
- phy13: ethernet-phy@13 {
- reg = <0x13>;
- compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
- lantiq,led1h = <0x70>;
- lantiq,led1l = <0x00>;
- lantiq,led2h = <0x00>;
- lantiq,led2l = <0x03>;
- };
- };
-};
diff --git a/target/linux/lantiq/dts/VG3503J_V2.dts b/target/linux/lantiq/dts/VG3503J_V2.dts
deleted file mode 100644
index 005d5bc1ad..0000000000
--- a/target/linux/lantiq/dts/VG3503J_V2.dts
+++ /dev/null
@@ -1,11 +0,0 @@
-/dts-v1/;
-
-/include/ "VG3503J.dtsi"
-
-/ {
- gphy-xrx200 {
- compatible = "lantiq,phy-xrx200";
- firmware = "lantiq/vr9_phy22f_a2x.bin";
- phys = [ 00 01 ];
- };
-};
diff --git a/target/linux/lantiq/dts/VGV7510KW22.dtsi b/target/linux/lantiq/dts/VGV7510KW22.dtsi
index c9045fa7ef..1abdc20b1d 100644
--- a/target/linux/lantiq/dts/VGV7510KW22.dtsi
+++ b/target/linux/lantiq/dts/VGV7510KW22.dtsi
@@ -49,24 +49,12 @@
pinctrl-0 = <&state_default>;
state_default: pinmux {
- ip101a-rst {
- lantiq,pins = "io46";
- lantiq,output = <0>;
- lantiq,pull = <1>;
- };
gphy-leds {
- lantiq,groups = "gphy0 led1",
+ lantiq,groups = "gphy0 led0", "gphy0 led1",
"gphy1 led0", "gphy1 led1";
lantiq,function = "gphy";
lantiq,open-drain = <0>;
- lantiq,pull = <0>;
- lantiq,output = <1>;
- };
- stp {
- lantiq,groups = "stp";
- lantiq,function = "stp";
lantiq,pull = <2>;
- lantiq,open-drain = <0>;
lantiq,output = <1>;
};
mdio {
@@ -79,26 +67,9 @@
lantiq,pull = <0>;
lantiq,output = <1>;
};
- spi {
- lantiq,groups = "spi_di", "spi_do", "spi_clk";
- lantiq,function = "spi";
- };
};
};
- stp: stp@E100BB0 {
- compatible = "lantiq,gpio-stp-xway";
- reg = <0xE100BB0 0x40>;
- #gpio-cells = <2>;
- gpio-controller;
-
- lantiq,shadow = <0xff>;
- lantiq,groups = <0x1>;
- lantiq,dsl = <0x0>;
- lantiq,phy1 = <0x7>;
- lantiq,phy2 = <0x7>; /* enable gphy0 led2 = LAN2 LED */
- };
-
ifxhcd@E101000 {
status = "okay";
gpios = <&gpio 47 0>;
@@ -237,11 +208,33 @@
};
};
+ wan: interface@1 {
+ compatible = "lantiq,xrx200-pdi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+ mtd-mac-address = <&boardconfig 0x16>;
+ mtd-mac-address-increment = <2>;
+ lantiq,wan;
+
+ ethernet@0 {
+ compatible = "lantiq,xrx200-pdi-port";
+ reg = <0>;
+ phy-mode = "mii";
+ phy-handle = <&phy1>;
+ };
+ };
+
mdio@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "lantiq,xrx200-mdio";
+ phy1: ethernet-phy@1 {
+ reg = <0x1>;
+ compatible = "ethernet-phy-id0243.0c54", "ethernet-phy-ieee802.3-c22";
+ };
+
phy11: ethernet-phy@11 {
reg = <0x11>;
compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
diff --git a/target/linux/lantiq/dts/VGV7519.dtsi b/target/linux/lantiq/dts/VGV7519.dtsi
index 95de6e56e7..ad6393e12e 100644
--- a/target/linux/lantiq/dts/VGV7519.dtsi
+++ b/target/linux/lantiq/dts/VGV7519.dtsi
@@ -23,54 +23,44 @@
};
fpi@10000000 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "lantiq,fpi", "simple-bus";
- ranges = <0x0 0x10000000 0xEEFFFFF>;
- reg = <0x10000000 0xEF00000>;
-
localbus@0 {
- #address-cells = <2>;
- #size-cells = <1>;
- compatible = "lantiq,localbus", "simple-bus";
+ nor-boot@0 {
+ compatible = "lantiq,nor";
+ bank-width = <2>;
+ reg = <0 0x0 0x800000>, <1 0x800000 0x800000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ boardconfig: partition@40000 {
+ label = "board_config";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+ };
+ };
};
gpio: pinmux@E100B10 {
- compatible = "lantiq,pinctrl-xr9";
pinctrl-names = "default";
pinctrl-0 = <&state_default>;
- interrupt-parent = <&icu0>;
- interrupts = <166 135 66 40 41 42 38>;
-
- #gpio-cells = <2>;
- gpio-controller;
- reg = <0xE100B10 0xA0>;
-
state_default: pinmux {
stp {
lantiq,groups = "stp";
lantiq,function = "stp";
- };
- spi {
- lantiq,groups = "spi_di", "spi_do", "spi_clk";
- lantiq,function = "spi";
+ lantiq,open-drain = <0>;
+ lantiq,output = <1>;
+ lantiq,pull = <0>;
};
mdio {
lantiq,groups = "mdio";
lantiq,function = "mdio";
};
- gphy-leds_out {
- lantiq,pins = "io7", "io44";
- lantiq,pull = <0>;
- lantiq,output = <1>;
- };
- stp_out {
- lantiq,pins = "io4", "io5", "io6";
- lantiq,open-drain = <0>;
- lantiq,output = <1>;
- lantiq,pull = <0>;
- };
pci-rst {
lantiq,pins = "io21";
lantiq,open-drain = <0>;
@@ -109,19 +99,7 @@
pci@E105400 {
status = "okay";
- #address-cells = <3>;
- #size-cells = <2>;
- #interrupt-cells = <1>;
- compatible = "lantiq,pci-xway";
- bus-range = <0x0 0x0>;
- ranges = <0x2000000 0 0x8000000 0x8000000 0 0x2000000 /* pci memory */
- 0x1000000 0 0x00000000 0xAE00000 0 0x200000>; /* io space */
- reg = <0x7000000 0x8000 /* config space */
- 0xE105400 0x400>; /* pci bridge */
lantiq,bus-clock = <33333333>;
- /*lantiq,external-clock;*/
- lantiq,delay-hi = <0>; /* 0ns delay */
- lantiq,delay-lo = <0>; /* 0.0ns delay */
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
interrupt-map = <
0x7000 0 0 1 &icu0 30 1 // slot 14, irq 30
@@ -243,7 +221,8 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
- mac-address = [ 00 11 22 33 44 55 ];
+ mtd-mac-address = <&boardconfig 0x16>;
+ lantiq,switch;
ethernet@0 {
compatible = "lantiq,xrx200-pdi-port";
@@ -276,8 +255,10 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
- mac-address = [ 00 11 22 33 44 56 ];
+ mtd-mac-address = <&boardconfig 0x16>;
+ mtd-mac-address-increment = <2>;
lantiq,wan;
+
ethernet@5 {
compatible = "lantiq,xrx200-pdi-port";
reg = <5>;
@@ -293,27 +274,22 @@
phy0: ethernet-phy@0 {
reg = <0x0>;
compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
- lantiq,c45-reg-init = <1 0 0 0>;
};
phy1: ethernet-phy@1 {
reg = <0x1>;
compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
- lantiq,c45-reg-init = <1 0 0 0>;
};
phy5: ethernet-phy@5 {
reg = <0x5>;
compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
- lantiq,c45-reg-init = <1 0 0 0>;
};
phy11: ethernet-phy@11 {
reg = <0x11>;
compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
- lantiq,c45-reg-init = <1 0 0 0>;
};
phy13: ethernet-phy@13 {
reg = <0x13>;
compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
- lantiq,c45-reg-init = <1 0 0 0>;
};
};
};
diff --git a/target/linux/lantiq/dts/VGV7519BRN.dts b/target/linux/lantiq/dts/VGV7519BRN.dts
index 4f56ba8974..b225acf57d 100644
--- a/target/linux/lantiq/dts/VGV7519BRN.dts
+++ b/target/linux/lantiq/dts/VGV7519BRN.dts
@@ -6,31 +6,62 @@
/ {
fpi@10000000 {
localbus@0 {
- nor-flash@0 {
- compatible = "lantiq,nor", "cfi-flash";
- bank-width = <2>;
- reg = <0 0x0 0x800000>, <1 0x800000 0x800000>;
- #address-cells = <1>;
- #size-cells = <1>;
-
+ nor-boot@0 {
partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
+ partition@0 {
+ label = "Boot";
+ reg = <0x00000 0x40000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "Certificate";
+ reg = <0x50000 0x10000>;
+ read-only;
+ };
+ partition@60000 {
+ label = "Special_Area";
+ reg = <0x60000 0x10000>;
+ read-only;
+ };
- partition@40000 {
- label = "board_config";
- reg = <0x40000 0x10000>;
+ partition@70000 {
+ label = " Reserve_0";
+ reg = <0x70000 0x10000>;
read-only;
};
+
partition@80000 {
- label = "firmware";
+ label = "Code_Image_0";
reg = <0x80000 0x780000>;
+ brnboot,root-id = <0x00>;
+ read-only;
+ };
+
+ partition@4000000 {
+ compatible = "brnboot,root-selector";
+ label = "Primary_Setting";
+ reg = <0x4000000 0x10000>;
+ read-only;
+ };
+
+ partition@4010000 {
+ label = "Configuration";
+ reg = <0x4010000 0x60000>;
read-only;
};
- partition@880000 {
- label = "rootfs_data";
- reg = <0x880000 0x780000>;
+
+ partition@4070000 {
+ label = " Reserve_1";
+ reg = <0x4070000 0x10000>;
+ read-only;
+ };
+
+ partition@4080000 {
+ label = "Code_Image_1";
+ reg = <0x4080000 0x780000>;
+ brnboot,root-id = <0x01>;
+ read-only;
};
};
};
diff --git a/target/linux/lantiq/dts/VGV7519NOR.dts b/target/linux/lantiq/dts/VGV7519NOR.dts
index 24a3d1666a..69b0a1f450 100644
--- a/target/linux/lantiq/dts/VGV7519NOR.dts
+++ b/target/linux/lantiq/dts/VGV7519NOR.dts
@@ -7,26 +7,11 @@
fpi@10000000 {
localbus@0 {
nor-boot@0 {
- compatible = "lantiq,nor";
- bank-width = <2>;
- reg = <0 0x0 0x800000>, <1 0x800000 0x800000>;
- #address-cells = <1>;
- #size-cells = <1>;
-
partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
-
partition@0 {
label = "uboot";
reg = <0x00000 0x40000>;
};
- partition@40000 {
- label = "board_config";
- reg = <0x40000 0x10000>;
- read-only;
- };
partition@60000 {
label = "uboot_env";
reg = <0x60000 0x10000>;
@@ -34,9 +19,6 @@
partition@80000 {
label = "firmware";
reg = <0x80000 0xf80000>;
- // 0x080000 - 0x01b0000 : kernel
- // 0x1b0000 - 0x1000000 : rootfs (squashfs)
- // 0x390000 - 0x1000000 : rootfs_data
};
};
};
diff --git a/target/linux/lantiq/dts/WBMR300.dts b/target/linux/lantiq/dts/WBMR300.dts
new file mode 100644
index 0000000000..824efb7cc0
--- /dev/null
+++ b/target/linux/lantiq/dts/WBMR300.dts
@@ -0,0 +1,303 @@
+/dts-v1/;
+
+/include/ "vr9.dtsi"
+
+/ {
+ model = "WBMR300 - Buffalo WBMR-300HPD";
+
+ chosen {
+ bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
+
+ leds {
+ boot = &power_g;
+ failsafe = &diag_r;
+ running = &power_g;
+
+ dsl = &dsl;
+ internet = &router_g;
+ wifi = &wifi_g;
+ };
+ };
+
+ memory@0 {
+ reg = <0x0 0x4000000>;
+ };
+
+ fpi@10000000 {
+ gpio: pinmux@E100B10 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinmux {
+ mdio {
+ lantiq,groups = "mdio";
+ lantiq,function = "mdio";
+ };
+ phy-rst {
+ lantiq,pins = "io42";
+ lantiq,pull = <0>;
+ lantiq,open-drain = <0>;
+ lantiq,output = <1>;
+ };
+ pcie-rst {
+ lantiq,pins = "io38";
+ lantiq,pull = <0>;
+ lantiq,output = <1>;
+ };
+ };
+ pins_spi_default: pins_spi_default {
+ spi_in {
+ lantiq,groups = "spi_di";
+ lantiq,function = "spi";
+ };
+ spi_out {
+ lantiq,groups = "spi_do", "spi_clk",
+ "spi_cs4";
+ lantiq,function = "spi";
+ lantiq,output = <1>;
+ };
+ };
+ };
+
+ ifxhcd@E101000 {
+ status = "okay";
+ gpios = <&gpio 33 0>;
+ lantiq,portmask = <0x3>;
+ };
+
+ ifxhcd@E106000 {
+ status = "okay";
+ gpios = <&gpio 33 0>;
+ };
+ };
+
+ gphy-xrx200 {
+ compatible = "lantiq,phy-xrx200";
+ firmware = "lantiq/vr9_phy22f_a2x.bin";
+ phys = [ 00 01 ];
+ };
+
+ gpio_poweroff {
+ compatible = "gpio-poweroff";
+ gpios = <&gpio 6 1>;
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <100>;
+
+ power {
+ label = "power";
+ gpios = <&gpio 5 1>;
+ linux,code = <0x74>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 7 1>;
+ linux,code = <0x198>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 31 1>;
+ linux,code = <0x211>;
+ };
+
+ auto {
+ label = "auto";
+ gpios = <&gpio 48 0>;
+ linux,code = <0x100>;
+ linux,input-type = <5>; /* EV_SW */
+ };
+
+ router {
+ label = "router";
+ gpios = <&gpio 2 0>;
+ linux,code = <0x100>;
+ linux,input-type = <5>; /* EV_SW */
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ diag_r: diag_r {
+ label = "wbmr300:red:diag";
+ gpios = <&gpio 0 0>;
+ default_state = "off";
+ };
+
+ wifi_g: wifi_g {
+ label = "wbmr300:green:wifi";
+ gpios = <&gpio 1 0>;
+ };
+
+ dsl: dsl {
+ label = "dsl";
+ gpios = <&gpio 4 0>;
+ };
+
+ router_y: router_y {
+ label = "wbmr300:yellow:router";
+ gpios = <&gpio 8 0>;
+ };
+
+ wifi_y: wifi_y {
+ label = "wbmr300:yellow:wifi";
+ gpios = <&gpio 9 0>;
+ };
+
+ lan1: lan1 {
+ label = "wbmr300:green:lan1";
+ gpios = <&gpio 11 0>;
+ };
+
+ wan: wan {
+ label = "wbmr300:green:wan";
+ gpios = <&gpio 12 0>;
+ };
+
+ lan3: lan3 {
+ label = "wbmr300:green:lan3";
+ gpios = <&gpio 15 0>;
+ };
+
+ lan2: lan2 {
+ label = "wbmr300:green:lan2";
+ gpios = <&gpio 33 0>;
+ };
+
+ internet_g: internet_g {
+ label = "wbmr300:green:internet";
+ gpios = <&gpio 34 0>;
+ };
+
+ internet_y: internet_y {
+ label = "wbmr300:yellow:internet";
+ gpios = <&gpio 35 0>;
+ };
+
+ router_g: router_g {
+ label = "wbmr300:green:router";
+ gpios = <&gpio 36 0>;
+ };
+
+ power_g: power_g {
+ label = "wbmr300:green:power";
+ gpios = <&gpio 49 0>;
+ };
+ };
+};
+
+&spi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pins_spi_default>;
+
+ status = "ok";
+ m25p80@4 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "jedec,spi-nor";
+ reg = <4 0>;
+ spi-max-frequency = <20000000>;
+
+ partition@0 {
+ reg = <0x0 0x10000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition@10000 {
+ reg = <0x10000 0x10000>;
+ label = "gphyfirmware";
+ read-only;
+ };
+
+ partition@20000 {
+ reg = <0x20000 0x80000>;
+ label = "dsl_fw";
+ };
+
+ partition@de0000 {
+ reg = <0xa0000 0xf40000>;
+ label = "firmware";
+ };
+
+ partition@fe0000 {
+ reg = <0xfe0000 0x10000>;
+ label = "sysconfig";
+ read-only;
+ };
+
+ partition@ff0000 {
+ reg = <0xff0000 0x2000>;
+ label = "ubootconfig";
+ };
+
+ partition@ff3000 {
+ reg = <0xff3000 0x2000>;
+ label = "board_config";
+ read-only;
+ };
+ };
+};
+
+&eth0 {
+ lan: interface@0 {
+ compatible = "lantiq,xrx200-pdi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ lantiq,switch;
+
+ ethernet@1 {
+ compatible = "lantiq,xrx200-pdi-port";
+ reg = <4>;
+ phy-mode = "mii";
+ phy-handle = <&phy13>;
+ };
+ ethernet@2 {
+ compatible = "lantiq,xrx200-pdi-port";
+ reg = <5>;
+ phy-mode = "mii";
+ phy-handle = <&phy14>;
+ };
+ ethernet@3 {
+ compatible = "lantiq,xrx200-pdi-port";
+ reg = <2>;
+ phy-mode = "mii";
+ phy-handle = <&phy11>;
+ };
+ ethernet@4 {
+ compatible = "lantiq,xrx200-pdi-port";
+ reg = <3>;
+ phy-mode = "mii";
+ phy-handle = <&phy12>;
+ };
+ };
+
+ mdio@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "lantiq,xrx200-mdio";
+ phy11: ethernet-phy@11 {
+ reg = <0x11>;
+ compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
+ };
+ phy12: ethernet-phy@12 {
+ reg = <0x12>;
+ compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
+ };
+ phy13: ethernet-phy@13 {
+ reg = <0x13>;
+ compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
+ };
+ phy14: ethernet-phy@14 {
+ reg = <0x14>;
+ compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
+ };
+ };
+};
diff --git a/target/linux/lantiq/dts/amazonse.dtsi b/target/linux/lantiq/dts/amazonse.dtsi
index c0bba436d1..c586106359 100644
--- a/target/linux/lantiq/dts/amazonse.dtsi
+++ b/target/linux/lantiq/dts/amazonse.dtsi
@@ -45,7 +45,7 @@
compatible = "lantiq,eiu-xway";
reg = <0x101000 0x1000>;
interrupt-parent = <&icu0>;
- interrupts = <29 30 31>;
+ lantiq,eiu-irqs = <29 30 31>;
};
pmu0: pmu@102000 {
diff --git a/target/linux/lantiq/dts/ar9.dtsi b/target/linux/lantiq/dts/ar9.dtsi
index 9feb8a0e51..e67bcc2a10 100644
--- a/target/linux/lantiq/dts/ar9.dtsi
+++ b/target/linux/lantiq/dts/ar9.dtsi
@@ -50,7 +50,7 @@
compatible = "lantiq,eiu-xway";
reg = <0x101000 0x1000>;
interrupt-parent = <&icu0>;
- interrupts = <166 135 66 40 41 42>;
+ lantiq,eiu-irqs = <166 135 66 40 41 42>;
};
pmu0: pmu@102000 {
diff --git a/target/linux/lantiq/dts/danube.dtsi b/target/linux/lantiq/dts/danube.dtsi
index 0a75fd9d45..a785af4266 100644
--- a/target/linux/lantiq/dts/danube.dtsi
+++ b/target/linux/lantiq/dts/danube.dtsi
@@ -54,7 +54,7 @@
compatible = "lantiq,eiu-xway";
reg = <0x101000 0x1000>;
interrupt-parent = <&icu0>;
- interrupts = <166 135 66>;
+ lantiq,eiu-irqs = <166 135 66>;
};
pmu0: pmu@102000 {
diff --git a/target/linux/lantiq/dts/vr9.dtsi b/target/linux/lantiq/dts/vr9.dtsi
index aa34a5f3e7..15d73a50be 100644
--- a/target/linux/lantiq/dts/vr9.dtsi
+++ b/target/linux/lantiq/dts/vr9.dtsi
@@ -50,7 +50,7 @@
compatible = "lantiq,eiu-xway";
reg = <0x101000 0x1000>;
interrupt-parent = <&icu0>;
- interrupts = <166 135 66 40 41 42>;
+ lantiq,eiu-irqs = <166 135 66 40 41 42>;
};
pmu0: pmu@102000 {
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index bc74e4f697..e0a28c227f 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -57,15 +57,6 @@ define Image/Build/squashfs
$(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image)
endef
-define Image/BuildNAND/squashfs
-
-ifneq ($($(PROFILE)_UBI_OPTS),)
- $(call prepare_generic_squashfs,$(KDIR)/root.$(1))
- $(call Image/Build/UbinizeImage,$(PROFILE),,squashfs,$($(PROFILE)_UBI_OPTS))
- $(call Image/Build/SysupgradeNAND,$(PROFILE),$(1),$(KDIR)/uImage-$(PROFILE))
-endif
-endef
-
DGN3500_SKERNEL=0x50000
DGN3500_SKERNEL_DECIMAL=327680
define Image/BuildDGN3500/squashfs
@@ -108,21 +99,6 @@ define Image/BuildEVA/squashfs
$(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva)
endef
-define Image/BuildEVA/ubifs
-
-ifneq ($($(PROFILE)_UBIFS_OPTS),)
- $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubifs
-endif
-endef
-
-define Image/BuildEVA/ubi
-
-ifneq ($($(PROFILE)_UBI_OPTS),)
- $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubi
- $(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs-overlay.ubi
-endif
-endef
-
define Image/BuildLoader/squashfs
dd if=$(KDIR)/loader-$(2).bin of=$(KDIR)/loader-$(2).bin.padded bs=3072k conv=sync
cat $(KDIR)/loader-$(2).bin.padded $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
@@ -148,85 +124,45 @@ define Image/Build/jffs2-256k
cat $(KDIR)/uImage-$(2)-$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
endef
-define Image/Build/ubifs
-
-ifneq ($($(PROFILE)_UBIFS_OPTS),)
- $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubifs
-endif
-endef
-
-define Image/Build/ubi
-
-ifneq ($($(PROFILE)_UBI_OPTS),)
- $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubi
- $(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs-overlay.ubi
-endif
-endef
-
-
-define Image/BuildNAND/ubifs
-
-ifneq ($($(PROFILE)_UBIFS_OPTS),)
-ifneq ($($(PROFILE)_UBI_OPTS),)
- $(call Image/Build/UbinizeImage,$(PROFILE),,ubifs,$($(PROFILE)_UBI_OPTS))
- $(call Image/Build/SysupgradeNAND,$(PROFILE),$(1),$(KDIR)/uImage-$(PROFILE))
-endif
-endif
-endef
-
-
-define Image/InstallKernel/Template
-
-ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_KERNEL),)
- $(INSTALL_DIR) $(TARGET_DIR)/boot
-
-ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_UIMAGE),)
- $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage $(TARGET_DIR)/boot/
- ln -sf $(IMG_PREFIX)-$(1)-uImage $(TARGET_DIR)/boot/uImage
-endif
-
-ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_ZIMAGE),)
- $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-zImage $(TARGET_DIR)/boot/
- ln -sf $(IMG_PREFIX)-$(1)-zImage $(TARGET_DIR)/boot/zImage
-endif
-endif
-
-ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_DTB),)
- $(INSTALL_DIR) $(TARGET_DIR)/boot
-
-ifneq ($(1),)
- $(CP) $(KDIR)/$(1).dtb $(TARGET_DIR)/boot/
-endif
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ define Image/BuildKernel/InitramfsTemplate
+ $(call PatchKernelLzma,$(1),-initramfs)
+ $(call MkImageLzma,$(1),-initramfs)
+ $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs
+ endef
endif
-endef
define Image/BuildKernel/Template
$(call PatchKernelLzma,$(1))
$(call MkImageLzma,$(1))
$(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage
-ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
- $(call PatchKernelLzma,$(1),-initramfs)
- $(call MkImageLzma,$(1),-initramfs)
- $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs
-endif
+ $(Image/BuildKernel/InitramfsTemplate)
endef
-define Image/BuildKernelLoader/Template
- $(CP) $(KDIR)/loader-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-loader
- $(CP) $(KDIR)/vmlinux-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ define Image/BuildKernelLoader/InitramfsTemplate
$(CP) $(KDIR)/loader-initramfs-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs-loader
$(CP) $(KDIR)/vmlinux-initramfs-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs
+ endef
endif
+
+define Image/BuildKernelLoader/Template
+ $(CP) $(KDIR)/loader-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-loader
+ $(CP) $(KDIR)/vmlinux-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux
+ $(Image/BuildKernelLoader/InitramfsTemplate)
endef
-define Image/Prepare/Profile
- $(call PatchKernelLzma,$(1))
- $(call Image/BuildLoader/Template,$(1))
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ define Image/Prepare/InitramfsTemplate
$(call PatchKernelLzma,$(1),-initramfs)
$(call Image/BuildLoader/Template,$(1),-initramfs)
+ endef
endif
+
+define Image/Prepare/Template
+ $(call PatchKernelLzma,$(1))
+ $(call Image/BuildLoader/Template,$(1))
+ $(Image/Prepare/InitramfsTemplate)
endef
define Image/BuildKernelEVA/Template
@@ -234,12 +170,6 @@ define Image/BuildKernelEVA/Template
$(call MkImageEVA,$(1))
$(CP) $(KDIR)/$(1).eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.64k
$(CP) $(KDIR)/$(1).eva.align.128k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.128k
-ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
- $(call PatchKernelLzma,$(1),-initramfs)
- $(call MkImageEVA,$(1),-initramfs)
- $(CP) $(KDIR)/$(1)-initramfs.eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-initramfs.eva.align.64k
- $(CP) $(KDIR)/$(1)-initramfs.eva.align.128k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-initramfs.eva.align.128k
-endif
endef
@@ -249,18 +179,6 @@ define Build/append-dtb
cat $@.dtb >> $@
endef
-define Build/tplink-fw
- mktplinkfw2 -c -B $(BOARD_ID) -s \
- -k $@ -o $@.new
- mv $@.new $@
-endef
-
-define Build/mktplinkfw2
- mktplinkfw2 -B $(BOARD_ID) -s -a 0x4 -j \
- -k $(word 1,$^) -r $(word 2,$^) \
- -o $@
-endef
-
define Build/mkbrncmdline
mkbrncmdline -i $@ -o $@.new BRN-BOOT
mv $@.new $@
@@ -270,6 +188,21 @@ define Build/mkbrnimg
mkbrnimg -s $(SIGNATURE) -m $(MAGIC) -p $(CRC32_POLY) -o $@ $(word 1,$^) $(word 2,$^)
endef
+define Build/fullimage
+ mkimage -A mips -O linux -C lzma -T filesystem -a 0x00 \
+ -e 0x00 -n 'LEDE RootFS' \
+ -d $(word 2,$^) $(word 2,$^).new
+
+ cat $(word 1,$^) $(word 2,$^).new > $@.tmp
+
+ mkimage -A mips -O linux -T multi -a 0x00 -C none \
+ -e 0x00 -n 'OpenWrt fullimage' \
+ -d $@.tmp $@
+
+ rm $(word 2,$^).new
+ rm $@.tmp
+endef
+
# Shared device definition: applies to every defined device
define Device/Default
PROFILES = Default $$(DEVICE_PROFILE)
@@ -279,172 +212,585 @@ define Device/Default
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
FILESYSTEMS := squashfs
DEVICE_PROFILE :=
- DEVICE_DTS :=
- IMAGES := sysupgrade.bin
- IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs
-endef
-DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS
-
-define Device/lantiqTpLink
- KERNEL := kernel-bin | append-dtb | lzma
- KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-fw
+ DEVICE_DTS = $$(DEVICE_PROFILE)
+ IMAGE_SIZE :=
IMAGES := sysupgrade.bin
- IMAGE/sysupgrade.bin := mktplinkfw2
+ IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
endef
-DEVICE_VARS += BOARD_ID
+DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS IMAGE_SIZE
define Device/lantiqBrnImage
KERNEL := kernel-bin | append-dtb | mkbrncmdline | lzma-no-dict
IMAGES := factory.bin
- IMAGE/factory.bin := mkbrnimg
+ IMAGE/factory.bin := mkbrnimg | check-size $$$$(IMAGE_SIZE)
endef
DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY
-define lantiqTpLink
- define Device/$(1)
- $$(Device/lantiqTpLink)
- DEVICE_PROFILE := $(1)
- DEVICE_DTS := $(1)
- BOARD_ID := $(2)
- endef
- TARGET_DEVICES += $(1)
-endef
-
-define lantiqImage
- define Device/$(1)
- $$(Device/lantiqImage)
- DEVICE_PROFILE := $(1)
- DEVICE_DTS := $(if $(2),$(2),$(1))
- endef
- TARGET_DEVICES += $(1)
-endef
-
-define lantiqBrnImage
- define Device/$(1)
- $$(Device/lantiqBrnImage)
- DEVICE_PROFILE := $(1)
- DEVICE_DTS := $(1)
- SIGNATURE := $(2)
- MAGIC := $(3)
- CRC32_POLY := $(4)
- endef
- TARGET_DEVICES += $(1)
-endef
-
-ifeq ($(CONFIG_TARGET_lantiq_falcon),y)
-
-$(eval $(call lantiqImage,EASY98000NOR))
-$(eval $(call lantiqImage,EASY98000SFLASH))
+define Device/lantiqFullImage
+ KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | pad-offset 4 0
+ IMAGES := sysupgrade.bin fullimage.img
+ IMAGE/fullimage.img := fullimage | check-size $$$$(IMAGE_SIZE)
+endef
+
+ifeq ($(SUBTARGET),xway_legacy)
+
+define Device/ARV4520PW
+ DEVICE_PROFILE := ARV4520PW
+ IMAGE_SIZE := 3648k
+ DEVICE_TITLE := Easybox 800, WAV-281 - ARV4520PW
+ DEVICE_PACKAGES := kmod-ltq-hcd-danube \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-rt61-pci wpad-mini \
+ swconfig
+endef
+TARGET_DEVICES += ARV4520PW
+
+define Device/ARV4525PW
+ DEVICE_PROFILE := ARV4525PW
+ IMAGE_SIZE := 3776k
+ DEVICE_TITLE := Speedport W502V Typ A - ARV4525PW
+ DEVICE_PACKAGES := kmod-ath5k wpad-mini \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa
+endef
+TARGET_DEVICES += ARV4525PW
+
+define Device/ARV452CQW
+ DEVICE_PROFILE := ARV452CQW
+ IMAGE_SIZE := 3776k
+ DEVICE_TITLE := Easybox 801 - ARV452CQW
+ DEVICE_PACKAGES := kmod-ltq-hcd-danube \
+ kmod-ath5k wpad-mini \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ swconfig
+endef
+TARGET_DEVICES += ARV452CQW
+
+define Device/ARV4518PWR01
+ DEVICE_PROFILE := ARV4518PWR01
+ IMAGE_SIZE := 3776k
+ DEVICE_TITLE := ARV4518PWR01
+ DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ath5k wpad-mini \
+ swconfig
+endef
+TARGET_DEVICES += ARV4518PWR01
+
+define Device/ARV4518PWR01A
+ DEVICE_PROFILE := ARV4518PWR01A
+ IMAGE_SIZE := 3776k
+ DEVICE_TITLE := ARV4518PWR01A
+ DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ath5k wpad-mini \
+ swconfig
+endef
+TARGET_DEVICES += ARV4518PWR01A
endif
-
-ifeq ($(CONFIG_TARGET_lantiq_ase),y)
-
-$(eval $(call lantiqImage,DGN1000B))
-
-endif
-
-
-ifeq ($(CONFIG_TARGET_lantiq_xway),y)
+ifeq ($(SUBTARGET),xway)
# Danube
+DEVICE_BTHOMEHUBV2B_UBIFS_OPTS:="-m 512 -e 15872 -c 1959"
+DEVICE_BTHOMEHUBV2B_UBI_OPTS:="-m 512 -p 16KiB -s 256"
+
Image/BuildKernel/Profile/BTHOMEHUBV2B=$(call Image/BuildKernel/Template,BTHOMEHUBV2B)
Image/Build/Profile/BTHOMEHUBV2B=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV2B)
-$(eval $(call lantiqImage,EASY50712))
-$(eval $(call lantiqImage,ACMP252))
-$(eval $(call lantiqImage,ARV4510PW))
-$(eval $(call lantiqImage,ARV4525PW))
-$(eval $(call lantiqImage,ARV7525PW))
-$(eval $(call lantiqImage,ARV4518PWR01))
-$(eval $(call lantiqImage,ARV4518PWR01A))
-$(eval $(call lantiqImage,ARV4519PW))
-$(eval $(call lantiqImage,ARV4520PW))
-$(eval $(call lantiqImage,ARV452CQW))
-$(eval $(call lantiqImage,ARV7510PW22))
-$(eval $(call lantiqImage,ARV7518PW))
-$(eval $(call lantiqImage,ARV7519PW))
-$(eval $(call lantiqImage,ARV752DPW))
-$(eval $(call lantiqImage,ARV752DPW22))
-$(eval $(call lantiqImage,ARV8539PW22))
-$(eval $(call lantiqImage,GIGASX76X))
+define LegacyDevice/BTHOMEHUBV2B
+ DEVICE_TITLE := BT Home Hub 2B
+ DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+ kmod-ltq-deu-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ath9k wpad-mini \
+ swconfig
+endef
+LEGACY_DEVICES += BTHOMEHUBV2B
+
+define Device/EASY50712
+ DEVICE_PROFILE := EASY50712
+ IMAGE_SIZE := 3776k
+ DEVICE_TITLE := Lantiq Danube - EASY50712
+endef
+TARGET_DEVICES += EASY50712
+
+define Device/ACMP252
+ DEVICE_PROFILE := ACMP252
+ IMAGE_SIZE := 14848k
+ DEVICE_TITLE := AudioCodes MediaPack MP-252
+ DEVICE_PACKAGES := kmod-rt2x00-pci wpad-mini \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-a kmod-ltq-ptm-danube \
+ ltq-adsl-app
+endef
+TARGET_DEVICES += ACMP252
+
+define Device/ARV4510PW
+ DEVICE_PROFILE := ARV4510PW
+ IMAGE_SIZE := 15616k
+ DEVICE_TITLE := Wippies, Elisa - ARV4510PW
+ DEVICE_PACKAGES := kmod-ledtrig-usbdev kmod-usb2-pci kmod-usb-uhci \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ltq-tapi kmod-ltq-vmmc \
+ kmod-rt2800-pci kmod-ath5k wpad-mini \
+ swconfig
+endef
+TARGET_DEVICES += ARV4510PW
+
+define Device/ARV7525PW
+ DEVICE_PROFILE := ARV7525PW
+ IMAGE_SIZE := 3776k
+ DEVICE_TITLE := Speedport W303V Typ A - ARV7525PW
+ DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa
+endef
+TARGET_DEVICES += ARV7525PW
+
+define Device/ARV4519PW
+ DEVICE_PROFILE := ARV4519PW
+ IMAGE_SIZE := 3776k
+ DEVICE_TITLE := Vodafone, Pirelli - ARV4519PW
+ DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ swconfig
+endef
+TARGET_DEVICES += ARV4519PW
+
+define Device/ARV7510PW22
+ DEVICE_PROFILE := ARV7510PW22
+ IMAGE_SIZE := 31232k
+ DEVICE_TITLE := Astoria - ARV7510PW22
+ DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ltq-tapi kmod-ltq-vmmc \
+ kmod-rt2800-pci wpad-mini \
+ kmod-usb-uhci kmod-usb2 kmod-usb2-pci \
+ swconfig
+endef
+TARGET_DEVICES += ARV7510PW22
+
+define Device/ARV7518PW
+ DEVICE_PROFILE := ARV7518PW
+ IMAGE_SIZE := 7872k
+ DEVICE_TITLE := Astoria - ARV7518PW
+ DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ath9k wpad-mini \
+ swconfig
+endef
+TARGET_DEVICES += ARV7518PW
+
+define Device/ARV7519PW
+ DEVICE_PROFILE := ARV7519PW
+ IMAGE_SIZE := 15488k
+ DEVICE_TITLE := Astoria - ARV7519PW
+ DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-rt2800-pci wpad-mini \
+ swconfig
+endef
+TARGET_DEVICES += ARV7519PW
+
+define Device/ARV752DPW
+ DEVICE_PROFILE := ARV752DPW
+ IMAGE_SIZE := 7872k
+ DEVICE_TITLE := Easybox 802 - ARV752DPW
+ DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ltq-tapi kmod-ltq-vmmc \
+ kmod-rt2800-pci wpad-mini \
+ swconfig
+endef
+TARGET_DEVICES += ARV752DPW
+
+define Device/ARV752DPW22
+ DEVICE_PROFILE := ARV752DPW22
+ IMAGE_SIZE := 7616k
+ DEVICE_TITLE := Easybox 803 - ARV752DPW22
+ DEVICE_PACKAGES := kmod-usb2-pci kmod-usb-uhci kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ltq-tapi kmod-ltq-vmmc \
+ kmod-rt2800-pci wpad-mini \
+ swconfig
+endef
+TARGET_DEVICES += ARV752DPW22
+
+define Device/ARV8539PW22
+ DEVICE_PROFILE := ARV8539PW22
+ IMAGE_SIZE := 7616k
+ DEVICE_TITLE := Speedport W504V Typ A - ARV8539PW22
+ DEVICE_PACKAGES := kmod-ltq-hcd-danube \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ath9k wpad-mini \
+ swconfig
+endef
+TARGET_DEVICES += ARV8539PW22
+
+define Device/GIGASX76X
+ DEVICE_PROFILE := GIGASX76X
+ IMAGE_SIZE := 7680k
+ DEVICE_TITLE := Gigaset sx76x
+ DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+ ltq-adsl-app ppp-mod-pppoe \
+ kmod-ath5k wpad-mini \
+ swconfig
+endef
+TARGET_DEVICES += GIGASX76X
+
# AR9
+DEVICE_BTHOMEHUBV3A_UBIFS_OPTS:="-m 512 -e 15872 -c 1959"
+DEVICE_BTHOMEHUBV3A_UBI_OPTS:="-m 512 -p 16KiB -s 256"
+
Image/BuildKernel/Profile/BTHOMEHUBV3A=$(call Image/BuildKernel/Template,BTHOMEHUBV3A)
Image/Build/Profile/BTHOMEHUBV3A=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV3A)
+define LegacyDevice/BTHOMEHUBV3A
+ DEVICE_TITLE := BT Home Hub 3A
+ DEVICE_PACKAGES := kmod-usb-dwc2 kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+ kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
+ kmod-ltq-deu-ar9 \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ath9k wpad-mini \
+ swconfig uboot-envtools
+endef
+LEGACY_DEVICES += BTHOMEHUBV3A
+
Image/BuildKernel/Profile/DGN3500=$(call Image/BuildKernel/Template,DGN3500)
Image/Build/Profile/DGN3500=$(call Image/BuildDGN3500/$(1),$(1),DGN3500)
+define LegacyDevice/DGN3500
+ DEVICE_TITLE := Netgear DGN3500
+ DEVICE_PACKAGES := kmod-usb-dwc2 kmod-ledtrig-usbdev \
+ kmod-ath9k wpad-mini \
+ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+ kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ltq-deu-ar9 swconfig
+endef
+LEGACY_DEVICES += DGN3500
+
Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B)
Image/Build/Profile/DGN3500B=$(call Image/BuildDGN3500B/$(1),$(1),DGN3500B)
-$(eval $(call lantiqImage,WBMRA,WBMR))
-$(eval $(call lantiqImage,WBMRB,WBMR))
+define LegacyDevice/DGN3500B
+ DEVICE_TITLE := Netgear DGN3500B
+ DEVICE_PACKAGES := kmod-usb-dwc2 kmod-ledtrig-usbdev \
+ kmod-ath9k wpad-mini \
+ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+ kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ltq-deu-ar9 swconfig
+endef
+LEGACY_DEVICES += DGN3500B
+
+define Device/WBMRA
+ DEVICE_PROFILE := WBMRA
+ IMAGE_SIZE := 31488k
+ DEVICE_DTS := WBMR
+ DEVICE_TITLE := Buffalo WBMR-HP-G300H (A) - WBMR
+ DEVICE_PACKAGES := kmod-usb-dwc2 kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+ kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ath9k wpad hostapd-utils \
+ swconfig
+endef
+TARGET_DEVICES += WBMRA
+
+define Device/WBMRB
+ DEVICE_PROFILE := WBMRB
+ IMAGE_SIZE := 31488k
+ DEVICE_DTS := WBMR
+ DEVICE_TITLE := Buffalo WBMR-HP-G300H (B) - WBMR
+ DEVICE_PACKAGES := kmod-usb-dwc2 kmod-ledtrig-usbdev \
+ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+ kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ath9k wpad hostapd-utils \
+ swconfig
+endef
+TARGET_DEVICES += WBMRB
Image/BuildKernel/Profile/FRITZ7320=$(call Image/BuildKernelEVA/Template,FRITZ7320)
Image/Build/Profile/FRITZ7320=$(call Image/BuildEVA/$(1),$(1),FRITZ7320)
-$(eval $(call lantiqImage,GR7000))
-$(eval $(call lantiqImage,H201L))
-$(eval $(call lantiqImage,P2601HNFX))
+define LegacyDevice/FRITZ7320
+ DEVICE_TITLE := 1&1 HomeServer - FRITZ7320
+ DEVICE_PACKAGES := kmod-ath9k wpad-mini \
+ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+ kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
+ ltq-adsl-app ppp-mod-pppoa \
+ kmod-ltq-deu-ar9 kmod-usb-dwc2 \
+ kmod-ath9k wpad-mini
+endef
+LEGACY_DEVICES += FRITZ7320
+
+define Device/GR7000
+ DEVICE_PROFILE := GR7000
+ IMAGE_SIZE := 7808k
+ DEVICE_TITLE := Aztech GR7000
+ DEVICE_PACKAGES := kmod-ltq-deu-ar9 kmod-usb-dwc2 swconfig
+endef
+TARGET_DEVICES += GR7000
+
+define Device/H201L
+ DEVICE_PROFILE := H201L
+ IMAGE_SIZE := 7808k
+ DEVICE_TITLE := ZTE H201L - H201L
+ DEVICE_PACKAGES := kmod-ath9k-htc wpad-mini \
+ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+ kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
+ ltq-adsl-app ppp-mod-pppoe \
+ kmod-ltq-deu-ar9 kmod-usb-dwc2 \
+ kmod-ltq-tapi kmod-ltq-vmmc \
+ swconfig
+endef
+TARGET_DEVICES += H201L
+
+define Device/P2601HNFX
+ DEVICE_PROFILE := P2601HNFX
+ IMAGE_SIZE := 15616k
+ DEVICE_TITLE := ZyXEL P-2601HN-Fx
+ DEVICE_PACKAGES := kmod-rt2800-usb wpad-mini \
+ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+ kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
+ ltq-adsl-app ppp-mod-pppoe \
+ kmod-ltq-deu-ar9 kmod-usb-dwc2 \
+ swconfig
+endef
+TARGET_DEVICES += P2601HNFX
+
endif
-ifeq ($(CONFIG_TARGET_lantiq_xrx200),y)
+ifeq ($(SUBTARGET),xrx200)
# VR9
+DEVICE_P2812HNUF1_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
+DEVICE_P2812HNUF1_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
+
Image/BuildKernel/Profile/P2812HNUF1=$(call Image/BuildKernel/Template,P2812HNUF1)
Image/Build/Profile/P2812HNUF1=$(call Image/BuildNAND/$(1),$(1),P2812HNUF1)
+define LegacyDevice/P2812HNUF1
+ DEVICE_TITLE := ZyXEL P-2812HNU-F1
+ DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2
+endef
+LEGACY_DEVICES += P2812HNUF1
+
+DEVICE_P2812HNUF3_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
+DEVICE_P2812HNUF3_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
+
Image/BuildKernel/Profile/P2812HNUF3=$(call Image/BuildKernel/Template,P2812HNUF3)
Image/Build/Profile/P2812HNUF3=$(call Image/BuildNAND/$(1),$(1),P2812HNUF3)
-$(eval $(call lantiqImage,ARV7519RW22))
+define LegacyDevice/P2812HNUF3
+ DEVICE_TITLE := ZyXEL P-2812HNU-F3
+ DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2
+endef
+LEGACY_DEVICES += P2812HNUF3
+
+define Device/ARV7519RW22
+ DEVICE_PROFILE := ARV7519RW22
+ IMAGE_SIZE := 31232k
+ DEVICE_TITLE := Livebox Astoria ARV7519RW22
+ DEVICE_PACKAGES := kmod-usb-dwc2
+endef
+TARGET_DEVICES += ARV7519RW22
+
+
+DEVICE_BTHOMEHUBV5A_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
+DEVICE_BTHOMEHUBV5A_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
Image/BuildKernel/Profile/BTHOMEHUBV5A=$(call Image/BuildKernel/Template,BTHOMEHUBV5A)
Image/Build/Profile/BTHOMEHUBV5A=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV5A)
-$(eval $(call lantiqImage,EASY80920NAND))
-$(eval $(call lantiqImage,EASY80920NOR))
+define LegacyDevice/BTHOMEHUBV5A
+ DEVICE_TITLE := BT Home Hub 5A
+ DEVICE_PACKAGES := kmod-ath9k kmod-ath10k wpad-mini kmod-usb-dwc2
+endef
+LEGACY_DEVICES += BTHOMEHUBV5A
+
+define Device/EASY80920NAND
+ $(Device/lantiqFullImage)
+ DEVICE_PROFILE := EASY80920NAND
+ IMAGE_SIZE := 64512k
+ DEVICE_TITLE := Lantiq VR9 - EASY80920NAND
+ DEVICE_PACKAGES := kmod-ath9k wpad-mini kmod-usb-dwc2
+endef
+TARGET_DEVICES += EASY80920NAND
+
+define Device/EASY80920NOR
+ DEVICE_PROFILE := EASY80920NOR
+ IMAGE_SIZE := 7936k
+ DEVICE_TITLE := Lantiq VR9 - EASY80920NOR
+ DEVICE_PACKAGES := kmod-ath9k wpad-mini kmod-usb-dwc2
+endef
+TARGET_DEVICES += EASY80920NOR
+
+
+DEVICE_FRITZ3370_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
+DEVICE_FRITZ3370_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
Image/BuildKernel/Profile/FRITZ3370=$(call Image/BuildKernelEVA/Template,FRITZ3370)
Image/Build/Profile/FRITZ3370=$(call Image/BuildEVA/$(1),$(1),FRITZ3370)
+define LegacyDevice/FRITZ3370
+ DEVICE_TITLE := Fritz!Box WLan - FRITZ3370
+ DEVICE_PACKAGES := kmod-ath9k wpad-mini kmod-usb-dwc2
+endef
+LEGACY_DEVICES += FRITZ3370
+
+Image/BuildKernel/Profile/FRITZ7360SL=$(call Image/BuildKernelEVA/Template,FRITZ7360SL)
+Image/Build/Profile/FRITZ7360SL=$(call Image/BuildEVA/$(1),$(1),FRITZ7360SL)
+
+define LegacyDevice/FRITZ7360SL
+ DEVICE_TITLE := 1&1 HomeServer - FRITZ7360SL
+ DEVICE_PACKAGES := kmod-ath9k wpad-mini kmod-usb-dwc2
+endef
+LEGACY_DEVICES += FRITZ7360L
+
+Image/Prepare/Profile/VG3503J=$(call Image/Prepare/Template,VG3503J)
Image/BuildKernel/Profile/VG3503J=$(call Image/BuildKernelLoader/Template,VG3503J)
Image/Build/Profile/VG3503J=$(call Image/BuildLoader/$(1),$(1),VG3503J)
-Image/BuildKernel/Profile/VG3503J_V2=$(call Image/BuildKernelLoader/Template,VG3503J_V2)
-Image/Build/Profile/VG3503J_V2=$(call Image/BuildLoader/$(1),$(1),VG3503J_V2)
+define LegacyDevice/VG3503J
+ DEVICE_TITLE := BT Openreak - ECI VDSL Modem
+endef
+LEGACY_DEVICES += VG3503J
+
+include tp-link.mk
-$(eval $(call lantiqTpLink,TDW8970,TD-W8970v1))
-$(eval $(call lantiqTpLink,TDW8980,TD-W8980v1))
-$(eval $(call lantiqTpLink,VR200v,ArcherVR200V))
-$(eval $(call lantiqImage,VGV7510KW22NOR))
-$(eval $(call lantiqBrnImage,VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7))
-$(eval $(call lantiqImage,VGV7519NOR))
-$(eval $(call lantiqBrnImage,VGV7519BRN,5D00008000,0x12345678,0x2083b8ed))
+define Device/WBMR300
+ DEVICE_PROFILE := WBMR300
+ IMAGE_SIZE := 15616k
+ DEVICE_TITLE := Buffalo WBMR-300HPD
+ DEVICE_PACKAGES := kmod-mt76 wpad-mini kmod-usb-dwc2
+endef
+TARGET_DEVICES += WBMR300
+
+define Device/VGV7510KW22NOR
+ DEVICE_PROFILE := VGV7510KW22NOR
+ IMAGE_SIZE := 15232k
+ DEVICE_TITLE := o2 Box 6431 / Arcadyan VGV7510KW22 (NOR)
+ DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2
+endef
+TARGET_DEVICES += VGV7510KW22NOR
+
+define Device/VGV7510KW22BRN
+ $(Device/lantiqBrnImage)
+ DEVICE_PROFILE := VGV7510KW22BRN
+ IMAGE_SIZE := 7168k
+ SIGNATURE := 5D00008000
+ MAGIC := 0x12345678
+ CRC32_POLY := 0x2083b8ed
+ DEVICE_TITLE := o2 Box 6431 / Arcadyan VGV7510KW22 (BRN)
+ DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2
+endef
+TARGET_DEVICES += VGV7510KW22BRN
-define Image/Prepare
- $(call Image/Prepare/Profile,$(PROFILE))
+define Device/VGV7519NOR
+ DEVICE_PROFILE := VGV7519NOR
+ IMAGE_SIZE := 15360k
+ DEVICE_TITLE := Experiabox 8 VGV7519
+ DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2
endef
+TARGET_DEVICES += VGV7519NOR
+
+define Device/VGV7519BRN
+ $(Device/lantiqBrnImage)
+ DEVICE_PROFILE := VGV7519BRN
+ IMAGE_SIZE := 7168k
+ SIGNATURE := 5D00008000
+ MAGIC := 0x12345678
+ CRC32_POLY := 0x2083b8ed
+ DEVICE_TITLE := Experiabox 8 VGV7519 (BRN)
+ DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2
+endef
+TARGET_DEVICES += VGV7519BRN
endif
+ifneq ($($(PROFILE)_UBI_OPTS),)
+ define Image/BuildNAND/squashfs
+ $(call prepare_generic_squashfs,$(KDIR)/root.$(1))
+ $(call Image/Build/UbinizeImage,$(2),,squashfs,$($(PROFILE)_UBI_OPTS))
+ $(call Image/Build/SysupgradeNAND,$(2),$(1),$(KDIR)/uImage-$(2))
+ endef
+
+ define Image/Build/ubifs
+ $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(2)-rootfs.ubifs
+ endef
-define Image/BuildKernel
- $(call Image/BuildKernel/Profile/$(PROFILE))
+ define Image/Build/ubi
+ $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(2)-rootfs.ubi
+ $(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(2)-rootfs-overlay.ubi
+ endef
+
+ define Image/BuildEVA/ubi
+ $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(2)-rootfs.ubi
+ $(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(2)-rootfs-overlay.ubi
+ endef
+
+ifneq ($($(PROFILE)_UBIFS_OPTS),)
+ define Image/BuildNAND/ubifs
+ $(call Image/Build/UbinizeImage,$(2),,ubifs,$($(PROFILE)_UBI_OPTS))
+ $(call Image/Build/SysupgradeNAND,$(2),$(1),$(KDIR)/uImage-$(2))
+ endef
+
+ define Image/BuildEVA/ubifs
+ $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(2)-rootfs.ubifs
+ endef
+endif
+endif
+
+define Image/Prepare/Profile
+ $(call Image/Prepare/Profile/$(1))
endef
-define Image/InstallKernel
- $(call Image/InstallKernel/Template/$(PROFILE))
+define Image/BuildKernel/Profile
+ $(call Image/BuildKernel/Profile/$(1))
endef
-define Image/Build
- $(call Image/Build/Profile/$(PROFILE),$(1))
+define Image/Build/Profile
+ $(call Image/Build/Profile/$(1),$(2))
endef
$(eval $(call BuildImage))
diff --git a/target/linux/lantiq/image/tp-link.mk b/target/linux/lantiq/image/tp-link.mk
new file mode 100644
index 0000000000..554419185f
--- /dev/null
+++ b/target/linux/lantiq/image/tp-link.mk
@@ -0,0 +1,48 @@
+define Build/tplink-fw
+ mktplinkfw2 -c -B $(BOARD_ID) -s \
+ -k $@ -o $@.new
+ mv $@.new $@
+endef
+
+define Build/mktplinkfw2
+ mktplinkfw2 -B $(BOARD_ID) -s -a 0x4 -j \
+ -k $(word 1,$^) -r $(word 2,$^) \
+ -o $@
+endef
+DEVICE_VARS += BOARD_ID
+
+define Device/lantiqTpLink
+ KERNEL := kernel-bin | append-dtb | lzma
+ KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-fw
+ IMAGES := sysupgrade.bin
+ IMAGE/sysupgrade.bin := mktplinkfw2 | check-size $$$$(IMAGE_SIZE)
+endef
+
+define Device/TDW8970
+ $(Device/lantiqTpLink)
+ DEVICE_PROFILE := TDW8970
+ BOARD_ID := TD-W8970v1
+ IMAGE_SIZE := 7680k
+ DEVICE_TITLE := TP-LINK TD-W8970
+ DEVICE_PACKAGES:= kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev
+endef
+
+define Device/TDW8980
+ $(Device/lantiqTpLink)
+ DEVICE_PROFILE := TDW8980
+ BOARD_ID := TD-W8980v1
+ IMAGE_SIZE := 7680k
+ DEVICE_TITLE := TP-LINK TD-W8980
+ DEVICE_PACKAGES:= kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev
+endef
+
+define Device/VR200v
+ $(Device/lantiqTpLink)
+ DEVICE_PROFILE := VR200v
+ BOARD_ID := ArcherVR200V
+ IMAGE_SIZE := 15808k
+ DEVICE_TITLE := TP-LINK Archer VR200v
+ DEVICE_PACKAGES:= kmod-usb-dwc2 kmod-ledtrig-usbdev
+endef
+TARGET_DEVICES += TDW8970 TDW8980 VR200v
+
diff --git a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch
index 93bb4275ec..3af676297d 100644
--- a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch
+++ b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch
@@ -163,8 +163,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ /* Clear all pending interrupts */
+ phy_read(phydev, MII_VR9_11G_ISTAT);
+
-+ vr9_gphy_mmd_write(phydev, 0x1e0, 0xc5);
-+ vr9_gphy_mmd_write(phydev, 0x1e1, 0x67);
++ vr9_gphy_mmd_write(phydev, 0x1e0, 0xc0);
++ vr9_gphy_mmd_write(phydev, 0x1e1, 0x00);
+ vr9_gphy_mmd_write(phydev, 0x1e2, 0x70);
+ vr9_gphy_mmd_write(phydev, 0x1e3, 0x03);
+ vr9_gphy_mmd_write(phydev, 0x1e4, 0x70);
diff --git a/target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch b/target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
index 3250a9b441..07df336d2f 100644
--- a/target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
+++ b/target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
@@ -209,7 +209,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+};
--- /dev/null
+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -0,0 +1,1801 @@
+@@ -0,0 +1,1830 @@
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
@@ -234,6 +234,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+#include <linux/platform_device.h>
+#include <linux/interrupt.h>
+#include <linux/clk.h>
++#include <linux/if_vlan.h>
+#include <asm/delay.h>
+
+#include <linux/of_net.h>
@@ -248,14 +249,9 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+
+#define SW_POLLING
+#define SW_ROUTING
-+/* #define SW_PORTMAP */
+
+#ifdef SW_ROUTING
-+ #ifdef SW_PORTMAP
+#define XRX200_MAX_DEV 2
-+ #else
-+#define XRX200_MAX_DEV 2
-+ #endif
+#else
+#define XRX200_MAX_DEV 1
+#endif
@@ -435,6 +431,8 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ struct mii_bus *mii_bus;
+
+ struct xrx200_chan chan[XRX200_MAX_DMA];
++ u16 vlan_vid[XRX200_MAX_VLAN];
++ u16 vlan_port_map[XRX200_MAX_VLAN];
+
+ struct net_device *devs[XRX200_MAX_DEV];
+ int num_devs;
@@ -735,6 +733,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+static int xrx200sw_set_vlan_vid(struct switch_dev *dev, const struct switch_attr *attr,
+ struct switch_val *val)
+{
++ struct xrx200_hw *hw = container_of(dev, struct xrx200_hw, swdev);
+ int i;
+ struct xrx200_pce_table_entry tev;
+ struct xrx200_pce_table_entry tem;
@@ -749,6 +748,8 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ return -EINVAL;
+ }
+
++ hw->vlan_vid[val->port_vlan] = val->value.i;
++
+ tev.index = val->port_vlan;
+ xrx200_pce_table_entry_read(&tev);
+ tev.key[0] = val->value.i;
@@ -780,6 +781,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+
+static int xrx200sw_set_vlan_ports(struct switch_dev *dev, struct switch_val *val)
+{
++ struct xrx200_hw *hw = container_of(dev, struct xrx200_hw, swdev);
+ int i, portmap, tagmap, untagged;
+ struct xrx200_pce_table_entry tem;
+
@@ -830,6 +832,10 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ tem.val[2] = tagmap;
+ xrx200_pce_table_entry_write(&tem);
+
++ ltq_switch_w32_mask(0, portmap, PCE_PMAP2);
++ ltq_switch_w32_mask(0, portmap, PCE_PMAP3);
++ hw->vlan_port_map[val->port_vlan] = portmap;
++
+ xrx200sw_fixup_pvids();
+
+ return 0;
@@ -1156,7 +1162,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ if (ret) {
+ netdev_err(dev,
+ "failed to allocate new rx buffer\n");
-+ return 0;
++ return;
+ }
+
+ skb_put(skb, len);
@@ -1258,11 +1264,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ u32 byte_offset;
+ int len;
+#ifdef SW_ROUTING
-+ #ifdef SW_PORTMAP
-+ u32 special_tag = (SPID_CPU_PORT << SPID_SHIFT) | PORT_MAP_SEL | PORT_MAP_EN | DPID_ENABLE;
-+ #else
+ u32 special_tag = (SPID_CPU_PORT << SPID_SHIFT) | DPID_ENABLE;
-+ #endif
+#endif
+
+ skb->dev = dev;
@@ -1274,12 +1276,27 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ return NETDEV_TX_BUSY;
+ }
+#ifdef SW_ROUTING
-+ #ifdef SW_PORTMAP
++ if (is_multicast_ether_addr(eth_hdr(skb)->h_dest)) {
++ u16 port_map = priv->port_map;
++ special_tag |= PORT_MAP_SEL | PORT_MAP_EN;
++ if (skb->protocol == htons(ETH_P_8021Q)) {
++ u16 vid;
++ int i;
++
++ if (!__vlan_get_tag(skb, &vid)) {
++ for (i = 0; i < XRX200_MAX_VLAN; i++) {
++ if (priv->hw->vlan_vid[i] != vid)
++ continue;
++ port_map = priv->hw->vlan_port_map[i];
++ break;
++ }
++ }
++ }
++ special_tag |= port_map << PORT_MAP_SHIFT;
++ }
+ special_tag |= priv->port_map << PORT_MAP_SHIFT;
-+ #else
+ if(priv->id)
+ special_tag |= (1 << DPID_SHIFT);
-+ #endif
+ if(skb_headroom(skb) < 4) {
+ struct sk_buff *tmp = skb_realloc_headroom(skb, 4);
+ dev_kfree_skb_any(skb);
@@ -1421,13 +1438,18 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+static void xrx200_mdio_link(struct net_device *dev)
+{
+ struct xrx200_priv *priv = netdev_priv(dev);
++ bool changed = false, link = false;
+ int i;
+
+ for (i = 0; i < priv->num_port; i++) {
+ if (!priv->port[i].phydev)
+ continue;
+
++ if (priv->port[i].phydev->link)
++ link = true;
++
+ if (priv->port[i].link != priv->port[i].phydev->link) {
++ changed = true;
+ xrx200_gmac_update(&priv->port[i]);
+ priv->port[i].link = priv->port[i].phydev->link;
+ netdev_info(dev, "port %d %s link\n",
@@ -1435,6 +1457,8 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ (priv->port[i].link)?("got"):("lost"));
+ }
+ }
++ if (changed && !link)
++ netif_carrier_off(dev);
+}
+
+static inline int xrx200_mdio_poll(struct mii_bus *bus)
@@ -1512,6 +1536,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ | SUPPORTED_TP);
+ phydev->advertising = phydev->supported;
+ port->phydev = phydev;
++ phydev->no_auto_carrier_off = true;
+
+ pr_info("%s: attached PHY [%s] (phy_addr=%s, irq=%d)\n",
+ dev->name, phydev->drv->name,
@@ -1694,9 +1719,9 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ xrx200_pci_microcode();
+
+ /* Default unknown Broadcat/Multicast/Unicast port maps */
-+ ltq_switch_w32(0x7f, PCE_PMAP1);
-+ ltq_switch_w32(0x7f, PCE_PMAP2);
-+ ltq_switch_w32(0x7f, PCE_PMAP3);
++ ltq_switch_w32(0x40, PCE_PMAP1);
++ ltq_switch_w32(0x40, PCE_PMAP2);
++ ltq_switch_w32(0x40, PCE_PMAP3);
+
+ /* RMON Counter Enable for all physical ports */
+ for (i = 0; i < 7; i++)
@@ -1736,6 +1761,10 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ ltq_switch_w32_mask(0, PCE_INGRESS, PCE_PCTRL_REG(6, 0));
+ ltq_switch_w32_mask(0, BIT(3), MAC_CTRL_REG(6, 2));
+ ltq_switch_w32(1518 + 8 + 4 * 2, MAC_FLEN_REG);
++ xrx200sw_write_x(1, XRX200_BM_QUEUE_GCTRL_GL_MOD, 0);
++
++ for (i = 0; i < XRX200_MAX_VLAN; i++)
++ hw->vlan_vid[i] = i;
+}
+
+static void xrx200_hw_cleanup(struct xrx200_hw *hw)
@@ -2179,7 +2208,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+// XRX200_BM_GCTRL_P_SRES, /* Software Reset for PQM */
+// XRX200_BM_GCTRL_F_SRES, /* Software Reset for FSQM */
+// XRX200_BM_QUEUE_GCTRL, /* Queue Manager GlobalControl Register 0 */
-+// XRX200_BM_QUEUE_GCTRL_GL_MOD, /* WRED Mode Signal */
++ XRX200_BM_QUEUE_GCTRL_GL_MOD, /* WRED Mode Signal */
+// XRX200_BM_QUEUE_GCTRL_AQUI, /* Average Queue Update Interval */
+// XRX200_BM_QUEUE_GCTRL_AQWF, /* Average Queue Weight Factor */
+// XRX200_BM_QUEUE_GCTRL_QAVGEN, /* Queue Average Calculation Enable */
@@ -2835,7 +2864,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+// {0x0124, 1, 1, 0x00}, /* XRX200_BM_GCTRL_P_SRES Software Reset for PQM */
+// {0x0124, 0, 1, 0x00}, /* XRX200_BM_GCTRL_F_SRES Software Reset for FSQM */
+// {0x0128, 0, 16, 0x00}, /* XRX200_BM_QUEUE_GCTRL Queue Manager GlobalControl Register 0 */
-+// {0x0128, 10, 1, 0x00}, /* XRX200_BM_QUEUE_GCTRL_GL_MOD WRED Mode Signal */
++ {0x0128, 10, 1, 0x00}, /* XRX200_BM_QUEUE_GCTRL_GL_MOD WRED Mode Signal */
+// {0x0128, 7, 3, 0x00}, /* XRX200_BM_QUEUE_GCTRL_AQUI Average Queue Update Interval */
+// {0x0128, 3, 4, 0x00}, /* XRX200_BM_QUEUE_GCTRL_AQWF Average Queue Weight Factor */
+// {0x0128, 2, 1, 0x00}, /* XRX200_BM_QUEUE_GCTRL_QAVGEN Queue Average Calculation Enable */
diff --git a/target/linux/lantiq/patches-4.4/0028-NET-lantiq-various-etop-fixes.patch b/target/linux/lantiq/patches-4.4/0028-NET-lantiq-various-etop-fixes.patch
index 81eccf24bc..a236da1efa 100644
--- a/target/linux/lantiq/patches-4.4/0028-NET-lantiq-various-etop-fixes.patch
+++ b/target/linux/lantiq/patches-4.4/0028-NET-lantiq-various-etop-fixes.patch
@@ -104,7 +104,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
+#define PMAC_HD_CTL_AS (1 << 19)
+#define PMAC_HD_CTL_RXSH (1 << 22)
-+
+
+/* Switch Enable (0=disable, 1=enable) */
+#define GCTL0_SE 0x80000000
+/* Disable MDIO auto polling (0=disable, 1=enable) */
@@ -124,7 +124,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#define MDIO_XR9_REG_OFFSET 0
+#define MDIO_XR9_ADDR_OFFSET 5
+#define MDIO_XR9_WR_OFFSET 16
-
++
+#define LTQ_DMA_ETOP ((of_machine_is_compatible("lantiq,ase")) ? \
+ (INT_NUM_IM3_IRL0) : (INT_NUM_IM2_IRL0))
+
@@ -333,7 +333,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
- ltq_pmu_enable(PMU_PPE);
+ clk_enable(priv->clk_ppe);
-+
+
+- switch (priv->pldata->mii_mode) {
+ if (of_machine_is_compatible("lantiq,ar9")) {
+ ltq_etop_gbit_init(dev);
+ /* force the etops link to the gbit to MII */
@@ -342,8 +343,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ ltq_etop_w32_mask(MDIO_CFG_MASK, 0, LTQ_ETOP_MDIO_CFG);
+ ltq_etop_w32_mask(MAC_CFG_MASK, MAC_CFG_CGEN | MAC_CFG_DUPLEX |
+ MAC_CFG_SPEED | MAC_CFG_LINK, LTQ_ETOP_MAC_CFG);
-
-- switch (priv->pldata->mii_mode) {
++
+ switch (mii_mode) {
case PHY_INTERFACE_MODE_RMII:
- ltq_etop_w32_mask(ETOP_MII_MASK,
@@ -382,7 +382,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
- ltq_etop_w32(PPE32_CGEN, LQ_PPE32_ENET_MAC_CFG);
+ return 0;
+}
-+
+
+- ltq_dma_init_port(DMA_PORT_ETOP);
+static int
+ltq_etop_dma_init(struct net_device *dev)
+{
@@ -391,14 +392,21 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ int rx = priv->rx_irq - LTQ_DMA_ETOP;
+ int err;
- ltq_dma_init_port(DMA_PORT_ETOP);
-
- for (i = 0; i < MAX_DMA_CHAN; i++) {
- int irq = LTQ_DMA_CH0_INT + i;
- struct ltq_etop_chan *ch = &priv->ch[i];
--
++ ltq_dma_init_port(DMA_PORT_ETOP);
+
- ch->idx = ch->dma.nr = i;
--
++ priv->txch.dma.nr = tx;
++ ltq_dma_alloc_tx(&priv->txch.dma);
++ err = request_irq(priv->tx_irq, ltq_etop_dma_irq, 0, "eth_tx", priv);
++ if (err) {
++ netdev_err(dev, "failed to allocate tx irq\n");
++ goto err_out;
++ }
++ priv->txch.dma.irq = priv->tx_irq;
+
- if (IS_TX(i)) {
- ltq_dma_alloc_tx(&ch->dma);
- request_irq(irq, ltq_etop_dma_irq, 0, "etop_tx", priv);
@@ -410,15 +418,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
- return -ENOMEM;
- ch->dma.desc = 0;
- request_irq(irq, ltq_etop_dma_irq, 0, "etop_rx", priv);
-+ priv->txch.dma.nr = tx;
-+ ltq_dma_alloc_tx(&priv->txch.dma);
-+ err = request_irq(priv->tx_irq, ltq_etop_dma_irq, 0, "eth_tx", priv);
-+ if (err) {
-+ netdev_err(dev, "failed to allocate tx irq\n");
-+ goto err_out;
-+ }
-+ priv->txch.dma.irq = priv->tx_irq;
-+
+ priv->rxch.dma.nr = rx;
+ ltq_dma_alloc_rx(&priv->rxch.dma);
+ for (priv->rxch.dma.desc = 0; priv->rxch.dma.desc < LTQ_DESC_NUM;
@@ -656,12 +655,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
- phy_stop(priv->phydev);
- for (i = 0; i < MAX_DMA_CHAN; i++) {
- struct ltq_etop_chan *ch = &priv->ch[i];
--
-- if (!IS_RX(i) && !IS_TX(i))
-- continue;
-- napi_disable(&ch->napi);
-- ltq_dma_close(&ch->dma);
-- }
+ if (priv->phydev)
+ phy_stop(priv->phydev);
+ napi_disable(&priv->txch.napi);
@@ -671,7 +664,12 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ ltq_dma_close(&priv->txch.dma);
+ ltq_dma_close(&priv->rxch.dma);
+ spin_unlock_irqrestore(&priv->lock, flags);
-+
+
+- if (!IS_RX(i) && !IS_TX(i))
+- continue;
+- napi_disable(&ch->napi);
+- ltq_dma_close(&ch->dma);
+- }
return 0;
}
@@ -791,7 +789,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
-@@ -733,30 +943,61 @@ ltq_etop_probe(struct platform_device *p
+@@ -733,31 +943,62 @@ ltq_etop_probe(struct platform_device *p
goto err_out;
}
@@ -825,10 +823,19 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
priv->pdev = pdev;
- priv->pldata = dev_get_platdata(&pdev->dev);
priv->netdev = dev;
+- spin_lock_init(&priv->lock);
+ priv->tx_irq = irqres[0].start;
+ priv->rx_irq = irqres[1].start;
+ priv->mii_mode = of_get_phy_mode(pdev->dev.of_node);
-+
+
+- for (i = 0; i < MAX_DMA_CHAN; i++) {
+- if (IS_TX(i))
+- netif_napi_add(dev, &priv->ch[i].napi,
+- ltq_etop_poll_tx, 8);
+- else if (IS_RX(i))
+- netif_napi_add(dev, &priv->ch[i].napi,
+- ltq_etop_poll_rx, 32);
+- priv->ch[i].netdev = dev;
+ mac = of_get_mac_address(pdev->dev.of_node);
+ if (mac)
+ memcpy(priv->mac, mac, ETH_ALEN);
@@ -848,26 +855,18 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ priv->clk_ephycgu = clk_get(&pdev->dev, "ephycgu");
+ if (IS_ERR(priv->clk_ephycgu))
+ return PTR_ERR(priv->clk_ephycgu);
-+ }
-+
- spin_lock_init(&priv->lock);
+ }
-- for (i = 0; i < MAX_DMA_CHAN; i++) {
-- if (IS_TX(i))
-- netif_napi_add(dev, &priv->ch[i].napi,
-- ltq_etop_poll_tx, 8);
-- else if (IS_RX(i))
-- netif_napi_add(dev, &priv->ch[i].napi,
-- ltq_etop_poll_rx, 32);
-- priv->ch[i].netdev = dev;
-- }
++ spin_lock_init(&priv->lock);
++
+ netif_napi_add(dev, &priv->txch.napi, ltq_etop_poll_tx, 8);
+ netif_napi_add(dev, &priv->rxch.napi, ltq_etop_poll_rx, 32);
+ priv->txch.netdev = dev;
+ priv->rxch.netdev = dev;
-
++
err = register_netdev(dev);
if (err)
+ goto err_free;
@@ -785,31 +1026,22 @@ ltq_etop_remove(struct platform_device *
return 0;
}
diff --git a/target/linux/lantiq/patches-4.4/0030-GPIO-add-named-gpio-exports.patch b/target/linux/lantiq/patches-4.4/0030-GPIO-add-named-gpio-exports.patch
index 2e27918765..1148ec4e26 100644
--- a/target/linux/lantiq/patches-4.4/0030-GPIO-add-named-gpio-exports.patch
+++ b/target/linux/lantiq/patches-4.4/0030-GPIO-add-named-gpio-exports.patch
@@ -22,11 +22,13 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
#include "gpiolib.h"
-@@ -450,3 +452,69 @@ void of_gpiochip_remove(struct gpio_chip
+@@ -450,3 +452,73 @@ void of_gpiochip_remove(struct gpio_chip
gpiochip_remove_pin_ranges(chip);
of_node_put(chip->of_node);
}
+
++#ifdef CONFIG_GPIO_SYSFS
++
+static struct of_device_id gpio_export_ids[] = {
+ { .compatible = "gpio-export" },
+ { /* sentinel */ }
@@ -92,6 +94,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ return platform_driver_probe(&gpio_export_driver, of_gpio_export_probe);
+}
+device_initcall(of_gpio_export_init);
++
++#endif
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -122,6 +122,12 @@ static inline int gpio_export(unsigned g
diff --git a/target/linux/lantiq/patches-4.4/0034-reset-Fix-compile-when-reset-RESET_CONTROLLER-is-not.patch b/target/linux/lantiq/patches-4.4/0034-reset-Fix-compile-when-reset-RESET_CONTROLLER-is-not.patch
deleted file mode 100644
index ddbe134c1b..0000000000
--- a/target/linux/lantiq/patches-4.4/0034-reset-Fix-compile-when-reset-RESET_CONTROLLER-is-not.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From b1b9fca8c317afc3f2b78bb54f877e8a830a819d Mon Sep 17 00:00:00 2001
-From: John Crispin <blogic@openwrt.org>
-Date: Fri, 9 Aug 2013 18:47:27 +0200
-Subject: [PATCH 34/36] reset: Fix compile when reset RESET_CONTROLLER is not
- selected
-
-Drivers need to protect their reset api calls with #ifdef to avoid compile
-errors.
-
-This patch adds dummy wrappers in the same way that linux/of.h does it.
-
-Cc: linux-kernel@vger.kernel.org
-Cc: Philipp Zabel <p.zabel@pengutronix.de>
-Cc: Gabor Juhos <juhosg@openwrt.org>
----
- include/linux/reset-controller.h | 16 ++++++++++++++
- include/linux/reset.h | 43 ++++++++++++++++++++++++++++++++++++++
- 2 files changed, 59 insertions(+)
-
---- a/include/linux/reset-controller.h
-+++ b/include/linux/reset-controller.h
-@@ -48,7 +48,23 @@ struct reset_controller_dev {
- unsigned int nr_resets;
- };
-
-+#if defined(CONFIG_RESET_CONTROLLER)
-+
- int reset_controller_register(struct reset_controller_dev *rcdev);
- void reset_controller_unregister(struct reset_controller_dev *rcdev);
-
-+#else
-+
-+static inline int reset_controller_register(struct reset_controller_dev *rcdev)
-+{
-+ return -ENOSYS;
-+}
-+
-+void reset_controller_unregister(struct reset_controller_dev *rcdev)
-+{
-+
-+}
-+
-+#endif
-+
- #endif
diff --git a/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
index 25852e2cca..7116b89230 100644
--- a/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
+++ b/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
@@ -51,7 +51,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o
--- /dev/null
+++ b/arch/mips/lantiq/xway/ath_eep.c
-@@ -0,0 +1,298 @@
+@@ -0,0 +1,307 @@
+/*
+ * Copyright (C) 2011 Luca Olivetti <luca@ventoso.org>
+ * Copyright (C) 2011 John Crispin <blogic@openwrt.org>
@@ -104,6 +104,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ const __be32 *list;
+ const char *part;
+ phandle phandle;
++ u16 dev_ids[2] = { 0 };
+
+ if ((list = of_get_property(np, "ath,eep-flash", &i)) && i == 2 *
+ sizeof(*list) && (phandle = be32_to_cpup(list++)) &&
@@ -188,6 +189,14 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
+ }
+
++ if (!of_property_read_u16_array(np, "ath,device-id", dev_ids, 2)) {
++ struct pci_dev *d = NULL;
++
++ while ((d = pci_get_device(PCI_VENDOR_ID_ATHEROS,
++ dev_ids[0], d)) != NULL)
++ d->device = dev_ids[1];
++ }
++
+ if (!of_property_read_u32(np, "ath,led-pin", &led_pin)) {
+ ath9k_pdata.led_pin = led_pin;
+ dev_info(&pdev->dev, "using led pin %d.\n", led_pin);
@@ -379,7 +388,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ eth_mac_set = mac_pton(str, eth_mac);
+ return !eth_mac_set;
+}
-+__setup("ethaddr=", setup_ethaddr);
++early_param("ethaddr", setup_ethaddr);
+
+int __init of_eth_mac_probe(struct platform_device *pdev)
+{
@@ -620,10 +629,10 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
goto err_hw;
- memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
-+ if (priv->mac)
++ memcpy(&mac.sa_data, ltq_get_eth_mac(), ETH_ALEN);
++
++ if (priv->mac && !is_valid_ether_addr(mac.sa_data))
+ memcpy(&mac.sa_data, priv->mac, ETH_ALEN);
-+ else
-+ memcpy(&mac.sa_data, ltq_get_eth_mac(), ETH_ALEN);
+
if (!is_valid_ether_addr(mac.sa_data)) {
pr_warn("etop: invalid MAC, using random\n");
diff --git a/target/linux/lantiq/patches-4.4/0042-arch-mips-increase-io_space_limit.patch b/target/linux/lantiq/patches-4.4/0042-arch-mips-increase-io_space_limit.patch
new file mode 100644
index 0000000000..14b417e690
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/0042-arch-mips-increase-io_space_limit.patch
@@ -0,0 +1,23 @@
+From 9807eb80a1b3bad7a4a89aa6566497bb1cadd6ef Mon Sep 17 00:00:00 2001
+From: John Crispin <john@phrozen.org>
+Date: Fri, 3 Jun 2016 13:12:20 +0200
+Subject: [PATCH] arch: mips: increase io_space_limit
+
+this value comes from x86 and breaks some pci devices
+
+Signed-off-by: John Crispin <john@phrozen.org>
+---
+ arch/mips/include/asm/io.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/mips/include/asm/io.h
++++ b/arch/mips/include/asm/io.h
+@@ -50,7 +50,7 @@
+
+ /* ioswab[bwlq], __mem_ioswab[bwlq] are defined in mangle-port.h */
+
+-#define IO_SPACE_LIMIT 0xffff
++#define IO_SPACE_LIMIT 0xffffffff
+
+ /*
+ * On MIPS I/O ports are memory mapped, so we access them using normal
diff --git a/target/linux/lantiq/patches-4.4/0047-irq-fixes.patch b/target/linux/lantiq/patches-4.4/0047-irq-fixes.patch
new file mode 100644
index 0000000000..9efa63d35a
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/0047-irq-fixes.patch
@@ -0,0 +1,78 @@
+--- a/arch/mips/lantiq/irq.c
++++ b/arch/mips/lantiq/irq.c
+@@ -67,7 +67,7 @@ int gic_present;
+ #endif
+
+ static int exin_avail;
+-static struct resource ltq_eiu_irq[MAX_EIU];
++static u32 ltq_eiu_irq[MAX_EIU];
+ static void __iomem *ltq_icu_membase[MAX_IM];
+ static void __iomem *ltq_eiu_membase;
+ static struct irq_domain *ltq_domain;
+@@ -76,7 +76,7 @@ static int ltq_perfcount_irq;
+ int ltq_eiu_get_irq(int exin)
+ {
+ if (exin < exin_avail)
+- return ltq_eiu_irq[exin].start;
++ return ltq_eiu_irq[exin];
+ return -1;
+ }
+
+@@ -128,7 +128,7 @@ static int ltq_eiu_settype(struct irq_da
+ int i;
+
+ for (i = 0; i < MAX_EIU; i++) {
+- if (d->hwirq == ltq_eiu_irq[i].start) {
++ if (d->hwirq == ltq_eiu_irq[i]) {
+ int val = 0;
+ int edge = 0;
+
+@@ -176,7 +176,7 @@ static unsigned int ltq_startup_eiu_irq(
+
+ ltq_enable_irq(d);
+ for (i = 0; i < MAX_EIU; i++) {
+- if (d->hwirq == ltq_eiu_irq[i].start) {
++ if (d->hwirq == ltq_eiu_irq[i]) {
+ /* by default we are low level triggered */
+ ltq_eiu_settype(d, IRQF_TRIGGER_LOW);
+ /* clear all pending */
+@@ -198,7 +198,7 @@ static void ltq_shutdown_eiu_irq(struct
+
+ ltq_disable_irq(d);
+ for (i = 0; i < MAX_EIU; i++) {
+- if (d->hwirq == ltq_eiu_irq[i].start) {
++ if (d->hwirq == ltq_eiu_irq[i]) {
+ /* disable */
+ ltq_eiu_w32(ltq_eiu_r32(LTQ_EIU_EXIN_INEN) & ~BIT(i),
+ LTQ_EIU_EXIN_INEN);
+@@ -343,10 +343,10 @@ static int icu_map(struct irq_domain *d,
+ return 0;
+
+ for (i = 0; i < exin_avail; i++)
+- if (hw == ltq_eiu_irq[i].start)
++ if (hw == ltq_eiu_irq[i])
+ chip = &ltq_eiu_type;
+
+- irq_set_chip_and_handler(hw, chip, handle_level_irq);
++ irq_set_chip_and_handler(irq, chip, handle_level_irq);
+
+ return 0;
+ }
+@@ -441,14 +441,14 @@ int __init icu_of_init(struct device_nod
+ eiu_node = of_find_compatible_node(NULL, NULL, "lantiq,eiu-xway");
+ if (eiu_node && !of_address_to_resource(eiu_node, 0, &res)) {
+ /* find out how many external irq sources we have */
+- exin_avail = of_irq_count(eiu_node);
++ exin_avail = of_property_count_u32_elems(eiu_node, "lantiq,eiu-irqs");
+
+ if (exin_avail > MAX_EIU)
+ exin_avail = MAX_EIU;
+
+- ret = of_irq_to_resource_table(eiu_node,
++ ret = of_property_read_u32_array(eiu_node, "lantiq,eiu-irqs",
+ ltq_eiu_irq, exin_avail);
+- if (ret != exin_avail)
++ if (ret)
+ panic("failed to load external irq resources");
+
+ if (!request_mem_region(res.start, resource_size(&res),
diff --git a/target/linux/lantiq/patches-4.4/0047-poweroff.patch b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
new file mode 100644
index 0000000000..54249bba52
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
@@ -0,0 +1,23 @@
+--- a/arch/mips/lantiq/xway/reset.c
++++ b/arch/mips/lantiq/xway/reset.c
+@@ -301,12 +301,6 @@ static void ltq_machine_halt(void)
+ unreachable();
+ }
+
+-static void ltq_machine_power_off(void)
+-{
+- local_irq_disable();
+- unreachable();
+-}
+-
+ static void ltq_usb_init(void)
+ {
+ /* Power for USB cores 1 & 2 */
+@@ -379,7 +373,6 @@ static int __init mips_reboot_setup(void
+
+ _machine_restart = ltq_machine_restart;
+ _machine_halt = ltq_machine_halt;
+- pm_power_off = ltq_machine_power_off;
+
+ return 0;
+ }
diff --git a/target/linux/lantiq/patches-4.4/0160-owrt-lantiq-multiple-flash.patch b/target/linux/lantiq/patches-4.4/0160-owrt-lantiq-multiple-flash.patch
index 087d923f7d..4c45e4f8a1 100644
--- a/target/linux/lantiq/patches-4.4/0160-owrt-lantiq-multiple-flash.patch
+++ b/target/linux/lantiq/patches-4.4/0160-owrt-lantiq-multiple-flash.patch
@@ -82,6 +82,7 @@
- if (!ltq_mtd->res) {
- dev_err(&pdev->dev, "failed to get memory resource\n");
- return -ENOENT;
+- }
+ for (i = 0; i < pdev->num_resources; i++) {
+ printk(KERN_NOTICE "lantiq nor flash device: %.8llx at %.8llx\n",
+ (unsigned long long)resource_size(&pdev->resource[i]),
@@ -94,14 +95,27 @@
+ dev_err(&pdev->dev, "Could not reserve memory region\n");
+ return -ENOMEM;
+ }
-+
+
+- ltq_mtd->map = devm_kzalloc(&pdev->dev, sizeof(struct map_info),
+- GFP_KERNEL);
+- if (!ltq_mtd->map)
+- return -ENOMEM;
+ ltq_mtd->map[i].name = ltq_map_name;
+ ltq_mtd->map[i].bankwidth = 2;
+ ltq_mtd->map[i].read = ltq_read16;
+ ltq_mtd->map[i].write = ltq_write16;
+ ltq_mtd->map[i].copy_from = ltq_copy_from;
+ ltq_mtd->map[i].copy_to = ltq_copy_to;
-+
+
+- if (of_find_property(pdev->dev.of_node, "lantiq,noxip", NULL))
+- ltq_mtd->map->phys = NO_XIP;
+- else
+- ltq_mtd->map->phys = ltq_mtd->res->start;
+- ltq_mtd->res->start;
+- ltq_mtd->map->size = resource_size(ltq_mtd->res);
+- ltq_mtd->map->virt = devm_ioremap_resource(&pdev->dev, ltq_mtd->res);
+- if (IS_ERR(ltq_mtd->map->virt))
+- return PTR_ERR(ltq_mtd->map->virt);
+ if (of_find_property(pdev->dev.of_node, "lantiq,noxip", NULL))
+ ltq_mtd->map[i].phys = NO_XIP;
+ else
@@ -111,18 +125,30 @@
+ ltq_mtd->map[i].size);
+ if (IS_ERR(ltq_mtd->map[i].virt))
+ return PTR_ERR(ltq_mtd->map[i].virt);
-+
+
+- ltq_mtd->map->name = ltq_map_name;
+- ltq_mtd->map->bankwidth = 2;
+- ltq_mtd->map->read = ltq_read16;
+- ltq_mtd->map->write = ltq_write16;
+- ltq_mtd->map->copy_from = ltq_copy_from;
+- ltq_mtd->map->copy_to = ltq_copy_to;
+ if (ltq_mtd->map[i].virt == NULL) {
+ dev_err(&pdev->dev, "Failed to ioremap flash region\n");
+ err = PTR_ERR(ltq_mtd->map[i].virt);
+ goto err_out;
+ }
-+
+
+- ltq_mtd->map->map_priv_1 = LTQ_NOR_PROBING;
+- ltq_mtd->mtd = do_map_probe("cfi_probe", ltq_mtd->map);
+- ltq_mtd->map->map_priv_1 = LTQ_NOR_NORMAL;
+ ltq_mtd->map[i].map_priv_1 = LTQ_NOR_PROBING;
+ for (type = rom_probe_types; !ltq_mtd->mtd[i] && *type; type++)
+ ltq_mtd->mtd[i] = do_map_probe(*type, &ltq_mtd->map[i]);
+ ltq_mtd->map[i].map_priv_1 = LTQ_NOR_NORMAL;
-+
+
+- if (!ltq_mtd->mtd) {
+- dev_err(&pdev->dev, "probing failed\n");
+- return -ENXIO;
+ if (!ltq_mtd->mtd[i]) {
+ dev_err(&pdev->dev, "probing failed\n");
+ return -ENXIO;
@@ -138,10 +164,7 @@
+ cfi->addr_unlock2 ^= 1;
}
-- ltq_mtd->map = devm_kzalloc(&pdev->dev, sizeof(struct map_info),
-- GFP_KERNEL);
-- if (!ltq_mtd->map)
-- return -ENOMEM;
+- ltq_mtd->mtd->dev.parent = &pdev->dev;
+ if (devices_found == 1) {
+ ltq_mtd->cmtd = ltq_mtd->mtd[0];
+ } else if (devices_found > 1) {
@@ -153,34 +176,6 @@
+ err = -ENXIO;
+ }
-- if (of_find_property(pdev->dev.of_node, "lantiq,noxip", NULL))
-- ltq_mtd->map->phys = NO_XIP;
-- else
-- ltq_mtd->map->phys = ltq_mtd->res->start;
-- ltq_mtd->res->start;
-- ltq_mtd->map->size = resource_size(ltq_mtd->res);
-- ltq_mtd->map->virt = devm_ioremap_resource(&pdev->dev, ltq_mtd->res);
-- if (IS_ERR(ltq_mtd->map->virt))
-- return PTR_ERR(ltq_mtd->map->virt);
--
-- ltq_mtd->map->name = ltq_map_name;
-- ltq_mtd->map->bankwidth = 2;
-- ltq_mtd->map->read = ltq_read16;
-- ltq_mtd->map->write = ltq_write16;
-- ltq_mtd->map->copy_from = ltq_copy_from;
-- ltq_mtd->map->copy_to = ltq_copy_to;
--
-- ltq_mtd->map->map_priv_1 = LTQ_NOR_PROBING;
-- ltq_mtd->mtd = do_map_probe("cfi_probe", ltq_mtd->map);
-- ltq_mtd->map->map_priv_1 = LTQ_NOR_NORMAL;
--
-- if (!ltq_mtd->mtd) {
-- dev_err(&pdev->dev, "probing failed\n");
-- return -ENXIO;
-- }
--
-- ltq_mtd->mtd->dev.parent = &pdev->dev;
--
- cfi = ltq_mtd->map->fldrv_priv;
- cfi->addr_unlock1 ^= 1;
- cfi->addr_unlock2 ^= 1;
diff --git a/target/linux/lantiq/patches-4.4/0400-xrx200-net-multi-phy.patch b/target/linux/lantiq/patches-4.4/0400-xrx200-net-multi-phy.patch
deleted file mode 100644
index a86fe8de40..0000000000
--- a/target/linux/lantiq/patches-4.4/0400-xrx200-net-multi-phy.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/drivers/net/ethernet/lantiq_xrx200.c
-+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -1209,13 +1209,18 @@ static void xrx200_gmac_update(struct xr
- static void xrx200_mdio_link(struct net_device *dev)
- {
- struct xrx200_priv *priv = netdev_priv(dev);
-+ bool changed = false, link = false;
- int i;
-
- for (i = 0; i < priv->num_port; i++) {
- if (!priv->port[i].phydev)
- continue;
-
-+ if (priv->port[i].phydev->link)
-+ link = true;
-+
- if (priv->port[i].link != priv->port[i].phydev->link) {
-+ changed = true;
- xrx200_gmac_update(&priv->port[i]);
- priv->port[i].link = priv->port[i].phydev->link;
- netdev_info(dev, "port %d %s link\n",
-@@ -1223,6 +1228,8 @@ static void xrx200_mdio_link(struct net_
- (priv->port[i].link)?("got"):("lost"));
- }
- }
-+ if (changed && !link)
-+ netif_carrier_off(dev);
- }
-
- static inline int xrx200_mdio_poll(struct mii_bus *bus)
-@@ -1300,6 +1307,7 @@ static int xrx200_mdio_probe(struct net_
- | SUPPORTED_TP);
- phydev->advertising = phydev->supported;
- port->phydev = phydev;
-+ phydev->no_auto_carrier_off = true;
-
- pr_info("%s: attached PHY [%s] (phy_addr=%s, irq=%d)\n",
- dev->name, phydev->drv->name,
diff --git a/target/linux/lantiq/xrx200/config-default b/target/linux/lantiq/xrx200/config-default
index 1c9f5ccb13..dc4e6084ed 100644
--- a/target/linux/lantiq/xrx200/config-default
+++ b/target/linux/lantiq/xrx200/config-default
@@ -1,40 +1,27 @@
CONFIG_ADM6996_PHY=y
CONFIG_AR8216_PHY=y
-# CONFIG_ARCH_HAS_SG_CHAIN is not set
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
-CONFIG_CPU_SUPPORTS_MSA=y
+CONFIG_AT803X_PHY=y
+CONFIG_CPU_MIPSR2_IRQ_EI=y
+CONFIG_CPU_MIPSR2_IRQ_VI=y
+CONFIG_CPU_RMAP=y
CONFIG_CRC16=y
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_LZO=y
CONFIG_FIRMWARE_IN_KERNEL=y
-CONFIG_GPIO_DEVRES=y
-CONFIG_HAS_IOPORT_MAP=y
-# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
-CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
-CONFIG_HAVE_ARCH_TRACEHOOK=y
-# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
-CONFIG_HAVE_BPF_JIT=y
-CONFIG_HAVE_CC_STACKPROTECTOR=y
-CONFIG_HAVE_CONTEXT_TRACKING=y
-CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
-CONFIG_HAVE_DMA_CONTIGUOUS=y
-CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-CONFIG_HZ_PERIODIC=y
+CONFIG_ICPLUS_PHY=y
CONFIG_INPUT=y
CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_POLLDEV=y
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_WORK=y
# CONFIG_ISDN is not set
CONFIG_LANTIQ_PHY=y
CONFIG_LANTIQ_XRX200=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
-CONFIG_LIBFDT=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
+CONFIG_MIPS_MT=y
+# CONFIG_MIPS_MT_FPAFF is not set
+CONFIG_MIPS_MT_SMP=y
+CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_ECC=y
CONFIG_MTD_NAND_PLATFORM=y
@@ -46,19 +33,27 @@ CONFIG_MTD_UBI_BLOCK=y
# CONFIG_MTD_UBI_FASTMAP is not set
# CONFIG_MTD_UBI_GLUEBI is not set
CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_NET_FLOW_LIMIT=y
CONFIG_NLS=y
-# CONFIG_NO_IOPORT_MAP is not set
-CONFIG_OF_ADDRESS_PCI=y
+CONFIG_NR_CPUS=2
CONFIG_PCIE_LANTIQ=y
-# CONFIG_RCU_STALL_COMMON is not set
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_GPIO=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_RCU_STALL_COMMON=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
CONFIG_RTL8306_PHY=y
CONFIG_RTL8366S_PHY=y
CONFIG_RTL8367B_PHY=y
CONFIG_RTL8367_PHY=y
-CONFIG_SPI=y
-CONFIG_SPI_LANTIQ=y
-CONFIG_SPI_MASTER=y
-CONFIG_SYS_SUPPORTS_MIPS16=y
+CONFIG_SMP=y
+CONFIG_SMP_UP=y
+CONFIG_SWCONFIG_LEDS=y
+CONFIG_SYNC_R4K=y
+CONFIG_SYS_SUPPORTS_SCHED_SMT=y
+CONFIG_SYS_SUPPORTS_SMP=y
+CONFIG_TREE_RCU=y
CONFIG_UBIFS_FS=y
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
CONFIG_UBIFS_FS_LZO=y
@@ -69,6 +64,7 @@ CONFIG_USB_COMMON=y
# CONFIG_USB_EHCI_HCD is not set
CONFIG_USB_SUPPORT=y
# CONFIG_USB_UHCI_HCD is not set
+CONFIG_XPS=y
CONFIG_XRX200_PHY_FW=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_ZLIB_INFLATE=y
diff --git a/target/linux/lantiq/xrx200/profiles/00-default.mk b/target/linux/lantiq/xrx200/profiles/00-default.mk
new file mode 100644
index 0000000000..26bc8b502b
--- /dev/null
+++ b/target/linux/lantiq/xrx200/profiles/00-default.mk
@@ -0,0 +1,9 @@
+define Profile/Default
+ NAME:=Default Profile
+ PRIORITY:=1
+endef
+
+define Profile/Default/Description
+ Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
diff --git a/target/linux/lantiq/xrx200/profiles/arv.mk b/target/linux/lantiq/xrx200/profiles/arv.mk
deleted file mode 100644
index 3dc22c00da..0000000000
--- a/target/linux/lantiq/xrx200/profiles/arv.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-define Profile/VG3503J
- NAME:=BT Openreach - ECI VDSL Modem
-endef
-
-$(eval $(call Profile,VG3503J))
-
-define Profile/VG3503J_V2
- NAME:=BT Openreach - ECI VDSL Modem v2
-endef
-
-$(eval $(call Profile,VG3503J_V2))
-
-define Profile/VGV7510KW22NOR
- NAME:=o2 Box 6431 / Arcadyan VGV7510KW22 (NOR)
- PACKAGES:=kmod-rt2800-pci wpad-mini kmod-usb-dwc2
-endef
-
-$(eval $(call Profile,VGV7510KW22NOR))
-
-define Profile/VGV7510KW22BRN
- NAME:=o2 Box 6431 / Arcadyan VGV7510KW22 (BRN)
- PACKAGES:=kmod-rt2800-pci wpad-mini kmod-usb-dwc2
-endef
-
-$(eval $(call Profile,VGV7510KW22BRN))
-
-define Profile/VGV7519NOR
- NAME:=Experiabox 8 VGV7519
- PACKAGES:=kmod-rt2800-pci wpad-mini kmod-usb-dwc2
-endef
-
-$(eval $(call Profile,VGV7519NOR))
-
-define Profile/VGV7519BRN
- NAME:=Experiabox 8 VGV7519 (BRN)
- PACKAGES:=kmod-rt2800-pci wpad-mini kmod-usb-dwc2
-endef
-
-$(eval $(call Profile,VGV7519BRN))
-
-define Profile/ARV7519RW22
- NAME:=Livebox Astoria ARV7519RW22
- PACKAGES:=kmod-usb-dwc2
-endef
-
-$(eval $(call Profile,ARV7519RW22))
diff --git a/target/linux/lantiq/xrx200/profiles/avm.mk b/target/linux/lantiq/xrx200/profiles/avm.mk
deleted file mode 100644
index 89909b92e3..0000000000
--- a/target/linux/lantiq/xrx200/profiles/avm.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-define Profile/FRITZ3370
- NAME:=Fritz!Box WLan - FRITZ3370
- PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2
-endef
-
-FRITZ3370_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
-FRITZ3370_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
-
-$(eval $(call Profile,FRITZ3370))
diff --git a/target/linux/lantiq/xrx200/profiles/bt.mk b/target/linux/lantiq/xrx200/profiles/bt.mk
deleted file mode 100644
index a1083bbb6d..0000000000
--- a/target/linux/lantiq/xrx200/profiles/bt.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-define Profile/BTHOMEHUBV5A
- NAME:=BT Home Hub 5A
- PACKAGES:=kmod-ath9k kmod-ath10k wpad-mini kmod-usb-dwc2
-endef
-
-BTHOMEHUBV5A_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
-BTHOMEHUBV5A_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
-
-$(eval $(call Profile,BTHOMEHUBV5A))
diff --git a/target/linux/lantiq/xrx200/profiles/lantiq.mk b/target/linux/lantiq/xrx200/profiles/lantiq.mk
deleted file mode 100644
index 39c3bc6051..0000000000
--- a/target/linux/lantiq/xrx200/profiles/lantiq.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-define Profile/EASY80920NOR
- NAME:=Lantiq VR9 - EASY80920NOR
- PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 dsl-vrx200-firmware-xdsl-a dsl-vrx200-firmware-xdsl-b-patch
-endef
-
-$(eval $(call Profile,EASY80920NOR))
-
-define Profile/EASY80920NAND
- NAME:=Lantiq VR9 - EASY80920NAND
- PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 dsl-vrx200-firmware-xdsl-a dsl-vrx200-firmware-xdsl-b-patch
-endef
-
-$(eval $(call Profile,EASY80920NAND))
diff --git a/target/linux/lantiq/xrx200/profiles/tplink.mk b/target/linux/lantiq/xrx200/profiles/tplink.mk
deleted file mode 100644
index 2ac364e3fb..0000000000
--- a/target/linux/lantiq/xrx200/profiles/tplink.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-define Profile/TDW8970
- NAME:=TP-LINK TD-W8970
- PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev dsl-vrx200-firmware-xdsl-a dsl-vrx200-firmware-xdsl-b-patch
-endef
-
-$(eval $(call Profile,TDW8970))
-
-define Profile/TDW8980
- NAME:=TP-LINK TD-W8980
- PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev dsl-vrx200-firmware-xdsl-a dsl-vrx200-firmware-xdsl-b-patch
-endef
-
-$(eval $(call Profile,TDW8980))
-
-define Profile/VR200v
- NAME:=TP-LINK Archer VR200v
- PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev dsl-vrx200-firmware-xdsl-a dsl-vrx200-firmware-xdsl-b-patch
-endef
-
-$(eval $(call Profile,VR200v))
diff --git a/target/linux/lantiq/xrx200/profiles/zyxel.mk b/target/linux/lantiq/xrx200/profiles/zyxel.mk
deleted file mode 100644
index f6995f946b..0000000000
--- a/target/linux/lantiq/xrx200/profiles/zyxel.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-define Profile/P2812HNUF1
- NAME:=ZyXEL P-2812HNU-F1
- PACKAGES:=kmod-rt2800-pci wpad-mini kmod-usb-dwc2
-endef
-
-P2812HNUF1_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
-P2812HNUF1_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
-
-$(eval $(call Profile,P2812HNUF1))
-
-define Profile/P2812HNUF3
- NAME:=ZyXEL P-2812HNU-F3
- PACKAGES:=kmod-rt2800-pci wpad-mini kmod-usb-dwc2
-endef
-
-P2812HNUF3_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
-P2812HNUF3_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
-
-$(eval $(call Profile,P2812HNUF3))
-
diff --git a/target/linux/lantiq/xrx200/target.mk b/target/linux/lantiq/xrx200/target.mk
index 50abb24cb9..e112ea0996 100644
--- a/target/linux/lantiq/xrx200/target.mk
+++ b/target/linux/lantiq/xrx200/target.mk
@@ -13,6 +13,8 @@ DEFAULT_PACKAGES+=kmod-leds-gpio \
kmod-ltq-ptm-vr9 \
kmod-ltq-deu-vr9 \
ltq-vdsl-app \
+ dsl-vrx200-firmware-xdsl-a \
+ dsl-vrx200-firmware-xdsl-b-patch \
ppp-mod-pppoa \
swconfig
diff --git a/target/linux/lantiq/xway/profiles/00-default.mk b/target/linux/lantiq/xway/profiles/00-default.mk
new file mode 100644
index 0000000000..26bc8b502b
--- /dev/null
+++ b/target/linux/lantiq/xway/profiles/00-default.mk
@@ -0,0 +1,9 @@
+define Profile/Default
+ NAME:=Default Profile
+ PRIORITY:=1
+endef
+
+define Profile/Default/Description
+ Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
diff --git a/target/linux/lantiq/xway/profiles/arv.mk b/target/linux/lantiq/xway/profiles/arv.mk
deleted file mode 100644
index 976cd194d0..0000000000
--- a/target/linux/lantiq/xway/profiles/arv.mk
+++ /dev/null
@@ -1,167 +0,0 @@
-define Profile/ARV4525PW
- NAME:=Speedport W502V Typ A - ARV4525PW
- PACKAGES:=kmod-ath5k wpad-mini \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa
-endef
-
-$(eval $(call Profile,ARV4525PW))
-
-define Profile/ARV8539PW22
- NAME:=Speedport W504V Typ A - ARV8539PW22
- PACKAGES:=kmod-ltq-hcd-danube \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ath9k wpad-mini \
- swconfig
-endef
-
-$(eval $(call Profile,ARV8539PW22))
-
-define Profile/ARV7525PW
- NAME:=Speedport W303V Typ A - ARV7525PW
- PACKAGES:=kmod-rt2800-pci wpad-mini \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa
-endef
-
-$(eval $(call Profile,ARV7525PW))
-
-define Profile/ARV4518PWR01
- NAME:=ARV4518PWR01
- PACKAGES:=kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ath5k wpad-mini \
- swconfig
-endef
-
-$(eval $(call Profile,ARV4518PWR01))
-
-define Profile/ARV4518PWR01A
- NAME:=ARV4518PWR01A
- PACKAGES:=kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ath5k wpad-mini \
- swconfig
-endef
-
-$(eval $(call Profile,ARV4518PWR01A))
-
-define Profile/ARV4510PW
- NAME:=Wippies, Elisa - ARV4510PW
- PACKAGES:=kmod-ledtrig-usbdev kmod-usb2-pci kmod-usb-uhci \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ltq-tapi kmod-ltq-vmmc \
- kmod-rt2800-pci kmod-ath5k wpad-mini \
- swconfig
-endef
-
-$(eval $(call Profile,ARV4510PW))
-
-define Profile/ARV4519PW
- NAME:=Vodafone, Pirelli - ARV4519PW
- PACKAGES:=kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa \
- swconfig
-endef
-
-$(eval $(call Profile,ARV4519PW))
-
-define Profile/ARV7510PW22
- NAME:=Astoria - ARV7510PW22
- PACKAGES:=kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ltq-tapi kmod-ltq-vmmc \
- kmod-rt2800-pci wpad-mini \
- kmod-usb-uhci kmod-usb2 kmod-usb2-pci \
- swconfig
-endef
-
-$(eval $(call Profile,ARV7510PW22))
-
-define Profile/ARV7518PW
- NAME:=Astoria - ARV7518PW
- PACKAGES:=kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ath9k wpad-mini \
- swconfig
-endef
-
-$(eval $(call Profile,ARV7518PW))
-
-define Profile/ARV7519PW
- NAME:=Astoria - ARV7519PW
- PACKAGES:=kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-rt2800-pci wpad-mini \
- swconfig
-endef
-
-$(eval $(call Profile,ARV7519PW))
-
-define Profile/ARV4520PW
- NAME:=Easybox 800, WAV-281 - ARV4520PW
- PACKAGES:=kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-rt61-pci wpad-mini \
- swconfig
-endef
-
-$(eval $(call Profile,ARV4520PW))
-
-define Profile/ARV452CQW
- NAME:=Easybox 801 - ARV452CQW
- PACKAGES:=kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
- kmod-ath5k wpad-mini \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa \
- swconfig
-endef
-
-$(eval $(call Profile,ARV452CQW))
-
-define Profile/ARV752DPW
- NAME:=Easybox 802 - ARV752DPW
- PACKAGES:=kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ltq-tapi kmod-ltq-vmmc \
- kmod-rt2800-pci wpad-mini \
- swconfig
-endef
-
-$(eval $(call Profile,ARV752DPW))
-
-define Profile/ARV752DPW22
- NAME:=Easybox 803 - ARV752DPW22
- PACKAGES:=kmod-usb2-pci kmod-usb-uhci kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ltq-tapi kmod-ltq-vmmc \
- kmod-rt2800-pci wpad-mini \
- swconfig
-endef
-
-$(eval $(call Profile,ARV752DPW22))
diff --git a/target/linux/lantiq/xway/profiles/audiocodes.mk b/target/linux/lantiq/xway/profiles/audiocodes.mk
deleted file mode 100644
index 006cc50c13..0000000000
--- a/target/linux/lantiq/xway/profiles/audiocodes.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-define Profile/ACMP252
- NAME:=AudioCodes MediaPack MP-252
- PACKAGES:=kmod-rt2x00-pci wpad-mini \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-a kmod-ltq-ptm-danube \
- ltq-adsl-app
-endef
-
-$(eval $(call Profile,ACMP252))
diff --git a/target/linux/lantiq/xway/profiles/avm.mk b/target/linux/lantiq/xway/profiles/avm.mk
deleted file mode 100644
index 2922b0862e..0000000000
--- a/target/linux/lantiq/xway/profiles/avm.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-define Profile/FRITZ7320
- NAME:=1&1 HomeServer - FRITZ7320
- PACKAGES:=kmod-ath9k wpad-mini \
- kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
- kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ltq-deu-ar9 kmod-usb-dwc2
-endef
-
-$(eval $(call Profile,FRITZ7320))
diff --git a/target/linux/lantiq/xway/profiles/aztech.mk b/target/linux/lantiq/xway/profiles/aztech.mk
deleted file mode 100644
index 8f4887720e..0000000000
--- a/target/linux/lantiq/xway/profiles/aztech.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-define Profile/GR7000
- NAME:=Aztech GR7000
- PACKAGES:= \
- kmod-ltq-deu-ar9 kmod-usb-dwc2 \
- swconfig
-endef
-$(eval $(call Profile,GR7000))
diff --git a/target/linux/lantiq/xway/profiles/bt.mk b/target/linux/lantiq/xway/profiles/bt.mk
deleted file mode 100644
index 656d7f3089..0000000000
--- a/target/linux/lantiq/xway/profiles/bt.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-define Profile/BTHOMEHUBV2B
- NAME:=BT Home Hub 2B
- PACKAGES:=kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
- kmod-ltq-deu-danube \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ath9k wpad-mini \
- swconfig
-endef
-
-
-BTHOMEHUBV2B_UBIFS_OPTS:="-m 512 -e 15872 -c 1959"
-BTHOMEHUBV2B_UBI_OPTS:="-m 512 -p 16KiB -s 256"
-
-
-$(eval $(call Profile,BTHOMEHUBV2B))
-
-define Profile/BTHOMEHUBV3A
- NAME:=BT Home Hub 3A
- PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
- kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
- kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
- kmod-ltq-deu-ar9 \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ath9k wpad-mini \
- swconfig uboot-envtools
-endef
-
-BTHOMEHUBV3A_UBIFS_OPTS:="-m 512 -e 15872 -c 1959"
-BTHOMEHUBV3A_UBI_OPTS:="-m 512 -p 16KiB -s 256"
-
-
-$(eval $(call Profile,BTHOMEHUBV3A))
diff --git a/target/linux/lantiq/xway/profiles/buffalo.mk b/target/linux/lantiq/xway/profiles/buffalo.mk
deleted file mode 100644
index 687975011a..0000000000
--- a/target/linux/lantiq/xway/profiles/buffalo.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-define Profile/WBMRA
- NAME:=Buffalo WBMR-HP-G300H (A) - WBMR
- PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
- kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
- kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ath9k wpad hostapd-utils \
- swconfig
-endef
-
-$(eval $(call Profile,WBMRA))
-
-define Profile/WBMRB
- NAME:=Buffalo WBMR-HP-G300H (B) - WBMR
- PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
- kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
- kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ath9k wpad hostapd-utils \
- swconfig
-endef
-
-$(eval $(call Profile,WBMRB))
diff --git a/target/linux/lantiq/xway/profiles/gigaset.mk b/target/linux/lantiq/xway/profiles/gigaset.mk
deleted file mode 100644
index c6259af972..0000000000
--- a/target/linux/lantiq/xway/profiles/gigaset.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-define Profile/GIGASX76X
- NAME:=Gigaset sx76x
- PACKAGES:= kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
- kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
- kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
- ltq-adsl-app ppp-mod-pppoe \
- kmod-ath5k wpad-mini \
- swconfig
-endef
-
-$(eval $(call Profile,GIGASX76X))
diff --git a/target/linux/lantiq/xway/profiles/lantiq.mk b/target/linux/lantiq/xway/profiles/lantiq.mk
deleted file mode 100644
index 800a9f6768..0000000000
--- a/target/linux/lantiq/xway/profiles/lantiq.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-define Profile/EASY50712
- NAME:=Lantiq Danube - EASY50712
-endef
-
-$(eval $(call Profile,EASY50712))
diff --git a/target/linux/lantiq/xway/profiles/netgear.mk b/target/linux/lantiq/xway/profiles/netgear.mk
deleted file mode 100644
index b30ffe66f7..0000000000
--- a/target/linux/lantiq/xway/profiles/netgear.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-define Profile/DGN3500
- NAME:=Netgear DGN3500
- PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
- kmod-ath9k wpad-mini \
- kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
- kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ltq-deu-ar9 swconfig
-endef
-
-$(eval $(call Profile,DGN3500))
-
-define Profile/DGN3500B
- NAME:=Netgear DGN3500B
- PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
- kmod-ath9k wpad-mini \
- kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
- kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
- ltq-adsl-app ppp-mod-pppoa \
- kmod-ltq-deu-ar9 swconfig
-endef
-
-$(eval $(call Profile,DGN3500B))
diff --git a/target/linux/lantiq/xway/profiles/zte.mk b/target/linux/lantiq/xway/profiles/zte.mk
deleted file mode 100644
index 7de0b26be1..0000000000
--- a/target/linux/lantiq/xway/profiles/zte.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-define Profile/H201L
- NAME:=ZTE H201L - H201L
- PACKAGES:=kmod-ath9k-htc wpad-mini \
- kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
- kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
- ltq-adsl-app ppp-mod-pppoe \
- kmod-ltq-deu-ar9 kmod-usb-dwc2 \
- kmod-ltq-tapi kmod-ltq-vmmc \
- swconfig
-endef
-
-$(eval $(call Profile,H201L))
diff --git a/target/linux/lantiq/xway/profiles/zyxel.mk b/target/linux/lantiq/xway/profiles/zyxel.mk
deleted file mode 100644
index a1177fbf1f..0000000000
--- a/target/linux/lantiq/xway/profiles/zyxel.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-define Profile/P2601HNFX
- NAME:=ZyXEL P-2601HN-Fx
- PACKAGES:= kmod-rt2800-usb wpad-mini \
- kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
- kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
- ltq-adsl-app ppp-mod-pppoe \
- kmod-ltq-deu-ar9 kmod-usb-dwc2 \
- swconfig
-endef
-$(eval $(call Profile,P2601HNFX))
diff --git a/target/linux/lantiq/xway_legacy/config-default b/target/linux/lantiq/xway_legacy/config-default
new file mode 100644
index 0000000000..b838106ddc
--- /dev/null
+++ b/target/linux/lantiq/xway_legacy/config-default
@@ -0,0 +1,29 @@
+CONFIG_ADM6996_PHY=y
+CONFIG_AR8216_PHY=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+# CONFIG_GPIO_SYSFS is not set
+# CONFIG_HW_RANDOM is not set
+CONFIG_INPUT=y
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_POLLDEV=y
+# CONFIG_ISDN is not set
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+# CONFIG_LEDS_TRIGGER_TIMER is not set
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+# CONFIG_MTD_PHYSMAP_OF is not set
+CONFIG_NLS=y
+CONFIG_RTL8306_PHY=y
+CONFIG_RTL8366S_PHY=y
+CONFIG_RTL8367B_PHY=y
+CONFIG_RTL8367_PHY=y
+CONFIG_USB=y
+CONFIG_USB_COMMON=y
+# CONFIG_USB_EHCI_HCD is not set
+CONFIG_USB_SUPPORT=y
+# CONFIG_USB_UHCI_HCD is not set
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
diff --git a/target/linux/lantiq/xway_legacy/profiles/00-default.mk b/target/linux/lantiq/xway_legacy/profiles/00-default.mk
new file mode 100644
index 0000000000..26bc8b502b
--- /dev/null
+++ b/target/linux/lantiq/xway_legacy/profiles/00-default.mk
@@ -0,0 +1,9 @@
+define Profile/Default
+ NAME:=Default Profile
+ PRIORITY:=1
+endef
+
+define Profile/Default/Description
+ Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
diff --git a/target/linux/lantiq/xway_legacy/target.mk b/target/linux/lantiq/xway_legacy/target.mk
new file mode 100644
index 0000000000..2d9cc56d38
--- /dev/null
+++ b/target/linux/lantiq/xway_legacy/target.mk
@@ -0,0 +1,12 @@
+ARCH:=mips
+SUBTARGET:=xway_legacy
+BOARDNAME:=XWAY Legacy
+FEATURES:=squashfs atm mips16 ramdisk small_flash
+CPU_TYPE:=34kc
+CPU_SUBTYPE:=dsp
+
+DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug
+
+define Target/Description
+ Lantiq XWAY Legacy for old boards with small flash
+endef