From patchwork Sun Feb 26 06:17:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 1748064 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=bSlfvl6W; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=M4fWOaLo; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PPYTF4GQtz2466 for ; Sun, 26 Feb 2023 17:22:39 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=PQmUm4BTiMH+k02veY+7ey7XCMBHYvDhc1AEX+0md4c=; b=bSlfvl6W6D6FJ2 d7AxKMf3XtK4sQrEPR/dtMSNxN/JwyLxYEued+OoC6r8+kestCKI41pFtvrzxVG51CcQEzgHfzyMX KRCq3cP2OEpc9D5WRE01lSa0Wr2WddFhOblsEknZ0M2+J1M/efU+EI1yEbhgSOZZu5YFl5dFIFJg9 7yciHLEs4gsvZQSBmR6DEcY4VJnuUoeW7gpQzrCQ409JWA1Jpmta4qzYPf8SFNJ139lF/3CRvJaaf O+4UCQgZhi0W46hShEp1bOCZV1AeVaiNnwpt+LW9xCbwOu6/VUSSZ9hI6FsdNHobTm9WzgjHE77gN 74ojQLtiH33mjN8Pcc0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWAMR-006tO8-GC; Sun, 26 Feb 2023 06:18:15 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWAML-006tNY-FN for openwrt-devel@lists.openwrt.org; Sun, 26 Feb 2023 06:18:10 +0000 Received: by mail-pl1-x631.google.com with SMTP id i5so1952623pla.2 for ; Sat, 25 Feb 2023 22:18:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3R2MQs9I5ZKbebXxPmldzOJdvvDT1njoY1AZ9o5sUYo=; b=M4fWOaLodaIRZgtVKoJl7+i1WKev1IMUlO1eSZjJzDgoTc7SGyboIBk/StowrP6wuA XPfVIYVwxsqqqsmA4LTPQoZ2+H8d3MQ/t8wjzUKGbyld1NfTYSJWVP0qqj3RE3FjJ/2n IPW0F7IV11EAUujx8IdhE8SMGaQjonV0WVZjihhGlz12MGxNLB1XBKzrZax0TNARmQsu jz1XVCWDPtyAuVtmDKB4M3a0DL9JhvtzHT9UK7+bRWlKuESDDSUN3jeGEa85HbUZ5oWL 6trJn1sLKmzSWGyRVFU1nBFgmCk9u+ulbr9OwA1PupSyKS/zHJcIwv+qbtN4/aao2Gvl NAxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3R2MQs9I5ZKbebXxPmldzOJdvvDT1njoY1AZ9o5sUYo=; b=GgrcmLoLKonH8VSmsVaUZxQ7C9SLKH5C9zT8uDa4hdx+UhwDt0Wo9xavAsIsftZC26 Lr6yNZhf68m94YHrAaFd5V4PPpQmnWZtgRWicjBsBlsc+Q9mN2cpDcGdMUO1EAt8XaaU CiVY4JhGVVk+LT3F74vAl8dVeKVuDw3FIg3/DmFTPPpgIRxjnMXjiUd4cnM2ZOIwb6aS dz6rXMqEiAAB3c6fCAPfm4F9ikNObuutDgLj5HphPhES2q7aIxa14H6kQ9VHwFa35gXw t0qBJFSRKc7dxBedWzo6bBf1xFzciel97k+btAe9TaAwMu60A4OE+c2TWc5LxOHoDUt7 J/vA== X-Gm-Message-State: AO0yUKWE0ymf72s+1bxnGcR0BZBzvOo6/SAk17dGD2PG+gi2xTtJnAnW X4Rts90zp6/uQgevUnD4nzj6Faqk8i8= X-Google-Smtp-Source: AK7set+7nFOgXBdzP2vDhGRyIm6mCMBt6UPo0cfci2ran6r1j8JULvjv8h8F9YsWi+YJB4p9yfYNyQ== X-Received: by 2002:a05:6a21:3399:b0:cd:2952:7b69 with SMTP id yy25-20020a056a21339900b000cd29527b69mr533853pzb.52.1677392287262; Sat, 25 Feb 2023 22:18:07 -0800 (PST) Received: from localhost ([2600:1700:38c1:1d7f:f66d:4ff:fe3c:3ceb]) by smtp.gmail.com with ESMTPSA id i2-20020aa79082000000b005a8c60ce93bsm2020458pfa.149.2023.02.25.22.18.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Feb 2023 22:18:06 -0800 (PST) From: Brian Norris To: openwrt-devel@lists.openwrt.org Cc: Alan Luck , Brian Norris Subject: [PATCH] ipq806x: Add buttons to OnHub Date: Sat, 25 Feb 2023 22:17:37 -0800 Message-Id: <20230226061737.891704-1-computersforpeace@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230225_221809_579951_DBCDD01B X-CRM114-Status: GOOD ( 10.04 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Alan Luck These are the factory reset button (external) and "developer mode" button (hidden inside the case (ASUS) or under a screw in the base (TP-Link)) found on the TP-Link and ASUS OnHub devices. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:631 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [computersforpeace[at]gmail.com] -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 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List 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 From: Alan Luck These are the factory reset button (external) and "developer mode" button (hidden inside the case (ASUS) or under a screw in the base (TP-Link)) found on the TP-Link and ASUS OnHub devices. Signed-off-by: Alan Luck [Brian: add description; factor out for both ASUS and TP-Link; use existing pinmux definitions; add keycode for dev button] Signed-off-by: Brian Norris --- .../arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi index 25ba71da00ef..549c46202619 100644 --- a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi +++ b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi @@ -5,6 +5,7 @@ #include "qcom-ipq8064-smb208.dtsi" #include +#include #include / { @@ -30,6 +31,28 @@ }; }; + keys { + compatible = "gpio-keys"; + pinctrl-0 = <&button_pins>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + wakeup-source; + }; + + dev { + label = "dev"; + gpios = <&qcom_pinmux 15 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + wakeup-source; + }; + }; + mdio: mdio { compatible = "virtual,mdio-gpio"; #address-cells = <1>; @@ -227,12 +250,17 @@ pins = "gpio17"; output-low; }; + }; + + button_pins: button_pins { recovery { pins = "gpio16"; + function = "gpio"; bias-none; }; developer { pins = "gpio15"; + function = "gpio"; bias-none; }; };