From patchwork Thu Jan 18 12:50:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 862878 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=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pyjXV+2g"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 3zMkNc1YJ7z9s0g for ; Thu, 18 Jan 2018 23:51:28 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4KLHZiL/gq7gD1b6qdN/MQ6BJPPf14keNBkJzgaHpsk=; b=pyjXV+2gAh20oG CUCYcYQpxEwR8U3QN7Whl7Sy8nTEUZGEuSU5gfsxSG0I15xaz52Wgo0nq/lKxl80rT2yx2TX+Jb1l 219MPA9CFV+ejiIyierAUa/0+T5WEaQjZm7Lly2cjWrXNWPUKqBm/Rc//8+uEcYRNoH1dqra/dkZd fP/3WCLZkYnwW2l2V9BOJlfZO7cSBrViSl6azgzuQmS1Cc5I0NoFHrcCcX09/zxh1dvdsR0e/13wf Sknmg8en6Jn+soaBGV73d215gfvRD81DCYSjey6sWHU50zI6Ik/MgqE4fi0obo+kghip6oVs8AowB ei7KOU0JVT6ioz7Tf8Lg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ec9fB-00007I-HC; Thu, 18 Jan 2018 12:51:25 +0000 Received: from arrakis.dune.hu ([78.24.191.176]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ec9ez-0008CR-5l for lede-dev@lists.infradead.org; Thu, 18 Jan 2018 12:51:15 +0000 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 8C792B8063E; Thu, 18 Jan 2018 13:50:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.1 Received: from localhost.localdomain (unknown [213.197.76.1]) by arrakis.dune.hu (Postfix) with ESMTPSA; Thu, 18 Jan 2018 13:50:50 +0100 (CET) From: Gabor Juhos To: lede-dev@lists.infradead.org Date: Thu, 18 Jan 2018 13:50:29 +0100 Message-Id: <20180118125032.7097-2-juhosg@freemail.hu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180118125032.7097-1-juhosg@freemail.hu> References: <20180118125032.7097-1-juhosg@freemail.hu> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [78.24.191.176 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (juhosg[at]freemail.hu) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 1/4] ar71xx: add definitions for RouterBOARD hardware option bits X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gabor Juhos MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add bit definitions for the 'hardware options' tag which is used in the MikroTik devices' hardware configurations. These values can be used in board setup codes, to do different initialization sequences. The values were obtained from the RouterOS 6.41-rc38 patches. Additionally, introduce two helper functions what make the processing of the hardware options easy. Signed-off-by: Gabor Juhos --- .../ar71xx/files/arch/mips/ath79/routerboot.h | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/routerboot.h b/target/linux/ar71xx/files/arch/mips/ath79/routerboot.h index c1d7fb9ee0..cf189362d6 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/routerboot.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/routerboot.h @@ -21,6 +21,32 @@ struct rb_info { u32 hw_options; }; +/* Bit definitions for hardware options */ +#define RB_HW_OPT_UART_ABSENT BIT(0) +#define RB_HW_OPT_HAS_VOLTAGE BIT(1) +#define RB_HW_OPT_HAS_USB BIT(2) +#define RB_HW_OPT_HAS_ATTINY BIT(3) +#define RB_HW_OPT_NO_NAND BIT(14) +#define RB_HW_OPT_HAS_LCD BIT(15) +#define RB_HW_OPT_HAS_POE_OUT BIT(16) +#define RB_HW_OPT_HAS_uSD BIT(17) +#define RB_HW_OPT_HAS_SFP BIT(20) +#define RB_HW_OPT_HAS_WIFI BIT(21) +#define RB_HW_OPT_HAS_TS_FOR_ADC BIT(22) +#define RB_HW_OPT_HAS_PLC BIT(29) + +static inline bool +rb_hw_option_match(const struct rb_info *info, u32 mask, u32 val) +{ + return (info->hw_options & (val | mask)) == val; +} + +static inline bool +rb_has_hw_option(const struct rb_info *info, u32 mask) +{ + return rb_hw_option_match(info, mask, mask); +} + #ifdef CONFIG_ATH79_ROUTERBOOT const struct rb_info *rb_init_info(void *data, unsigned int size); void *rb_get_wlan_data(void); From patchwork Thu Jan 18 12:50:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 862876 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=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mvhs0NH6"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 3zMkNR5Lhpz9s0g for ; Thu, 18 Jan 2018 23:51:19 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gHGPSsE+5TOQh3CXJZPfeTMUrDAvQXqSrchRKzhwm78=; b=mvhs0NH6M/9QFJ V54BmoPbu/YVIbEzQO/C7H1PVw3q4cH/wBiVKA/Mhom7XHGq07ty3pYqkhGxL6UyxXmDDOo/j2w8D Qx50w1oWDR5BtIokiC1Hu26CJ5KYnnR6jqIPkXf1Js8lj9RhB1/id/Kqby6P8oxezaKnPQBFEIJfA XRSsHucex3PyO/eesOcNWP7Ik4cLoJBExwf592/f+f25HE9JQl7EhX0h0IiLz6YdGQeiinlIr3ajm C0W3e2N7v2/WTSQdXKkK8RhGSLjNZwowOANP1KRyOTW1QWmQYQfQhgTof/YoBJF3JrW5Qte2gDspg ma2jNbaSWj+l/e8HnzCg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ec9f3-0008Pc-Ek; Thu, 18 Jan 2018 12:51:17 +0000 Received: from arrakis.dune.hu ([78.24.191.176]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ec9ez-0008CS-5p for lede-dev@lists.infradead.org; Thu, 18 Jan 2018 12:51:15 +0000 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id D2ABFB80651; Thu, 18 Jan 2018 13:50:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.1 Received: from localhost.localdomain (unknown [213.197.76.1]) by arrakis.dune.hu (Postfix) with ESMTPSA; Thu, 18 Jan 2018 13:50:50 +0100 (CET) From: Gabor Juhos To: lede-dev@lists.infradead.org Date: Thu, 18 Jan 2018 13:50:30 +0100 Message-Id: <20180118125032.7097-3-juhosg@freemail.hu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180118125032.7097-1-juhosg@freemail.hu> References: <20180118125032.7097-1-juhosg@freemail.hu> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [78.24.191.176 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (juhosg[at]freemail.hu) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 2/4] ar71xx: mach-rbspi: return rb_info from rbspi_platform_setup X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gabor Juhos MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Modify the rbspi_platform_setup() function to return the pointer of the rb_info structure. This allows board specific setup routines to access the various fields of the information. It is useful for investigating the hardware option bits for example. Also update the board setup codes, to ensure that those handle the new return value correctly. Signed-off-by: Gabor Juhos --- .../ar71xx/files/arch/mips/ath79/mach-rbspi.c | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 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 0c827ed566..25e920f593 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c @@ -564,7 +564,7 @@ void __init rbspi_wlan_init(u16 id, int wmac_offset) /* * Common platform init routine for all SPI NOR devices. */ -static int __init rbspi_platform_setup(void) +static __init const struct rb_info *rbspi_platform_setup(void) { const struct rb_info *info; char buf[RBSPI_MACH_BUFLEN] = "MikroTik "; @@ -573,7 +573,7 @@ static int __init rbspi_platform_setup(void) info = rb_init_info((void *)(KSEG1ADDR(AR71XX_SPI_BASE)), 0x20000); if (!info) - return -ENODEV; + return NULL; if (info->board_name) { str = "RouterBOARD "; @@ -591,7 +591,7 @@ static int __init rbspi_platform_setup(void) /* fix partitions based on flash parsing */ rbspi_init_partitions(info); - return 0; + return info; } /* @@ -683,7 +683,7 @@ static void __init rbmapl_setup(void) { u32 flags = RBSPI_HAS_WLAN0; - if (rbspi_platform_setup()) + if (!rbspi_platform_setup()) return; rbspi_peripherals_setup(flags); @@ -712,7 +712,7 @@ static void __init rbhapl_setup(void) { u32 flags = RBSPI_HAS_WLAN0; - if (rbspi_platform_setup()) + if (!rbspi_platform_setup()) return; rbspi_peripherals_setup(flags); @@ -774,7 +774,7 @@ static void __init rb952_setup(void) u32 flags = RBSPI_HAS_WAN4 | RBSPI_HAS_USB | RBSPI_HAS_SSR | RBSPI_HAS_POE; - if (rbspi_platform_setup()) + if (!rbspi_platform_setup()) return; /* differentiate the hAP from the hAP ac lite */ @@ -797,7 +797,7 @@ static void __init rb750upr2_setup(void) { u32 flags = RBSPI_HAS_WAN4 | RBSPI_HAS_SSR; - if (rbspi_platform_setup()) + if (!rbspi_platform_setup()) return; /* differentiate the hEX lite from the hEX PoE lite */ @@ -827,7 +827,7 @@ static void __init rb962_setup(void) { u32 flags = RBSPI_HAS_USB | RBSPI_HAS_POE | RBSPI_HAS_PCI; - if (rbspi_platform_setup()) + if (!rbspi_platform_setup()) return; rbspi_peripherals_setup(flags); @@ -880,7 +880,7 @@ static void __init rblhg_setup(void) { u32 flags = RBSPI_HAS_WLAN1 | RBSPI_HAS_MDIO1; - if (rbspi_platform_setup()) + if (!rbspi_platform_setup()) return; rbspi_peripherals_setup(flags); @@ -901,7 +901,7 @@ static void __init rbwap_setup(void) { u32 flags = RBSPI_HAS_WLAN0; - if (rbspi_platform_setup()) + if (!rbspi_platform_setup()) return; rbspi_peripherals_setup(flags); @@ -923,7 +923,7 @@ static void __init rbcap_setup(void) { u32 flags = RBSPI_HAS_WLAN0; - if (rbspi_platform_setup()) + if (!rbspi_platform_setup()) return; rbspi_peripherals_setup(flags); @@ -948,7 +948,7 @@ static void __init rbmap_setup(void) u32 flags = RBSPI_HAS_USB | RBSPI_HAS_WLAN0 | RBSPI_HAS_SSR | RBSPI_HAS_POE; - if (rbspi_platform_setup()) + if (!rbspi_platform_setup()) return; rbspi_spi_cs_gpios[1] = RBMAP_GPIO_SSR_CS; @@ -985,7 +985,7 @@ static void __init rbwapgsc_setup(void) { u32 flags = RBSPI_HAS_PCI; - if (rbspi_platform_setup()) + if (!rbspi_platform_setup()) return; rbspi_peripherals_setup(flags); From patchwork Thu Jan 18 12:50:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 862881 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=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ov4ajVsz"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 3zMkP14h63z9s0g for ; Thu, 18 Jan 2018 23:51:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MT0UleIN90PEI4pQQUgSPNulFO+kE1i4BgHTxfxHfPY=; b=ov4ajVszGEuIqV zb9aVORagIlpuI18Kyma1OprKeHfcKouED0yD9vjtwrjHModNLn7FLsfFprY972CMW1E30M1kV4rq BHtXfGVaVdf/Yy2wDluy20IHqRQkB2zf0wdovR6pGUPDeAUjCkzN8Umrb+i0dZ1xbzsF6wxOWVkcg tAUkkhdJCHAbkTOWt5V2eGGcHs4+JKMWZ11oV9YogdgpOtJQN1KKUCTJz8qoMHEogvOnzRCSpFkjp ypf4BsgaiAPvwfGTQB0wcnhxRI7Yz9qJURuGEVof2GPVvQQgSi3AVNWLrb5jVaXWQw7CVDIOXhjsK hcoic0g6LmPs5DAIHVmA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ec9fW-0000eU-E8; Thu, 18 Jan 2018 12:51:46 +0000 Received: from arrakis.dune.hu ([78.24.191.176]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ec9ez-0008CU-UR for lede-dev@lists.infradead.org; Thu, 18 Jan 2018 12:51:17 +0000 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 43820B90BCC; Thu, 18 Jan 2018 13:50:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.1 Received: from localhost.localdomain (unknown [213.197.76.1]) by arrakis.dune.hu (Postfix) with ESMTPSA; Thu, 18 Jan 2018 13:50:51 +0100 (CET) From: Gabor Juhos To: lede-dev@lists.infradead.org Date: Thu, 18 Jan 2018 13:50:31 +0100 Message-Id: <20180118125032.7097-4-juhosg@freemail.hu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180118125032.7097-1-juhosg@freemail.hu> References: <20180118125032.7097-1-juhosg@freemail.hu> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [78.24.191.176 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (juhosg[at]freemail.hu) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 3/4] ar71xx: make leds-gpio usable with single-ended GPIOs X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gabor Juhos MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add patches for the leds-gpio driver to make it usable with open-drain and open-source kind of GPIO lines. This type of functionality is required by various MikroTik boards. Signed-off-by: Gabor Juhos --- ...llow-to-use-OPEN_-DRAIN-SOURCE-flags-with.patch | 45 ++++++++++++++++++++++ ...llow-to-use-OPEN_-DRAIN-SOURCE-flags-with.patch | 45 ++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.4/442-leds-gpio-allow-to-use-OPEN_-DRAIN-SOURCE-flags-with.patch create mode 100644 target/linux/ar71xx/patches-4.9/442-leds-gpio-allow-to-use-OPEN_-DRAIN-SOURCE-flags-with.patch diff --git a/target/linux/ar71xx/patches-4.4/442-leds-gpio-allow-to-use-OPEN_-DRAIN-SOURCE-flags-with.patch b/target/linux/ar71xx/patches-4.4/442-leds-gpio-allow-to-use-OPEN_-DRAIN-SOURCE-flags-with.patch new file mode 100644 index 0000000000..c17c879122 --- /dev/null +++ b/target/linux/ar71xx/patches-4.4/442-leds-gpio-allow-to-use-OPEN_-DRAIN-SOURCE-flags-with.patch @@ -0,0 +1,45 @@ +From 183148e0789bee1cd5c46ba49afcb211f636f8a2 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Mon, 15 Jan 2018 15:01:14 +0100 +Subject: [PATCH] leds: gpio: allow to use OPEN_{DRAIN,SOURCE} flags with + legacy GPIOs + +LEDs which are connected to open-source or open-drain type of GPIO lines +can be used only, if those are defined via devicetree. +Add two new fields to 'struct gpio_led' in order to make it possible to +specify this type of GPIO lines to the leds-gpio driver via platform data. +Also update the create_gpio_led() function to set the GPIOF_OPEN_DRAIN and +GPIOF_OPEN_SOURCE flags for the given GPIO line. + +Signed-off-by: Gabor Juhos +--- + drivers/leds/leds-gpio.c | 6 ++++++ + include/linux/leds.h | 2 ++ + 2 files changed, 8 insertions(+) + +--- a/drivers/leds/leds-gpio.c ++++ b/drivers/leds/leds-gpio.c +@@ -110,6 +110,12 @@ static int create_gpio_led(const struct + if (template->active_low) + flags |= GPIOF_ACTIVE_LOW; + ++ if (template->open_drain) ++ flags |= GPIOF_OPEN_DRAIN; ++ ++ if (template->open_source) ++ flags |= GPIOF_OPEN_SOURCE; ++ + ret = devm_gpio_request_one(parent, template->gpio, flags, + template->name); + if (ret < 0) +--- a/include/linux/leds.h ++++ b/include/linux/leds.h +@@ -350,6 +350,8 @@ struct gpio_led { + unsigned retain_state_suspended : 1; + unsigned default_state : 2; + /* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */ ++ unsigned open_drain : 1; ++ unsigned open_source : 1; + struct gpio_desc *gpiod; + }; + #define LEDS_GPIO_DEFSTATE_OFF 0 diff --git a/target/linux/ar71xx/patches-4.9/442-leds-gpio-allow-to-use-OPEN_-DRAIN-SOURCE-flags-with.patch b/target/linux/ar71xx/patches-4.9/442-leds-gpio-allow-to-use-OPEN_-DRAIN-SOURCE-flags-with.patch new file mode 100644 index 0000000000..26c8cb5dfc --- /dev/null +++ b/target/linux/ar71xx/patches-4.9/442-leds-gpio-allow-to-use-OPEN_-DRAIN-SOURCE-flags-with.patch @@ -0,0 +1,45 @@ +From 183148e0789bee1cd5c46ba49afcb211f636f8a2 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Mon, 15 Jan 2018 15:01:14 +0100 +Subject: [PATCH] leds: gpio: allow to use OPEN_{DRAIN,SOURCE} flags with + legacy GPIOs + +LEDs which are connected to open-source or open-drain type of GPIO lines +can be used only, if those are defined via devicetree. +Add two new fields to 'struct gpio_led' in order to make it possible to +specify this type of GPIO lines to the leds-gpio driver via platform data. +Also update the create_gpio_led() function to set the GPIOF_OPEN_DRAIN and +GPIOF_OPEN_SOURCE flags for the given GPIO line. + +Signed-off-by: Gabor Juhos +--- + drivers/leds/leds-gpio.c | 6 ++++++ + include/linux/leds.h | 2 ++ + 2 files changed, 8 insertions(+) + +--- a/drivers/leds/leds-gpio.c ++++ b/drivers/leds/leds-gpio.c +@@ -100,6 +100,12 @@ static int create_gpio_led(const struct + if (template->active_low) + flags |= GPIOF_ACTIVE_LOW; + ++ if (template->open_drain) ++ flags |= GPIOF_OPEN_DRAIN; ++ ++ if (template->open_source) ++ flags |= GPIOF_OPEN_SOURCE; ++ + ret = devm_gpio_request_one(parent, template->gpio, flags, + template->name); + if (ret < 0) +--- a/include/linux/leds.h ++++ b/include/linux/leds.h +@@ -380,6 +380,8 @@ struct gpio_led { + unsigned panic_indicator : 1; + unsigned default_state : 2; + /* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */ ++ unsigned open_drain : 1; ++ unsigned open_source : 1; + struct gpio_desc *gpiod; + }; + #define LEDS_GPIO_DEFSTATE_OFF 0 From patchwork Thu Jan 18 12:50:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 862882 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=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XxxLYKp6"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 3zMkPD0j5kz9s0g for ; Thu, 18 Jan 2018 23:52:00 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FQPn3qFThAIV+QQweqnAVh6hsK1gpTW5PiN36koKEdw=; b=XxxLYKp6hGJJcA Pjf4R1dSFlw0hwZcj5LbN4ilcVXZn1Wf0p3p4e6plXI4NI77+/qOaA0gFaQG0ALrZANSkUYtlsczE rNdpIdT2y0SYJ5RSG7KHtn0LJiJYm4Mb5RwGvdU/TGLelW2wm852zdOvFlkjaVYdY5kINshOQOzzI 7bCj1o7vm5WcMXyNCEwACQoOSsqILXpSH4kvcG3ygrRxjJ6WirRWJuGSAW22whXxO1VY6KHESBCtl uzlSBx1fB6Xh0oOUImw5LzCR+igjwlsT8LpSkn6FQhtjg3WAPF7TG0dWEcQqzwUW5SEmA+C8t7s2q avKYO4Xj6zIz26adh+1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ec9fh-0000rr-00; Thu, 18 Jan 2018 12:51:57 +0000 Received: from arrakis.dune.hu ([78.24.191.176]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ec9ez-0008CW-Dt for lede-dev@lists.infradead.org; Thu, 18 Jan 2018 12:51:17 +0000 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id B1F12B9146C; Thu, 18 Jan 2018 13:50:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.1 Received: from localhost.localdomain (unknown [213.197.76.1]) by arrakis.dune.hu (Postfix) with ESMTPSA; Thu, 18 Jan 2018 13:50:51 +0100 (CET) From: Gabor Juhos To: lede-dev@lists.infradead.org Date: Thu, 18 Jan 2018 13:50:32 +0100 Message-Id: <20180118125032.7097-5-juhosg@freemail.hu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180118125032.7097-1-juhosg@freemail.hu> References: <20180118125032.7097-1-juhosg@freemail.hu> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [78.24.191.176 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (juhosg[at]freemail.hu) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 4/4] ar71xx: add support for the MikroTik RB911-2Hn/5Hn boards X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gabor Juhos MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The patch adds support for the MikroTik RB911-2Hn (911 Lite2) and the RB911-5Hn (911 Lite5) boards: https://mikrotik.com/product/RB911-2Hn https://mikrotik.com/product/RB911-5Hn The two boards are using the same hardware design, the only difference between the two is the supported wireless band. Specifications: * SoC: Atheros AR9344 (600MHz) * RAM: 64MiB * Storage: 16 MiB SPI NOR flash * Ethernet: 1x100M (Passive PoE in) * Wireless: AR9344 built-in wireless MAC, single chain 802.11b/g/n (911-2Hn) or 802.11a/g/n (911-5Hn) Notes: * Older versions of these boards might be equipped with a NAND flash chip instead of the SPI NOR device. Those boards are not supported (yet). * The MikroTik RB911-5HnD (911 Lite5 Dual) board also uses the same hardware. Support for that can be added later with little effort probably. Installation: 1. Setup a DHCP/BOOTP Server with the following parameters: * DHCP-Option 66 (TFTP server name): pointing to a local TFTP server within the same subnet of the DHCP range * DHCP-Option 67 (Bootfile-Name): matching the initramfs filename of the to be booted image. The usable intramfs files are: - openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf - openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf - openwrt-ar71xx-mikrotik-rb-nor-flash-16M-initramfs-kernel.bin 2. Press the reset button on the board and keep that pressed. 3. Connect the board to your local network via its ethernet port. 4. Release the button after the LEDs on the board are turned off. Now the board should load and start the initramfs image from the TFTP server. 5. Upload the sysupgrade image to the board with scp: $ scp openwrt-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/fw.bin 5. Log in to the running system listening on 192.168.1.1 via ssh as root (without password): $ ssh root@192.168.1.1 7. Flash the uploaded firmware file from the ssh session via the sysupgrade command: root@OpenWrt:~# sysupgrade /tmp/fw.bin Signed-off-by: Gabor Juhos --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 4 + .../linux/ar71xx/base-files/etc/board.d/02_network | 2 + target/linux/ar71xx/base-files/etc/diag.sh | 2 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 6 ++ .../ar71xx/base-files/lib/upgrade/platform.sh | 4 + .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 2 + .../ar71xx/files/arch/mips/ath79/mach-rbspi.c | 97 ++++++++++++++++++++++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/mikrotik.mk | 2 +- .../701-MIPS-ath79-add-routerboard-detection.patch | 3 +- .../701-MIPS-ath79-add-routerboard-detection.patch | 3 +- 11 files changed, 123 insertions(+), 3 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 fb1f29dcfa..ecd3723c6a 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -292,6 +292,10 @@ rb-750up-r2) ucidef_set_led_switch "port4" "port3" "rb:green:port4" "switch0" "0x04" ucidef_set_led_switch "port5" "port5" "rb:green:port5" "switch0" "0x02" ;; +rb-911-2hn|\ +rb-911-5hn) + ucidef_set_led_netdev "eth" "ETH" "rb:green:eth" "eth0" + ;; rb-941-2nd) ucidef_set_led_timer "user" "USR/ACT" "rb:green:user" "1000" "1000" ;; diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 5a10a9f486..b0755c44dd 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -93,6 +93,8 @@ ar71xx_setup_interfaces() pqi-air-pen|\ rb-411|\ rb-411u|\ + rb-911-2hn|\ + rb-911-5hn|\ rb-911g-2hpnd|\ rb-911g-5hpacd|\ rb-911g-5hpnd|\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 2720288e3d..4f4a73ce06 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -319,6 +319,8 @@ get_status_led() { rb-750-r2|\ rb-750p-pbr2|\ rb-750up-r2|\ + rb-911-2hn|\ + rb-911-5hn|\ rb-911g-2hpnd|\ rb-911g-5hpacd|\ rb-911g-5hpnd|\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index b6642495de..73bdce5853 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -941,6 +941,12 @@ ar71xx_board_detect() { *"RouterBOARD 751G") name="rb-751g" ;; + *"RouterBOARD 911-2Hn") + name="rb-911-2hn" + ;; + *"RouterBOARD 911-5Hn") + name="rb-911-5hn" + ;; *"RouterBOARD 911G-2HPnD") name="rb-911g-2hpnd" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 3d7b1593e1..1f9ed76fc3 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -660,6 +660,8 @@ platform_check_image() { rb-750-r2|\ rb-750p-pbr2|\ rb-750up-r2|\ + rb-911-2hn|\ + rb-911-5hn|\ rb-941-2nd|\ rb-951ui-2nd|\ rb-952ui-5ac2nd|\ @@ -723,6 +725,8 @@ platform_pre_upgrade() { rb-750-r2|\ rb-750p-pbr2|\ rb-750up-r2|\ + rb-911-2hn|\ + rb-911-5hn|\ rb-941-2nd|\ rb-951ui-2nd|\ rb-952ui-5ac2nd|\ diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index 3ca77550bc..caaaf97792 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -1054,6 +1054,8 @@ config ATH79_MACH_RBSPI select ATH79_ROUTERBOOT help Say 'Y' here if you want your kernel to support the + MikroTik ROuterBOARD 911-2Hn (911 Lite2) + MikroTik ROuterBOARD 911-5Hn (911 Lite5) MikroTik RouterBOARD mAP MikroTik RouterBOARD mAP lite MikroTik RouterBOARD hAP lite 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 25e920f593..f7f3b028f4 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c @@ -3,6 +3,8 @@ * * - MikroTik RouterBOARD mAP 2nD * - MikroTik RouterBOARD mAP L-2nD + * - MikroTik RouterBOARD 911-2Hn (911 Lite2) + * - MikroTik RouterBOARD 911-5Hn (911 Lite5) * - MikroTik RouterBOARD 941L-2nD * - MikroTik RouterBOARD 951Ui-2nD * - MikroTik RouterBOARD 952Ui-5ac2nD @@ -509,6 +511,56 @@ static struct platform_device rbwapgsc_phy_device = { }, }; +/* RB911L GPIOs */ +#define RB911L_GPIO_BTN_RESET 15 +#define RB911L_GPIO_LED_1 13 +#define RB911L_GPIO_LED_2 12 +#define RB911L_GPIO_LED_3 4 +#define RB911L_GPIO_LED_4 21 +#define RB911L_GPIO_LED_5 18 +#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 */ + +static struct gpio_led rb911l_leds[] __initdata = { + { + .name = "rb:green:eth", + .gpio = RB911L_GPIO_LED_ETH, + .active_low = 1, + }, { + .name = "rb:green:led1", + .gpio = RB911L_GPIO_LED_1, + .active_low = 1, + }, { + .name = "rb:green:led2", + .gpio = RB911L_GPIO_LED_2, + .active_low = 1, + }, { + .name = "rb:green:led3", + .gpio = RB911L_GPIO_LED_3, + .active_low = 1, + }, { + .name = "rb:green:led4", + .gpio = RB911L_GPIO_LED_4, + .active_low = 1, + }, { + .name = "rb:green:led5", + .gpio = RB911L_GPIO_LED_5, + .active_low = 1, + }, { + .name = "rb:green:power", + .gpio = RB911L_GPIO_LED_POWER, + .default_state = LEDS_GPIO_DEFSTATE_ON, + .open_drain = 1, + }, { + .name = "rb:green:user", + .gpio = RB911L_GPIO_LED_USER, + .active_low = 1, + .open_drain = 1, + }, +}; + static struct gen_74x164_chip_platform_data rbspi_ssr_data = { .base = RBSPI_SSR_GPIO_BASE, .num_registers = 1, @@ -1015,8 +1067,53 @@ static void __init rbwapgsc_setup(void) rbwapgsc_leds); } +/* + * Setup the 911L hardware (AR9344). + */ +static void __init rb911l_setup(void) +{ + const struct rb_info *info; + + info = rbspi_platform_setup(); + if (!info) + return; + + if (!rb_has_hw_option(info, RB_HW_OPT_NO_NAND)) { + /* + * Old hardware revisions might be equipped with a NAND flash + * chip instead of the 16MiB SPI NOR device. Those boards are + * not supported at the moment, so throw a warning and skip + * the peripheral setup to avoid messing up the data in the + * flash chip. + */ + WARN(1, "The NAND flash on this board is not supported.\n"); + } else { + rbspi_peripherals_setup(0); + } + + ath79_register_mdio(1, 0x0); + + ath79_init_mac(ath79_eth1_data.mac_addr, ath79_mac_base, 0); + + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.speed = SPEED_1000; + ath79_eth1_data.duplex = DUPLEX_FULL; + + ath79_register_eth(1); + + rbspi_wlan_init(0, 1); + + rbspi_register_reset_button(RB911L_GPIO_BTN_RESET); + + /* Make the eth LED controllable by software. */ + ath79_gpio_output_select(RB911L_GPIO_LED_ETH, AR934X_GPIO_OUT_GPIO); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(rb911l_leds), rb911l_leds); +} + 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); MIPS_MACHINE_NONAME(ATH79_MACH_RB_952, "952-hb", rb952_setup); MIPS_MACHINE_NONAME(ATH79_MACH_RB_962, "962", rb962_setup); MIPS_MACHINE_NONAME(ATH79_MACH_RB_750UPR2, "750-hb", rb750upr2_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index a621fe2c90..394be00c99 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -190,6 +190,7 @@ enum ath79_mach_type { ATH79_MACH_RB_750UPR2, /* MikroTik RouterBOARD 750UP r2 */ ATH79_MACH_RB_751, /* MikroTik RouterBOARD 751 */ ATH79_MACH_RB_751G, /* Mikrotik RouterBOARD 751G */ + ATH79_MACH_RB_911L, /* Mikrotik RouterBOARD 911-2Hn/911-5Hn boards */ ATH79_MACH_RB_922GS, /* Mikrotik RouterBOARD 911/922GS boards */ ATH79_MACH_RB_941, /* MikroTik RouterBOARD 941-2nD */ ATH79_MACH_RB_951G, /* Mikrotik RouterBOARD 951G */ diff --git a/target/linux/ar71xx/image/mikrotik.mk b/target/linux/ar71xx/image/mikrotik.mk index 403bcb08b5..f381f85ae2 100644 --- a/target/linux/ar71xx/image/mikrotik.mk +++ b/target/linux/ar71xx/image/mikrotik.mk @@ -40,7 +40,7 @@ define Device/rb-nor-flash-16M LOADER_TYPE := elf KERNEL_INSTALL := 1 KERNEL := kernel-bin | lzma | loader-kernel - SUPPORTED_DEVICES := rb-750-r2 rb-750up-r2 rb-750p-pbr2 rb-941-2nd rb-951ui-2nd rb-952ui-5ac2nd rb-962uigs-5hact2hnt rb-lhg-5nd rb-map-2nd rb-mapl-2nd rb-wap-2nd + SUPPORTED_DEVICES := rb-750-r2 rb-750up-r2 rb-750p-pbr2 rb-911-2hn rb-911-5hn rb-941-2nd rb-951ui-2nd rb-952ui-5ac2nd rb-962uigs-5hact2hnt rb-lhg-5nd rb-map-2nd rb-mapl-2nd rb-wap-2nd IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | pad-to $$$$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) endef diff --git a/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch b/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch index 625bb19ba5..64c7e881a7 100644 --- a/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch +++ b/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/prom.c +++ b/arch/mips/ath79/prom.c -@@ -136,6 +136,30 @@ void __init prom_init(void) +@@ -136,6 +136,31 @@ void __init prom_init(void) initrd_end = initrd_start + fw_getenvl("initrd_size"); } #endif @@ -26,6 +26,7 @@ + strstr(arcs_cmdline, "board=2011L") || + strstr(arcs_cmdline, "board=2011r") || + strstr(arcs_cmdline, "board=711Gr100") || ++ strstr(arcs_cmdline, "board=911L") || + strstr(arcs_cmdline, "board=922gs")) + ath79_prom_append_cmdline("console", "ttyS0,115200"); } diff --git a/target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch b/target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch index 625bb19ba5..64c7e881a7 100644 --- a/target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch +++ b/target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/prom.c +++ b/arch/mips/ath79/prom.c -@@ -136,6 +136,30 @@ void __init prom_init(void) +@@ -136,6 +136,31 @@ void __init prom_init(void) initrd_end = initrd_start + fw_getenvl("initrd_size"); } #endif @@ -26,6 +26,7 @@ + strstr(arcs_cmdline, "board=2011L") || + strstr(arcs_cmdline, "board=2011r") || + strstr(arcs_cmdline, "board=711Gr100") || ++ strstr(arcs_cmdline, "board=911L") || + strstr(arcs_cmdline, "board=922gs")) + ath79_prom_append_cmdline("console", "ttyS0,115200"); }