From patchwork Sun Jul 19 21:24:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1331957 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=svanheule.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=MTdLPSK0; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=svanheule.net header.i=@svanheule.net header.a=rsa-sha256 header.s=mail1707 header.b=J8Le/GMx; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B8ybc5GYxz9sSt for ; Mon, 20 Jul 2020 07:26:36 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lqIYT5+hmT+0U8U/ccxvqPPlAliDPexl2PwGJKhdv+g=; b=MTdLPSK0lqXd6r5p/NHAf1Qal IuL/fpkat/oQf9zKoiwoA6rlZ57n3VjfJLfNYBOn7SEV2WRrVmI3nGn5BqrMiaMyvXeyySnH9KBHS +0AcFk8DvG1M1SapSByN+aOeM7XhflmRRrIXmQUlRhaeLrrJjXjX37kRsVsflqaG+w58kWDmo8VSb vqFEkJGCFiWDLedddoz+EKIEmovxLwvSHvLyvtD5M7DzDIlKOqo1Z5AFO0M6YxQSMF7QO9IA768ap XTxn5vRAVLoJ1xPxJ0RTy+h8Os+qkHsUPTvuubqECe2IIHRkbTAcASzab8SVcwG6a1yHzDH3Y3e9h ESxZFcf+g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxGnk-0000FP-Lo; Sun, 19 Jul 2020 21:24:52 +0000 Received: from polaris.svanheule.net ([2a00:c98:2060:a004:1::200]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxGne-0000CI-T9 for openwrt-devel@lists.openwrt.org; Sun, 19 Jul 2020 21:24:49 +0000 Received: from terra.local.svanheule.net (unknown [IPv6:2a02:a03f:5670:b301:4dd0:c870:d4d:e262]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: sander@svanheule.net) by polaris.svanheule.net (Postfix) with ESMTPSA id 6A04A16136E; Sun, 19 Jul 2020 23:24:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1595193883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1zAFQBtRLyoovE0D8nGOGlX80/v3+A1aSESn2g1zc10=; b=J8Le/GMxEJjsUMCumQ8iHYDy5W4ydgQPPpOnFL7wvTQch/sHTXL3dfkboU42ih5CZzstz4 WKO8OmeShjiejQUOWNrpPKF14BQrZYOHrwCDx05AWEywcljOPdkXaAXRhHq9K+JweDdlr7 gAy1Odj26wQ7c7nsAIwFHLWL/SNZeVr527M2lecsRIzWZ7nwuBArZ6jaaT14zQUFux6+75 qBo9au08yuezr5HVvGbEJYpGs4peIQ+ILmleMPiy/XevTiov4W+eXxmsMstWlystNZREvo Ca1h3CwHHX+HoDqUCBV3KW4cKMQy50WebfBDvWcMamt33pmV6bGP/MZM8G8qlg== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Subject: [RFC PATCH v2 3/6] ath79: prepare for 1-port TP-Link EAP2x5 devices Date: Sun, 19 Jul 2020 23:24:05 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200719_172447_249951_CAE5CA15 X-CRM114-Status: GOOD ( 12.90 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:c98:2060:a004:1:0:0:200 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sander Vanheule , Julien Dusser Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org TP-Link has developed a number of access points based on the AP152 reference board. In the EAP-series of 802.11ac access points, this includes the following devices with one ethernet port: * EAP225 v1/v2 * EAP225 v3 * EAP225-Outdoor v1 * EAP245 v1 Since the only differences between these devices are the ath10k wireless radios and LEDs, a common base is provided for the overlapping support requirements. Hardware commonalities: * SoC: QCA9563-AL3A MIPS 74kc v5.0 @ 775MHz, AHB @ 258MHz * RAM: 128MiB DDR2 @ 650MHz * Flash: 16MiB SPI NOR * Wi-Fi 2.4GHz: provided by SoC * Wi-Fi 5Ghz: ath10k chip on PCIe * Ethernet: AR8033-AL1A, one 1GbE port (802.3at PoE) This patch was originally developed by Julien Dusser for the EAP245 v1, and was adapted by Sander Vanheule to support more devices. Signed-off-by: Julien Dusser Signed-off-by: Sander Vanheule --- .../dts/qca9563_tplink_eap2x5_1port.dtsi | 139 ++++++++++++++++++ target/linux/ath79/image/generic-tp-link.mk | 10 ++ 2 files changed, 149 insertions(+) create mode 100644 target/linux/ath79/dts/qca9563_tplink_eap2x5_1port.dtsi diff --git a/target/linux/ath79/dts/qca9563_tplink_eap2x5_1port.dtsi b/target/linux/ath79/dts/qca9563_tplink_eap2x5_1port.dtsi new file mode 100644 index 0000000000..24f0b4f0ce --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_eap2x5_1port.dtsi @@ -0,0 +1,139 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include +#include + +#include "qca956x.dtsi" + +/ { + aliases { + label-mac-device = ð0; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + label = "partition-table"; + reg = <0x020000 0x010000>; + read-only; + }; + + info: partition@30000 { + label = "info"; + reg = <0x030000 0x010000>; + read-only; + }; + + partition@40000 { + compatible = "openwrt,elf"; + label = "firmware"; + reg = <0x040000 0xec0000>; + }; + + partition@f00000 { + label = "config"; + reg = <0xf00000 0x030000>; + read-only; + }; + + partition@f30000 { + label = "mutil-log"; + reg = <0xf30000 0x080000>; + read-only; + }; + + partition@fb0000 { + label = "oops"; + reg = <0xfb0000 0x040000>; + read-only; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +&pinmux { + mdio_pins: pinux_mdio_pins { + /* GPIO 8 as MDC(0x21), GPIO 10 as MDIO(0x20) */ + pinctrl-single,bits = <0x8 0x00000021 0x000000ff>, + <0x8 0x00200000 0x00ff0000>; + }; +}; + +&mdio0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>; + + phy-mask = <0x10>; + + phy4: ethernet-phy@4 { + reg = <4>; + reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&phy4>; + phy-mode = "sgmii"; + + mtd-mac-address = <&info 0x8>; + + qca956x-serdes-fixup; + + gmac-config { + device = <&gmac>; + }; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&info 0x8>; +}; diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index 8a26e4bebe..d2cc8d09bd 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -362,6 +362,16 @@ define Device/tplink_cpe610-v2 endef TARGET_DEVICES += tplink_cpe610-v2 +define Device/tplink_eap2x5_1port + $(Device/tplink-safeloader) + SOC := qca9563 + IMAGE_SIZE := 15104k + LOADER_TYPE := elf + KERNEL := kernel-bin | append-dtb | lzma | loader-kernel + KERNEL_INITRAMFS := $$(KERNEL) + IMAGE/factory.bin := append-rootfs | tplink-safeloader factory | pad-extra 128 +endef + define Device/tplink_eap245-v3 $(Device/tplink-safeloader) SOC := qca9563