From patchwork Sun Aug 11 20:40:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Cieslakiewicz X-Patchwork-Id: 1145390 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=wp.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qRiMa3D1"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=wp.pl header.i=@wp.pl header.b="XTbv6xo6"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 466B6Y73YHz9sDQ for ; Mon, 12 Aug 2019 06:54:13 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-ID:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YYKz7HwrasHm/Jm0B1cELcZjh4tzzu/uAIc86NQDAkY=; b=qRiMa3D1CMBnwV KaqNW6ppgAL3ziX9ba3TMhDBd5PCBgI885zrXMLJqv1pRSJVJKCgsT+w6F+/c7k6htop73nMOJNsX RzyGuvHUJHoAinbJVK4RmCCBBP45ejxKaqSqFKFeorFD4WQ9fZeMc6Lxop8EjnZg9eb9l6yw+dlE/ 5pUUJGCN+avuid5SlouiAl/WKXU1rzzIYzIiM418/UayH7gmc/HPihXmZ/DEwHAkpLFqFnNt3Pxsd UlrZiPwjhem7MAz44C4vysZJb1wU7MCBAngpxjrAupwbg/JaX1tGr/KYcjk/7iVhx4UzqMfD7xNJI BmLJdwRil/Pb/OC1KFtg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hwuqx-0000Gb-PM; Sun, 11 Aug 2019 20:54:11 +0000 Received: from mx4.wp.pl ([212.77.101.11]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hwuqH-0007Wg-B8 for openwrt-devel@lists.openwrt.org; Sun, 11 Aug 2019 20:53:30 +0000 Received: (wp-smtpd smtp.wp.pl 35071 invoked from network); 11 Aug 2019 22:53:27 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1565556807; bh=FDUbme/j1pUwteODZ1eL5ScI5wAq5BruuqqokIAOVDI=; h=From:To:Cc:Subject; b=XTbv6xo6dPcMEzBR7LwsMjee1yaaBJ7w3MleiCfNFBMCLSOCYX97druqf6tdwhKlK HFWqhIPpKlrLerVCv2v7yh6gf4HSoI1SJpELsV5LDFP5+julVjn9/zNwqFz6dEmCw1 QJQHjcQGxi+vo+qtOW+R0yVG3qVu3YqxsXGauZ9M= Received: from 89-79-49-72.dynamic.chello.pl (HELO kosmio.komorska) (michal.cieslakiewicz@wp.pl@[89.79.49.72]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 11 Aug 2019 22:53:27 +0200 Date: Sun, 11 Aug 2019 22:40:40 +0200 From: Michal Cieslakiewicz To: "openwrt-devel@lists.openwrt.org" Message-ID: <20190811224040.7171c4a6@kosmio.komorska> In-Reply-To: <20190811223921.572cda5b@kosmio.komorska> References: <20190811223921.572cda5b@kosmio.komorska> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-slackware-linux-gnu) MIME-Version: 1.0 X-WP-MailID: 5f57841fbcc62899facb953427119cb5 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 000000A [IQMU] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190811_135329_569988_048B25DF X-CRM114-Status: UNSURE ( 8.12 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.77.101.11 listed in list.dnswl.org] -0.0 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 (michal.cieslakiewicz[at]wp.pl) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_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 Subject: [OpenWrt-Devel] [PATCH v3 1/5] ath79: add LAN LEDs control bits for AR724x GPIO function pinmux X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Currently AR724x pinmux for register 0x18040028 controls only JTAG disable bit. This patch adds new DTS settings to control LAN LEDs and CLKs that allow full software control over these diodes - exactly the same is done by ar71xx target in device setup phase for many routers (WNR2000v3 for example). 'switch_led_disable_pins' clears AR724X_GPIO_FUNC_ETH_SWITCH_LED[0-4]_EN bits. 'clks_disable_pins' clears AR724X_GPIO_FUNC_CLK_OBS[1-5]_EN and AR724X_GPIO_FUNC_GE0_MII_CLK_EN bits. These all should be used together, along with 'jtag_disable_pins', to allow OS to control all GPIO-connected LEDs and buttons on device. Signed-off-by: Michal Cieslakiewicz --- target/linux/ath79/dts/ar724x.dtsi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/linux/ath79/dts/ar724x.dtsi b/target/linux/ath79/dts/ar724x.dtsi index b2844bf179..95832d998a 100644 --- a/target/linux/ath79/dts/ar724x.dtsi +++ b/target/linux/ath79/dts/ar724x.dtsi @@ -75,7 +75,15 @@ #pinctrl-cells = <2>; jtag_disable_pins: pinmux_jtag_disable_pins { - pinctrl-single,bits = <0x0 0x1 0x1>; + pinctrl-single,bits = <0x0 0x1 0x1>; + }; + + switch_led_disable_pins: pinmux_switch_led_disable_pins { + pinctrl-single,bits = <0x0 0x0 0xf8>; + }; + + clks_disable_pins: pinmux_clks_disable_pins { + pinctrl-single,bits = <0x0 0x0 0x81f00>; }; };