aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/lantiq')
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/board.d/02_network8
-rw-r--r--target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom3
-rwxr-xr-xtarget/linux/lantiq/base-files/lib/upgrade/platform.sh1
-rw-r--r--target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7412.dts230
-rw-r--r--target/linux/lantiq/image/Makefile12
5 files changed, 254 insertions, 0 deletions
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 86894403d7..b7d23da53d 100755
--- a/target/linux/lantiq/base-files/etc/board.d/02_network
+++ b/target/linux/lantiq/base-files/etc/board.d/02_network
@@ -158,6 +158,14 @@ avm,fritz7360sl)
"0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0"
;;
+avm,fritz7412)
+ tffsdev=$(find_mtd_chardev "nand-tffs")
+ annex="b"
+ lan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n maca)
+ wan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n macdsl)
+ ucidef_set_interface_lan 'eth0'
+ ;;
+
siemens,gigaset-sx76x)
annex="b"
ucidef_add_switch "switch0" \
diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
index 40642e580f..26b3dd0420 100644
--- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
+++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
@@ -163,6 +163,9 @@ case "$FIRMWARE" in
avm,fritz7312|avm,fritz7320|avm,fritz7360sl)
ath9k_eeprom_extract "urlader" 2437 0
;;
+ avm,fritz7412)
+ /usr/bin/fritz_cal_extract -i 1 -s 0x1e000 -e 0x207 -l 4096 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader")
+ ;;
tplink,tdw8970|tplink,tdw8980)
ath9k_eeprom_extract "boardconfig" 135168 0
;;
diff --git a/target/linux/lantiq/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/base-files/lib/upgrade/platform.sh
index ecbb939e36..d7cacb2eae 100755
--- a/target/linux/lantiq/base-files/lib/upgrade/platform.sh
+++ b/target/linux/lantiq/base-files/lib/upgrade/platform.sh
@@ -11,6 +11,7 @@ platform_do_upgrade() {
case "$board" in
avm,fritz3370-rev2-hynix|\
avm,fritz3370-rev2-micron|\
+ avm,fritz7412|\
bt,homehub-v2b|\
bt,homehub-v3a|\
bt,homehub-v5a|\
diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7412.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7412.dts
new file mode 100644
index 0000000000..3059c12858
--- /dev/null
+++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7412.dts
@@ -0,0 +1,230 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "vr9.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mips/lantiq_rcu_gphy.h>
+
+/ {
+ compatible = "avm,fritz7412", "lantiq,xway", "lantiq,vr9";
+ model = "AVM FRITZ!Box 7412";
+
+ chosen {
+ bootargs = "console=ttyLTQ0,115200 mem=126M vpe1_load_addr=0x87e00000 vpe1_mem=2M maxvpes=1 maxtcs=1 nosmp";
+ };
+
+ aliases {
+ led-boot = &power_green;
+ led-failsafe = &power_red;
+ led-running = &power_green;
+
+ led-dsl = &info;
+ led-wifi = &wifi;
+ };
+
+ memory@0 {
+ reg = <0x0 0x8000000>;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ dect {
+ label = "dect";
+ gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_PHONE>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power_green: power_green {
+ label = "fritz7412:green:power";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ };
+
+ power_red: power_red {
+ label = "fritz7412:red:power";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ fon {
+ label = "fritz7412:green:fon";
+ gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
+ };
+
+ dect {
+ label = "fritz7412:green:dect";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi: wifi {
+ label = "fritz7412:green:wifi";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ };
+
+ info: info {
+ label = "fritz7412:green:info";
+ gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&localbus {
+ nand@0 {
+ compatible = "lantiq,nand-xway";
+ bank-width = <2>;
+ reg = <0 0x0 0x2000000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ lantiq,cs = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "urlader";
+ reg = <0x0 0x40000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "nand-tffs";
+ reg = <0x40000 0x400000>;
+ read-only;
+ };
+
+ partition@440000 {
+ label = "kernel";
+ reg = <0x440000 0x400000>;
+ };
+
+ partition@840000 {
+ label = "ubi";
+ reg = <0x840000 0x3000000>;
+ };
+
+ partition@3840000 {
+ label = "reserved-kernel";
+ reg = <0x3840000 0x400000>;
+ read-only;
+ };
+
+ partition@3c40000 {
+ label = "reserved-filesystem";
+ reg = <0x3c40000 0x3000000>;
+ read-only;
+ };
+
+ partition@6c40000 {
+ label = "config";
+ reg = <0x6c40000 0x400000>;
+ read-only;
+ };
+
+ partition@6e40000 {
+ label = "nand-filesystem";
+ reg = <0x6e40000 0x400000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pcie0 {
+ status = "okay";
+ gpio-reset = <&gpio 11 GPIO_ACTIVE_HIGH>;
+
+ pcie@0 {
+ reg = <0 0 0 0 0>;
+ #interrupt-cells = <1>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ device_type = "pci";
+
+ wifi@168c,002e {
+ compatible = "pci168c,002e";
+ reg = <0 0 0 0 0>;
+ qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */
+ };
+ };
+};
+
+&gpio {
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinmux {
+ mdio {
+ lantiq,groups = "mdio";
+ lantiq,function = "mdio";
+ };
+ pcie-rst {
+ lantiq,pins = "io11";
+ lantiq,open-drain = <1>;
+ lantiq,output = <1>;
+ };
+ nand-mux {
+ lantiq,groups = "nand cle", "nand ale",
+ "nand rd", "nand cs1",
+ "nand rdy";
+ lantiq,function = "ebu";
+ };
+ nand-pins {
+ lantiq,pins = "io13", "io24", "io49";
+ lantiq,pull = <1>;
+ };
+ };
+};
+
+&gphy0 {
+ lantiq,gphy-mode = <GPHY_MODE_FE>;
+};
+
+&eth0 {
+ lantiq,phys = <&gphy0>;
+
+ 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 = "gmii";
+ phy-handle = <&phy11>;
+ };
+ };
+
+ mdio@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ compatible = "lantiq,xrx200-mdio";
+
+ phy11: ethernet-phy@11 {
+ reg = <0x11>;
+ compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
+ };
+ };
+};
+
+&vmmc {
+ status = "okay";
+};
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index 7e328bf2be..e6fa8b5f50 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -665,6 +665,18 @@ define Device/avm_fritz7360sl
endef
TARGET_DEVICES += avm_fritz7360sl
+define Device/avm_fritz7412
+ $(Device/AVM)
+ $(Device/NAND)
+ BOARD_NAME := FRITZ7412
+ DEVICE_DTS := FRITZ7412
+ KERNEL_SIZE := 4096k
+ IMAGE_SIZE := 49152k
+ DEVICE_TITLE := AVM FRITZ!Box 7412
+ DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-mini kmod-ltq-tapi kmod-ltq-vmmc fritz-tffs-nand fritz-caldata
+endef
+TARGET_DEVICES += avm_fritz7412
+
define Device/arcadyan_vg3503j
IMAGE_SIZE := 8000k
DEVICE_DTS := VG3503J