define Build/Compile
endef
+# Use ath10k-bdencoder from https://github.com/qca/qca-swiss-army-knife.git
+# to generate the board-* files here.
#
# This is intended to be used on an interim basis until device-specific
# board data for new devices is available through the upstream compilation
# Please send a mail with your device-specific board files upstream.
# You can find instructions and examples on the linux-wireless wiki:
# <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>
-#
ALLWIFIBOARDS:= \
aruba_ap-303 \
avm_fritzrepeater-1200 \
+ dlink_dap2610 \
ezviz_cs-w3-wd1200g-eup \
linksys_ea8300 \
qxwlan_e2600ac
$(eval $(call generate-ipq-wifi-package,aruba_ap-303,Aruba AP-303))
$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater 1200))
+$(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610))
$(eval $(call generate-ipq-wifi-package,ezviz_cs-w3-wd1200g-eup,EZVIZ CS-W3-WD1200G EUP))
$(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC))
;;
aruba,ap-303|\
avm,fritzrepeater-1200|\
+ dlink,dap-2610 |\
engenius,eap1300|\
meraki,mr33|\
netgear,ex6100v2|\
cilab,meshpoint-one)
label_mac=$(mtd_get_mac_binary "ART" 0x1006)
;;
+ dlink,dap-2610)
+ lan_mac=$(mtd_get_mac_ascii bdcfg lanmac)
+ label_mac=$lan_mac
+ ;;
engenius,ens620ext)
wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
lan_mac=$(macaddr_add "$wan_mac" 1)
unielec,u4019-32m)
caldata_extract "0:ART" 0x1000 0x2f20
;;
+ dlink,dap-2610)
+ caldata_extract "ART" 0x1000 0x2f20
+ ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac)
+ ;;
engenius,ens620ext)
caldata_extract "ART" 0x1000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2)
unielec,u4019-32m)
caldata_extract "0:ART" 0x5000 0x2f20
;;
+ dlink,dap-2610)
+ caldata_extract "ART" 0x5000 0x2f20
+ ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
+ ;;
engenius,ens620ext)
caldata_extract "ART" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +3)
CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_SPLIT_FIRMWARE=y
CONFIG_MTD_SPLIT_FIT_FW=y
+CONFIG_MTD_SPLIT_WRGG_FW=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_BEB_LIMIT=20
CONFIG_MTD_UBI_BLOCK=y
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcom-ipq4019.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/soc/qcom,tcsr.h>
+
+/ {
+ model = "D-Link DAP 2610";
+ compatible = "dlink,dap-2610";
+
+ aliases {
+ led-boot = &led_red;
+ led-failsafe = &led_red;
+ led-running = &led_green;
+ led-upgrade = &led_red;
+ };
+
+ soc {
+ edma@c080000 {
+ qcom,num_gmac = <1>;
+ status = "ok";
+ };
+
+ tcsr@1949000 {
+ compatible = "qcom,tcsr";
+ reg = <0x1949000 0x100>;
+ qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
+ };
+
+ ess_tcsr@1953000 {
+ compatible = "qcom,tcsr";
+ reg = <0x1953000 0x1000>;
+ qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
+ };
+
+ tcsr@1957000 {
+ compatible = "qcom,tcsr";
+ reg = <0x1957000 0x100>;
+ qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
+ };
+
+ rng@22000 {
+ status = "ok";
+ };
+
+ crypto@8e3a000 {
+ status = "ok";
+ };
+
+ watchdog@b017000 {
+ status = "ok";
+ };
+
+ ess-switch@c000000 {
+ status = "ok";
+ switch_lan_bmp = <0x20>;
+ switch_wan_bmp = <0x00>;
+ };
+
+ ess-psgmii@98000 {
+ status = "ok";
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_red: red {
+ label = "dap-2610:red:power";
+ gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
+ };
+
+ led_green: green {
+ label = "dap-2610:green:power";
+ gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&blsp1_spi1 {
+ pinctrl-0 = <&spi_0_pins>;
+ pinctrl-names = "default";
+ status = "ok";
+ cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <24000000>;
+
+ partitions {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "fixed-partitions";
+
+ partition@0 {
+ label = "SBL1";
+ reg = <0x0 0x40000>;
+ read-only;
+ };
+ partition@40000 {
+ label = "MIBIB";
+ reg = <0x40000 0x20000>;
+ read-only;
+ };
+ partition@60000 {
+ label = "QSEE";
+ reg = <0x60000 0x60000>;
+ read-only;
+ };
+ partition@c0000 {
+ label = "CDT";
+ reg = <0xc0000 0x10000>;
+ read-only;
+ };
+ partition@d0000 {
+ label = "DDRPARAMS";
+ reg = <0xd0000 0x10000>;
+ read-only;
+ };
+ partition@e0000 {
+ label = "APPSBLENV";
+ reg = <0xe0000 0x10000>;
+ read-only;
+ };
+ partition@f0000 {
+ label = "APPSBL";
+ reg = <0xf0000 0x80000>;
+ read-only;
+ };
+ partition@170000 {
+ label = "ART";
+ reg = <0x170000 0x10000>;
+ read-only;
+ };
+ partition@180000 {
+ compatible = "wrg";
+ label = "firmware";
+ reg = <0x180000 0xdc0000>;
+ };
+ partition@fb0000 {
+ label = "rgbd";
+ reg = <0xfb0000 0x10000>;
+ read-only;
+ };
+ partition@fc0000 {
+ label = "bdcfg";
+ reg = <0xfc0000 0x10000>;
+ read-only;
+ };
+ partition@fd0000 {
+ label = "langpack";
+ reg = <0xfd0000 0x20000>;
+ read-only;
+ };
+ partition@ff0000 {
+ label = "certificate";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ partition@f40000 {
+ label = "captival";
+ reg = <0xf40000 0x70000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&blsp_dma {
+ status = "ok";
+};
+
+&blsp1_uart1 {
+ pinctrl-0 = <&serial_pins>;
+ pinctrl-names = "default";
+ status = "ok";
+};
+
+&cryptobam {
+ status = "ok";
+};
+
+&gmac0 {
+ qcom,phy_mdio_addr = <4>;
+ qcom,poll_required = <1>;
+ qcom,forced_speed = <1000>;
+ qcom,forced_duplex = <1>;
+ vlan_tag = <1 0x20>;
+};
+
+&mdio {
+ status = "ok";
+};
+
+&tlmm {
+ serial_pins: serial_pinmux {
+ mux {
+ pins = "gpio60", "gpio61";
+ function = "blsp_uart0";
+ bias-disable;
+ };
+ };
+
+ spi_0_pins: spi_0_pinmux {
+ mux {
+ function = "blsp_spi0";
+ pins = "gpio55", "gpio56", "gpio57";
+ drive-strength = <12>;
+ bias-disable;
+ };
+ mux_cs {
+ function = "gpio";
+ pins = "gpio54";
+ drive-strength = <2>;
+ bias-disable;
+ output-high;
+ };
+ };
+};
+
+&wifi0 {
+ status = "ok";
+ qcom,ath10k-calibration-variant = "dlink,dap-2610";
+};
+
+&wifi1 {
+ status = "ok";
+ qcom,ath10k-calibration-variant = "dlink,dap-2610";
+};
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION
+DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION \
+ WRGG_DEVNAME WRGG_SIGNATURE
define Device/Default
PROFILES := Default
@cp $@.new $@
endef
+define Build/wrgg-image
+ mkwrggimg -i $@ \
+ -o $@.new \
+ -d "$(WRGG_DEVNAME)" \
+ -s "$(WRGG_SIGNATURE)" \
+ -v "" -m "" -B ""
+ mv $@.new $@
+endef
+
define Device/8dev_jalapeno-common
$(call Device/FitImage)
$(call Device/UbiFit)
endef
TARGET_DEVICES += compex_wpj428
+define Device/dlink_dap-2610
+ $(call Device/FitImageLzma)
+ DEVICE_VENDOR := D-Link
+ DEVICE_MODEL := DAP-2610
+ SOC := qcom-ipq4018
+ DEVICE_DTS_CONFIG := config@ap.dk01.1-c1
+ BLOCKSIZE := 64k
+ WRGG_DEVNAME := /dev/mtdblock/8
+ WRGG_SIGNATURE := wapac30_dkbs_dap2610
+ IMAGE_SIZE := 14080k
+ IMAGES := sysupgrade.bin factory.bin
+ # Bootloader expects a special 160 byte header which is added by
+ # wrgg-image.
+ # Factory image size must be larger than 6MB, and size in wrgg header must
+ # match actual factory image size to be flashable from D-Link http server.
+ # Bootloader verifies checksum of wrgg image before booting, thus jffs2
+ # cannot be part of the wrgg image. This is solved in the factory image by
+ # having the rootfs at the end of the image (without pad-rootfs). And in
+ # the sysupgrade image only the kernel is included in the wrgg checksum,
+ # but this is not flashable from the D-link http server.
+ # append-rootfs must start on an erase block boundary.
+ IMAGE/factory.bin := append-kernel | pad-offset 6144k 160 | append-rootfs | wrgg-image | check-size $$$$(IMAGE_SIZE)
+ IMAGE/sysupgrade.bin := append-kernel | wrgg-image | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | append-metadata
+ DEVICE_PACKAGES := ipq-wifi-dlink_dap2610
+endef
+TARGET_DEVICES += dlink_dap-2610
+
define Device/engenius_eap1300
$(call Device/FitImage)
DEVICE_VENDOR := EnGenius
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
-@@ -785,11 +785,40 @@ dtb-$(CONFIG_ARCH_QCOM) += \
+@@ -785,11 +785,41 @@ dtb-$(CONFIG_ARCH_QCOM) += \
qcom-apq8074-dragonboard.dtb \
qcom-apq8084-ifc6540.dtb \
qcom-apq8084-mtp.dtb \
+ qcom-ipq4018-a42.dtb \
+ qcom-ipq4018-ap120c-ac.dtb \
++ qcom-ipq4018-dap-2610.dtb \
+ qcom-ipq4018-cs-w3-wd1200g-eup.dtb \
+ qcom-ipq4018-ea6350v3.dtb \
+ qcom-ipq4018-eap1300.dtb \