From patchwork Sun Jul 29 10:14:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 950564 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=fail (p=none dis=none) header.from=slashdirt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="n9N8EQ3k"; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.b="mQFSHwU1"; 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 41ddrR1FRMz9ryn for ; Sun, 29 Jul 2018 20:15:51 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version: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=fiAUB8kqjDMVYGIDzRoz6MWISV/7W3w17Lylx2oqsRM=; b=n9N8EQ3krMYSKoQ6SWrYQ5Hr01 DlKfj8R2voYi+BQMvuURTmBw4zRznU++MLna0Cfp816DSB0pcdBczZfuBynKUWKFBT4lvFjLtDxQA OmeTnn7kX2qsvmXxGKik5o4Yj3iw3k5N8hTOSHb9G+xSb/vxmOjGxIixRAWLbARmSB3W2jGYCls4+ QGElhyp4N/OKW3IbokxonYRQFzIQqHZapzhZXAUyRfAFmZ/w6NrTd+Xps/NHdlHmP0ARQslIJsgyL TyIefw0GnnRv889xSSwhhpmKXZS8MRnoWrUeK4KLTfuI/13/rmogQQwyotBa19Rk9SKximWYYzrQi nGyKhcMw==; 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 1fjijq-0007TP-92; Sun, 29 Jul 2018 10:15:46 +0000 Received: from vps.slashdirt.org ([178.238.224.32]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fjijL-0005X6-E2 for openwrt-devel@lists.openwrt.org; Sun, 29 Jul 2018 10:15:18 +0000 Received: from Chuck.lan (tardis.herebedragons.eu [185.144.46.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id 496C112009E for ; Sun, 29 Jul 2018 12:15:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.9.2 vps.slashdirt.org 496C112009E DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1532859301; bh=fcotbLQziWUJmXy9+/PzFA9s8ZVKsyHsGbEIdCFxleI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mQFSHwU1rGH3I8lwvupinzYel/ZZ/i7qGCQcmC26gUxlY7p2wXUzCcS3BZ3rKNZGD DBtdfbKJp6dncrWja4byMmSrcsPiJNB9M2APYQdAKDWjKzOSJF9AR5yst/gACv2uuB 5CuSuNR6THb+aJJftSBBzvo0zsAOkAFf3uZ9xZcY= From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Date: Sun, 29 Jul 2018 12:14:56 +0200 Message-Id: <20180729101500.8621-2-hacks@slashdirt.org> X-Mailer: git-send-email 2.13.6 (Apple Git-96) In-Reply-To: <20180729101500.8621-1-hacks@slashdirt.org> References: <20180729101500.8621-1-hacks@slashdirt.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180729_031515_812796_A55FADC6 X-CRM114-Status: UNSURE ( 9.13 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 NO_DNS_FOR_FROM RBL: Envelope sender has no MX or A DNS records [listed in slashdirt.org. IN A] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 1/5] ar71xx: rbspi: clarify USB power gpios action 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: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The gpios that control power toggle for USB on the RouterBOARD devices are active low _off_ switches. When they are active (low), power is off. When they are inactive (high), power is on. Rename GPIO defines, set gpios to GPIOF_ACTIVE_LOW for consistency and reflect their true action in the display name. This brings openwrt code in line with OEM. Signed-off-by: Thibaut VARÈNE Tested-by: Ryan Mounce --- .../linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c index 2997018aa3..f14b078b2c 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c @@ -213,7 +213,7 @@ static struct gpio_led rbhapl_leds[] __initdata = { #define RB952_GPIO_POE_POWER 14 #define RB952_GPIO_POE_STATUS 12 #define RB952_GPIO_BTN_RESET 16 -#define RB952_GPIO_USB_POWER RBSPI_SSR_GPIO(RB952_SSR_BIT_USB_POWER) +#define RB952_GPIO_USB_PWROFF RBSPI_SSR_GPIO(RB952_SSR_BIT_USB_POWER) #define RB952_GPIO_LED_LAN1 RBSPI_SSR_GPIO(RB952_SSR_BIT_LED_LAN1) #define RB952_GPIO_LED_LAN2 RBSPI_SSR_GPIO(RB952_SSR_BIT_LED_LAN2) #define RB952_GPIO_LED_LAN3 RBSPI_SSR_GPIO(RB952_SSR_BIT_LED_LAN3) @@ -258,7 +258,7 @@ static struct gpio_led rb952_leds[] __initdata = { #define RB962_GPIO_POE_STATUS 2 #define RB962_GPIO_POE_POWER 3 #define RB962_GPIO_LED_USER 12 -#define RB962_GPIO_USB_POWER 13 +#define RB962_GPIO_USB_PWROFF 13 #define RB962_GPIO_BTN_RESET 20 static struct gpio_led rb962_leds_gpio[] __initdata = { @@ -388,7 +388,7 @@ static struct gpio_led rbcap_leds[] __initdata = { #define RBMAP_GPIO_LED_POWER 4 #define RBMAP_GPIO_POE_POWER 14 #define RBMAP_GPIO_POE_STATUS 12 -#define RBMAP_GPIO_USB_POWER RBSPI_SSR_GPIO(RBMAP_SSR_BIT_USB_POWER) +#define RBMAP_GPIO_USB_PWROFF RBSPI_SSR_GPIO(RBMAP_SSR_BIT_USB_POWER) #define RBMAP_GPIO_LED_LAN1 RBSPI_SSR_GPIO(RBMAP_SSR_BIT_LED_LAN1) #define RBMAP_GPIO_LED_LAN2 RBSPI_SSR_GPIO(RBMAP_SSR_BIT_LED_LAN2) #define RBMAP_GPIO_LED_POEO RBSPI_SSR_GPIO(RBMAP_SSR_BIT_LED_POEO) @@ -828,9 +828,9 @@ static void __init rbspi_952_750r2_setup(u32 flags) rbspi_network_setup(flags, 1, 5, 6); if (flags & RBSPI_HAS_USB) - gpio_request_one(RB952_GPIO_USB_POWER, + gpio_request_one(RB952_GPIO_USB_PWROFF, GPIOF_ACTIVE_LOW | GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, - "USB power"); + "USB power off"); if (flags & RBSPI_HAS_POE) gpio_request_one(RB952_GPIO_POE_POWER, @@ -938,9 +938,9 @@ static void __init rb962_setup(void) rbspi_wlan_init(1, 7); if (flags & RBSPI_HAS_USB) - gpio_request_one(RB962_GPIO_USB_POWER, + gpio_request_one(RB962_GPIO_USB_PWROFF, GPIOF_ACTIVE_LOW | GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, - "USB power"); + "USB power off"); /* PoE output GPIO is inverted, set GPIOF_ACTIVE_LOW for consistency */ if (flags & RBSPI_HAS_POE) @@ -1047,12 +1047,11 @@ static void __init rbmap_setup(void) GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED, "POE power"); - /* USB power GPIO is inverted, set GPIOF_ACTIVE_LOW for consistency */ if (flags & RBSPI_HAS_USB) - gpio_request_one(RBMAP_GPIO_USB_POWER, + gpio_request_one(RBMAP_GPIO_USB_PWROFF, GPIOF_OUT_INIT_HIGH | GPIOF_ACTIVE_LOW | GPIOF_EXPORT_DIR_FIXED, - "USB power"); + "USB power off"); ath79_register_leds_gpio(-1, ARRAY_SIZE(rbmap_leds), rbmap_leds); From patchwork Sun Jul 29 10:14:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 950565 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=fail (p=none dis=none) header.from=slashdirt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="otQfGnSp"; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.b="u69vr7X+"; 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 41ddrd4FvKz9ryn for ; Sun, 29 Jul 2018 20:16:01 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version: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=RXZ/3TzH22yACkd7n93JNwEWN+bH5XH2TyRGWKGe2aw=; b=otQfGnSptptqHqSICqeLmddEUD 7Si7yq8m+QCik+c+wI3dt/PeT0N85ZDG1UdQ28FiONKxc0XWGoy1AvhUG/CFhrMKPMw7EO3BF7Goc Ackb0owuKXkuW3uFaj7wnEWyptjJtWUs7dY5c8C/NEKpf0Y/4K1YEPlZo8CGcvq/JTWRXD21VUh3t XAklh75KET0dosXJgMnw+ExicVh9mf+Gv+ehbBPw1yczVNqelUeuj1QgIXERI5mFJ/Bq2ZLfjFLMR OAfK9Z1t9WkDOm0A9V9BUGrTIqX25rd9K6UsplRBtBIXOOCD7CaN4FGwIFGEekn5LiGYQgAyNfD5u YNQagttw==; 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 1fjijz-0007id-T4; Sun, 29 Jul 2018 10:15:55 +0000 Received: from vps.slashdirt.org ([178.238.224.32]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fjijL-0005X7-E4 for openwrt-devel@lists.openwrt.org; Sun, 29 Jul 2018 10:15:18 +0000 Received: from Chuck.lan (tardis.herebedragons.eu [185.144.46.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id 684B012009F for ; Sun, 29 Jul 2018 12:15:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.9.2 vps.slashdirt.org 684B012009F DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1532859301; bh=XKhKK6c7LxkxZUvqnKAWUYojtlsVknsGhupKdk17zls=; h=From:To:Subject:Date:In-Reply-To:References:From; b=u69vr7X+YBeszeFh8dkkqWBmn8kAtxGgKg+b3jej5hbFJu6g5h6yQqwmu/I1MiuZi tlIGl9pwu9fjaGS0ugVVhfcNKeXJdXBrPa3Muvx3jXVdzbGo0gfZ7MAXywJEMtw1UL oXLqZBChFV6cA+Ou8s2ISiIWsTGNajiTH5mFmLoU= From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Date: Sun, 29 Jul 2018 12:14:57 +0200 Message-Id: <20180729101500.8621-3-hacks@slashdirt.org> X-Mailer: git-send-email 2.13.6 (Apple Git-96) In-Reply-To: <20180729101500.8621-1-hacks@slashdirt.org> References: <20180729101500.8621-1-hacks@slashdirt.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180729_031515_656129_8AD35468 X-CRM114-Status: GOOD ( 10.37 ) X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 NO_DNS_FOR_FROM RBL: Envelope sender has no MX or A DNS records [listed in slashdirt.org. IN A] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 2/5] ar71xx: rbspi: fix RB wAP AC gpio conflict and LED 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: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org e15c63a37574bd15ce3a6636c2f04741ab76f7b9 introduced code that was trying to register GPIO 1 as both an LED and a button. The OEM source makes it clear that LED1 is not wired to the SoC GPIOs. GPIO 1 is the reset button. Furthermore the (green) power led default state should also be defined, (matching OEM source), and it should be used by diag.sh since it's currently the only software-controllable LED. This patch fixes these issues and renames the corresponding #defines for clarity Signed-off-by: Thibaut VARÈNE --- target/linux/ar71xx/base-files/etc/diag.sh | 3 ++- target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c | 17 +++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index d3cdc81b39..280b83b413 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -384,7 +384,8 @@ get_status_led() { rb-912uag-2hpnd|\ rb-912uag-5hpnd|\ rb-sxt2n|\ - rb-sxt5n) + rb-sxt5n|\ + rb-wapg-5hact2hnd) status_led="rb:green:power" ;; re355|\ diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c index f14b078b2c..ad67c6e869 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c @@ -478,10 +478,10 @@ static struct gpio_led rblhg_leds[] __initdata = { }; /* RB w APG-5HacT2HnD (wAP AC) gpios*/ -#define RBWAPGSC_LED1 1 -#define RBWAPGSC_LED2 8 -#define RBWAPGSC_LED3 9 -#define RBWAPGSC_POWERLED 16 +#define RBWAPGSC_WIFI_LED_1 1 +#define RBWAPGSC_WIFI_LED_2 8 +#define RBWAPGSC_WIFI_LED_3 9 +#define RBWAPGSC_GPIO_LED_POWER 16 #define RBWAPGSC_GPIO_BTN_RESET 1 #define RBWAPGSC_GPIO_MDIO_MDC 12 #define RBWAPGSC_GPIO_MDIO_DATA 11 @@ -489,13 +489,10 @@ static struct gpio_led rblhg_leds[] __initdata = { static struct gpio_led rbwapgsc_leds[] __initdata = { { - .name = "rb:green:led1", - .gpio = RBWAPGSC_LED1, - .active_low = 1, - },{ - .name = "rb:blue:power", - .gpio = RBWAPGSC_POWERLED, + .name = "rb:green:power", + .gpio = RBWAPGSC_GPIO_LED_POWER, .active_low = 1, + .default_state = LEDS_GPIO_DEFSTATE_ON, }, }; From patchwork Sun Jul 29 10:14:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 950562 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=fail (p=none dis=none) header.from=slashdirt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CaKsG3mW"; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.b="0N/HWgHF"; 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 41ddr53J31z9ryn for ; Sun, 29 Jul 2018 20:15:30 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version: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=3nyq9EO44U3lYFustkvBLtKFVIXR5ViZ+UhqXvgNMA8=; b=CaKsG3mWrCJMsd7Wxwurjggbe+ dooV0ts1+nwBHfr46nvvTxG5iIqBLA5mVHt6NbCXnTCLX+jIgRezPAyb7JPuPlS6j+LVkin8HCKp5 IMBuYiL7vFzNLUJk1GY+2G16Fztb1+1ckuqO+RN5Tli6EGG43gjg5Wvy4JFJ3S2WBP2n7sTGg3qlM DSev09AXERioPsBRs6mYZfBxHTEQx53dk0+KHLTlsROa+fb+2KiEbiBI6isAGNuhBC1K5yMGlDJDC DaKOGX/m0dg6d4BOGmfDgcsyHWoaVaoEql9lmwUtT8R6mJs0+1soWGTEZvZGaiv+MqY3Aguzz0ppw eQWU6Tmw==; 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 1fjijO-0006qM-UM; Sun, 29 Jul 2018 10:15:18 +0000 Received: from vps.slashdirt.org ([178.238.224.32]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fjijL-0005XK-E5 for openwrt-devel@lists.openwrt.org; Sun, 29 Jul 2018 10:15:17 +0000 Received: from Chuck.lan (tardis.herebedragons.eu [185.144.46.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id 95F751200A0 for ; Sun, 29 Jul 2018 12:15:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.9.2 vps.slashdirt.org 95F751200A0 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1532859301; bh=qjdZZ49vNsszUn1TlKNKmAUer/5fA75F4VmJwacQhL8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=0N/HWgHFLiZyEpFOESIR2LIljw8lWOoeTNm2jkcQJdFt/1Jyy7Hel5FD4U4ozoYQH 3ZEZ2mk9jvE0eTqU8VLHOJxaKyJP6uRes2RbVGJuCxxyHexWuAZuVQpe1X9xZKuOca sCmN4VSUSWfRFLpJB69lR8p/seE+HZaLeWVxCy10= From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Date: Sun, 29 Jul 2018 12:14:58 +0200 Message-Id: <20180729101500.8621-4-hacks@slashdirt.org> X-Mailer: git-send-email 2.13.6 (Apple Git-96) In-Reply-To: <20180729101500.8621-1-hacks@slashdirt.org> References: <20180729101500.8621-1-hacks@slashdirt.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180729_031515_649421_2634830E X-CRM114-Status: UNSURE ( 9.26 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 NO_DNS_FOR_FROM RBL: Envelope sender has no MX or A DNS records [listed in slashdirt.org. IN A] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 3/5] ar71xx: rbspi: mark rb911L user led as active low 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: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The active_low flag was missing for the user LED. This LED is open drain (confirmed in OEM source) and open drain only makes sense for active low GPIOs. The two wireless LEDs mentioned in the comments are also #defined for future reference. Signed-off-by: Thibaut VARÈNE Tested-by: Ryan Mounce --- target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c index ad67c6e869..4aff7df55b 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c @@ -255,6 +255,8 @@ static struct gpio_led rb952_leds[] __initdata = { /* RB 962UiGS-5HacT2HnT gpios */ +#define RB962_WIFI_LED_1 1 +#define RB962_WIFI_LED_2 2 #define RB962_GPIO_POE_STATUS 2 #define RB962_GPIO_POE_POWER 3 #define RB962_GPIO_LED_USER 12 @@ -520,7 +522,7 @@ static struct platform_device rbwapgsc_phy_device = { #define RB911L_GPIO_LED_ETH 20 #define RB911L_GPIO_LED_POWER 11 #define RB911L_GPIO_LED_USER 3 -#define RB911L_GPIO_PIN_HOLE 14 /* for reference */ +#define RB911L_GPIO_PIN_HOLE 14 /* for reference, active low */ static struct gpio_led rb911l_leds[] __initdata = { { @@ -551,6 +553,7 @@ static struct gpio_led rb911l_leds[] __initdata = { .name = "rb:green:power", .gpio = RB911L_GPIO_LED_POWER, .default_state = LEDS_GPIO_DEFSTATE_ON, + .active_low = 1, .open_drain = 1, }, { .name = "rb:green:user", From patchwork Sun Jul 29 10:14:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 950561 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=fail (p=none dis=none) header.from=slashdirt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="X4dUzwjp"; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.b="DRW22jP8"; 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 41ddr62Shmz9s1R for ; Sun, 29 Jul 2018 20:15:34 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version: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=9JDBPIwsWYFCLz/VHdRXCcTj8hkfbl2QKCqudQtNfx4=; b=X4dUzwjp2bDzDyMlPEq0aSxoVC aHCHVkj9vIVkVypHu3gRcS9XFnVIBtuwf+IVR9/OqvZ/MaCp7MlJJZ/cOO5pkjab71ke86LQcfHNu WP5Cz98rLu1R8Z/2iVYOEXyuQISqLytHErqEEWSj2Cn/NOO2SRT55OE/NTAqLgEJpPlM4w61+becb VK3mQ9iNTPYc/wB5k3vM9vGxL++Y2U2WyQC/6bqImdwybxYQKGAk1shKcE0uI336QmjNOSSXDlirN uecOF09VPlOHh6dAZuYoNiIqOpB2g7E3zds0vOKhWieULnRktM7r/jwvK/Ayf351pfuKU41bbovPN rUQSdM0w==; 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 1fjijV-0006z2-W2; Sun, 29 Jul 2018 10:15:26 +0000 Received: from vps.slashdirt.org ([178.238.224.32]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fjijL-0005Xh-E6 for openwrt-devel@lists.openwrt.org; Sun, 29 Jul 2018 10:15:17 +0000 Received: from Chuck.lan (tardis.herebedragons.eu [185.144.46.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id BF06B1200A1 for ; Sun, 29 Jul 2018 12:15:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.9.2 vps.slashdirt.org BF06B1200A1 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1532859301; bh=2m7GGYZRGBmAS8es+B7BWoGpsP2My/WoSEO9eBkW73E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DRW22jP8C+/iVZsBpgnZ20F/rs5Vz7zDpX8oKBobSyagXyjOSDGU/w1EZ+Gavnn6d fws0hyKX+cs1Nr3I34fBu+0wAbb8I6fjPc3M1TliMZYu7rR2t0TFPdE7zQbBRM1jYQ Dfyas8kclKjvFqw+Ku82Gtfw+EdfEwIJQb/Yz+0k= From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Date: Sun, 29 Jul 2018 12:14:59 +0200 Message-Id: <20180729101500.8621-5-hacks@slashdirt.org> X-Mailer: git-send-email 2.13.6 (Apple Git-96) In-Reply-To: <20180729101500.8621-1-hacks@slashdirt.org> References: <20180729101500.8621-1-hacks@slashdirt.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180729_031515_648160_1BCA67DD X-CRM114-Status: UNSURE ( 8.65 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 NO_DNS_FOR_FROM RBL: Envelope sender has no MX or A DNS records [listed in slashdirt.org. IN A] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 4/5] ar71xx: add missing diag LED support for RB wAP 2nD 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: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org 3b15eb06c366cf3805590a61f22e966a95bf8101 did not include diag.sh edit Signed-off-by: Thibaut VARÈNE --- target/linux/ar71xx/base-files/etc/diag.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 280b83b413..efb1305aec 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -375,7 +375,8 @@ get_status_led() { rb-962uigs-5hact2hnt|\ rb-lhg-5nd|\ rb-map-2nd|\ - rb-mapl-2nd) + rb-mapl-2nd|\ + rb-wap-2nd) status_led="rb:green:user" ;; rb-951ui-2hnd) From patchwork Sun Jul 29 10:15:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 950566 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=fail (p=none dis=none) header.from=slashdirt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="h5w/k6b2"; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.b="XwcDpAI1"; 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 41ddrq5MxXz9ryn for ; Sun, 29 Jul 2018 20:16:11 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version: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=oU4lpa+Z/7PsXubgSK9KKLg6UGKsIPymSHylygvATFI=; b=h5w/k6b22C5bVW+0hsWFqDxV0Y 3Bj9mu1HjdntoQKRwD94u8+V+4K+ci14ZY3tABm6JlgQQueZoh9w6RAn1+qX0TgVbpBcfGhyGFEhh njZ+4yfwuytl7llbzrC6omDYoWEd8KBL5n/GC6K7ezyuHUQp2ZkjbEcUtcWYe1Q/EXMnZqq5ID+A6 /gBD0odR4wLxskLit7O7ltej5aMYE9tIlshzxTNg40KnYFZYtFX4AdFVvfGWntLxLwrCDS2aKKcYD MXsV22Wx6OWl9bu4rIOj/M4jGgBsmfHdtK/Xjqt41x31Qli7dTb1RRqU0wTBQL8qSv2Ae8TyyUHBL Kg8hmbWA==; 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 1fjikA-0007yv-L6; Sun, 29 Jul 2018 10:16:06 +0000 Received: from vps.slashdirt.org ([178.238.224.32]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fjijY-0006qC-Im for openwrt-devel@lists.openwrt.org; Sun, 29 Jul 2018 10:15:33 +0000 Received: from Chuck.lan (tardis.herebedragons.eu [185.144.46.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id F19A01200A2 for ; Sun, 29 Jul 2018 12:15:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.9.2 vps.slashdirt.org F19A01200A2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1532859302; bh=uf+ZZAQ5AMfHx4bD5kelEmo8gSAcJfBc7liaPLYObiI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XwcDpAI1kFlm6oWymxMYhkZFXE9NOUMnkrKMrDnIIqLw6yQkHGZEq6MtGqFlPKL0h +kuVKERzmdG8Fxs29bRcRSOFGcU6/zjT3pLUC0YSTsKD7TzOCMgQN/P72Rq3gziDH9 ki49s2sbAiIBIPn9+iM4j3fcgfIg/LGVdswQGDWQ= From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Date: Sun, 29 Jul 2018 12:15:00 +0200 Message-Id: <20180729101500.8621-6-hacks@slashdirt.org> X-Mailer: git-send-email 2.13.6 (Apple Git-96) In-Reply-To: <20180729101500.8621-1-hacks@slashdirt.org> References: <20180729101500.8621-1-hacks@slashdirt.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180729_031529_660175_4F64F959 X-CRM114-Status: GOOD ( 12.79 ) X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 NO_DNS_FOR_FROM RBL: Envelope sender has no MX or A DNS records [listed in slashdirt.org. IN A] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 5/5] ar71xx: improve MikroTik wAP R support 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: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org 81d446b045176e3e25bb0ef74e3d060b51a0a353 introduced incomplete support for this device. This patch attempts to correct the situation based on OEM source code. LED1-3 are GSM mode on OFW (2G/3G/4G) hence unassigned here. Signed-off-by: Thibaut VARÈNE Tested-by: David Ehrmann --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 3 ++ target/linux/ar71xx/base-files/etc/diag.sh | 3 +- .../ar71xx/files/arch/mips/ath79/mach-rbspi.c | 63 +++++++++++++++++++++- 3 files changed, 67 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 11299dcb92..b0f4975e5c 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -680,6 +680,9 @@ rb-wap-2nd) ucidef_set_led_timer "user" "USER" "rb:green:user" "1000" "1000" ucidef_set_led_wlan "wlan" "WLAN" "rb:green:wlan" "phy0tpt" ;; +rb-wapr-2nd) + ucidef_set_led_wlan "wlan" "WLAN" "rb:green:user" "phy0tpt" + ;; re355|\ re450) ucidef_set_led_netdev "lan_data" "LAN Data" "$board:green:lan_data" "eth0" "tx rx" diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index efb1305aec..129df16097 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -376,7 +376,8 @@ get_status_led() { rb-lhg-5nd|\ rb-map-2nd|\ rb-mapl-2nd|\ - rb-wap-2nd) + rb-wap-2nd|\ + rb-wapr-2nd) status_led="rb:green:user" ;; rb-951ui-2hnd) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c index 4aff7df55b..cff69092c4 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c @@ -594,6 +594,36 @@ static struct gpio_led rb931_leds[] __initdata = { }, }; +/* RB wAP R-2nD (wAP R) gpios*/ +#define RBWAPR_GPIO_LED_USER 14 +#define RBWAPR_GPIO_LED1 12 +#define RBWAPR_GPIO_LED2 13 +#define RBWAPR_GPIO_LED3 3 +#define RBWAPR_GPIO_PCIE_PWROFF 15 +#define RBWAPR_GPIO_CONTROL 10 +#define RBWAPR_GPIO_BTN_RESET 16 + +static struct gpio_led rbwapr_leds[] __initdata = { + { + .name = "rb:green:user", + .gpio = RBWAPR_GPIO_LED_USER, + .active_low = 0, + },{ + .name = "rb:green:led1", + .gpio = RBWAPR_GPIO_LED1, + .active_low = 1, + },{ + .name = "rb:green:led2", + .gpio = RBWAPR_GPIO_LED2, + .active_low = 1, + },{ + .name = "rb:green:led3", + .gpio = RBWAPR_GPIO_LED3, + .active_low = 0, + }, +}; + + static struct gen_74x164_chip_platform_data rbspi_ssr_data = { .base = RBSPI_SSR_GPIO_BASE, .num_registers = 1, @@ -1170,6 +1200,37 @@ static void __init rb931_setup(void) rb931_gpio_keys); } +/* + * Init the wAP R hardware. + * The wAP R-2nD has a single ethernet port and a mini PCIe slot. + * The OEM source shows it has usb (used over PCIe for LTE devices), + * and the 'control' GPIO is assumed to be an output pin not tied to an LED. + */ +static void __init rbwapr_setup(void) +{ + u32 flags = RBSPI_HAS_WLAN0 | RBSPI_HAS_USB | RBSPI_HAS_PCI; + + if (!rbspi_platform_setup()) + return; + + rbspi_peripherals_setup(flags); + + /* GMAC1 is HW MAC, WLAN0 MAC is HW MAC + 1 */ + rbspi_network_setup(flags, 0, 1, 0); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(rbwapr_leds), rbwapr_leds); + + gpio_request_one(RBWAPR_GPIO_PCIE_PWROFF, GPIOF_OUT_INIT_HIGH | + GPIOF_ACTIVE_LOW | GPIOF_EXPORT_DIR_FIXED, + "PCIE power off"); + + gpio_request_one(RBWAPR_GPIO_CONTROL, GPIOF_OUT_INIT_LOW | + GPIOF_ACTIVE_LOW | GPIOF_EXPORT_DIR_FIXED, + "control"); + + rbspi_register_reset_button(RBWAPR_GPIO_BTN_RESET); +} + MIPS_MACHINE_NONAME(ATH79_MACH_RB_MAPL, "map-hb", rbmapl_setup); MIPS_MACHINE_NONAME(ATH79_MACH_RB_941, "H951L", rbhapl_setup); MIPS_MACHINE_NONAME(ATH79_MACH_RB_911L, "911L", rb911l_setup); @@ -1178,7 +1239,7 @@ MIPS_MACHINE_NONAME(ATH79_MACH_RB_962, "962", rb962_setup); MIPS_MACHINE_NONAME(ATH79_MACH_RB_750UPR2, "750-hb", rb750upr2_setup); MIPS_MACHINE_NONAME(ATH79_MACH_RB_LHG5, "lhg", rblhg_setup); MIPS_MACHINE_NONAME(ATH79_MACH_RB_WAP, "wap-hb", rbwap_setup); -MIPS_MACHINE_NONAME(ATH79_MACH_RB_WAPR, "wap-lte", rbwap_setup); +MIPS_MACHINE_NONAME(ATH79_MACH_RB_WAPR, "wap-lte", rbwapr_setup); MIPS_MACHINE_NONAME(ATH79_MACH_RB_CAP, "cap-hb", rbcap_setup); MIPS_MACHINE_NONAME(ATH79_MACH_RB_MAP, "map2-hb", rbmap_setup); MIPS_MACHINE_NONAME(ATH79_MACH_RB_WAPAC, "wapg-sc", rbwapgsc_setup);