From patchwork Fri Jan 7 03:51:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12706178 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAE4FC433FE for ; Fri, 7 Jan 2022 03:52:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231169AbiAGDwF (ORCPT ); Thu, 6 Jan 2022 22:52:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230527AbiAGDwF (ORCPT ); Thu, 6 Jan 2022 22:52:05 -0500 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06EB6C0611FD; Thu, 6 Jan 2022 19:52:05 -0800 (PST) Received: by mail-pg1-x531.google.com with SMTP id i30so4392422pgl.0; Thu, 06 Jan 2022 19:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VV2PQ7PmQhWzfQWCU4GSl8RsFiXS5v11ANHvanOzj28=; b=iNHuZh13Y7Zymb9vn8Bmeklqg1VbkDF23eULhbAN+956ElilZviAAE47gg5fq8/Hty C7yIhGaL3+orDLFH8i8Q76Qqw3/bt2BA524wMceBA2lYsgPy0B0S86Bw/jaQBE8qt6hO b5PUcSS6zokWWSJ8iE/Z3E05iI8zcHHIkXBHyGRgJQ+5EDwx/uQl8qAKhYnz1nO7/jC/ k8tqxKWPpUVzFqxQNWyjQG08LRPsSb/bz49G4ydKMirgr3RqTY2xDwG81yGf29wMuiig ikFImnjiZHAm7bgqkyx4oDaO2MSUgm9o1TXSml148ZjoifCsNbQuho2jRaK48si2ve1+ 4/6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VV2PQ7PmQhWzfQWCU4GSl8RsFiXS5v11ANHvanOzj28=; b=5Rl9kFteHMCoit3/37Vcb1b2PT6c1FQA/LWzPSroQR68CO8nnH0qbyAAQqhp63p3tC SP4s1PGkCGzpNRx1MUTayfNDIXCWEA+f7xBXOTQbY7a9TEJ2B7HkbmgrMYpu7u/vGYCk hwE+DhU6SwNLK0dk65lLdRNWjwEwMHlxct1snohzy5lhsZeid2XUs5sBpUXEgbAPjGY8 dhsCo2UQ24mT5eTsQToRTM0+BSF/DYPeyDSb4q+Yx8yxTzi16/m1agGW6pRTrk2a/AcU QbKxyV4xlu29MoZrZ518GXWJWZqB9zfXdHR4nV5xaUQjyXj2pMzYOb2Nc/D/vI67AIna i15Q== X-Gm-Message-State: AOAM532yb9g+OReQHa8rpKGIhDAYVE0Ybk2152MZsAzpKTdRe8i/eNcP dztWyFBQbNa50J2j9qT7HUVJgmn8hzw= X-Google-Smtp-Source: ABdhPJyWrtz4GWY+YXc9qqtXQWtNeHVRwCHJKUO6zxAp028ponY7PqM2Qp1eiIZm5+bUPfjTeFAQiw== X-Received: by 2002:a63:6dc8:: with SMTP id i191mr55568349pgc.34.1641527524263; Thu, 06 Jan 2022 19:52:04 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id j16sm4043855pfj.16.2022.01.06.19.52.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 19:52:03 -0800 (PST) From: Florian Fainelli To: linux-mips@vger.kernel.org Cc: Florian Fainelli , Hauke Mehrtens , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Thomas Bogendoerfer , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/5] MIPS: BCM47XX: Define Linksys WRT310N V2 buttons Date: Thu, 6 Jan 2022 19:51:37 -0800 Message-Id: <20220107035141.2325384-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220107035141.2325384-1-f.fainelli@gmail.com> References: <20220107035141.2325384-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Update the buttons registration code to register the two buttons (WPS, system rester) using the existing BCM47XX_BOARD_LINKSYS_WRT310NV2 board entry. Signed-off-by: Florian Fainelli --- arch/mips/bcm47xx/buttons.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c index 535d84addcdb..9e7ecc585d59 100644 --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c @@ -276,6 +276,12 @@ bcm47xx_buttons_linksys_wrt310nv1[] __initconst = { BCM47XX_GPIO_KEY(8, KEY_UNKNOWN), }; +static const struct gpio_keys_button +bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = { + BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON), + BCM47XX_GPIO_KEY(6, KEY_RESTART), +}; + static const struct gpio_keys_button bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = { BCM47XX_GPIO_KEY(5, KEY_WIMAX), @@ -608,6 +614,9 @@ int __init bcm47xx_buttons_register(void) case BCM47XX_BOARD_LINKSYS_WRT310NV1: err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1); break; + case BCM47XX_BOARD_LINKSYS_WRT310NV2: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2); + break; case BCM47XX_BOARD_LINKSYS_WRT54G3GV2: err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2); break; From patchwork Fri Jan 7 03:51:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12706179 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C389FC433F5 for ; Fri, 7 Jan 2022 03:52:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229698AbiAGDwH (ORCPT ); Thu, 6 Jan 2022 22:52:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231153AbiAGDwG (ORCPT ); Thu, 6 Jan 2022 22:52:06 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 423EBC061245; Thu, 6 Jan 2022 19:52:06 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id 8so4338276pgc.10; Thu, 06 Jan 2022 19:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ys1A3HofKEhlRvWsZyRKeSFGsAvmpbUdt2u0ZRIt6K4=; b=S2oJhRzWvyjJlf26HhTSzAs1s/WlWJ6pAdEsAXH0AdW13w2vC+PZLUoxy1c2JepK/z 07A45S1edwep4mRVedLrJuT8vffz6bfeO4Nq5fmYlfGAh6S9kymxxkuwF3x6ujiglufW OK/x+yB9GlatNcYzay+d5nQUfjR2UHf+fdXBKlRM0eFzWnEkVA0TFcVQmABJac+T2rs6 +1Et7xddE/xvShnsGVNJiKIwVNlWurJlxoiKiXX44RpCGFkwg3KWiPiTZXAn7h3HIsSD tDS3Csxmyjx4lDDB2+HUaSXqksTOAjvR02xA6pzFnAvQad/FsJguTAvD9vuxUF/ITkUP aS8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ys1A3HofKEhlRvWsZyRKeSFGsAvmpbUdt2u0ZRIt6K4=; b=RC9sT0T7rTWaP3v5ms0JUDg833HP2zKMVZtltHCKGPTQa6qyMDyDJWJiCA0txeP0oB F/wxX8yGRB+Wa7SblP+amER+crZ7FmD9CEsaukaElc5lNOG2/1r/fxniTfhndFaNmHsn NOz/2RiI6IkcU69Bn6bpTAEncTFMnVTTvSxVTO/fuwg32EJUy80cf2OpzuhvsFKQSnIy W9biovL21a+RERFRgoouUMinQpSMQFEnk5POvZpQZCgLBXyX3DhOcBEQmDix2z6clLpu 4NIxI+3XJ3Y6MkkQWGqkZ5j9gtmgo4pqDPjp94tZrK6NZFe70aYPzO/K1HYU5U2UGTNg jPRA== X-Gm-Message-State: AOAM5322BZ84gZlrQFV/abTgK0I0mcEq3WfeVkL8yG1Can89UF6S/1m4 3M4yuim4MFhbnH29UXG6lUriagsFxUA= X-Google-Smtp-Source: ABdhPJyMvh/0Kr6Hq2kpwbHDrPq03KIzS9Lvu3aoHtw0mrC2VDV/1VilDLd3aabuNvUYX3aeKpXAaQ== X-Received: by 2002:a63:580d:: with SMTP id m13mr55177214pgb.298.1641527525456; Thu, 06 Jan 2022 19:52:05 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id j16sm4043855pfj.16.2022.01.06.19.52.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 19:52:05 -0800 (PST) From: Florian Fainelli To: linux-mips@vger.kernel.org Cc: Florian Fainelli , Hauke Mehrtens , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Thomas Bogendoerfer , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/5] MIPS: BCM47XX: Add board entry for Linksys WRT320N v1 Date: Thu, 6 Jan 2022 19:51:38 -0800 Message-Id: <20220107035141.2325384-3-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220107035141.2325384-1-f.fainelli@gmail.com> References: <20220107035141.2325384-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org This router is based on a Broadcom BCM4717A1 chipset and supports 802.11n Wi-Fi. Add a board entry for that router and register LEDs and buttons accordingly. Signed-off-by: Florian Fainelli --- arch/mips/bcm47xx/board.c | 1 + arch/mips/bcm47xx/buttons.c | 9 +++++++++ arch/mips/bcm47xx/leds.c | 10 ++++++++++ arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 + 4 files changed, 21 insertions(+) diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c index 35266a70e22a..d9148c66e0e7 100644 --- a/arch/mips/bcm47xx/board.c +++ b/arch/mips/bcm47xx/board.c @@ -141,6 +141,7 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_boot_hw[] __initconst = { {{BCM47XX_BOARD_LINKSYS_WRT300NV11, "Linksys WRT300N V1.1"}, "WRT300N", "1.1"}, {{BCM47XX_BOARD_LINKSYS_WRT310NV1, "Linksys WRT310N V1"}, "WRT310N", "1.0"}, {{BCM47XX_BOARD_LINKSYS_WRT310NV2, "Linksys WRT310N V2"}, "WRT310N", "2.0"}, + {{BCM47XX_BOARD_LINKSYS_WRT320N_V1, "Linksys WRT320N V1"}, "WRT320N", "1.0"}, {{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"}, {{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"}, {{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"}, diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c index 9e7ecc585d59..25b4cc3aecd2 100644 --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c @@ -282,6 +282,12 @@ bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = { BCM47XX_GPIO_KEY(6, KEY_RESTART), }; +static const struct gpio_keys_button +bcm47xx_buttons_linksys_wrt320n_v1[] __initconst = { + BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON), + BCM47XX_GPIO_KEY(8, KEY_RESTART), +}; + static const struct gpio_keys_button bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = { BCM47XX_GPIO_KEY(5, KEY_WIMAX), @@ -617,6 +623,9 @@ int __init bcm47xx_buttons_register(void) case BCM47XX_BOARD_LINKSYS_WRT310NV2: err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2); break; + case BCM47XX_BOARD_LINKSYS_WRT320N_V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1); + break; case BCM47XX_BOARD_LINKSYS_WRT54G3GV2: err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2); break; diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c index 167c42c71e79..649bb03c9bb7 100644 --- a/arch/mips/bcm47xx/leds.c +++ b/arch/mips/bcm47xx/leds.c @@ -313,6 +313,13 @@ bcm47xx_leds_linksys_wrt310nv1[] __initconst = { BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), }; +static const struct gpio_led +bcm47xx_leds_linksys_wrt320n_v1[] __initconst = { + BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), + BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON), + BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), +}; + static const struct gpio_led bcm47xx_leds_linksys_wrt54g_generic[] __initconst = { BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), @@ -689,6 +696,9 @@ void __init bcm47xx_leds_register(void) case BCM47XX_BOARD_LINKSYS_WRT310NV1: bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1); break; + case BCM47XX_BOARD_LINKSYS_WRT320N_V1: + bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1); + break; case BCM47XX_BOARD_LINKSYS_WRT54G3GV2: bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2); break; diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h index f879be3e8099..73e8809600b0 100644 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h @@ -72,6 +72,7 @@ enum bcm47xx_board { BCM47XX_BOARD_LINKSYS_WRT300NV11, BCM47XX_BOARD_LINKSYS_WRT310NV1, BCM47XX_BOARD_LINKSYS_WRT310NV2, + BCM47XX_BOARD_LINKSYS_WRT320N_V1, BCM47XX_BOARD_LINKSYS_WRT54G3GV2, BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101, BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467, From patchwork Fri Jan 7 03:51:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12706180 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD501C433FE for ; Fri, 7 Jan 2022 03:52:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345910AbiAGDwI (ORCPT ); Thu, 6 Jan 2022 22:52:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233174AbiAGDwH (ORCPT ); Thu, 6 Jan 2022 22:52:07 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7540AC061201; Thu, 6 Jan 2022 19:52:07 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id g22so4368087pgn.1; Thu, 06 Jan 2022 19:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0aaNkARm8yVoibthEL3g0zapfb1DplmTNyxjJZYBl+w=; b=bbBrb9Rl01kNOpmugVoctDUHccQFS8Z6MklpLAI70CMXtfZPxbDrAcXmgRAJdIgfc4 3e9+qdV9yRvDw00jq0ZHKfUvo025vUef/P1xX1rEMTNRlGgw1QKdoIwaB4oyZvYgbkzP oSVz7KisFvQ6qOkF7H5peMaXHbAmjZUwAYh6OKDvJ7+rWH/ZkoRwMK4CWKDojApaGuFc SHTE2b0++MSwbIrGdIlUTsA3zQadl2rIcBw+4pTsK1+5KWpLKRQwQ640Vs2mUFEIq1ZJ UD9ihH5Qm4XpygVoa21EYmI86xfh5s+XFE/fGmqdFI35hv13POnzc7xfmEWpi4JKwt0q KvYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0aaNkARm8yVoibthEL3g0zapfb1DplmTNyxjJZYBl+w=; b=mxIDgSy+v3t11y5fbzuLHXmAX75EXWW5Ag++ADnbmStY2SJa3YeAvFzojAbmlrcD3Q dmsRsmhORo18Pq0wXcLLD7vNkhP3lR8HqGmYFo7UpV9w2uxE4fuAT76P1KNVE454wEn0 itjVHwUu0ipLm0AeMJZrTw6XABvFHckREI7Wx77UY0Jgslstk/mgtaXEZi9Iqcvtp0J0 n7M//EHLmeRdRawvuSElSFUSvQOir8kG/Gj8luczL7vJNU7DZWaaKDKVPiBGNvErAzfj 8SPeUCupxcxiQRhl/GZfRfgbknxG/1V50m2o2QAJ/Z07k5l68lYufX2KX0UEFo597+PW 0ibA== X-Gm-Message-State: AOAM5319o6XRVL4xj5tTZkLgak8ZsG2k9edERMLQQa2ev9bo5LPhk1jb OoI3SaDn3+uSjRu8wIzLIfHEuEbGyBc= X-Google-Smtp-Source: ABdhPJxRA2ddTKiPyxXWgFBqmFER+q1TMA8fKW/ESdK3+aSIBaOsc/mYE+a/mrnehY/VuG3NlA7EPA== X-Received: by 2002:a62:80c2:0:b0:4bb:47a:6983 with SMTP id j185-20020a6280c2000000b004bb047a6983mr63655013pfd.24.1641527526654; Thu, 06 Jan 2022 19:52:06 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id j16sm4043855pfj.16.2022.01.06.19.52.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 19:52:06 -0800 (PST) From: Florian Fainelli To: linux-mips@vger.kernel.org Cc: Florian Fainelli , Hauke Mehrtens , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Thomas Bogendoerfer , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 3/5] MIPS: BCM47XX: Add LEDs and buttons for Asus RTN-10U Date: Thu, 6 Jan 2022 19:51:39 -0800 Message-Id: <20220107035141.2325384-4-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220107035141.2325384-1-f.fainelli@gmail.com> References: <20220107035141.2325384-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Add the definitions for the buttons and LEDs used on the Asus RTN-10U router. Signed-off-by: Florian Fainelli --- arch/mips/bcm47xx/buttons.c | 9 +++++++++ arch/mips/bcm47xx/leds.c | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c index 25b4cc3aecd2..baf0a7d58d27 100644 --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c @@ -26,6 +26,12 @@ /* Asus */ +static const struct gpio_keys_button +bcm47xx_buttons_asus_rtn10u[] __initconst = { + BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON), + BCM47XX_GPIO_KEY(21, KEY_RESTART), +}; + static const struct gpio_keys_button bcm47xx_buttons_asus_rtn12[] __initconst = { BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON), @@ -490,6 +496,9 @@ int __init bcm47xx_buttons_register(void) int err; switch (board) { + case BCM47XX_BOARD_ASUS_RTN10U: + err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u); + break; case BCM47XX_BOARD_ASUS_RTN12: err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12); break; diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c index 649bb03c9bb7..4648a302a3c0 100644 --- a/arch/mips/bcm47xx/leds.c +++ b/arch/mips/bcm47xx/leds.c @@ -29,6 +29,14 @@ /* Asus */ +static const struct gpio_led +bcm47xx_leds_asus_rtn10u[] __initconst = { + BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), + BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON), + BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), + BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), +}; + static const struct gpio_led bcm47xx_leds_asus_rtn12[] __initconst = { BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), @@ -563,6 +571,9 @@ void __init bcm47xx_leds_register(void) enum bcm47xx_board board = bcm47xx_board_get(); switch (board) { + case BCM47XX_BOARD_ASUS_RTN10U: + bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u); + break; case BCM47XX_BOARD_ASUS_RTN12: bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12); break; From patchwork Fri Jan 7 03:51:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12706181 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDC09C433FE for ; Fri, 7 Jan 2022 03:52:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345929AbiAGDwL (ORCPT ); Thu, 6 Jan 2022 22:52:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230527AbiAGDwJ (ORCPT ); Thu, 6 Jan 2022 22:52:09 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1AD9C0611FF; Thu, 6 Jan 2022 19:52:08 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id s1so4362160pga.5; Thu, 06 Jan 2022 19:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bLSoIymaWywWpg+rlWS6uJiYTyIdtugwWHOa7gaHZDM=; b=EYDlQwsH8KzlYVUpvuaHHAKitKcdC+0b0KV8Bqc5oHyF7tQOjXM5DO2qJqwRUl7l02 iwyRB9UNAmHxhPMIuJrHoQPtvNcyQKJnbLtqgDRaxvOfeJh2gAXcMRlQtIfDeAgTn5hw ab10B+WoFynuIp1HUVmYy+g3yRe0m/myF/3ag1oLI5jXgPpMTcG9/47wLLVGEL0+6Ciq Paxx/EvTIVaIJeJ585JCGEsvqnc4rjyZZ3Pas0C2Z1mfBuy2WDUn90vOzFHj7gK3Wnrg vrIzOsx8b0tdM8me4Aa5gnhErKGO3isXKUXUg/FiUxAURszNUaw2fRCNt3fMOl1uU40D HB/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bLSoIymaWywWpg+rlWS6uJiYTyIdtugwWHOa7gaHZDM=; b=7qQnYSLlC5360TzUw5AbWFnF4UKrQ3rpXqCsy9dXoW1QYsuU/xzgWhmsglu+3KH/XW ZFC6ovzfGfPtsx5oIobG5PqIjbgOIvFluJYZSTQjvzLz7Es/0zoIDf/8lVR9l1MEXMuu SiSdPIVKGRqxPFhVhz4Q3tErxn7eMwUqZaT6UmLxolVbNHi4O6Bd4GTwnQf7I6D0CRFA j59ktq9YCnZe8PRQ9YhSdcXTaVRi6ggn6+kcWu4dIBL5y1TxQGmJ5cgbaQc0q88F610m 5xOwt4EjwU+P4FiqPCF1ccx+801fq9SM3ptrGegjwqFGV+SHcVfwMVrIRe/G9LEIO3AL Lr5Q== X-Gm-Message-State: AOAM533eIrldjVOMZo9nZXtQblJMkLc+UeKV8mp98iBjavSaA5IwJ+Sq aoKRXxkRsMWdcmVulJSgSABSS2jaDTQ= X-Google-Smtp-Source: ABdhPJzX+Onh/IMxOzEfyhzX7C6p/5aaLKHWj5+G82jeUBpJ5iYa788bGG6lf0/j/PL3mZUBBQnl0Q== X-Received: by 2002:aa7:9904:0:b0:4ba:5abb:aaf9 with SMTP id z4-20020aa79904000000b004ba5abbaaf9mr62062566pff.16.1641527527863; Thu, 06 Jan 2022 19:52:07 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id j16sm4043855pfj.16.2022.01.06.19.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 19:52:07 -0800 (PST) From: Florian Fainelli To: linux-mips@vger.kernel.org Cc: Florian Fainelli , Hauke Mehrtens , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Thomas Bogendoerfer , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 4/5] MIPS: BCM47XX: Add support for Netgear R6300 v1 Date: Thu, 6 Jan 2022 19:51:40 -0800 Message-Id: <20220107035141.2325384-5-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220107035141.2325384-1-f.fainelli@gmail.com> References: <20220107035141.2325384-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Add support for the Netgear R6300 v1 Wi-Fi router using a Broadcom BCM4706 chipset and supporting 802.11n and 802.11ac. Signed-off-by: Florian Fainelli --- arch/mips/bcm47xx/board.c | 1 + arch/mips/bcm47xx/buttons.c | 8 ++++++++ arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 + 3 files changed, 10 insertions(+) diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c index d9148c66e0e7..f87b14c73f3c 100644 --- a/arch/mips/bcm47xx/board.c +++ b/arch/mips/bcm47xx/board.c @@ -162,6 +162,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = { {{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"}, {{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"}, {{BCM47XX_BOARD_NETGEAR_R6200_V1, "Netgear R6200 V1"}, "U12H192T00_NETGEAR"}, + {{BCM47XX_BOARD_NETGEAR_R6300_V1, "Netgear R6300 V1"}, "U12H218T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"}, diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c index baf0a7d58d27..e380baef2458 100644 --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c @@ -409,6 +409,11 @@ bcm47xx_buttons_netgear_r6200_v1[] __initconst = { BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON), }; +static const struct gpio_keys_button +bcm47xx_buttons_netgear_r6300_v1[] __initconst = { + BCM47XX_GPIO_KEY(6, KEY_RESTART), +}; + static const struct gpio_keys_button bcm47xx_buttons_netgear_wndr3400v1[] __initconst = { BCM47XX_GPIO_KEY(4, KEY_RESTART), @@ -701,6 +706,9 @@ int __init bcm47xx_buttons_register(void) case BCM47XX_BOARD_NETGEAR_R6200_V1: err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1); break; + case BCM47XX_BOARD_NETGEAR_R6300_V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1); + break; case BCM47XX_BOARD_NETGEAR_WNDR3400V1: err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1); break; diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h index 73e8809600b0..721c65312b19 100644 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h @@ -100,6 +100,7 @@ enum bcm47xx_board { BCM47XX_BOARD_MOTOROLA_WR850GV2V3, BCM47XX_BOARD_NETGEAR_R6200_V1, + BCM47XX_BOARD_NETGEAR_R6300_V1, BCM47XX_BOARD_NETGEAR_WGR614V8, BCM47XX_BOARD_NETGEAR_WGR614V9, BCM47XX_BOARD_NETGEAR_WGR614_V10, From patchwork Fri Jan 7 03:51:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12706182 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E5AEC433EF for ; Fri, 7 Jan 2022 03:52:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345940AbiAGDwM (ORCPT ); Thu, 6 Jan 2022 22:52:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345931AbiAGDwK (ORCPT ); Thu, 6 Jan 2022 22:52:10 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAD31C061245; Thu, 6 Jan 2022 19:52:09 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id y9so4336820pgr.11; Thu, 06 Jan 2022 19:52:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zYcqEoQI29hMWYZqyQy1OtQsjoVbbA0r88mZGlgKY4A=; b=Qa0LlzaN7jijteHr/SGTUhu71JV6fo73vqA+B3N6T4s0E2+9RiqigpMPjESlBAQOv6 Nv0hdcC8ejTZdiBw/h/1bPNHPWPFRme69RAYymYDQqotxenTo35S3NTnpx0o8r807iMr Z2lTTllz/qDmCjMgxbrZFmNuAmyeaBIArbspYIFt/wtb/ZQHKxNJQejpt0j/wCDfgMEz s7jTRSzbs/3ha/oVR33M6bCqB7qZFHnyKRRGW4EMtA3BT5ZiLgqwb0+Znbz7BT/J5M8U y8uQIyiBlSjNkOzJ0EwHAhBcQExKv3AOMFEVAetO0GiUeyZv1EIZ88p7KApr12kVf/yN Z00g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zYcqEoQI29hMWYZqyQy1OtQsjoVbbA0r88mZGlgKY4A=; b=ZcQDmTY4jOrdhQc0CdNF6yainHjP89xgvdDY274Mcvg7MDMFlh4O+XcPtTWh2+jmLH Z8ugPy2w40EF5QjaFrEdqIJgUHRfgsKzpxSO0z5JPUU3QsbPfNOhIlF4+p9/HPBX8vQF FX/wrQX0hYiGoHx788XWn//kbkhAXhIfsmggTvfLMzkrv/ic8SMr1zX9Gy21wgObmf+E 4jyrJJ6VWNpA4yXGuTlNPNGTzzwyY1XOuEsjOSN8i3WNj4oU8Hh3SYihm280n7Iq+lHN joxNIeanHBhGDXx7TcpdcZ8e34xdM2DLtpObxGmfiaoxPFAbQI2kFZTtg1detCLT6dSV ydnQ== X-Gm-Message-State: AOAM532s/l3fn6kEhfJIdAGUxK1mEl5Xqryc0RGtbRXYyZBpZprJBya2 RhoVGseshW+lavRhxmV/h8BdROqBLHs= X-Google-Smtp-Source: ABdhPJxGYbGeHW+Gc7dBjAgSOuinoqAyhaSqHIkvQhHwsLiqnp3Z1xdnS/6dU01E/mODwUi0MiJ1rA== X-Received: by 2002:a62:7bcc:0:b0:4bc:e13e:b484 with SMTP id w195-20020a627bcc000000b004bce13eb484mr9607751pfc.53.1641527529063; Thu, 06 Jan 2022 19:52:09 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id j16sm4043855pfj.16.2022.01.06.19.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 19:52:08 -0800 (PST) From: Florian Fainelli To: linux-mips@vger.kernel.org Cc: Florian Fainelli , Hauke Mehrtens , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Thomas Bogendoerfer , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 5/5] MIPS: BCM47XX: Add support for Netgear WN2500RP v1 & v2 Date: Thu, 6 Jan 2022 19:51:41 -0800 Message-Id: <20220107035141.2325384-6-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220107035141.2325384-1-f.fainelli@gmail.com> References: <20220107035141.2325384-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Add support for the Netgear WN2500 RP v1 and v2 Wi-Fi range extenders based on the BCM5357 chipset and supporting 802.11n and 802.11ac. Signed-off-by: Florian Fainelli --- arch/mips/bcm47xx/board.c | 2 ++ arch/mips/bcm47xx/buttons.c | 9 +++++++++ arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 2 ++ 3 files changed, 13 insertions(+) diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c index f87b14c73f3c..012cf1c5e911 100644 --- a/arch/mips/bcm47xx/board.c +++ b/arch/mips/bcm47xx/board.c @@ -166,6 +166,8 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = { {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"}, + {{BCM47XX_BOARD_NETGEAR_WN2500RP_V1, "Netgear WN2500RP V1"}, "U12H197T00_NETGEAR"}, + {{BCM47XX_BOARD_NETGEAR_WN2500RP_V2, "Netgear WN2500RP V2"}, "U12H294T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"}, diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c index e380baef2458..36f0b1aafaa2 100644 --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c @@ -414,6 +414,12 @@ bcm47xx_buttons_netgear_r6300_v1[] __initconst = { BCM47XX_GPIO_KEY(6, KEY_RESTART), }; +static const struct gpio_keys_button +bcm47xx_buttons_netgear_wn2500rp_v1[] __initconst = { + BCM47XX_GPIO_KEY(12, KEY_RESTART), + BCM47XX_GPIO_KEY(31, KEY_WPS_BUTTON), +}; + static const struct gpio_keys_button bcm47xx_buttons_netgear_wndr3400v1[] __initconst = { BCM47XX_GPIO_KEY(4, KEY_RESTART), @@ -709,6 +715,9 @@ int __init bcm47xx_buttons_register(void) case BCM47XX_BOARD_NETGEAR_R6300_V1: err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1); break; + case BCM47XX_BOARD_NETGEAR_WN2500RP_V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wn2500rp_v1); + break; case BCM47XX_BOARD_NETGEAR_WNDR3400V1: err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1); break; diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h index 721c65312b19..6583639fe760 100644 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h @@ -104,6 +104,8 @@ enum bcm47xx_board { BCM47XX_BOARD_NETGEAR_WGR614V8, BCM47XX_BOARD_NETGEAR_WGR614V9, BCM47XX_BOARD_NETGEAR_WGR614_V10, + BCM47XX_BOARD_NETGEAR_WN2500RP_V1, + BCM47XX_BOARD_NETGEAR_WN2500RP_V2, BCM47XX_BOARD_NETGEAR_WNDR3300, BCM47XX_BOARD_NETGEAR_WNDR3400V1, BCM47XX_BOARD_NETGEAR_WNDR3400V2,