AP.DK01.1 is QCA dev board with:
- ipq4028 (quad core ARM @710MHz, 2x2 dual an+ac radios)
- 256MB RAM
- 32MB SPI flash
- QCA8075 ethernet switch (WAN port, 4x LAN ports)

First installation via u-boot:
sf probe
sf erase 0x180000 0x1a00000
tftpboot 0x84000000 lede-ipq806x-AP-DK01.1-C1-squashfs-sysupgrade.bin
sf write 0x84000000 0x180000 0x1a00000

Further via sysupgrade.

Changes:
- add partitions
- enable wifi and ethernet
- set max cpu speed to 710MHz
- set memory size to 256MB
- add image generation
- extract pre-cal data from ART partition

Wirespeed NAT can be achieved with spreading rx interrupts over different
cores. Wifi needs love -- too slow. Could be that latest ath10k helps,
didn't test yet.

Changes since v1:
- add hw description and install instruction

Signed-off-by: Roman Yeryomin <ro...@advem.lv>
---
 .../etc/hotplug.d/firmware/11-ath10k-caldata       |  6 ++
 target/linux/ipq806x/base-files/lib/ipq806x.sh     |  3 +
 target/linux/ipq806x/image/Makefile                | 18 ++++-
 ...s-ipq4019-ap.dk01.1-add-256MB-memory-node.patch | 14 ++++
 ...2-dts-ipq4019-ap.dk01.1-fix-max-cpu-speed.patch | 15 ++++
 ...4-03-dts-ipq4019-ap.dk01.1-add-partitions.patch | 72 ++++++++++++++++++
 ...pq4019-ap.dk01.1-enable-wifi-and-ethernet.patch | 87 ++++++++++++++++++++++
 7 files changed, 214 insertions(+), 1 deletion(-)
 create mode 100644 
target/linux/ipq806x/patches-4.9/864-01-dts-ipq4019-ap.dk01.1-add-256MB-memory-node.patch
 create mode 100644 
target/linux/ipq806x/patches-4.9/864-02-dts-ipq4019-ap.dk01.1-fix-max-cpu-speed.patch
 create mode 100644 
target/linux/ipq806x/patches-4.9/864-03-dts-ipq4019-ap.dk01.1-add-partitions.patch
 create mode 100644 
target/linux/ipq806x/patches-4.9/864-04-dts-ipq4019-ap.dk01.1-enable-wifi-and-ethernet.patch

diff --git 
a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 39757eb..271667f 100644
--- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -50,6 +50,9 @@ case "$FIRMWARE" in
        fritz4040)
                /usr/bin/fritz_cal_extract -i 1 -s 0x400 -e 0x207 -l 12064 -o 
/lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader_config")
                ;;
+       ap-dk01.1-c1)
+               ath10kcal_extract "ART" 4096 12064
+               ;;
        esac
        ;;
 "ath10k/pre-cal-ahb-a800000.wifi.bin")
@@ -57,6 +60,9 @@ case "$FIRMWARE" in
        fritz4040)
                /usr/bin/fritz_cal_extract -i 1 -s 0x400 -e 0x208 -l 12064 -o 
/lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader_config")
                ;;
+       ap-dk01.1-c1)
+               ath10kcal_extract "ART" 20480 12064
+               ;;
        esac
        ;;
 
diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh 
b/target/linux/ipq806x/base-files/lib/ipq806x.sh
index e8ff7ea..940c7ef 100644
--- a/target/linux/ipq806x/base-files/lib/ipq806x.sh
+++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh
@@ -14,6 +14,9 @@ ipq806x_board_detect() {
        machine=$(cat /proc/device-tree/model)
 
        case "$machine" in
+       *"AP-DK01.1-C1")
+               name="ap-dk01.1-c1"
+               ;;
        *"AP148")
                name="ap148"
                ;;
diff --git a/target/linux/ipq806x/image/Makefile 
b/target/linux/ipq806x/image/Makefile
index 3a76c7f..60b3a71 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -264,7 +264,23 @@ define Device/AP-DK04.1-C1
        DEVICE_TITLE := QCA AP-DK04.1-C1
 endef
 
