From patchwork Tue May 29 18:08:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Maclean X-Patchwork-Id: 922304 X-Patchwork-Delegate: blogic@openwrt.org 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=monkeh.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tbs3cC8l"; 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 40wMGX2QyRz9s1R for ; Wed, 30 May 2018 04:10:44 +1000 (AEST) 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:References: In-Reply-To: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:List-Owner; bh=noYPxJdl4MbdH6gkx7O5AnUTJ4TD1bE/MplhKlFj7RQ=; b=tbs3cC8ljUInGif4nq8/UuLkIS oMfUUM6tEI64GnB0mxCf/LaPyCTNE7ctca+YDguFCblFbyq9QGX56PQ9+XntgS61mWuFMgYv1FXbQ ooCTT4IS8P3+ODjpstb1eHXazDgd5JEwdLkPRrQaOQ64793EG4WwRHyG9hMgo1kGdDY/fBNnuBENK wgPZOatnBDqc/KDn0ztuDR4j+Sdv1UpEF8h2aERcTVMYx8tWoYbGrMRTLHejZ1Li32alU1QWYXs3B fMP57XiEptWgNFaleNYY4UL40td4L6DMNB3JF+fwI4e6icuPFwuNxt/d5JU5E2spXAJ9DsNXhJtm+ NrJ4/5bA==; 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 1fNj4w-0005M8-O1; Tue, 29 May 2018 18:10:38 +0000 Received: from monkeh.net ([88.97.98.50] helo=mail.monkeh.net) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNj3p-0003LS-Uh for openwrt-devel@lists.openwrt.org; Tue, 29 May 2018 18:09:33 +0000 Received: from terra.home.monkeh.net (unknown [172.16.0.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: monkeh@monkeh.net) by mail.monkeh.net (Postfix) with ESMTPSA id 70907309D31 for ; Tue, 29 May 2018 18:09:12 +0000 (UTC) From: Alex Maclean To: openwrt-devel@lists.openwrt.org Date: Tue, 29 May 2018 19:08:33 +0100 Message-Id: <20180529180833.16668-5-monkeh@monkeh.net> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180529180833.16668-1-monkeh@monkeh.net> References: <20180529180833.16668-1-monkeh@monkeh.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180529_110930_293388_87569D0C X-CRM114-Status: GOOD ( 12.44 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record Subject: [OpenWrt-Devel] [PATCH 5/5] ath79: add TP-Link TL-WR703N port 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 Signed-off-by: Alex Maclean --- .../ath79/base-files/etc/board.d/02_network | 1 + target/linux/ath79/dts/ar9331_tl-wr703n.dts | 139 ++++++++++++++++++ target/linux/ath79/image/tiny-tp-link.mk | 10 ++ 3 files changed, 150 insertions(+) create mode 100644 target/linux/ath79/dts/ar9331_tl-wr703n.dts diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index cc4498ffc5..0d0ddb3987 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -9,6 +9,7 @@ ath79_setup_interfaces() case "$board" in "avm,fritz300e"|\ + "tplink,tl-wr703n"|\ "ubnt,unifi") ucidef_set_interface_lan "eth0" ;; diff --git a/target/linux/ath79/dts/ar9331_tl-wr703n.dts b/target/linux/ath79/dts/ar9331_tl-wr703n.dts new file mode 100644 index 0000000000..70f94ed4cb --- /dev/null +++ b/target/linux/ath79/dts/ar9331_tl-wr703n.dts @@ -0,0 +1,139 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar9331.dtsi" + +/ { + compatible = "tplink,tl-wr703n", "qca,ar9331"; + model = "TP-Link TL-WR703N"; + + aliases { + serial0 = &uart; + led-status = &led_system; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x2000000>; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + led_system: system { + label = "tl-wr703n:blue:system"; + gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + }; + }; + + reg_usb_vbus: reg_usb_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + uboot: partition@0 { + reg = <0x0 0x20000>; + label = "u-boot"; + read-only; + }; + + firmware: partition@20000 { + reg = <0x20000 0x3d0000>; + label = "firmware"; + }; + + art: partition@3f0000 { + reg = <0x3f0000 0x10000>; + label = "art"; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&phy4>; + + mtd-mac-address = <&uboot 0x1fc00>; + + gmac-config { + device = <&gmac>; + + switch-phy-addr-swap = <0>; + switch-phy-swap = <0>; + }; +}; + +&gpio { + status = "okay"; +}; + +&mdio0 { + status = "okay"; + + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "mii"; + }; +}; + +&uart { + status = "okay"; +}; + +&usb { + dr_mode = "host"; + vbus-supply = <®_usb_vbus>; + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&uboot 0x1fc00>; +}; diff --git a/target/linux/ath79/image/tiny-tp-link.mk b/target/linux/ath79/image/tiny-tp-link.mk index 09180bd678..e6d5feefc5 100644 --- a/target/linux/ath79/image/tiny-tp-link.mk +++ b/target/linux/ath79/image/tiny-tp-link.mk @@ -1,6 +1,16 @@ include ./common-tp-link.mk +define Device/tl-wr703n + $(Device/tplink-4mlzma) + ATH_SOC := ar9331 + DEVICE_TITLE := TP-Link TL-WR703N + DEVICE_PACKAGES := kmod-usb-chipidea2 + TPLINK_HWID := 0x07030101 + SUPPORTED_DEVICES := tplink,tl-wr703n tl-wr703n +endef +TARGET_DEVICES += tl-wr703n + define Device/tl-wr740n-v2 $(Device/tplink-4m) ATH_SOC := ar7240