Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2931652pxb; Mon, 16 Nov 2020 00:39:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPr7SiT8gJbl1jffu5T0LoN2z6oEs+juFns+8Kv1gblRXPazYoKLAqpLpYm/vos2lCBq1H X-Received: by 2002:a17:906:f744:: with SMTP id jp4mr14106559ejb.122.1605515943318; Mon, 16 Nov 2020 00:39:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605515943; cv=none; d=google.com; s=arc-20160816; b=s/RCCP/yCgfEoOO3rgnDlRbXnA3EEYiGyCdDQb6NvM/2QIhOFCh5y81mpv6p6uehVs UAOEsEBr1fTzdAqSkbTQI+Gl3IyXlEemLL23WJQG69A/TSo/8kSVuWz2uBfrWO937eFM yqI6NA3Jlk5VaZ/K6Q0raiCPeRVGihPKP+Mq4radJuiTWtE0UeK9W8qq83kkuR3CMthJ SIj9fFRgU/Pol2JmkDPMWuvZJPoW4VcPDa/oQBH0Vy3phrISviS0o2niqMZiqyX/iNUD yQupFjMJpsVHIv5FBd5tGqFxsIpsGHzOmuEdh1uGOGLZQAec5hfqOaNQt+sncl1IOg64 RuGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :autocrypt:from:references:cc:to:subject:dkim-signature; bh=4EG4aCcIJxzY9+5Wm6px9/vBxPVbMMJi/JSK5pdZ4+k=; b=F0NBd44km1Jk3FG5vJpB4s9jTrbr1nG2BmsaIB30Y8gk9Q1O3ivl4t1cqiOGDWHAgG GkJaJjQOyacm782b/rxYsgwe7kZJs7KYnA+Uul7nz6+tIHx6kQR4JVT80xUijIsJ7Rli zaiMQdB1W5SroFBqKU/0YBUn0kDr3O5+h0qkFoa7eEMkq10bjrlug4GZBp016wLAWwL8 aL7tLj64AcHncLJddNhYyFspne/B4Um3J4gFeQ953p0ygE6uSTgXgd5OGg3Hic+UPy2H Kx6MzDZ4u1cpxaMhMpi5dytHoMvg32Spd15adntZU59ixz6MogSDo59GcJKzx7TbTkRq G7oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=iylfEb6Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q1si9347887edr.229.2020.11.16.00.38.40; Mon, 16 Nov 2020 00:39:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=iylfEb6Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727916AbgKPIgM (ORCPT + 99 others); Mon, 16 Nov 2020 03:36:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727895AbgKPIgL (ORCPT ); Mon, 16 Nov 2020 03:36:11 -0500 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52BF9C0613D1 for ; Mon, 16 Nov 2020 00:36:11 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id s8so17682311wrw.10 for ; Mon, 16 Nov 2020 00:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:autocrypt:organization:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4EG4aCcIJxzY9+5Wm6px9/vBxPVbMMJi/JSK5pdZ4+k=; b=iylfEb6YBFN4jnlgbKtaUSV/gnmc2cbkl3Qe2ftxdBLHXKBNUr8j0SHNcaEdnzK17D BR9Aeod28MU6BPwDoWqcAt2syWIqUd6hq4pXArHNDUoorVCFqLCRuytEp98uz5EwUYUQ Z6GjlVVpW7YZLjmPleNe+WbLh1fXkU0/qdGHcCbeZsP+TRnT61wtq6l5EDRC8AOcLSjn HoVg0v+vaTtYH1Y34icVeuci7IyjbLNbmADBiW3/nt5yXinhBgehcZ0bVdOK3sT7phZg hg6SLDtmN52P5I22LxVf6aGNxSN8yauipNusAH9zQsj3MTTWmt6ffAY+ViO36TuGzThU lJRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=4EG4aCcIJxzY9+5Wm6px9/vBxPVbMMJi/JSK5pdZ4+k=; b=HzYCiu2yrIxTmFIbPM0hWeq8e1vAxz9Oyb4niTgLu8aNjLKUQvA3qiG5tDzOU1+1II RENNSlzx/y0tfZJRIZpvIWxP0qh6Wni6kDfE2FtRBOAmtbq70Sp1qePdlLSr2qQX/X3N 0gBQ6EehgpuF1WWVITFgeYoIyyWIUAzyhTabiix5/K8DNt5J7v0fRnmcS5ReT8E6uYzc 2XdM0Noc0FHM2CrM6WheX0gathkkMH5Ips0Q8PSkCYumxpj6BRuxrP8npqCk7oyQvtz2 IykbLbSmQGZ3Wm6uL7jHgPD7Gi1+HCX1zrSV1fRnEjAMfn0byF3aOTTFiF7M9ZOLxINi JtQg== X-Gm-Message-State: AOAM531V5hA+gaS54D409n2zXCp1wMMQvOYDLrDoaK3PGH1SEBLdfDtf sR+U76RyQg2tneihg6B8OvXwnA== X-Received: by 2002:a5d:5146:: with SMTP id u6mr18793500wrt.66.1605515769916; Mon, 16 Nov 2020 00:36:09 -0800 (PST) Received: from ?IPv6:2a01:e35:2ec0:82b0:edb9:72a:9e35:6eb? ([2a01:e35:2ec0:82b0:edb9:72a:9e35:6eb]) by smtp.gmail.com with ESMTPSA id z6sm18297622wmi.1.2020.11.16.00.36.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Nov 2020 00:36:08 -0800 (PST) Subject: Re: [PATCH] arm64: dts: meson: enable rtc node on Khadas VIM1/VIM2 boards To: Christian Hewitt , Rob Herring , Mark Rutland , Kevin Hilman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Artem Lapkin References: <20201116064147.12062-1-christianshewitt@gmail.com> From: Neil Armstrong Autocrypt: addr=narmstrong@baylibre.com; prefer-encrypt=mutual; keydata= mQENBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAG0KE5laWwgQXJtc3Ryb25nIDxuYXJtc3Ryb25nQGJheWxpYnJlLmNvbT6JATsEEwEKACUC GyMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheABQJXDO2CAhkBAAoJEBaat7Gkz/iubGIH/iyk RqvgB62oKOFlgOTYCMkYpm2aAOZZLf6VKHKc7DoVwuUkjHfI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dRGgMK0cZB3Xfe6sOp24PQTHAKGtjTHNP/THomkH24Fum9K3iM /4Wh4V2eqGEgpdeSp5K+LdaNyNgaqzMOtt4HYk86LYLSHfFXywdlbGrY9+TqiJ+ZVW4trmui NIJCOku8SYansq34QzYM0x3UFRwff+45zNBEVzctSnremg1mVgrzOfXU8rt+4N1b2MxorPF8 619aCwVP7U16qNSBaqiAJr4e5SNEnoAq18+1Gp8QsFG0ARY8xp+qaKBByWES7lRi3QbqAKZf yOHS6gmYo9gBmuAhc65/VtHMJtxwjpUeN4Bcs9HUpDMDVHdfeRa73wM+wY5potfQ5zkSp0Jp bxnv/cRBH6+c43stTffprd//4Hgz+nJcCgZKtCYIAPkUxABC85ID2CidzbraErVACmRoizhT KR2OiqSLW2x4xdmSiFNcIWkWJB6Qdri0Fzs2dHe8etD1HYaht1ZhZ810s7QOL7JwypO8dscN KTEkyoTGn6cWj0CX+PeP4xp8AR8ot4d0BhtUY34UPzjE1/xyrQFAdnLd0PP4wXxdIUuRs0+n WLY9Aou/vC1LAdlaGsoTVzJ2gX4fkKQIWhX0WVk41BSFeDKQ3RQ2pnuzwedLO94Bf6X0G48O VsbXrP9BZ6snXyHfebPnno/te5XRqZTL9aJOytB/1iUna+1MAwBxGFPvqeEUUyT+gx1l3Acl ZaTUOEkgIor5losDrePdPgE= Organization: Baylibre Message-ID: <9e790744-c966-0ed6-349e-b1e0013f5193@baylibre.com> Date: Mon, 16 Nov 2020 09:36:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201116064147.12062-1-christianshewitt@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/11/2020 07:41, Christian Hewitt wrote: > Enable the rtc node on VIM1/VIM2 boards so users can simply attach a power > cell and use the on-board RTC without modifying the device-tree. > > Cold boot with no cell attached is gracefully handled: > > VIM2:~ # dmesg | grep rtc > [ 7.716150] rtc-hym8563 1-0051: no valid clock/calendar values available > [ 7.716957] rtc-hym8563 1-0051: registered as rtc0 > [ 7.729850] rtc-hym8563 1-0051: no valid clock/calendar values available > [ 7.729877] rtc-hym8563 1-0051: hctosys: unable to read the hardware clock > [ 8.126768] rtc-hym8563 1-0051: no valid clock/calendar values available > > Warm boot (and any boot with cell attached) recalls stored values resulting > in consistently faster (re)boot times: > > VIM2:~ # dmesg | grep rtc > [ 7.441671] rtc-hym8563 1-0051: registered as rtc0 > [ 7.442663] rtc-hym8563 1-0051: setting system clock to 2020-11-16T05:49:59 UTC (1605505799) > > Suggested-by: Artem Lapkin > Signed-off-by: Christian Hewitt > --- > > This supersedes other recent attempts by Art to make the same change [0] > and [1] which were rejected for lack of justification for the change and > leaving comments behind. I have been using the same changes in my own > tree for a while. > > Christian > > [0] https://patchwork.kernel.org/project/linux-amlogic/patch/20200925033017.1790973-8-art@khadas.com/ > [1] https://patchwork.kernel.org/project/linux-amlogic/patch/20200925033017.1790973-9-art@khadas.com/ > > arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 3 +-- > arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 3 +-- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts > index 8bcdffdf55d0..638a5992d760 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts > +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts > @@ -97,8 +97,7 @@ > pinctrl-names = "default"; > > rtc: rtc@51 { > - /* has to be enabled manually when a battery is connected: */ > - status = "disabled"; > + status = "okay"; > compatible = "haoyu,hym8563"; > reg = <0x51>; > #clock-cells = <0>; > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts > index bff8ec2c1c70..da000c10b945 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts > +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts > @@ -228,8 +228,7 @@ > pinctrl-names = "default"; > > rtc: rtc@51 { > - /* has to be enabled manually when a battery is connected: */ > - status = "disabled"; > + status = "okay"; > compatible = "haoyu,hym8563"; > reg = <0x51>; > #clock-cells = <0>; > Reviewed-by: Neil Armstrong