From patchwork Wed Oct 16 10:38:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Cieslakiewicz X-Patchwork-Id: 1178167 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 (sender SPF authorized) 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=fail (p=none dis=none) header.from=wp.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xa/pQUyx"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=wp.pl header.i=@wp.pl header.b="cSX85yUG"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 46tl2j3lgYz9sNx for ; Thu, 17 Oct 2019 07:56:29 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-ID:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZqTZZjx9KVmflx29EPBNLBIAa176mGWwSOBvzs7TQsE=; b=Xa/pQUyxj7jsMV 3h0cwrImSSsmJaGnzZRcNdSqiYo2qSXNBlNWPJLLlfuyvE7mW8V3Q0qCTXOhrMHMq604A0El8vL2j ilX7Nl8z8mCLi3LOGfb/DHFy8sjFqgU+QxAlFApxWB0zxJ+z7HweKc0BjO4SPDO5e4ePqcNtJtBWU YeJQ7gslh06jtr9dxL5/8JC7fNqcb1qp52I1gcoANlI7vNL6eYYDkfloQQzYNe5Es7+24UCCogLsm ti8Hv0jPkHDsQQV8+tkFMvKQm4fQPs2j0WCy4ByEgHFwVrRrN8UgwMlyGtObGk7YhrYDacgVDKWUk 7hjJuv+Hn9PyU18PMWYw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKqLA-00031m-U1; Wed, 16 Oct 2019 20:56:16 +0000 Received: from mx3.wp.pl ([212.77.101.9]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKqKX-0002HW-Ho for openwrt-devel@lists.openwrt.org; Wed, 16 Oct 2019 20:55:39 +0000 Received: (wp-smtpd smtp.wp.pl 6261 invoked from network); 16 Oct 2019 22:55:35 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1571259335; bh=BTFwUpGzHZ+G8COwrKHC28D2tOGpsjBw2ppthfq5ZxA=; h=From:To:Cc:Subject; b=cSX85yUG/6wnZu6IcpBEYsUnMb5NEMDHOx3fXm8ZWepm7ns7uMNL8o8C5RDo9Owp6 7dTxX/laG01xDPlzBDuGSRIp/pjHBcC7mMrLGvedrOYGjhHPPWXKrBMpwizX+hZj66 9QsdajSB9NU8h3r6Ts6Iay0+k+ALEayTkSlI0zFQ= Received: from 89-79-49-72.dynamic.chello.pl (HELO kosmio.komorska) (michal.cieslakiewicz@wp.pl@[89.79.49.72]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 16 Oct 2019 22:55:35 +0200 Date: Wed, 16 Oct 2019 12:38:43 +0200 From: Michal Cieslakiewicz To: "openwrt-devel@lists.openwrt.org" Message-ID: <20191016123843.0242404a@kosmio.komorska> In-Reply-To: <20191016123722.70774de1@kosmio.komorska> References: <20191016123722.70774de1@kosmio.komorska> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-slackware-linux-gnu) MIME-Version: 1.0 X-WP-MailID: 2244eb97e41065a34e6e256c70af5f59 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000000 [4UOl] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191016_135537_767553_0C3A3D12 X-CRM114-Status: UNSURE ( 8.22 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.77.101.9 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.77.101.9 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michal.cieslakiewicz[at]wp.pl) -0.0 SPF_PASS SPF: sender matches SPF record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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 Subject: [OpenWrt-Devel] [PATCH v5 1/5] ath79: add LAN LEDs control bits for AR724x GPIO function pinmux X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Currently AR724x pinmux for register 0x18040028 controls only JTAG disable bit. This patch adds new DTS settings to control LAN LEDs and CLKs that allow full software control over these diodes - exactly the same is done by ar71xx target in device setup phase for many routers (WNR2000v3 for example). 'switch_led_disable_pins' clears AR724X_GPIO_FUNC_ETH_SWITCH_LED[0-4]_EN bits. 'clks_disable_pins' clears AR724X_GPIO_FUNC_CLK_OBS[1-5]_EN and AR724X_GPIO_FUNC_GE0_MII_CLK_EN bits. These all should be used together, along with 'jtag_disable_pins', to allow OS to control all GPIO-connected LEDs and buttons on device. Signed-off-by: Michal Cieslakiewicz --- target/linux/ath79/dts/ar724x.dtsi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/linux/ath79/dts/ar724x.dtsi b/target/linux/ath79/dts/ar724x.dtsi index b2844bf179..95832d998a 100644 --- a/target/linux/ath79/dts/ar724x.dtsi +++ b/target/linux/ath79/dts/ar724x.dtsi @@ -75,7 +75,15 @@ #pinctrl-cells = <2>; jtag_disable_pins: pinmux_jtag_disable_pins { - pinctrl-single,bits = <0x0 0x1 0x1>; + pinctrl-single,bits = <0x0 0x1 0x1>; + }; + + switch_led_disable_pins: pinmux_switch_led_disable_pins { + pinctrl-single,bits = <0x0 0x0 0xf8>; + }; + + clks_disable_pins: pinmux_clks_disable_pins { + pinctrl-single,bits = <0x0 0x0 0x81f00>; }; }; From patchwork Wed Oct 16 10:39:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Cieslakiewicz X-Patchwork-Id: 1178165 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 (sender SPF authorized) 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=fail (p=none dis=none) header.from=wp.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oMFNOoNA"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=wp.pl header.i=@wp.pl header.b="IctuMaGb"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 46tl2J6HDqz9sNx for ; Thu, 17 Oct 2019 07:56:08 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-ID:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JDuhbyuYY7tmnP86FexPRFGuuek70vJCi0WzVudDj14=; b=oMFNOoNAKMyKoG ZKetqQ7BpEsZVJd+e2vSsiCPqJfXtxWr4rO2ybQ6j/4+Zz/yxV+YMflPjTiXLrI7U8D3Tq5GLkxt+ 65lZxiyHdm1YJtmXvuf2Rpwkm5JRGxrAWsqyD0312VOoletiguvdBqfUsT7k7RJ4eUIPnzLWPCkCd nbeDPd8XTxk6FnnWO5v/r9cC5DLFS++ACYU26baylAbg7oMBZlgx1ttpNDLV4OPBj+f7H1jPPUKz7 lfu05eoy25OAdtl33bk3KtL9qVOlcHVh8JQK7IifyXDxN+oddsI55ybc6Xub0HjkbEEhNAoLm2pnU qtM4i0F4KB7Rkiu8hdKA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKqKy-0002jH-Sa; Wed, 16 Oct 2019 20:56:04 +0000 Received: from mx4.wp.pl ([212.77.101.11]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKqKW-0002HE-4s for openwrt-devel@lists.openwrt.org; Wed, 16 Oct 2019 20:55:39 +0000 Received: (wp-smtpd smtp.wp.pl 3359 invoked from network); 16 Oct 2019 22:55:30 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1571259330; bh=G87pUTO3QP3yRPyFUQuaJe+rxF0QQPC70ESTjNLn9+k=; h=From:To:Cc:Subject; b=IctuMaGb2nwixM1Yd3Z2Wjvb0xsYCV+w/h6IO+g4Dol5ZW0pOAcqRKeI5bbkup/OS sX/NoY39/QgG/4IJsj0252gSCUhjWdovBZG2bvQoyx0d/XRuYgPj+KvTEVPLcQ90bl kuAsS3/D0vP07Mi+SNwK2HJ7GTVuoH9rTRGwZjlg= Received: from 89-79-49-72.dynamic.chello.pl (HELO kosmio.komorska) (michal.cieslakiewicz@wp.pl@[89.79.49.72]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 16 Oct 2019 22:55:30 +0200 Date: Wed, 16 Oct 2019 12:39:51 +0200 From: Michal Cieslakiewicz To: "openwrt-devel@lists.openwrt.org" Message-ID: <20191016123951.0ed754a4@kosmio.komorska> In-Reply-To: <20191016123722.70774de1@kosmio.komorska> References: <20191016123722.70774de1@kosmio.komorska> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-slackware-linux-gnu) MIME-Version: 1.0 X-WP-MailID: 71750f111b661af55e3c5d0342ee88f2 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000000 [EdNF] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191016_135536_734429_B8C2F12A X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.77.101.11 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michal.cieslakiewicz[at]wp.pl) -0.0 SPF_PASS SPF: sender matches SPF record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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 Subject: [OpenWrt-Devel] [PATCH v5 2/5] ath79: WNR612v2: improve device support X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This patch improves ath79 support for Netgear WNR612v2. Router functionality becomes identical to ar71xx version. Changes include: * software control over LAN LEDs via sysfs * correct MAC addresses for network interfaces * correct image size in device definition * dts: 'keys' renamed to 'ath9k-keys' * dts: 'label-mac-device' set to eth1 (LAN) * dts: formatting adjustments Signed-off-by: Michal Cieslakiewicz --- .../ath79/dts/ar7240_netgear_wnr612-v2.dts | 2 +- .../ath79/dts/ar7240_netgear_wnr612-v2.dtsi | 23 +++++++++++++------ target/linux/ath79/dts/ar7240_on_n150r.dts | 2 +- target/linux/ath79/image/tiny-netgear.mk | 2 +- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts index b568d90eff..41dbe709a0 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts +++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts @@ -4,6 +4,6 @@ #include "ar7240_netgear_wnr612-v2.dtsi" / { - model = "Netgear WNR612 v2"; compatible = "netgear,wnr612-v2", "qca,ar7240"; + model = "Netgear WNR612 v2"; }; diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi index 8e934429a3..4bff7c8b78 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi +++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi @@ -12,9 +12,10 @@ led-failsafe = &power; led-running = &power; led-upgrade = &power; + label-mac-device = ð1; }; - keys { + ath9k-keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -28,6 +29,10 @@ leds { compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>; + power: power { label = "netgear:green:power"; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; @@ -47,6 +52,10 @@ label = "netgear:green:wan"; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; + }; + + ath9k-leds { + compatible = "gpio-leds"; wlan: wlan { label = "netgear:green:wlan"; @@ -70,7 +79,7 @@ #address-cells = <1>; #size-cells = <1>; - uboot: partition@0 { + partition@0 { reg = <0x0 0x40000>; label = "u-boot"; read-only; @@ -87,7 +96,7 @@ label = "firmware"; }; - partition@3f0000 { + art: partition@3f0000 { reg = <0x3f0000 0x10000>; label = "art"; read-only; @@ -99,15 +108,13 @@ ð0 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mtd-mac-address = <&art 0x0>; }; ð1 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mtd-mac-address = <&art 0x6>; }; &pcie { @@ -116,6 +123,8 @@ ath9k: wifi@0,0 { compatible = "pci168c,002b"; reg = <0x0000 0 0 0 0>; + mtd-mac-address = <&art 0x0>; + mtd-mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7240_on_n150r.dts b/target/linux/ath79/dts/ar7240_on_n150r.dts index 3aaa07f724..8322276213 100644 --- a/target/linux/ath79/dts/ar7240_on_n150r.dts +++ b/target/linux/ath79/dts/ar7240_on_n150r.dts @@ -4,6 +4,6 @@ #include "ar7240_netgear_wnr612-v2.dtsi" / { - model = "ON Network N150R"; compatible = "on,n150r", "qca,ar7240"; + model = "ON Network N150R"; }; diff --git a/target/linux/ath79/image/tiny-netgear.mk b/target/linux/ath79/image/tiny-netgear.mk index 67ef28c9cc..2f17d79757 100644 --- a/target/linux/ath79/image/tiny-netgear.mk +++ b/target/linux/ath79/image/tiny-netgear.mk @@ -4,7 +4,7 @@ define Device/netgear_ar7240 ATH_SOC := ar7240 NETGEAR_KERNEL_MAGIC := 0x32303631 KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma - IMAGE_SIZE := 3904k + IMAGE_SIZE := 3712k IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs $(Device/netgear_ath79) endef From patchwork Wed Oct 16 10:41:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Cieslakiewicz X-Patchwork-Id: 1178169 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 (sender SPF authorized) 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=fail (p=none dis=none) header.from=wp.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MEDSMsxT"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=wp.pl header.i=@wp.pl header.b="d2/QI0qU"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 46tl362Y0pz9sNx for ; Thu, 17 Oct 2019 07:56:50 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-ID:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uF9N9+k+gofGoswoybxZe+Q3CmsfCU47WBaOcBfOLuI=; b=MEDSMsxTugs/CV ZWhsyhdOu5VytrSk8hOjh7xbyINrxfrbeZfI5K2gpVDEp/WjyukA+wmvuYEX1gY3jLo+9dG/7dKxF /RAnbDuId7n4dcbf/LGkHFhYL63m7QHLK7XO97V7Vby/YKYqZ04QNqfVBTmG6uDX0LAv7ai4JDprm LwN0iYGQaTKkxrdar7p/YzzJlyE0wo92VMclRA5IHopWDy2CKfgHyZg/VYdr0UxoqNJXc3L9ytNUU HZddG84CVYf0VSyNbHKb/t4DS3G+qVma0jOpxkKkbFCZXRaHqm4swwJhAfzRFJ/tWoTWMlP/Y3Jt+ U3iCcoWjLhPvn7qnaedQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKqLY-0003WJ-86; Wed, 16 Oct 2019 20:56:40 +0000 Received: from mx4.wp.pl ([212.77.101.12]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKqKY-0002IJ-QQ for openwrt-devel@lists.openwrt.org; Wed, 16 Oct 2019 20:55:40 +0000 Received: (wp-smtpd smtp.wp.pl 6887 invoked from network); 16 Oct 2019 22:55:36 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1571259336; bh=I04WFEmevQWoYtCesHdgkO/dsaVjjlU0JIqofJPUwzM=; h=From:To:Cc:Subject; b=d2/QI0qU50CdXzV5ixXrnVnEBOF4Iv8bQG+hdagtQg8Cp7mutwYhDCRauwEPOAbJ9 YYcahLAtJx9le1iNf1EwzOAfw7tnerXKduXEq48Sclp3Dn9IvtlozORtPeCvpoumFe 8avoVpeii3vCYgWOoZNcSqLnrc8FmIf1klN3jU84= Received: from 89-79-49-72.dynamic.chello.pl (HELO kosmio.komorska) (michal.cieslakiewicz@wp.pl@[89.79.49.72]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 16 Oct 2019 22:55:36 +0200 Date: Wed, 16 Oct 2019 12:41:34 +0200 From: Michal Cieslakiewicz To: "openwrt-devel@lists.openwrt.org" Message-ID: <20191016124134.56ccd640@kosmio.komorska> In-Reply-To: <20191016123722.70774de1@kosmio.komorska> References: <20191016123722.70774de1@kosmio.komorska> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-slackware-linux-gnu) MIME-Version: 1.0 X-WP-MailID: de1fced1e54a7ccf5c0aad9ddeb84397 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000000 [0VN1] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191016_135539_039435_1C9DAB28 X-CRM114-Status: GOOD ( 11.06 ) X-Spam-Score: 0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.77.101.12 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michal.cieslakiewicz[at]wp.pl) -0.0 SPF_PASS SPF: sender matches SPF record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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 Subject: [OpenWrt-Devel] [PATCH v5 3/5] ath79: add support for Netgear WNR2000 v3 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This patch adds ath79 support for Netgear WNR2000v3. Router was previously supported by ar71xx target only. Note: this is a 4_32 device with limited upgrade capabilities. Specification ============= * Description: Netgear WNR2000 v3 * Loader: U-boot * SOC: Atheros AR7241 (360 MHz) * RAM: 32 MiB * Flash: 4 MiB (SPI NOR) - U-boot binary: 256 KiB - U-boot environment: 64 KiB - Firmware: 3712 KiB - ART: 64 KiB * Ethernet: 4 x 10/100 LAN + 1 x 10/100 WAN * Wireless: 2.4 GHz b/g/n (Atheros AR9287) * USB: no * Buttons: - Reset - WiFi (rfkill) - WPS * LEDs: - Power (amber/green) - WAN (amber/green) - WLAN (blue) - 4 x LAN (amber/green) - WPS (green) * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1 * Power supply: DC 12V 1A * MAC addresses: LAN on case label, WAN +1, WLAN +2 Installation ============ * TFTP recovery * TFTP via U-boot prompt * sysupgrade * Web interface Test build configuration ======================== CONFIG_TARGET_ath79=y CONFIG_TARGET_ath79_tiny=y CONFIG_TARGET_ath79_tiny_DEVICE_netgear_wnr2000-v3=y CONFIG_ALL_KMODS=y CONFIG_DEVEL=y CONFIG_CCACHE=y CONFIG_COLLECT_KERNEL_DEBUG=y CONFIG_IMAGEOPT=y CONFIG_KERNEL_DEBUG_INFO=y CONFIG_KERNEL_DEBUG_KERNEL=y Signed-off-by: Michal Cieslakiewicz --- .../ath79/base-files/etc/board.d/01_leds | 11 + .../ath79/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 1 + .../ath79/dts/ar7241_netgear_wnr2000-v3.dts | 207 ++++++++++++++++++ target/linux/ath79/image/tiny-netgear.mk | 16 ++ 5 files changed, 236 insertions(+) create mode 100644 target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index 4ea9586d3d..97598ce45c 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -111,6 +111,17 @@ glinet,gl-ar300m-lite) glinet,gl-x750) ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1" ;; +netgear,wnr2000-v3) + ucidef_set_led_netdev "wan-amber" "WAN (amber)" "netgear:amber:wan" "eth0" + ucidef_set_led_switch "lan1green" "LAN1 (green)" "netgear:green:lan1" "switch0" "0x02" "0x04" + ucidef_set_led_switch "lan2green" "LAN2 (green)" "netgear:green:lan2" "switch0" "0x04" "0x04" + ucidef_set_led_switch "lan3green" "LAN3 (green)" "netgear:green:lan3" "switch0" "0x08" "0x04" + ucidef_set_led_switch "lan4green" "LAN4 (green)" "netgear:green:lan4" "switch0" "0x10" "0x04" + ucidef_set_led_switch "lan1amber" "LAN1 (amber)" "netgear:amber:lan1" "switch0" "0x02" "0x02" + ucidef_set_led_switch "lan2amber" "LAN2 (amber)" "netgear:amber:lan2" "switch0" "0x04" "0x02" + ucidef_set_led_switch "lan3amber" "LAN3 (amber)" "netgear:amber:lan3" "switch0" "0x08" "0x02" + ucidef_set_led_switch "lan4amber" "LAN4 (amber)" "netgear:amber:lan4" "switch0" "0x10" "0x02" + ;; netgear,wnr612-v2|\ on,n150r) ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0" 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 fe74bddbf1..72ee6279ea 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -204,6 +204,7 @@ ath79_setup_interfaces() ucidef_add_switch_port_attr "switch0" 2 led 9 ucidef_add_switch_port_attr "switch0" 5 led 2 ;; + netgear,wnr2000-v3|\ netgear,wnr612-v2|\ on,n150r|\ tplink,tl-wr740n-v1|\ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 3240026aec..fb37bd8579 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -78,6 +78,7 @@ case "$FIRMWARE" in winchannel,wb2000) caldata_extract "art" 0x5000 0x440 ;; + netgear,wnr2000-v3|\ netgear,wnr612-v2|\ on,n150r|\ pcs,cap324|\ diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts new file mode 100644 index 0000000000..deb031b353 --- /dev/null +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts @@ -0,0 +1,207 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar7241.dtsi" + +/ { + compatible = "netgear,wnr2000-v3", "qca,ar7241"; + model = "Netgear WNR2000 v3"; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-boot = &power_amber; + led-failsafe = &power_amber; + led-running = &power_green; + led-upgrade = &power_amber; + label-mac-device = ð1; + }; + + keys { + compatible = "gpio-keys"; + + wps { + label = "wps"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + }; + + ath9k-keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + linux,code = ; + gpios = <&ath9k 8 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + rfkill { + label = "rfkill"; + linux,code = ; + gpios = <&ath9k 9 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>; + + wan_green { + label = "netgear:green:wan"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + + wan_amber { + label = "netgear:amber:wan"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + + lan1_green { + label = "netgear:green:lan1"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + lan1_amber { + label = "netgear:amber:lan1"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + + lan2_green { + label = "netgear:green:lan2"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + lan2_amber { + label = "netgear:amber:lan2"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + }; + + lan3_green { + label = "netgear:green:lan3"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + lan3_amber { + label = "netgear:amber:lan3"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + }; + + lan4_green { + label = "netgear:green:lan4"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + lan4_amber { + label = "netgear:amber:lan4"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + + wps_green { + label = "netgear:green:wps"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + }; + }; + + ath9k-leds { + compatible = "gpio-leds"; + + power_green: power_green { + label = "netgear:green:power"; + gpios = <&ath9k 3 GPIO_ACTIVE_LOW>; + }; + + power_amber: power_amber { + label = "netgear:amber:power"; + gpios = <&ath9k 2 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + wlan_blue { + label = "netgear:blue:wlan"; + gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; +}; + +&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 = <0x0 0x40000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x40000 0x10000>; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3a0000>; + compatible = "netgear,uimage"; + }; + + art: partition@3f0000 { + label = "art"; + reg = <0x3f0000 0x10000>; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&art 0x0>; +}; + +ð1 { + status = "okay"; + + compatible = "qca,ar7241-eth", "syscon", "simple-mfd"; + mtd-mac-address = <&art 0x6>; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0,0 { + compatible = "pci168c,002e"; + reg = <0x0000 0 0 0 0>; + mtd-mac-address = <&art 0x0>; + mtd-mac-address-increment = <1>; + qca,no-eeprom; + #gpio-cells = <2>; + gpio-controller; + }; +}; + +&uart { + status = "okay"; +}; diff --git a/target/linux/ath79/image/tiny-netgear.mk b/target/linux/ath79/image/tiny-netgear.mk index 2f17d79757..b5fed1b88b 100644 --- a/target/linux/ath79/image/tiny-netgear.mk +++ b/target/linux/ath79/image/tiny-netgear.mk @@ -27,3 +27,19 @@ define Device/on_n150r SUPPORTED_DEVICES += n150r endef TARGET_DEVICES += on_n150r + +define Device/netgear_wnr2000-v3 + ATH_SOC := ar7241 + DEVICE_MODEL := WNR2000 + DEVICE_VARIANT := v3 + NETGEAR_KERNEL_MAGIC := 0x32303033 + NETGEAR_BOARD_ID := WNR2000V3 + NETGEAR_HW_ID := 29763551+04+32 + IMAGE_SIZE := 3712k + IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs + IMAGES += factory-NA.img + IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | check-size $$$$(IMAGE_SIZE) + SUPPORTED_DEVICES += wnr2000-v3 + $(Device/netgear_ath79) +endef +TARGET_DEVICES += netgear_wnr2000-v3 From patchwork Wed Oct 16 10:42:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Cieslakiewicz X-Patchwork-Id: 1178166 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 (sender SPF authorized) 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=fail (p=none dis=none) header.from=wp.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="poqdOHWl"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=wp.pl header.i=@wp.pl header.b="uHcbTaa3"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 46tl2K6vrRz9sP3 for ; Thu, 17 Oct 2019 07:56:09 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-ID:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=R1c0e+yUyQzNF+m1SOeA31cQAcB2NCHQABe25wI5ANo=; b=poqdOHWlv2Jo0V 5Dtty3HWsclNM6SMk609+BTh6bCSKdk561G+xJRN8PPXcCeox+wlQ/IUlkgDOvI9/OcESizNdQ7H2 aMEdVPJ1r1jZj6mWMqtoPBRU1/KjwQI04TUDVMEBIAy2+JJ1J5Y4nziyz1Uz4yV5cqxtOvnL+6VYW sFE44MFJB85Th6VL8P7+WgHNs1316VKdsNeaQPcScfom/g6U9W0PSCyaSMx/AY0OyMlqnZ6Tej4z8 D3Nckgv1BXNrsU+2f7iME79QxkuTlyjAoHYc1kqj0y6BBmivAu0hir3pkI9c9kb/SiJKeFYe1kCnd rC5jnfoNy3OXbToFyeOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKqKj-0002Te-Pa; Wed, 16 Oct 2019 20:55:49 +0000 Received: from mx4.wp.pl ([212.77.101.11]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKqKW-0002HJ-4l for openwrt-devel@lists.openwrt.org; Wed, 16 Oct 2019 20:55:38 +0000 Received: (wp-smtpd smtp.wp.pl 4142 invoked from network); 16 Oct 2019 22:55:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1571259332; bh=1/XnyyjHDocBFbC2JrAjjYHR1ypjHv29hgohzhSKx6Q=; h=From:To:Cc:Subject; b=uHcbTaa3a7hk/7ipumcWto5f6iddcF0b2SL3zdwTz8sYMh52Iy6rWseVfZOStd2c6 uIuIBfzkAd51OdJYcNt3wddx4EgH5XvL5TXUulEah85nRLtPkWM23n3jfhrhQvvr9T 83YfznDDUerNFNm/7feX17unYM0orwEMdVhOZKJo= Received: from 89-79-49-72.dynamic.chello.pl (HELO kosmio.komorska) (michal.cieslakiewicz@wp.pl@[89.79.49.72]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 16 Oct 2019 22:55:32 +0200 Date: Wed, 16 Oct 2019 12:42:44 +0200 From: Michal Cieslakiewicz To: "openwrt-devel@lists.openwrt.org" Message-ID: <20191016124244.02400fb8@kosmio.komorska> In-Reply-To: <20191016123722.70774de1@kosmio.komorska> References: <20191016123722.70774de1@kosmio.komorska> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-slackware-linux-gnu) MIME-Version: 1.0 X-WP-MailID: fc7b8a934b6029445e5e5c200935dee2 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000000 [QcN1] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191016_135536_727545_F5843944 X-CRM114-Status: GOOD ( 11.60 ) X-Spam-Score: 0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.77.101.11 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michal.cieslakiewicz[at]wp.pl) -0.0 SPF_PASS SPF: sender matches SPF record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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 Subject: [OpenWrt-Devel] [PATCH v5 4/5] ath79: add support for Netgear WNR1000 v2 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This patch adds ath79 support for Netgear WNR1000v2. Router was previously supported by ar71xx target only. Note: this is a 4_32 device with limited upgrade capabilities. Specification ============= * Description: Netgear WNR1000 v2 * Loader: U-boot * SOC: Atheros AR7240 (340 MHz) * RAM: 32 MiB * Flash: 4 MiB (SPI NOR) - U-boot binary: 256 KiB - U-boot environment: 64 KiB - Firmware: 3712 KiB - ART: 64 KiB * Ethernet: 4 x 10/100 LAN + 1 x 10/100 WAN * Wireless: 2.4 GHz b/g/n (Atheros AR9285) * USB: no * Buttons: - Reset - WiFi (rfkill) - WPS * LEDs: - Power (amber/green) - WAN (amber/green) - WLAN (blue) - 4 x LAN (amber/green) - WPS (green) * UART: 4-pin connector JP2, 3.3V (Vcc, TX, RX, GND), 115200 8N1 * Power supply: DC 12V 1A * MAC addresses: LAN on case label, WAN +1, WLAN +2 Installation ============ * TFTP recovery * TFTP via U-boot prompt * sysupgrade * Web interface Test build configuration ======================== CONFIG_TARGET_ath79=y CONFIG_TARGET_ath79_tiny=y CONFIG_TARGET_ath79_tiny_DEVICE_netgear_wnr1000-v2=y CONFIG_ALL_KMODS=y CONFIG_DEVEL=y CONFIG_CCACHE=y CONFIG_COLLECT_KERNEL_DEBUG=y CONFIG_IMAGEOPT=y CONFIG_KERNEL_DEBUG_INFO=y CONFIG_KERNEL_DEBUG_KERNEL=y Signed-off-by: Michal Cieslakiewicz --- .../ath79/base-files/etc/board.d/01_leds | 1 + .../ath79/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 1 + .../ath79/dts/ar7240_netgear_wnr1000-v2.dts | 203 ++++++++++++++++++ target/linux/ath79/image/tiny-netgear.mk | 12 ++ 5 files changed, 218 insertions(+) create mode 100644 target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index 97598ce45c..499fe0031c 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -111,6 +111,7 @@ glinet,gl-ar300m-lite) glinet,gl-x750) ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1" ;; +netgear,wnr1000-v2|\ netgear,wnr2000-v3) ucidef_set_led_netdev "wan-amber" "WAN (amber)" "netgear:amber:wan" "eth0" ucidef_set_led_switch "lan1green" "LAN1 (green)" "netgear:green:lan1" "switch0" "0x02" "0x04" 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 72ee6279ea..8efab146f2 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -204,6 +204,7 @@ ath79_setup_interfaces() ucidef_add_switch_port_attr "switch0" 2 led 9 ucidef_add_switch_port_attr "switch0" 5 led 2 ;; + netgear,wnr1000-v2|\ netgear,wnr2000-v3|\ netgear,wnr612-v2|\ on,n150r|\ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index fb37bd8579..104e77ac3f 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -78,6 +78,7 @@ case "$FIRMWARE" in winchannel,wb2000) caldata_extract "art" 0x5000 0x440 ;; + netgear,wnr1000-v2|\ netgear,wnr2000-v3|\ netgear,wnr612-v2|\ on,n150r|\ diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts new file mode 100644 index 0000000000..5660ea5caf --- /dev/null +++ b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts @@ -0,0 +1,203 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar7240.dtsi" + +/ { + compatible = "netgear,wnr1000-v2", "qca,ar7240"; + model = "Netgear WNR1000 v2"; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-boot = &power_amber; + led-failsafe = &power_amber; + led-running = &power_green; + led-upgrade = &power_amber; + label-mac-device = ð1; + }; + + ath9k-keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + wps { + label = "wps"; + linux,code = ; + gpios = <&ath9k 6 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + reset { + label = "reset"; + linux,code = ; + gpios = <&ath9k 7 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + rfkill { + label = "rfkill"; + linux,code = ; + gpios = <&ath9k 8 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>; + + power_green: power_green { + label = "netgear:green:power"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + power_amber: power_amber { + label = "netgear:amber:power"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + wan_green { + label = "netgear:green:wan"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + + wan_amber { + label = "netgear:amber:wan"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + + lan1_green { + label = "netgear:green:lan1"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + lan1_amber { + label = "netgear:amber:lan1"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + }; + + lan2_green { + label = "netgear:green:lan2"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + lan2_amber { + label = "netgear:amber:lan2"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + }; + + lan3_green { + label = "netgear:green:lan3"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + lan3_amber { + label = "netgear:amber:lan3"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + }; + + lan4_green { + label = "netgear:green:lan4"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + lan4_amber { + label = "netgear:amber:lan4"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + }; + + ath9k-leds { + compatible = "gpio-leds"; + + wps_green { + label = "netgear:green:wps"; + gpios = <&ath9k 5 GPIO_ACTIVE_LOW>; + }; + + wlan_blue { + label = "netgear:blue:wlan"; + gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; +}; + +&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 = <0x0 0x40000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x40000 0x10000>; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3a0000>; + compatible = "netgear,uimage"; + }; + + art: partition@3f0000 { + label = "art"; + reg = <0x3f0000 0x10000>; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&art 0x0>; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&art 0x6>; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0,0 { + compatible = "pci168c,002b"; + reg = <0x0000 0 0 0 0>; + mtd-mac-address = <&art 0x0>; + mtd-mac-address-increment = <1>; + qca,no-eeprom; + #gpio-cells = <2>; + gpio-controller; + }; +}; + +&uart { + status = "okay"; +}; diff --git a/target/linux/ath79/image/tiny-netgear.mk b/target/linux/ath79/image/tiny-netgear.mk index b5fed1b88b..0df19390bb 100644 --- a/target/linux/ath79/image/tiny-netgear.mk +++ b/target/linux/ath79/image/tiny-netgear.mk @@ -28,6 +28,18 @@ define Device/on_n150r endef TARGET_DEVICES += on_n150r +define Device/netgear_wnr1000-v2 + ATH_SOC := ar7240 + DEVICE_MODEL := WNR1000 + DEVICE_VARIANT := v2 + NETGEAR_KERNEL_MAGIC := 0x31303031 + IMAGE_SIZE := 3712k + IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs + SUPPORTED_DEVICES += wnr1000-v2 + $(Device/netgear_ath79) +endef +TARGET_DEVICES += netgear_wnr1000-v2 + define Device/netgear_wnr2000-v3 ATH_SOC := ar7241 DEVICE_MODEL := WNR2000 From patchwork Wed Oct 16 16:19:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Cieslakiewicz X-Patchwork-Id: 1178168 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 (sender SPF authorized) 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=fail (p=none dis=none) header.from=wp.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ADu2rToc"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=wp.pl header.i=@wp.pl header.b="S8VLy/sF"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 46tl2q5lrVz9sNx for ; Thu, 17 Oct 2019 07:56:35 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-ID:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GOVF4XO8Fnk1M89WttSGgVNcfmER89vXqksLtsaBXTw=; b=ADu2rTocMxmZTM i4PSXVomWTvxZSwgkUfb2PK3aYSwXF7vJygDX77xULJBCwmYd0XuihB0XsY3ucLx3sqf55m/0gLpQ CEmnKU1ypHE6GSl9AfxReKfWa62Zaip/Kgzd2zqrHHUkPnZTR++r8wXw6a5tgl9XVGTuokXJuHbup 7LJ/77ifhHEbE1+0TbrRdkkUaXsYa5oR9NOrnj31c+x1XuUgF8MAaun1hgDhAZppLh6UW/ykEm23+ 4QXy5M3thKjWkP4jNGUQqTnMtxbyjbgXFEL6k4o2a8ogvB8wMAccD6bF0IyIj0B8n1wAP49heFKQk I/7VhlWGEVIHDZAhe0iA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKqLM-0003Ip-Lb; Wed, 16 Oct 2019 20:56:28 +0000 Received: from mx3.wp.pl ([212.77.101.10]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKqKX-0002HQ-JV for openwrt-devel@lists.openwrt.org; Wed, 16 Oct 2019 20:55:40 +0000 Received: (wp-smtpd smtp.wp.pl 5043 invoked from network); 16 Oct 2019 22:55:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1571259333; bh=cBcRENYSmP1Pw6XwIMBtLmlwOXsFHK/bcO7j2bFv+Cc=; h=From:To:Cc:Subject; b=S8VLy/sFqiqJaz94ieeX3eOdJzFmW9fqxCBlY60OMxcx717vfFs2ICp3mUXNAmfD4 fkI5vVrmu4ytXqmmjPR267vb05KRrSIUNXxU87m2G1E4BklI5AHR6zlZLds/AU1mHZ 21z1S94O/G5JMIkUH0u8xc2rbRm75NmswFw0Wwjo= Received: from 89-79-49-72.dynamic.chello.pl (HELO kosmio.komorska) (michal.cieslakiewicz@wp.pl@[89.79.49.72]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 16 Oct 2019 22:55:33 +0200 Date: Wed, 16 Oct 2019 18:19:36 +0200 From: Michal Cieslakiewicz To: "openwrt-devel@lists.openwrt.org" Message-ID: <20191016181936.19ebdbbd@kosmio.komorska> In-Reply-To: <20191016123722.70774de1@kosmio.komorska> References: <20191016123722.70774de1@kosmio.komorska> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-slackware-linux-gnu) MIME-Version: 1.0 X-WP-MailID: 5192b915924c3e157d7ef5758b25a165 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000000 [oVPF] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191016_135537_824452_3B9B898F X-CRM114-Status: GOOD ( 11.76 ) X-Spam-Score: 0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.77.101.10 listed in list.dnswl.org] 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michal.cieslakiewicz[at]wp.pl) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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 Subject: [OpenWrt-Devel] [PATCH v5 5/5] ath79: add support for Netgear WNR2200 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This patch adds ath79 support for Netgear WNR2200. Router was previously supported by ar71xx target only (8 MiB variant). Netgear WNR2200 has two flash versions - 8MiB sold in EU, US etc. and 16 MiB for Russia and China markets. Apart from flash size both variants share the same hardware specification. Specification ============= * Description: Netgear WNR2200 * Loader: U-boot * SOC: Atheros AR7241 (360 MHz) * RAM: 64 MiB * Flash: 8 MiB or 16 MiB (SPI NOR) - U-boot binary: 256 KiB - U-boot environment: 64 KiB - Firmware: 7808 KiB or 16000 KiB - ART: 64 KiB * Ethernet: 4 x 10/100 LAN + 1 x 10/100 WAN * Wireless: 2.4 GHz b/g/n (Atheros AR9287) * USB: yes, 1 x USB 2.0 * Buttons: - Reset - WiFi (rfkill) - WPS * LEDs: - Power (amber/green) - WAN (amber/green) - WLAN (blue) - 4 x LAN (amber/green) - WPS (green) * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1 * Power supply: DC 12V 1.5A * MAC addresses: LAN on case label, WAN +1, WLAN +2 Installation ============ * TFTP recovery * TFTP via U-boot prompt * sysupgrade * Web interface Test build configuration ======================== CONFIG_TARGET_ath79=y CONFIG_TARGET_ath79_generic=y CONFIG_TARGET_ath79_generic_DEVICE_netgear_wnr2200-8m=y CONFIG_ALL_KMODS=y CONFIG_DEVEL=y CONFIG_CCACHE=y CONFIG_COLLECT_KERNEL_DEBUG=y CONFIG_IMAGEOPT=y CONFIG_KERNEL_DEBUG_INFO=y CONFIG_KERNEL_DEBUG_KERNEL=y Signed-off-by: Michal Cieslakiewicz --- .../ath79/base-files/etc/board.d/01_leds | 4 +- .../ath79/base-files/etc/board.d/02_network | 2 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 2 + .../ath79/dts/ar7241_netgear_wnr2200-16m.dts | 34 +++ .../ath79/dts/ar7241_netgear_wnr2200-8m.dts | 34 +++ .../ath79/dts/ar7241_netgear_wnr2200.dtsi | 207 ++++++++++++++++++ target/linux/ath79/image/generic.mk | 32 +++ 7 files changed, 314 insertions(+), 1 deletion(-) create mode 100644 target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts create mode 100644 target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts create mode 100644 target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index 499fe0031c..0d78008182 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -112,7 +112,9 @@ glinet,gl-x750) ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1" ;; netgear,wnr1000-v2|\ -netgear,wnr2000-v3) +netgear,wnr2000-v3|\ +netgear,wnr2200-8m|\ +netgear,wnr2200-16m) ucidef_set_led_netdev "wan-amber" "WAN (amber)" "netgear:amber:wan" "eth0" ucidef_set_led_switch "lan1green" "LAN1 (green)" "netgear:green:lan1" "switch0" "0x02" "0x04" ucidef_set_led_switch "lan2green" "LAN2 (green)" "netgear:green:lan2" "switch0" "0x04" "0x04" 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 8efab146f2..56c27df7fa 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -206,6 +206,8 @@ ath79_setup_interfaces() ;; netgear,wnr1000-v2|\ netgear,wnr2000-v3|\ + netgear,wnr2200-8m|\ + netgear,wnr2200-16m|\ netgear,wnr612-v2|\ on,n150r|\ tplink,tl-wr740n-v1|\ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 104e77ac3f..b824f17040 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -80,6 +80,8 @@ case "$FIRMWARE" in ;; netgear,wnr1000-v2|\ netgear,wnr2000-v3|\ + netgear,wnr2200-8m|\ + netgear,wnr2200-16m|\ netgear,wnr612-v2|\ on,n150r|\ pcs,cap324|\ diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts new file mode 100644 index 0000000000..d182b58c05 --- /dev/null +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar7241_netgear_wnr2200.dtsi" + +/ { + compatible = "netgear,wnr2200-16m", "qca,ar7241"; + model = "Netgear WNR2200 (16M)"; +}; + +&partitions { + partition@0 { + label = "u-boot"; + reg = <0x0 0x40000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x40000 0x10000>; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfa0000>; + compatible = "netgear,uimage"; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x10000>; + read-only; + }; +}; diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts new file mode 100644 index 0000000000..e926c17893 --- /dev/null +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar7241_netgear_wnr2200.dtsi" + +/ { + compatible = "netgear,wnr2200-8m", "qca,ar7241"; + model = "Netgear WNR2200 (8M)"; +}; + +&partitions { + partition@0 { + label = "u-boot"; + reg = <0x0 0x40000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x40000 0x10000>; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7a0000>; + compatible = "netgear,uimage"; + }; + + art: partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x10000>; + read-only; + }; +}; diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi new file mode 100644 index 0000000000..1ce4d11835 --- /dev/null +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi @@ -0,0 +1,207 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar7241.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-boot = &power_amber; + led-failsafe = &power_amber; + led-running = &power_green; + led-upgrade = &power_amber; + label-mac-device = ð1; + }; + + ath9k-keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + wps { + label = "wps"; + linux,code = ; + gpios = <&ath9k 5 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + reset { + label = "reset"; + linux,code = ; + gpios = <&ath9k 6 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + rfkill { + label = "rfkill"; + linux,code = ; + gpios = <&ath9k 3 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>; + + wan_green { + label = "netgear:green:wan"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + + wan_amber { + label = "netgear:amber:wan"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + + lan1_green { + label = "netgear:green:lan1"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + lan1_amber { + label = "netgear:amber:lan1"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + }; + + lan2_green { + label = "netgear:green:lan2"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + lan2_amber { + label = "netgear:amber:lan2"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + + lan3_green { + label = "netgear:green:lan3"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + lan3_amber { + label = "netgear:amber:lan3"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + lan4_green { + label = "netgear:green:lan4"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + lan4_amber { + label = "netgear:amber:lan4"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + + wps_green { + label = "netgear:green:wps"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + }; + + usb_green { + label = "netgear:green:usb"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + trigger-sources = <&hub_port>; + linux,default-trigger = "usbport"; + }; + }; + + ath9k-leds { + compatible = "gpio-leds"; + + power_green: power_green { + label = "netgear:green:power"; + gpios = <&ath9k 2 GPIO_ACTIVE_LOW>; + }; + + power_amber: power_amber { + label = "netgear:amber:power"; + gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + wlan_blue { + label = "netgear:blue:wlan"; + gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions: partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + }; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&art 0x0>; +}; + +ð1 { + status = "okay"; + + compatible = "qca,ar7241-eth", "syscon", "simple-mfd"; + mtd-mac-address = <&art 0x6>; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0,0 { + compatible = "pci168c,002e"; + reg = <0x0000 0 0 0 0>; + mtd-mac-address = <&art 0x0>; + mtd-mac-address-increment = <1>; + qca,no-eeprom; + #gpio-cells = <2>; + gpio-controller; + + usb_power { + gpio-hog; + line-name = "netgear:power:usb"; + gpios = <4 GPIO_ACTIVE_HIGH>; + output-high; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; + +&usb { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index acb1ab4b0b..0c925dbf60 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -794,6 +794,38 @@ define Device/netgear_wndr3800ch endef TARGET_DEVICES += netgear_wndr3800ch +define Device/netgear_wnr2200_common + ATH_SOC := ar7241 + DEVICE_MODEL := WNR2200 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport + NETGEAR_KERNEL_MAGIC := 0x32323030 + IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | \ + append-rootfs | pad-rootfs + $(Device/netgear_ath79) +endef + +define Device/netgear_wnr2200-8m + $(Device/netgear_wnr2200_common) + DEVICE_VARIANT := 8M + IMAGE_SIZE := 7808k + IMAGES += factory-NA.img + IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | \ + check-size $$$$(IMAGE_SIZE) + SUPPORTED_DEVICES += wnr2200-8m netgear,wnr2200 wnr2200 +endef +TARGET_DEVICES += netgear_wnr2200-8m + +define Device/netgear_wnr2200-16m + $(Device/netgear_wnr2200_common) + DEVICE_VARIANT := 16M + DEVICE_ALT0_VENDOR := NETGEAR + DEVICE_ALT0_MODEL := WNR2200 + DEVICE_ALT0_VARIANT := CN/RU + IMAGE_SIZE := 16000k + SUPPORTED_DEVICES += wnr2200-16m +endef +TARGET_DEVICES += netgear_wnr2200-16m + define Device/ocedo_koala ATH_SOC := qca9558 DEVICE_VENDOR := Ocedo