+define Device/AP-DK01.1-C1
+       PROFILES += $$(DEVICE_NAME)
+       DEVICE_TITLE := QCA AP-DK01.1-C1
+       BOARD_NAME := ap-dk01.1-c1
+       DEVICE_DTS := qcom-ipq4019-ap.dk01.1-c1
+       KERNEL_LOADADDR := 0x80208000
+       KERNEL_INSTALL := 1
+       KERNEL_SIZE := 4096k
+       IMAGE_SIZE := 26624k
+       FILESYSTEMS := squashfs
+       $(call Device/FitImage)
+       IMAGES := sysupgrade.bin
+       IMAGE/sysupgrade.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | 
append-rootfs | pad-rootfs | append-metadata
+       DEVICE_PACKAGES := ath10k-firmware-qca4019
+endef
+
 TARGET_DEVICES += AP148 AP148-legacy C2600 D7800 DB149 EA8500 FRITZ4040 R7500 \
-                 R7500v2 R7800 NBG6817 VR2600v AP-DK04.1-C1
+                 R7500v2 R7800 NBG6817 VR2600v AP-DK04.1-C1 AP-DK01.1-C1
 
 $(eval $(call BuildImage))
diff --git 
a/target/linux/ipq806x/patches-4.9/864-01-dts-ipq4019-ap.dk01.1-add-256MB-memory-node.patch
 
b/target/linux/ipq806x/patches-4.9/864-01-dts-ipq4019-ap.dk01.1-add-256MB-memory-node.patch
new file mode 100644
index 0000000..8a80979
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-4.9/864-01-dts-ipq4019-ap.dk01.1-add-256MB-memory-node.patch
@@ -0,0 +1,14 @@
+--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
+@@ -20,6 +20,11 @@
+       model = "Qualcomm Technologies, Inc. IPQ4019/AP-DK01.1";
+       compatible = "qcom,ipq4019";
+ 
++      memory {
++              device_type = "memory";
++              reg = <0x80000000 0x10000000>;
++      };
++
+       clocks {
+                 xo: xo {
+                         compatible = "fixed-clock";
diff --git 
a/target/linux/ipq806x/patches-4.9/864-02-dts-ipq4019-ap.dk01.1-fix-max-cpu-speed.patch
 
b/target/linux/ipq806x/patches-4.9/864-02-dts-ipq4019-ap.dk01.1-fix-max-cpu-speed.patch
new file mode 100644
index 0000000..e9540f4
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-4.9/864-02-dts-ipq4019-ap.dk01.1-fix-max-cpu-speed.patch
@@ -0,0 +1,15 @@
+--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
+@@ -135,3 +135,12 @@
+               };
+       };
+ };
++
++&cpu0_opp_table {
++      /delete-node/ opp@666000000;
++
++      opp@710000000 {
++              opp-hz = /bits/ 64 <710000000>;
++              clock-latency-ns = <256000>;
++      };
++};
diff --git 
a/target/linux/ipq806x/patches-4.9/864-03-dts-ipq4019-ap.dk01.1-add-partitions.patch
 
