From patchwork Tue Nov 24 15:06:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_Gonz=C3=A1lez_Cabanelas?= X-Patchwork-Id: 1405605 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.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=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=ummtBygD; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=m4JIU98H; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4CgSCn4fZvz9sSs for ; Wed, 25 Nov 2020 02:11:33 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; 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:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=EGC7/Tx9qPpi90sSj4s/ydQFZOzoAC8Ok8J5IjfwoqY=; b=ummtBygDFLdZecSowZnoe6Pq5A KLkrbKbe85SjN7AdLVhxLQDRSuUOs1LGgx9knAnJ8xNqqwvyT2GQr3+QCXbch8rXRsiXFmbjtpivD Zb7r6SS21oo7tmbikgHDEi57tcIrMkA8HBxHoiZCebGseLbmnYLMXQ1HyEuOxruzd1d7xskNhAXl6 E8MsezwBk5f1YI63I4X9QpOBrpmGzUqo+qi1Gs22Xi4BPtDzVk7EwMc+SLxTh7fWBCG/khJycDrET FjgBak1BppUrUNVxQfj9ANkMtfCK44WIoDyi8/0WY7QCzzy/V8k2c71HWY0xLzrfKwZ2rDNRW9p7i a7oc5FvA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khZwo-000071-No; Tue, 24 Nov 2020 15:09:38 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khZwl-00005m-KQ for openwrt-devel@lists.openwrt.org; Tue, 24 Nov 2020 15:09:36 +0000 Received: by mail-wr1-x42e.google.com with SMTP id p8so22677195wrx.5 for ; Tue, 24 Nov 2020 07:09:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=jdPzp9rFqWZJHfpRZPWhTDiLL85fRaNzsAUlMZDKzUE=; b=m4JIU98HjprpX3J4bHrC5ir+9wsVEy5lfl1kGQcpw+c34Cw4JtfNiOBR4XH2u2fToN 8dSe1lWWequohefx9Zc2Rxy4o+a/mqgJ50Awf/skeKt/95OGtwdLZy0MQ/+EAOK8Btm5 gq/4PnmyEat70Igf4MaumL9Mb15aJvQIDF3ugQX1W8oXB3pPqVi+NrcSJE72r3pY4O63 5jZXkfGb3UY1RMsDoAYD6jq59WZ2V07f8/lTClOg/gKJ2rRnCeJ92C8qGlxdpbfOlDTY GMdVhHfT9WeKeyinmIllxBcy8FEVXLe88dZrvGkFtXxlBaj/uEoMiFtW6KkOrV6BbWtl uF0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=jdPzp9rFqWZJHfpRZPWhTDiLL85fRaNzsAUlMZDKzUE=; b=Lfd9od3zFRIDCNxvOO6oUJYriHQu3HxdGKai9WgrgSHuDLdY5fQvoTFW0TElTCrd12 S7r8B94cwxbPWlXjqfkUVelynJLZfAc0UTYq0fQJ6U70i4gA5ffSoShdr4bAFWnBwFBu b2xef1BQIQ8LEzj73HqKKnJLhYEZ6Dm6cxiLLPcSImQ6La1N2jxQzpiiaPQB3PHhItRZ ZZkFN+FYPrkEqU/YAV2tMxX3BIT5ObUG4rCE29FAm8SA+W8VcP6y0V/jj6iPssuL/biK 3Iao4ukHnwhJDR65hMxWB6g5IfdWKTMGU6BfSXg1oA+vpTiEcYIviXTOl3X5SlZjqC0w BwfQ== X-Gm-Message-State: AOAM531RxZjR325c5o/WZHHLZzBuCPqYuyQqmG8aI8yE1nkp61QIlaxd GlrPh4Fl/Br/ns5gvV+AUOwmK7n8L4k= X-Google-Smtp-Source: ABdhPJyzKUvXyQqy3w+FZAtD8QQ6UCvH/FjprMGwpNTbymKiUhf+muEQ7j4A9iUcNHgZrYBWTTMrrQ== X-Received: by 2002:a05:6000:143:: with SMTP id r3mr5808253wrx.331.1606230571921; Tue, 24 Nov 2020 07:09:31 -0800 (PST) Received: from tool.localnet ([213.177.199.100]) by smtp.gmail.com with ESMTPSA id d3sm25766512wre.91.2020.11.24.07.09.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 07:09:31 -0800 (PST) From: Daniel =?iso-8859-1?q?Gonz=E1lez?= Cabanelas To: openwrt-devel@lists.openwrt.org Subject: [PATCH 2/2] mvebu: LS421DE: use the RTC as a wakeup source Date: Tue, 24 Nov 2020 16:06:52 +0100 Message-ID: <6133600.ifz057I5f4@tool> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201124_100935_740615_037E7C31 X-CRM114-Status: GOOD ( 12.61 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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 [2a00:1450:4864:20:0:0:0:42e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [dgcbueu[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 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 The Buffalo Linkstation LS421DE comes with a Ricoh RS5C372A real time clock. This RTC has the INTRA pin connected to the power management circuit, allowing to wake up the device from the power off state when an alarm is scheduled. Add the "wakeup-source" property in the RTC dts node to allow the use of the alarm. Example of use, the device is powered off and it comes to life after 5 minutes: echo $(expr $(date '+%s') + 60 * 5) > /sys/class/rtc/rtc0/wakealarm poweroff This feature isn't available in the stock firmware. Signed-off-by: Daniel González Cabanelas --- .../mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts index e804665792..b63d84379b 100644 --- a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts +++ b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts @@ -226,6 +226,7 @@ rs5c372a: rs5c372a@32 { compatible = "ricoh,rs5c372a"; reg = <0x32>; + wakeup-source; }; };