From patchwork Mon Sep 21 04:14:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Boichat X-Patchwork-Id: 11788301 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CD16E112E for ; Mon, 21 Sep 2020 04:16:45 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 935C220866 for ; Mon, 21 Sep 2020 04:16:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CsBV8EG4"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Ax8vlAeB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 935C220866 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=mxEPQ+MwrOkth4+20+m/G1xMFZU2JFwyN6p0jCRuzn8=; b=CsBV8EG4UDKfhaDL7t6WTei1bJ o8nKPR9ChoA5RxJBHcDlHb3MJxN8hHhPBfbmsr9ZDq8jZ0BbJ3885yOg1yaF4rln/s05NbgbC/tAO V5edHzq1Sme6MNcyfmjnqelvPrW90IQbiisWUVnJM0ypsXY3+jkJ5qR2RXAgIV2HzBe3YkGeO0TUd yWO9GuZxxQXWhjqIGavI4OWfn4nIDwnGofeNTbYqS7O/yDyb77Bzkadea0qmLoLuqCau+6fuTzK1I RoFGSoyLmax2xi65xAiZmgCqee4Ih/pfxaRu3PNqa2EZJty7wfnkKmzZLZWdXy9f9JKHesfyVXPdy 80oDqnLA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKDDw-00071Y-5V; Mon, 21 Sep 2020 04:14:44 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKDDt-00070O-Au for linux-arm-kernel@lists.infradead.org; Mon, 21 Sep 2020 04:14:42 +0000 Received: by mail-pg1-x541.google.com with SMTP id k14so7890584pgi.9 for ; Sun, 20 Sep 2020 21:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=v7829AfRT6LvbLjz9XeDro4FUjlC8JvfoISGdbWocU0=; b=Ax8vlAeB60K7VxwqjgTm+4y+YjZoqTXAE/+iKq0Gl6phrxj06l4z/57g70tDMdKRnt P6f8T6MarPu6KuZv6/zdMpnalFdkdizCNkyMPmLLnYT6jLPMZnFtTsG9+Rsfez/TE70I xa/ooqfmxB0pDSrrcWDkVI8TmbOoiYZAg5l74= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=v7829AfRT6LvbLjz9XeDro4FUjlC8JvfoISGdbWocU0=; b=DGJL0OSTwvld/JI/U8umc1UqcE+gBKS/8sPX7K6SsEKAQnLXMiPMS1seqScP5PVwrC SqoP1x7QBNLrkvUNa/c2PvEu/9Cq4Q9umKhfvF8dniyHGRcc+HV6hVFeqD556ZHS+Smu fBBgihgpTkZaeHM1lXQxmU2UIWW8QDhCSxSWFCvmTqSdqKWs6kcRuxixLlaOOAWwIpi0 so/IhZhaCrV+VWTX4EsWyy7XjP1MJyyEFqVZ5pvyE1rFrAXCEAvIvWc9TNxrwRXPVfdm TiwexgKe2TViQyAz6mGzyh954TMwvSHe83AVnWrFekozwrcw5H8OZG9RNuaeWNWzi7UU PQbg== X-Gm-Message-State: AOAM5335qjJPp2CQ46BPTsxErSxu8W/wc3gXcUSE+WWTz6Z1gxLTYC5c RDGwoY0TiLWXfWBjdpqZeDCJMg== X-Google-Smtp-Source: ABdhPJxF2RiligLadfSfXIzQiHaHina12UJBS42E0zRZ9Ka91X39OXKvsPKp2DU/FWZ/lS6FAXuDog== X-Received: by 2002:a63:6782:: with SMTP id b124mr37636930pgc.308.1600661676013; Sun, 20 Sep 2020 21:14:36 -0700 (PDT) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:7220:84ff:fe09:41dc]) by smtp.gmail.com with ESMTPSA id m13sm10439167pfk.103.2020.09.20.21.14.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Sep 2020 21:14:35 -0700 (PDT) From: Nicolas Boichat To: Matthias Brugger Subject: [RFC PATCH] arm64: dts: mt8183: Add arm,no-tick-in-suspend Date: Mon, 21 Sep 2020 12:14:24 +0800 Message-Id: <20200921121420.RFC.1.I30d6887e950575eb1fd92ee56ab5d50ff64c97f3@changeid> X-Mailer: git-send-email 2.28.0.681.g6f77f65b4e-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200921_001441_391830_BF23B638 X-CRM114-Status: GOOD ( 16.30 ) X-Spam-Score: -1.7 (-) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-1.7 points) 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:541 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.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_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.5 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Feng Tang , Nicolas Boichat , Stephen Boyd , linux-kernel@vger.kernel.org, Rob Herring , John Stultz , linux-mediatek@lists.infradead.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The armv8-timer on MT8183 (kukui family) actually ticks in suspend, but its precision is so low (measured 400+ ppm -- 35 seconds/day) that it's actually better to use a fallback option (RTC). Signed-off-by: Nicolas Boichat --- We asked MTK if there is anything that can be done to make the archtimer more precise in suspend, but that does not seem to be possible. Ideally we'd like a arm,tick-in-suspend-but-use-something-else-if-possible property, but the rating in [1] cannot be used, as the RTC fallback is handled separately [2]. I don't know if this kind of issues happened in the past, one possible compromise is to add the option to kukui board only, since we _know_ there is an RTC there (which, technically, may not be the case on every single MT8183 platform). A more complete solution would involved quite a bit of refactoring in the timekeeping/rtc framework. [1] https://elixir.bootlin.com/linux/v5.8/source/kernel/time/clocksource.c#L486 [2] https://elixir.bootlin.com/linux/v5.8/source/kernel/time/timekeeping.c#L1693 arch/arm64/boot/dts/mediatek/mt8183.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index f9b60e3d085c..ebcb2309017d 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -219,6 +219,7 @@ timer { , , ; + arm,no-tick-in-suspend; }; soc {