From patchwork Mon Dec 17 22:08:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Genheimer X-Patchwork-Id: 1014783 X-Patchwork-Delegate: chunkeey@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=f0wl.cc Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="T3GZOwtr"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::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 43JZzc7093z9s3Z for ; Tue, 18 Dec 2018 09:08:28 +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=SsdkdEYEvmcGO88F+tPPA7clYT/mW6vdzmeq+zj8Dlo=; b=T3GZOwtrhiWNni V1e21mKfFyUYcr76f6o+dJv6s8CWR/yc3lDyHL3dgthHsCOlQ0husuJp0syWDQdJVUXXyRSRKjLUd 4ycANoYFvxXjyz6o/b5xWpYjhpcnxEumY5G2IllaTKXhDU00orHo7XO1jFgyfmLqjxWv0tjE7iHRk Dpk8g4o5UNLcHbWYgF+k4YJMxRaarHtQZT/eZEszGkIZGaf7VwJ07fUiAgbj1yJ9D4GXh/ELyl0cE P/kguA7XqjunfloBkBWUFzd/CcVDSX0UuMf/ETUFqybWV1YivmFgMiUMeXva7dCPosWByifOtIIzh jOY/b4uZldOpkbtCqFPA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZ13m-0003vK-Ua; Mon, 17 Dec 2018 22:08:22 +0000 Received: from dd16018.kasserver.com ([85.13.137.36]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZ13i-0003ug-Be for openwrt-devel@lists.openwrt.org; Mon, 17 Dec 2018 22:08:20 +0000 Received: from T420s.w17.io (p57939F11.dip0.t-ipconnect.de [87.147.159.17]) by dd16018.kasserver.com (Postfix) with ESMTPSA id 68F15741A0A for ; Mon, 17 Dec 2018 23:08:06 +0100 (CET) From: Marius Genheimer To: openwrt-devel@lists.openwrt.org Date: Mon, 17 Dec 2018 23:08:00 +0100 Message-Id: <20181217220800.3150-1-mail@f0wl.cc> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181217_140818_722865_58E1846A X-CRM114-Status: GOOD ( 17.04 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [85.13.137.36 listed in list.dnswl.org] Subject: [OpenWrt-Devel] [PATCH] ipq40xx: add support for ASUS Lyra X-BeenThere: openwrt-devel@lists.openwrt.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: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org SoC: Qualcomm IPQ4019 (Dakota) 717 MHz, 4 cores RAM: 256 MiB (Nanya NT5CC128M16IP-DI) FLASH: 128 MiB (Macronix NAND) WiFi0: Qualcomm IPQ4019 b/g/n 2x2 WiFi1: Qualcomm IPQ4019 a/n/ac 2x2 WiFi2: Qualcomm Atheros QCA9886 a/n/ac BT: Atheros AR3012 IN: WPS Button, Reset Button OUT: RGB-LED via TI LP5523 9-channel Controller UART: Front of Device - 115200 N-8 Pinout 3.3v - RX - TX - GND (Square is VCC) Installation: 1. Transfer OpenWRT-initrams image to the device via SSH to /tmp. Login credentials are identical to the Web UI. 2. Login to the device via SSH. 3. Flash the initramfs image using > mtd-write -d linux -i openwrt-image-file 4. Power-cycle the device and wait for OpenWRT to boot. 5. From there flash the OpenWRT-sysupgrade image. Ethernet-Ports: Although labeled identically, the port next to the power socket is the LAN port and the other one is WAN. This ist the same behavior as in the stock firmware. Signed-off-by: Marius Genheimer --- package/firmware/ipq-wifi/Makefile | 2 + package/firmware/ipq-wifi/map-ac2200.bin | Bin 0 -> 24324 bytes .../ipq40xx/base-files/etc/board.d/02_network | 8 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 9 + .../ipq40xx/base-files/lib/upgrade/platform.sh | 4 + target/linux/ipq40xx/config-4.14 | 1 + .../arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts | 311 +++++++++++++++++++++ target/linux/ipq40xx/image/Makefile | 11 + .../patches-4.14/901-arm-boot-add-dts-files.patch | 3 +- 9 files changed, 348 insertions(+), 1 deletion(-) create mode 100644 package/firmware/ipq-wifi/map-ac2200.bin create mode 100644 target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 4b39f970dd..d5d039d93b 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -54,4 +54,6 @@ endef #$(eval $(call generate-ipq-wifi-package,,,)) $(eval $(call generate-ipq-wifi-package,engenius_eap1300,board-engenius_eap1300.bin,EnGenius EAP1300)) +$(eval $(call generate-ipq-wifi-package,map-ac2200,map-ac2200.bin,ASUS MAP-AC2200)) + $(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE)))) diff --git a/package/firmware/ipq-wifi/map-ac2200.bin b/package/firmware/ipq-wifi/map-ac2200.bin new file mode 100644 index 0000000000000000000000000000000000000000..372936010a4723ee0197dc56cbfd3a193e559552 GIT binary patch literal 24324 zcmeHPeNak-f$|Vq#_}SHh=UL>2J)qF*bY=ny#pH1~^Bu7H`L7>iDn%Zh=dF6z`3y}w9AY!C+OCE1C;w!|6 z4#_g)hDOlH9Z#fVlE+kc4tui2_PEy_7?-$Wlan`;i4| zZ}OE7T_~=LD-@{$l%I81zq|RUxO~kkAN5wXY&sTE6}abidr3|5tGrb24I`b!htrBf zvwRhoE~=YT>ep2T6b@akJQsN=sKh(($wG;amO{XT_0;mGS7P2it5yfB38KF7EjjTW zYZ1!JDu){)xV>O7nM?+8c60Oa@K|CN*4JH)2l76DYm1O05b)t&2roF8&kN@9vfY>3 zdrx9D8eNzZ0*#H8mD{!{lci|+@+C{iuB4(6K93g!1rF;!zl@LjfJWK~;~GyE)7|}l zrlt&J%b)D!(Va{B;C=+UFFDlEMHCt%TdG*(h^@X+D68%|!Jl;#NqMaPmdFrmoIa_s>M8)u8zci5Oe z?l1ONdf{G}AD)OOiWBc7Vrh7qI87-dF%0AP!I_;YnjjSUR3APFKd@F=H`U93Cf*Q<|=a zc}0-dCWu(t?GHYiP$L1G)0tSiC2t%0CZ~`&isdhhZOzu_Wwtg~xF@COV9(X3QKC_r z0Rehx%m9p)c~PQdg#cZk5ug#E5ug#E5ug!R#0adCtipoWFG^m-HnZ1D)?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Zf*{J2ewn}w=VE?7W zlaacBih=$;hO`swejQMJyd%3I`XE=cGUK!E*PGEq4Td?k>Ar_^`5*zShK27-h3tLIg+U#@T2To+sEr}9ksu=nND(zk+& zd~z=u)#nt)xfNJmcW=2tc7#{zr5Zd}){s;aUgVqk`TJ?d!mC&B@!HDGfPQTbyd^YYdzl@W6wmZKi;aG4vJNMK@^;uaRzubG* zI}O|4h}H0RvgHFkFU9<~_o;Zzw3m{Mop}E(fL;lWhvQ~# zmNq)Rx!||(*LySy1twG|uxL8rCp!h6kbngv2cG=0PEjq9(r#Juyd@Z7GToQ$g51js zF%-bZU;CV(bm7mFj&Ldh1TWqlc=0=$yFPssy!ff(IlDX)-=4D1C+D6R`|?LmTWCCC6}F~8+a3=B_UswY#I>Jnw?w-x);YSRm-*D@z`Msy OaX +#include +#include + +/ { + model = "ASUS Lyra MAP-AC2200"; + compatible = "asus,map-ac2200", "qcom,ipq4019"; + + aliases { + led-boot = &led_blue0; + led-failsafe = &led_red0; + led-running = &led_blue0; + led-upgrade = &led_red0; + }; + + soc { + mdio@90000 { + status = "okay"; + }; + + ess-psgmii@98000 { + status = "okay"; + }; + + tcsr@1949000 { + compatible = "qcom,tcsr"; + reg = <0x1949000 0x100>; + qcom,wifi_glb_cfg = ; + }; + + ess_tcsr@1953000 { + compatible = "qcom,tcsr"; + reg = <0x1953000 0x1000>; + qcom,ess-interface-select = ; + }; + + tcsr@1957000 { + compatible = "qcom,tcsr"; + reg = <0x1957000 0x100>; + qcom,wifi_noc_memtype_m0_m2 = ; + }; + + usb2@60f8800 { + status = "okay"; + }; + + serial@78af000 { + pinctrl-0 = <&serial_pins>; + pinctrl-names = "default"; + status = "okay"; + }; + + crypto@8e3a000 { + status = "okay"; + }; + + watchdog@b017000 { + status = "okay"; + }; + + ess-switch@c000000 { + status = "okay"; + }; + + edma@c080000 { + status = "okay"; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + reset { + label = "reset"; + gpios = <&tlmm 34 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&nand { + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + status = "okay"; + + nand@0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "SBL1"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "MIBIB"; + reg = <0x80000 0x80000>; + read-only; + }; + + partition@100000 { + label = "QSEE"; + reg = <0x100000 0x100000>; + read-only; + }; + + partition@200000 { + label = "CDT"; + reg = <0x200000 0x80000>; + read-only; + }; + + partition@280000 { + label = "APPSBL"; + reg = <0x280000 0x140000>; + read-only; + }; + + partition@3c0000 { + label = "APPSBLENV"; + reg = <0x3c0000 0x40000>; + read-only; + }; + + partition@400000 { + label = "ubi"; + reg = <0x400000 0x7c00000>; + }; + }; + }; +}; + +&tlmm { + i2c_0_pins: i2c_0_pinmux { + pinmux { + function = "blsp_i2c0"; + pins = "gpio20", "gpio21"; + }; + + pinconf { + pins = "gpio20", "gpio21"; + drive-strength = <16>; + bias-disable; + }; + }; + + serial_pins: serial_pinmux { + mux { + pins = "gpio16", "gpio17"; + function = "blsp_uart0"; + bias-disable; + }; + }; + + nand_pins: nand_pins { + pullups { + pins = "gpio52", "gpio53", "gpio58", + "gpio59"; + function = "qpic"; + bias-pull-up; + }; + + pulldowns { + pins = "gpio54", "gpio55", "gpio56", + "gpio57", "gpio60", "gpio61", + "gpio62", "gpio63", "gpio64", + "gpio65", "gpio66", "gpio67", + "gpio68", "gpio69"; + function = "qpic"; + bias-pull-down; + }; + }; +}; + +&cryptobam { + status = "okay"; +}; + +&blsp_dma { + status = "okay"; +}; + +&qpic_bam { + status = "okay"; +}; + +&wifi0{ + status = "okay"; + qcom,ath10k-calibration-variant = "ASUS-MAP-AC2200"; +}; + +&wifi1{ + status = "okay"; + qcom,ath10k-calibration-variant = "ASUS-MAP-AC2200"; +}; + +&pcie0 { + status = "okay"; + perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>; + wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>; + + bridge@0,0 { + reg = <0x00000000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + wifi2: wifi@0,0 { + compatible = "qcom,ath10k"; + status = "okay"; + reg = <0x00010000 0 0 0 0>; + }; + }; +}; + +&usb2_hs_phy { + /* Bluetooth module attached via USB */ + status = "okay"; +}; + +&blsp1_i2c3 { + pinctrl-0 = <&i2c_0_pins>; + pinctrl-names = "default"; + status = "okay"; + + lp55231@32 { + /* 9-channel RGB LED controller */ + compatible = "national,lp5523"; + reg = <0x32>; + clock-mode = [01]; + + led_blue0: blue0 { + chan-name = "blue0"; + led-cur = [fa]; + max-cur = [ff]; + }; + + blue1 { + chan-name = "blue1"; + led-cur = [fa]; + max-cur = [ff]; + }; + + blue2 { + chan-name = "blue2"; + led-cur = [fa]; + max-cur = [ff]; + }; + + green0 { + chan-name = "green0"; + led-cur = [fa]; + max-cur = [ff]; + }; + + green1 { + chan-name = "green1"; + led-cur = [fa]; + max-cur = [ff]; + }; + + green2 { + chan-name = "green2"; + led-cur = [fa]; + max-cur = [ff]; + }; + + led_red0: red0 { + chan-name = "red0"; + led-cur = [fa]; + max-cur = [ff]; + }; + + red1 { + chan-name = "red1"; + led-cur = [fa]; + max-cur = [ff]; + }; + + red2 { + chan-name = "red2"; + led-cur = [fa]; + max-cur = [ff]; + }; + }; +}; diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index eaf9f68395..3e0c881461 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -56,6 +56,17 @@ define Device/8dev_jalapeno endef TARGET_DEVICES += 8dev_jalapeno +define Device/asus_map-ac2200 + $(call Device/FitImageLzma) + DEVICE_DTS := qcom-ipq4019-map-ac2200 + BLOCKSIZE := 126976 + PAGESIZE := 2048 + DEVICE_TITLE := ASUS Lyra MAP-AC2200 + IMAGES := sysupgrade.bin + DEVICE_PACKAGES := ipq-wifi-map-ac2200 ath10k-firmware-qca9888-ct kmod-ath3k +endef +TARGET_DEVICES += asus_map-ac2200 + define Device/asus_rt-ac58u $(call Device/FitImageLzma) DEVICE_DTS := qcom-ipq4018-rt-ac58u diff --git a/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch index 46c34038d6..1ec1361da6 100644 --- a/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch +++ b/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -697,7 +697,21 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -697,7 +697,22 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8074-dragonboard.dtb \ qcom-apq8084-ifc6540.dtb \ qcom-apq8084-mtp.dtb \ @@ -26,6 +26,7 @@ Signed-off-by: John Crispin qcom-ipq4019-ap.dk01.1-c1.dtb \ + qcom-ipq4019-a62.dtb \ + qcom-ipq4019-ap.dk04.1-c1.dtb \ ++ qcom-ipq4019-map-ac2200.dtb \ + qcom-ipq4028-wpj428.dtb \ + qcom-ipq4029-gl-b1300.dtb \ + qcom-ipq4029-mr33.dtb \