Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1230631pxy; Sun, 1 Aug 2021 17:41:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2LC721fheYkzekec/YWiz3Vi/ueIbFOqmG4XjMOu53laSNDj2q6TNLblYxHA3HQpQw7tG X-Received: by 2002:a92:c524:: with SMTP id m4mr2088099ili.42.1627864899468; Sun, 01 Aug 2021 17:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627864899; cv=none; d=google.com; s=arc-20160816; b=ptzZcHVllrF6WoW7YFFbqqaEaF1Essy7Ek4O0eyh6ByvKUQqypJSIdkAgPEak2VBxG yE9Me45/HQCJmkBBHxg2oDEL9ByOEOriSfTudyhAb1e7kCEVp5yVpYa0wx10G+k+eOpP uGtp14O1kbdlYIm5OCXDKTXOybbDwTIU3qXNVaVZBGKu0NEdneDoZ4gx7JEybzIjRo5p 4DP480ppmhjB9lUASwBg1qm0kYNEJhudUgm1wa8VdQ2EmmuZipiosfRbwiVvIG4D2hkU /NGUCgns0deHk4kNBbiiibjclh/BXlFnszz0mFZYyhLwmckkkIL2PFMOZ/EUl6+ljr1I /hUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=2533j0GhpTmiq4CdWF+zE8qm+cAb4QczFBvFc9sOBto=; b=RBkRCQWPLaip0Z1hwTwDkQGsBZmho3wwxv4sWYUG8ppbFNITxUr4jPqWniC6npFHDp OArYk9spIbev+d1sxPX18x3n9NIhr4AB6L1YKurx6wr14qFYuVsYhUR2rKrH4x7VMlI6 4lJMmaLisWHGjkqSftkll6iKb9y/fp1RkU8W66smbfUphZgxs9gEOrjSVi7DxBMO52/1 golNm6+SNXzhdLIUwYNTcfq1qz9Sevenxx7ASXWpdYUKZyk8klBn3RbQ6Yz0omIXp9it UgIMTYLOvG5k4EBn3kshhACNnL/A9V+o7jev1eLePjA5i+EBWLc0kV76+H8dIzYGXvQj 2SqA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t11si11686513ilu.68.2021.08.01.17.41.28; Sun, 01 Aug 2021 17:41:39 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231928AbhHBAkc (ORCPT + 99 others); Sun, 1 Aug 2021 20:40:32 -0400 Received: from foss.arm.com ([217.140.110.172]:57046 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231361AbhHBAkb (ORCPT ); Sun, 1 Aug 2021 20:40:31 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EEDE3D6E; Sun, 1 Aug 2021 17:40:22 -0700 (PDT) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CB5A03F66F; Sun, 1 Aug 2021 17:40:20 -0700 (PDT) Date: Mon, 2 Aug 2021 01:39:38 +0100 From: Andre Przywara To: Maxime Ripard Cc: Chen-Yu Tsai , Jernej Skrabec , Rob Herring , Icenowy Zheng , Samuel Holland , linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Ondrej Jirman , devicetree@vger.kernel.org, Alessandro Zummo , Alexandre Belloni , linux-rtc@vger.kernel.org Subject: Re: [PATCH v8 02/11] dt-bindings: rtc: sun6i: Add H616 compatible string Message-ID: <20210802013938.29fa18ed@slackpad.fritz.box> In-Reply-To: <20210726144137.6dauuxdssu7yszox@gilmour> References: <20210723153838.6785-1-andre.przywara@arm.com> <20210723153838.6785-3-andre.przywara@arm.com> <20210726144137.6dauuxdssu7yszox@gilmour> Organization: Arm Ltd. X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Jul 2021 16:41:37 +0200 Maxime Ripard wrote: > Hi, > > On Fri, Jul 23, 2021 at 04:38:29PM +0100, Andre Przywara wrote: > > Add the obvious compatible name to the existing RTC binding. > > The actual RTC part of the device uses a different day/month/year > > storage scheme, so it's not compatible with the previous devices. > > Also the clock part is quite different, as there is no external 32K LOSC > > oscillator input. > > > > Signed-off-by: Andre Przywara > > > > --- > > .../bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 14 ++++++++++++++ > > 1 file changed, 14 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml > > index beeb90e55727..d8a6500e5840 100644 > > --- a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml > > +++ b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml > > @@ -26,6 +26,7 @@ properties: > > - const: allwinner,sun50i-a64-rtc > > - const: allwinner,sun8i-h3-rtc > > - const: allwinner,sun50i-h6-rtc > > + - const: allwinner,sun50i-h616-rtc > > > > reg: > > maxItems: 1 > > @@ -104,6 +105,19 @@ allOf: > > minItems: 3 > > maxItems: 3 > > > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: allwinner,sun50i-h616-rtc > > + > > + then: > > + properties: > > + clock-output-names: > > + minItems: 3 > > + maxItems: 3 > > You don't need both of them when they are equal > > > + clocks: false > > + > > It's not entirely clear to me what those clocks are about though. If we > look at the clock output in the user manual, it looks like there's only > two clocks that are actually being output: the 32k "fanout" clock and > the losc. What are the 3 you're talking about?] I see three: the raw SYSTEM "CLK32K_LOSC", the RTC input + debounce clock (/32), and the multiplexed PAD. > Also, it looks like the 32k fanout clock needs at least the hosc or > pll-periph in input, so we probably don't want to ask for no parent > clock? Well, we never seem to reference the HOSC this way, this was always somewhat explicit. And yes, there is PLL-PERIPH as an input, but we don't support this yet. So I went with 0 input clocks *for now*: the driver can then ignore all clocks, so any clock referenced in the DT later won't cause any harm. This will all be addressed by Samuel's RTC clock patch, which will also touch the H6, IIRC. And it looks like we will need to touch the binding anyway then, but can then just *extend* this. The point is that everything works(TM) as of now: The consumers (pinctrl) get their LOSC clock, and can go ahead. This is in the interest to get us moving now, and refine the actual implementation later. In this case this will only change the accuracy of the LOSC frequency (HOSC/x, PLL/y, calibrated RC), but won't change the semantics. Cheers, Andre