Signed-off-by: Stijn Tintel
---
package/boot/uboot-envtools/files/ar71xx | 1 +
target/linux/ar71xx/base-files/etc/board.d/01_leds | 5 +
.../linux/ar71xx/base-files/etc/board.d/02_network | 5 +
.../etc/hotplug.d/firmware/11-ath10k-caldata | 4 +
.../base-files/etc/uci-defaults/09_fix-checksum| 9 +
target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +
.../ar71xx/base-files/lib/upgrade/platform.sh | 13 ++
target/linux/ar71xx/config-4.4 | 1 +
.../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 9 +
target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 +
.../files/arch/mips/ath79/mach-dap-2695-a1.c | 191 +
.../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 +
target/linux/ar71xx/image/generic.mk | 38
13 files changed, 281 insertions(+)
create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-dap-2695-a1.c
diff --git a/package/boot/uboot-envtools/files/ar71xx
b/package/boot/uboot-envtools/files/ar71xx
index a075020..45f1f45 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -54,6 +54,7 @@ om2p-lc)
dr531)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x1"
;;
+dap-2695-a1 | \
wzr-hp-ag300h)
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1" "0x1"
;;
diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index cf05859..96352a2 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -197,6 +197,11 @@ rb-2011uias-2hnd)
ucidef_set_led_switch "eth10" "ETH10" "rb:green:eth10" "switch1" "0x02"
;;
+dap-2695-a1)
+ ucidef_set_led_default "power" "POWER" "d-link:green:power" "1"
+ ucidef_set_led_default "diag" "DIAG" "d-link:red:power" "0"
+ ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "d-link:green:wlan2g"
"phy1tpt"
+ ;;
dhp-1565-a1)
ucidef_set_led_switch "wan" "WAN" "d-link:green:planet" "switch0" "0x20"
;;
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index b637113..65292b0 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -538,6 +538,11 @@ wndr3700)
ucidef_add_switch_port_attr "switch0" 5 led 2
;;
+dap-2695-a1)
+ ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_add_switch "switch0" "0@eth0" "2:lan" "3:wan" "6@eth1"
+ ;;
+
*)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
diff --git
a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 0e93feb..31f54e3 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -47,6 +47,10 @@ board=$(ar71xx_board_name)
case "$FIRMWARE" in
"ath10k/cal-pci-:00:00.0.bin")
case $board in
+ dap-2695-a1)
+ ath10kcal_extract "radiocfg" 20480 2116
+ ath10kcal_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
+ ;;
dlan-pro-1200-ac)
ath10kcal_extract "art" 20480 2116
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
index 1bfd525..057afe0 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
@@ -11,9 +11,18 @@ fixtrx() {
mtd -o 32 fixtrx firmware
}
+fixwrgg() {
+ local kernel_size=$(sed -n 's/mtd[0-9]*:
\([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
+
+ [ "$kernel_size" ] && mtd -c 0x$kernel_size fixwrgg firmware
+}
+
case "$board" in
mynet-rext |\
wrt160nl)
fixtrx
;;
+dap-2695-a1)
+ fixwrgg
+ ;;
esac
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index e57701a..82c1872 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -469,6 +469,9 @@ ar71xx_board_detect() {
*CR5000)
name="cr5000"
;;
+ *"DAP-2695 rev. A1")
+ name="dap-2695-a1"
+ ;;
*"DB120 reference board")
name="db120"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 716fa52..e94dd13 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -105,6 +105,10 @@