b/target/linux/ipq806x/patches-4.9/864-03-dts-ipq4019-ap.dk01.1-add-partitions.patch
new file mode 100644
index 0000000..a7861cd
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-4.9/864-03-dts-ipq4019-ap.dk01.1-add-partitions.patch
@@ -0,0 +1,72 @@
+--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
+@@ -93,6 +93,69 @@
+                               reg = <0>;
+                               compatible = "mx25l25635e";
+                               spi-max-frequency = <24000000>;
++
++                              SBL1@0 {
++                                      label = "SBL1";
++                                      reg = <0x0 0x40000>;
++                                      read-only;
++                              };
++
++                              MIBIB@40000 {
++                                      label = "MIBIB";
++                                      reg = <0x40000 0x20000>;
++                                      read-only;
++                              };
++
++                              QSEE@60000 {
++                                      label = "QSEE";
++                                      reg = <0x60000 0x60000>;
++                                      read-only;
++                              };
++
++                              CDT@c0000 {
++                                      label = "CDT";
++                                      reg = <0xc0000 0x10000>;
++                                      read-only;
++                              };
++
++                              DDRPARAMS@d0000 {
++                                      label = "DDRPARAMS";
++                                      reg = <0xd0000 0x10000>;
++                                      read-only;
++                              };
++
++                              APPSBLENV@e0000 {
++                                      label = "APPSBLENV";
++                                      reg = <0xe0000 0x10000>;
++                                      read-only;
++                              };
++
++                              APPSBL@f0000 {
++                                      label = "APPSBL";
++                                      reg = <0xf0000 0x80000>;
++                                      read-only;
++                              };
++
++                              ART@170000 {
++                                      label = "ART";
++                                      reg = <0x170000 0x10000>;
++                                      read-only;
++                              };
++
++                              kernel@180000 {
++                                      label = "kernel";
++                                      reg = <0x180000 0x400000>;
++                              };
++
++                              rootfs@580000 {
++                                      label = "rootfs";
++                                      reg = <0x580000 0x1600000>;
++                              };
++
++                              firmware@180000 {
++                                      label = "firmware";
++                                      reg = <0x180000 0x1a00000>;
++                              };
+                       };
+               };
+ 
diff --git 
a/target/linux/ipq806x/patches-4.9/864-04-dts-ipq4019-ap.dk01.1-enable-wifi-and-ethernet.patch
 
b/target/linux/ipq806x/patches-4.9/864-04-dts-ipq4019-ap.dk01.1-enable-wifi-and-ethernet.patch
new file mode 100644
index 0000000..cc90475
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-4.9/864-04-dts-ipq4019-ap.dk01.1-enable-wifi-and-ethernet.patch
@@ -0,0 +1,87 @@
+--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
+@@ -15,6 +15,7 @@
+  */
+ 
+ #include "qcom-ipq4019.dtsi"
++#include <dt-bindings/soc/qcom,tcsr.h>
+ 
+ / {
+       model = "Qualcomm Technologies, Inc. IPQ4019/AP-DK01.1";
+@@ -25,6 +26,27 @@
+               reg = <0x80000000 0x10000000>;
+       };
+ 
++      reserved-memory {
++              #address-cells = <0x1>;
++              #size-cells = <0x1>;
++              ranges;
++
++              rsvd1@87000000 {
++                      reg = <0x87000000 0x0500000>;
++                      no-map;
++              };
++
++              wifi_dump@87500000 {
++                      reg = <0x87500000 0x600000>;
++                      no-map;
++              };
++
++              rsvd2@87B00000 {
++                      reg = <0x87b00000 0x500000>;
++                      no-map;
++              };
++      };
++
+       clocks {
+                 xo: xo {
+                         compatible = "fixed-clock";
+@@ -196,6 +218,48 @@
+               usb2: usb2@60f8800 {
+                       status = "ok";
+               };
++
++              wifi@a000000 {
++                      status = "okay";
++              };
++
++              wifi@a800000 {
++                      status = "okay";
++              };
++
++              ess-switch@c000000 {
++                      status = "okay";
++              };
++
++              ess-psgmii@98000 {
++                      status = "okay";
++              };
++
++              edma@c080000 {
++                      status = "okay";
++              };
++
++              mdio@90000 {
++                      status = "okay";
++              };
++
++              ess_tcsr@1953000 {
++                      compatible = "qcom,tcsr";
++                      reg = <0x1953000 0x1000>;
++                      qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
++              };
++
++              tcsr@1949000 {
++                      compatible = "qcom,tcsr";
++                      reg = <0x1949000 0x100>;
++                      qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
++              };
++
++              tcsr@1957000 {
++                      compatible = "qcom,tcsr";
++                      reg = <0x1957000 0x100>;
++                      qcom,wifi_noc_memtype_m0_m2 = 
<TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
++              };
+       };
+ };
+ 
-- 
2.7.4


_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to