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=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 A2461C432BE for ; Thu, 2 Sep 2021 15:30:26 +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 6B40061074 for ; Thu, 2 Sep 2021 15:30:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6B40061074 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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:In-Reply-To:MIME-Version:References: 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=4IWVd23OIGJW959QhMhumZuoNfd3vQkBvRIEQqQHtKg=; b=JzSoLH9/htgaQA uLAwESvZN5l6eHaU0Ddaf04zAd3+me2MrBch10Tif54lWMafmhqmiXGDtmIrI9kVH7jcaf5x0FiNg 8COtlk9r5e8zB5tjU3EG5C6K5fDLCp3o+tYpITCOe2TuzLkSxM/xeGxS7P2IJl+Zg+es45qcTB06K BnjkoBhjBrlWSMsC5j+ENP4ioBTP5zzW1HbBEBlKpSRzwJ4HdSj2IMAT5zoMf2x4DTGpv+plxMrP+ VzEEZsoN8aYUVNeA2rhCp5EaIxSs7N+XUAM2jwKkjOMt0DSIApOU6lyr3ah7K2pwFa4fTMYn/IIZ2 wM8ETkvpxak50Fep0M/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLodE-009tYq-Lu; Thu, 02 Sep 2021 15:28:00 +0000 Received: from mail-ot1-f49.google.com ([209.85.210.49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLodB-009tYH-3h for linux-arm-kernel@lists.infradead.org; Thu, 02 Sep 2021 15:27:58 +0000 Received: by mail-ot1-f49.google.com with SMTP id a20-20020a0568300b9400b0051b8ca82dfcso2987904otv.3 for ; Thu, 02 Sep 2021 08:27:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bqpAdctft+FNwBQ21zVwpW5d55hAXSJQXRl03yYe76s=; b=B/ofBxZkscXk/QSz8qJ3uu+uDO9XksmRnLBhze6YhhnVeGOIb8vU0DWfZu23HZS04q D5xHKY4F6LZKhKk9OT8hIxEITWLGBT869589j3XGX9ezJr7bH/PD5zmUY5WPb/HHNRjE h9FwokA2ApTGochBhY8dpL+9Xb4QOIKGYrGv8CRGxUJw6xSR94w4nIw431OuuK4JLH// 0aXuFiu7x9tYNTfQuhwe+vHnWIi7/SUgduy8iDaqb+k+L+m9lmd9bVUBF03RgxHJPBTG 6M9rax3WDjbYyP4hi8wiy4tXGO1os8ZPJBI40CbyCmotH6Vs6aF0hKIiHOng/1foyfoX n0/A== X-Gm-Message-State: AOAM530D8qRsz5PGmmb7uXLiMMKTaA4DYC/lhkTSFbKDhV2da5uMdS88 t/ZjrBhphkj0xwrhEzg8eQ== X-Google-Smtp-Source: ABdhPJzEwGyey7HM+GJpRspaIwtYhFX2S77YtjWMNY2eHNOIzFXRViC3QKyJRTICTcJ3y3YNpyYroQ== X-Received: by 2002:a9d:798c:: with SMTP id h12mr3067596otm.215.1630596476006; Thu, 02 Sep 2021 08:27:56 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id c7sm391314otl.30.2021.09.02.08.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 08:27:55 -0700 (PDT) Received: (nullmailer pid 950168 invoked by uid 1000); Thu, 02 Sep 2021 15:27:54 -0000 Date: Thu, 2 Sep 2021 10:27:54 -0500 From: Rob Herring To: Samuel Holland Cc: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/7] dt-bindings: rtc: sun6i: Add H616 and R329 compatibles Message-ID: References: <20210901053951.60952-1-samuel@sholland.org> <20210901053951.60952-2-samuel@sholland.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210901053951.60952-2-samuel@sholland.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210902_082757_197670_E65C2D04 X-CRM114-Status: GOOD ( 26.41 ) 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 Wed, Sep 01, 2021 at 12:39:45AM -0500, Samuel Holland wrote: > For these new SoCs, start requiring a complete list of input clocks. > > For H616, this means bus, hosc, and pll-32k. For R329, this means ahb, > bus, and hosc; and optionally ext-osc32k. > > I'm not sure how to best represent this in the binding... > > Signed-off-by: Samuel Holland > --- > .../bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 55 +++++++++++++++++-- > include/dt-bindings/clock/sun50i-rtc.h | 12 ++++ > 2 files changed, 61 insertions(+), 6 deletions(-) > create mode 100644 include/dt-bindings/clock/sun50i-rtc.h > > diff --git a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml > index beeb90e55727..3e085db1294f 100644 > --- a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml > +++ b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml > @@ -26,6 +26,8 @@ properties: > - const: allwinner,sun50i-a64-rtc > - const: allwinner,sun8i-h3-rtc > - const: allwinner,sun50i-h6-rtc > + - const: allwinner,sun50i-h616-rtc > + - const: allwinner,sun50i-r329-rtc Can you please make all the single entry cases a single 'enum'. > > reg: > maxItems: 1 > @@ -37,7 +39,24 @@ properties: > - description: RTC Alarm 1 > > clocks: > - maxItems: 1 > + minItems: 1 > + maxItems: 4 > + > + clock-names: > + minItems: 1 > + maxItems: 4 > + items: > + - anyOf: This says the first entry is any of these. What about the rest of them? > + - const: ahb > + description: AHB parent for SPI bus clock The description should go in 'clocks'. The order should be defined as well with the first clock being the one that existed previously. > + - const: bus > + description: AHB/APB bus clock for register access > + - const: ext-osc32k > + description: External 32768 Hz oscillator input > + - const: hosc > + description: 24 MHz oscillator input > + - const: pll-32k > + description: 32 kHz clock divided from a PLL > > clock-output-names: > minItems: 1 > @@ -85,6 +104,9 @@ allOf: > enum: > - allwinner,sun8i-h3-rtc > - allwinner,sun50i-h5-rtc > + - allwinner,sun50i-h6-rtc > + - allwinner,sun50i-h616-rtc > + - allwinner,sun50i-r329-rtc > > then: > properties: > @@ -96,13 +118,35 @@ allOf: > properties: > compatible: > contains: > - const: allwinner,sun50i-h6-rtc > + enum: > + - allwinner,sun50i-h616-rtc > + - allwinner,sun50i-r329-rtc > > then: > + clocks: > + minItems: 3 # bus, hosc, and (pll-32k [H616] or ahb [R329]) > + > + clock-names: > + minItems: 3 > + > + required: > + - clock-names > + > + else: > + required: > + - clock-output-names > + > + - if: > + properties: clock-names > + > + then: > + required: > + - clocks # hosc is required > + > + else: > properties: > - clock-output-names: > - minItems: 3 > - maxItems: 3 > + clocks: > + maxItems: 1 # only ext-osc32k is allowed > > - if: > properties: > @@ -127,7 +171,6 @@ required: > - compatible > - reg > - interrupts > - - clock-output-names > > additionalProperties: false > > diff --git a/include/dt-bindings/clock/sun50i-rtc.h b/include/dt-bindings/clock/sun50i-rtc.h > new file mode 100644 > index 000000000000..d45e3ff4e105 > --- /dev/null > +++ b/include/dt-bindings/clock/sun50i-rtc.h > @@ -0,0 +1,12 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ Dual license please. > + > +#ifndef _DT_BINDINGS_CLK_SUN50I_RTC_CCU_H_ > +#define _DT_BINDINGS_CLK_SUN50I_RTC_CCU_H_ > + > +#define CLK_OSC32K 0 > +#define CLK_OSC32K_FANOUT 1 > +#define CLK_IOSC 2 > + > +#define CLK_RTC_SPI 8 > + > +#endif /* _DT_BINDINGS_CLK_SUN50I_RTC_CCU_H_ */ > -- > 2.31.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel