From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 857E770 for ; Mon, 2 Aug 2021 00:40:23 +0000 (UTC) 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) Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 autolearn=unavailable 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 311F0C4338F for ; Mon, 2 Aug 2021 00:43:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 ED43D60F8F for ; Mon, 2 Aug 2021 00:43:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org ED43D60F8F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=If0+63oAze8AF/FSxc/vvZM+mQDsabbG68O5FvHPmjY=; b=4a4otC3ioLEym5 Ra4h5gUN1ZqMKHUdxR6hIFA4mTiSFnoROFiyqjS7RHmvEatFAsPREiKBSlY0jLesqUG+2ynFg10z2 BngtnpQzqelrd99bix10un5bEGtS7pIZRT0QdWX3b+dJ6Ro6ttG8MfKYLwTj4Zh/bQr7oobun7PRy k0skVSzs2gqYlDQ+VFBUIrLtPmEfqVMHRN7jrCOSSwmlMCSagJRH0KRcJlc2r0FnWxZvO7v47Y/0K UKdtMagTnA6Xi2iPhD61UW1lvh/2RoOU4Z8h245cqqSu0uPz2UNtoFT33nlUgklPprp3YnolOW5gf wzShFmSs1LeRQI5w7wNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAM0K-00EV6W-V3; Mon, 02 Aug 2021 00:40:29 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAM0G-00EV5o-QE for linux-arm-kernel@lists.infradead.org; Mon, 02 Aug 2021 00:40:26 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210801_174025_010545_87327DCB X-CRM114-Status: GOOD ( 29.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel