From patchwork Sun Oct 29 23:24:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Yeryomin X-Patchwork-Id: 831826 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="m7gciAYs"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yQDH24vB6z9t4R for ; Mon, 30 Oct 2017 10:25:02 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id:Date:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=k55rNO+Dmo2lnSSKvMtdZepUyGJtKwfzLWw0ctgTXUo=; b=m7gciAYsUv6vx9 tWLMD3caB/WJCrpMZbjc/1OJfSi/tfzJrA+G99HuPuVFWWlr9vRWkSg7mkW9wHcXSrWkA2aZn+6uL PspA+7cR975fVvdHbUys1mIcU3+e9Q3qCHE0t8Nt83WejPoZRot3nRfz0GUjTO/UUHNIStaK4dxEc JxqQvBTjN0G5YN0hvWRamzgj2+R4rTxQI4uWWJXHyXDxriybqTaYq7Xfy188OmMjfRFrmjeBA9aoI vd3RtJr6Um47IFXCTH84bh+QKkv5PITITGdzYqEghK3zLI7s32IqZYSIPMf4NEnipIckhh8+vHDBb pQO1vciEeFC8tA3HTfiQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e8wwu-0006W0-6S; Sun, 29 Oct 2017 23:25:00 +0000 Received: from [213.175.92.62] (helo=mail.pbx.lv) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e8wwp-0006Ri-KK for lede-dev@lists.infradead.org; Sun, 29 Oct 2017 23:24:58 +0000 Received: from brain.lan (balticom-200-108.balticom.lv [83.99.200.108]) by mail.pbx.lv (MailSystem) with ESMTPSA id 5052D195C70 for ; Mon, 30 Oct 2017 01:24:32 +0200 (EET) From: Roman Yeryomin To: LEDE Development List Date: Mon, 30 Oct 2017 01:24:26 +0200 Message-Id: <20171029232426.4025-1-roman@advem.lv> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171029_162456_055907_F3DBF9CE X-CRM114-Status: GOOD ( 10.21 ) X-Spam-Score: -1.1 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS Subject: [LEDE-DEV] [PATCH v3] ipq806x: ipq4019: add ap-dk01.1-c1 board support X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org AP-DK01.1-C1 is QCA dev board with: - ipq4018 quad core ARM @716.8MHz, 2x2 dual (11n+11ac) radio - 256MB RAM - 32MB SPI flash - QCA8075 multiport ethernet phy (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 $filesize Further upgrades via sysupgrade. Changes: - add partitions - set memory size to 256MB - add reserved memory mapping - add correct compatible string - add image generation - extract pre-cal data from ART partition Compile and run tested. Wirespeed NAT can be achieved with spreading rx interrupts over different cores. Wifi speed is ~550Mbps @5GHz in open air. Note: AP-DK01.1-C1 is fully compatible with AP-DK01.2-C1, which has ipq4028 instead of ipq4018 on board. Changes since v2: - based on dts(i) rework/cleanup submitted: http://lists.infradead.org/pipermail/lede-dev/2017-October/009596.html - precise reserved memory mapping - more precise description - compatible string Signed-off-by: Roman Yeryomin --- .../etc/hotplug.d/firmware/11-ath10k-caldata | 6 ++ target/linux/ipq806x/base-files/lib/ipq806x.sh | 3 + target/linux/ipq806x/image/Makefile | 18 +++- ...pq4019-ap-dk01.1-c1-add-spi-and-ram-nodes.patch | 115 +++++++++++++++++++++ ...pq4019-ap-dk01.1-c1-add-compatible-string.patch | 10 ++ 5 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 target/linux/ipq806x/patches-4.9/864-07-dts-ipq4019-ap-dk01.1-c1-add-spi-and-ram-nodes.patch create mode 100644 target/linux/ipq806x/patches-4.9/864-08-dts-ipq4019-ap-dk01.1-c1-add-compatible-string.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 39757eb161..4c5b55bc53 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 @@ -47,6 +47,9 @@ board=$(board_name) case "$FIRMWARE" in "ath10k/pre-cal-ahb-a000000.wifi.bin") case "$board" in + ap-dk01.1-c1) + ath10kcal_extract "ART" 4096 12064 + ;; fritz4040) /usr/bin/fritz_cal_extract -i 1 -s 0x400 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader_config") ;; @@ -54,6 +57,9 @@ case "$FIRMWARE" in ;; "ath10k/pre-cal-ahb-a800000.wifi.bin") case "$board" in + ap-dk01.1-c1) + ath10kcal_extract "ART" 20480 12064 + ;; fritz4040) /usr/bin/fritz_cal_extract -i 1 -s 0x400 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader_config") ;; diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh b/target/linux/ipq806x/base-files/lib/ipq806x.sh index e8ff7ea3f8..940c7ef204 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 f6f7f421b8..c2e1290671 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -251,6 +251,22 @@ define Device/VR2600v IMAGE/sysupgrade.bin := pad-extra 512 | append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata 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 + define Device/AP-DK04.1-C1 $(call Device/FitImage) $(call Device/UbiFit) @@ -265,6 +281,6 @@ define Device/AP-DK04.1-C1 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-DK01.1-C1 AP-DK04.1-C1 $(eval $(call BuildImage)) diff --git a/target/linux/ipq806x/patches-4.9/864-07-dts-ipq4019-ap-dk01.1-c1-add-spi-and-ram-nodes.patch b/target/linux/ipq806x/patches-4.9/864-07-dts-ipq4019-ap-dk01.1-c1-add-spi-and-ram-nodes.patch new file mode 100644 index 0000000000..e9d262069f --- /dev/null +++ b/target/linux/ipq806x/patches-4.9/864-07-dts-ipq4019-ap-dk01.1-c1-add-spi-and-ram-nodes.patch @@ -0,0 +1,115 @@ +--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts ++++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts +@@ -19,4 +19,112 @@ + / { + model = "Qualcomm Technologies, Inc. IPQ40xx/AP-DK01.1-C1"; + ++ memory { ++ device_type = "memory"; ++ reg = <0x80000000 0x10000000>; ++ }; ++ ++ reserved-memory { ++ #address-cells = <0x1>; ++ #size-cells = <0x1>; ++ ranges; ++ ++ apps_bl@87000000 { ++ reg = <0x87000000 0x400000>; ++ no-map; ++ }; ++ ++ sbl@87400000 { ++ reg = <0x87400000 0x100000>; ++ no-map; ++ }; ++ ++ cnss_debug@87500000 { ++ reg = <0x87500000 0x600000>; ++ no-map; ++ }; ++ ++ cpu_context_dump@87b00000 { ++ reg = <0x87b00000 0x080000>; ++ no-map; ++ }; ++ ++ tz_apps@87b80000 { ++ reg = <0x87b80000 0x280000>; ++ no-map; ++ }; ++ ++ smem@87e00000 { ++ reg = <0x87e00000 0x080000>; ++ no-map; ++ }; ++ ++ tz@87e80000 { ++ reg = <0x87e80000 0x180000>; ++ no-map; ++ }; ++ }; ++}; ++ ++&spi_0 { ++ mx25l25635f@0 { ++ compatible = "mx25l25635f", "jedec,spi-nor"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ reg = <0>; ++ 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-08-dts-ipq4019-ap-dk01.1-c1-add-compatible-string.patch b/target/linux/ipq806x/patches-4.9/864-08-dts-ipq4019-ap-dk01.1-c1-add-compatible-string.patch new file mode 100644 index 0000000000..2d4ff31046 --- /dev/null +++ b/target/linux/ipq806x/patches-4.9/864-08-dts-ipq4019-ap-dk01.1-c1-add-compatible-string.patch @@ -0,0 +1,10 @@ +--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts ++++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts +@@ -18,6 +18,7 @@ + + / { + model = "Qualcomm Technologies, Inc. IPQ40xx/AP-DK01.1-C1"; ++ compatible = "qcom,ap-dk01.1-c1", "qcom,ap-dk01.2-c1", "qcom,ipq4019"; + + memory { + device_type = "memory";