From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C93BC0650F for ; Thu, 8 Aug 2019 05:49:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EF46D21873 for ; Thu, 8 Aug 2019 05:49:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730921AbfHHFtM convert rfc822-to-8bit (ORCPT ); Thu, 8 Aug 2019 01:49:12 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:47090 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728090AbfHHFtM (ORCPT ); Thu, 8 Aug 2019 01:49:12 -0400 Received: by mail-ed1-f67.google.com with SMTP id z51so1691724edz.13; Wed, 07 Aug 2019 22:49:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hJnMSCAXvPmR1BZ+8zibfYrH0y/pT73eVvDwjd3Lsw8=; b=k5o7R1WqxUKFT2Gpl32b2tEoxh18GEKtcRxfBXs+QQzaclP8d868GeOHKZdNmUIj8Y hlzVDNUXj7ZUkntTioJPK1ikYAW8YJKkGZmmcGgrrowKAFRw2W/vOFwInHRdI03I9tdn wqR2hUDALp8ykyI1cwIEE9iTzvndfcJesqwkZ+E4E99/y/d4orLyh3DBZMjiwO/y/Rv7 xuEqPxx/L+tMX0V5n3OC+VcYkuFCJofqtdVwhUAsQQ9GqJnXoXd7EGrvSgkxnLcSgZxU k6xmwxOqZXgmK1zDAHli571qVrLkNGsdLVr6Ayo5svDhTbLPu7h1CuX7jY8AE9tnpi5u C5og== X-Gm-Message-State: APjAAAXh0JnT5IDlhqbupmw+zqH5YraES+14Bo68Bahh8oCHDKkE88Ll cCx9eGyFliFl5TjhPcs3t2VdNzAO/00= X-Google-Smtp-Source: APXvYqxg9vJ4l1QRSKAQTdjsRPjbtcm9XCJ1t7YXpJhG1HoGUipLszFyE3bzb67r8G/bMglEGxNbsw== X-Received: by 2002:a17:906:4ed8:: with SMTP id i24mr11500568ejv.118.1565243349525; Wed, 07 Aug 2019 22:49:09 -0700 (PDT) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com. [209.85.128.54]) by smtp.gmail.com with ESMTPSA id b30sm21935944ede.88.2019.08.07.22.49.08 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 07 Aug 2019 22:49:09 -0700 (PDT) Received: by mail-wm1-f54.google.com with SMTP id 10so1079305wmp.3; Wed, 07 Aug 2019 22:49:08 -0700 (PDT) X-Received: by 2002:a05:600c:292:: with SMTP id 18mr1427274wmk.51.1565243348647; Wed, 07 Aug 2019 22:49:08 -0700 (PDT) MIME-Version: 1.0 References: <20190412120730.473-1-megous@megous.com> <20190806183045.edhm3qzpegscf2z7@core.my.home> <20190807105502.GK3600@piout.net> In-Reply-To: <20190807105502.GK3600@piout.net> From: Chen-Yu Tsai Date: Thu, 8 Aug 2019 13:48:55 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linux-sunxi] [PATCH 0/3] Add basic support for RTC on Allwinner H6 SoC To: Alexandre Belloni Cc: Mark Rutland , Alessandro Zummo , devicetree , Maxime Ripard , linux-kernel , linux-sunxi , Rob Herring , linux-arm-kernel , linux-rtc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 7, 2019 at 6:55 PM Alexandre Belloni wrote: > > Hi, > > On 06/08/2019 20:30:45+0200, Ondřej Jirman wrote: > > Maybe whether XO or DCXO is used also matters if you want to do some fine > > tunning of DCXO (control register has pletny of options), but that's probably > > better done in u-boot. And there's still no need to read HOSC source from DT. > > The driver can just check compatible, and if it is H6 and OSC_CLK_SRC_SEL is 1, > > it can do it's DCXO tunning, or whatever. But neither OS nor bootloader will > > be using this info to gate/disable the osciallator. > > > > It is actually useful to be able to tweak the crystal tuning at > runtime to be able to reduce clock drift and compare with a reliable > source (e.g. NTP). > I'm curious, what kind of options does this RTC have? It has options to set the current, trim cap value, band gap voltage, and also change the mode to just accept an external clock signal, instead of driving a crystal. The settings for the former parameters are not explained though. See page 364 of http://linux-sunxi.org/File:Allwinner_H6_V200_User_Manual_V1.1.pdf ChenYu